Analysis model: gpt-5.5 xhigh

Cabal Cracktro by The FiRM - Technical Dissection

Cabal Cracktro is a 16 November 1989 MS-DOS cracktro / unprotect loader by The FiRM. Demozoo credits High Plains Drifter for text and packaging, and Lord Blix for code/crack work.

Release year: 1989

The preserved file is not the full game and not a normal self-contained demo part. It is a 3191-byte .COM loader named CABAL.COM whose first visible job is a text-mode FiRM greeting, but whose real job is to stay resident while a renamed child program, GITUM.FRM, runs. The loader hooks BIOS INT 13h, waits for a few very specific sector-read signatures, and then writes a fixed 229-byte 46h fill block into the caller's ES segment at offset 015Dh.

That makes this much more interesting than its static screen suggests. The greeting is only XOR-obscured text. The actual crack is the resident disk hook: it fakes success or failure for selected protection reads and patches a child buffer without using the requested disk transfer offset.

The scene.org archive used here does not contain GITUM.FRM, so this analysis stops at the loader boundary. The child-side code that consumes the patched buffer is not present in the preserved ZIP.

Sources

Visuals

Time Still What is happening
00:00.000 Cabal Cracktro public Demozoo intro screen The decoded DOS 09h screen after the XOR pass: FiRM title, Cabal credit, key hints, greetings, and a key-wait prompt.
after key / child return Cabal Cracktro public Demozoo exit text The exit string printed after GITUM.FRM returns, or immediately when the child is missing in the preserved archive.

Generated loader map:

Cabal Cracktro COM loader and INT 13h map

Archive

Scene.org stores a 1254-byte ZIP:

61d851f3c3edc609c00102d3d09854e83c6d1afe17a607512da5eabb6d42b6e5  cabal_cracktro.zip

ZIP contents:

CABAL.BAT      63 bytes  1990-08-07 05:39
CABAL.COM    3191 bytes  1989-11-16 23:41

Extracted hashes:

2a9e9ae8fc8b5b8e3957f9e740d0c4b1eb1624766b5d30dc209bdf25babd5403  CABAL.BAT
57d2a17997d551b51de1680cc82fddada1879c3fc1bab6370f40670bdd3a1d25  CABAL.COM

CABAL.COM is a real flat COM image. There is no MZ header:

CABAL.COM: DOS executable (COM), start instruction 0xeb3b0a0d ...

The companion batch file shows the intended installed-game environment:

echo off
cls
cd\cabal
goslow
cabal
gofast
cd..
c:
mm

So the archive is a loader intended to be placed in a \CABAL directory. The loader itself then executes GITUM.FRM; that child file is not preserved here.

File Layout

All offsets in this section are file offsets. Runtime COM addresses are offset + 0100h.

0000..003c  entry jump plus MAMILOAD signature text
003d..008b  startup: save video mode, save/hook INT 13h, resize, print intro
008c..008e  short jump / padding
008f..009e  DOS EXEC parameter block template
009f..00dd  post-key child EXEC and cleanup path
00de..0153  resident INT 13h handler
0154..0185  IVT save/restore and patch-copy helpers
0186..0196  XOR 66h text toggle loop
0197..05fa  encoded DOS screen text, child filename, exit text
05fb..09fb  zero-filled saved-IVT area in the on-disk image
09fc..0ae0  229 bytes of 46h, copied by the INT 13h patch helper
0ae1..0c70  400 bytes of 53h tail fill
0c71..0c76  final zero padding

The first visible bytes are:

0000  eb 3b        jmp 013dh
0002  0a 0d        line break before the banner
0004  "MAMILOAD Unprotect v 1.0 - (c)1989 FiRM / by Lord Blix"
003b  0a 0d 1a

The loader brand is therefore embedded in clear text, while the actual greeting screen is hidden later behind a single-byte XOR.

Startup Path

The entry jump lands at runtime 013Dh:

013d  mov ah,0fh
013f  int 10h
0141  mov cs:[0d77h],al       ; save current video mode
0145  call 0264h              ; save 0000:0000..03ff IVT
0148  mov ax,3513h
014b  int 21h                 ; get old INT 13h vector
014d  mov cs:[0d73h],bx
0152  mov bx,es
0154  mov cs:[0d75h],bx
0159  sti
015a  mov dx,01deh
015d  mov ax,cs
015f  mov ds,ax
0161  mov ax,2513h
0164  int 21h                 ; set INT 13h = CS:01DE
0166  cli
0167  mov ax,cs
0169  mov es,ax
016b  mov bx,0200h
016e  mov ah,4ah
0170  int 21h                 ; resize own memory block
0172  mov al,cs:[0d77h]
0176  mov ah,00h
0178  int 10h                 ; restore saved video mode
017a  mov ax,cs
017c  mov ds,ax
017e  call 0286h              ; XOR-decode text block
0181  mov ah,09h
0183  mov dx,0297h
0186  int 21h                 ; print intro screen
0188  xor ax,ax
018a  int 16h                 ; wait for key
018c  jmp 019fh

There are four important details here.

  1. The loader saves the whole 1 KB interrupt vector table, not only the INT 13h vector.
  2. It then installs CS:01DEh as the BIOS disk handler.
  3. It shrinks its memory block to 0200h paragraphs before executing the child.
  4. The intro text is decoded only immediately before DOS prints it.

The INT 10h pair is not a graphics setup in the demo sense. It records the incoming mode and restores that same mode. The visible page is just text output through DOS function 09h, using CP437 box characters in the decoded string.

Interrupt Vector Save

The save helper copies the entire real-mode IVT into the loader image at runtime 06FCh:

0264  mov ax,cs
0266  mov es,ax
0268  mov di,06fch
026b  xor si,si
026d  mov ds,si
026f  mov cx,0400h
0272  rep movsb
0274  ret

The inner loop is the hardware REP MOVSB micro-loop:

while CX != 0:
    ES:DI = DS:SI
    SI += 1
    DI += 1
    CX -= 1

With DS=0000, SI=0000, ES=CS, and DI=06FCh, this copies 0000:0000..03FF into CS:06FC..0AFB.

That saved range matters later. 06FC..09FB is zero in the on-disk COM, but it becomes live IVT backup storage at runtime. Immediately after it, at runtime 0AFCh, begins the 229-byte 46h fill used by the protection patch helper.

XOR Text Toggle

The visible intro screen, child filename, and exit message are stored at runtime 0297h..06FAh with each byte XORed by 66h. The toggle routine is:

0286  mov di,0297h
0289  mov cx,0464h
028c  nop
028d  mov al,[di]
028f  xor al,66h
0291  mov [di],al
0293  inc di
0294  loop 028dh
0296  ret

The inner loop is completely linear:

for 0x464 bytes:
    byte = memory[DI]
    byte = byte xor 0x66
    memory[DI] = byte
    DI += 1

There is no compression, no checksum, and no variable key. Running the same routine twice re-encodes the block.

After decoding, the block contains three important strings:

runtime 0297h  intro screen, terminated by '$'
runtime 067Fh  "GITUM.FRM", zero-terminated child filename
runtime 0689h  exit message, terminated by '$'

That explains the two public screenshots. The first screenshot is the DOS 09h print at DX=0297h; the second is the DOS 09h print at DX=0689h.

Child EXEC Block

After the keypress, execution continues at runtime 019Fh:

019f  sti
01a0  mov ax,0d71h
01a3  mov sp,ax
01a5  cli
01a6  mov ax,cs
01a8  mov [0193h],ax
01ab  mov [0197h],ax
01ae  mov [019bh],ax
01b1  mov bx,018fh
01b4  mov dx,067fh
01b7  mov ax,4b00h
01ba  int 21h

The parameter block begins at runtime 018Fh:

018f  0000       environment segment, zero means inherit
0191  0080       command tail offset
0193  patched    command tail segment = CS
0195  005c       default FCB1 offset
0197  patched    default FCB1 segment = CS
0199  006c       default FCB2 offset
019b  patched    default FCB2 segment = CS

DX=067Fh points to the decoded child name:

GITUM.FRM\0

So the loader is not launching CABAL.EXE; it expects the game body to be renamed to the FiRM-looking sidecar name GITUM.FRM.

The loader does not test the carry flag after INT 21h / AH=4Bh. If the child is missing, DOS returns an error and the code still falls through to the normal cleanup and exit-message path. That matches the preserved archive: with only CABAL.COM and CABAL.BAT, the second public screenshot is reachable without the original game payload.

Cleanup

The cleanup path is:

01bc  call 0275h              ; restore whole IVT from CS:06FC
01bf  mov al,cs:[0d77h]
01c3  mov ah,00h
01c5  int 10h                 ; restore original video mode
01c7  mov dx,0689h
01ca  mov ah,09h
01cc  int 21h                 ; print exit string
01ce  mov ax,cs
01d0  mov es,ax
01d2  mov ah,49h
01d4  int 21h                 ; free memory block at ES
01d6  call 0286h              ; re-XOR text block
01d9  mov ax,4c00h
01dc  int 21h

The IVT restore helper is the inverse of the save helper:

0275  mov ax,cs
0277  mov ds,ax
0279  mov si,06fch
027c  xor di,di
027e  mov es,di
0280  mov cx,0400h
0283  rep movsb
0285  ret

This is heavy-handed. It restores all interrupt vectors from the pre-launch snapshot, not only INT 13h. That is acceptable for a short crack loader, but it is not polite TSR behavior.

INT 13h Handler

The resident handler starts at runtime 01DEh:

01de  push bp
01df  mov bp,sp
01e1  push si
01e2  push di
01e3  push es
01e4  push ds
01e5  push dx
01e6  push cx
01e7  push bx
01e8  push ax
01e9  jmp 01ffh

The normal pass-through exit restores the saved registers and jumps to the old BIOS disk handler:

01ec  pop ax
01ed  pop bx
01ee  pop cx
01ef  pop dx
01f0  pop ds
01f1  pop es
01f2  pop di
01f3  pop si
01f4  mov sp,bp
01f6  pop bp
01f7  jmp far [cs:0d73h]

The active decision tree begins at 01FFh:

01ff  cmp ah,02h
0202  jne 01ech              ; only BIOS read-sector calls are interesting

0204  mov ax,cs
0206  cmp [bp+04h],ax        ; caller CS from original INT stack frame
0209  jge 01ech              ; pass through higher/equal callers

020b  mov ax,es
020d  cmp ax,0f000h
0210  je 0233h               ; special success path

0212  cmp cx,27deh
0216  je 01fch               ; patch + forced error
0218  cmp cx,27f1h
021c  je 01fch               ; patch + forced error

021e  cmp cx,2707h
0222  je 0230h               ; patch + success
0224  cmp cx,2708h
0228  je 0230h               ; patch + success
022a  cmp cx,1401h
022e  jne 01ech              ; all other reads use old handler

The handler looks only at AH, the caller segment, ES, and CX. It does not inspect AL, CH, CL, DH, DL, or BX as a full disk-address tuple. CX is treated as a compact signature for a few protected reads. For BIOS AH=02h, CX normally carries cylinder/sector bits, but this handler is not a general disk emulator. It recognizes exactly five CX values and ignores the rest.

The caller-segment check is also deliberate. With a normal DOS INT, [BP+4] is the saved caller CS. The hook only handles calls whose saved caller segment compares below the loader's segment; higher or equal callers are passed to the old handler. This keeps the loader from recursively modifying its own service calls and probably targets DOS/BIOS-mediated disk reads below the resident COM block.

Returning Fake Flags

The handler does not use POPF. It edits the flags byte already sitting in the original interrupt frame. For the success path:

0230  call 0254h             ; optional, not used by ES=F000h branch
0233  clc
0234  lahf
0235  mov [bp+06h],ah        ; overwrite low flags byte in saved frame
0238  pop ax
0239  xor ax,ax              ; return AX=0000
023b  pop bx
023c  pop cx
023d  pop dx
023e  pop ds
023f  pop es
0240  pop di
0241  pop si
0242  mov sp,bp
0244  pop bp
0245  iret

LAHF copies status flags into AH; by storing that byte at [BP+06h], the handler changes the flags that IRET will restore. With CLC first, the caller sees carry clear and AX=0000h, i.e. a successful BIOS read.

The forced-error path is almost identical:

01fc  jmp 0246h

0246  call 0254h
0249  stc
024a  lahf
024b  mov [bp+06h],ah        ; saved flags get carry set
024e  pop ax
024f  mov ax,1010h
0252  jmp 023bh

For CX=27DEh and CX=27F1h, the caller sees carry set and AX=1010h. For CX=2707h, CX=2708h, and CX=1401h, the caller sees carry clear and AX=0000h.

That is the crack logic in miniature: the loader can make selected protection reads look good or bad without invoking the old BIOS handler.

Patch Copy Helper

The patch helper at runtime 0254h is short:

0254  mov di,015dh
0257  mov ax,cs
0259  mov ds,ax
025b  mov si,0afch
025e  mov cx,00e5h
0261  rep movsb
0263  ret

It intentionally does not load ES. The target segment is inherited from the interrupted BIOS call. It also ignores the BIOS transfer offset BX and writes to fixed offset 015Dh instead.

The source range is:

runtime 0AFCh..0BE0h
file    09FCh..0AE0h
length  00E5h = 229 bytes
value   every byte is 46h

So the copy loop is:

for 229 bytes:
    ES:DI = 0x46
    DI += 1

Because SI points into a flat run of 46h, this is equivalent to a memset(ES:015D, 46h, 229), implemented with REP MOVSB. The 400-byte run of 53h after it is not copied by this helper:

file 09fc..0ae0  229 bytes of 46h
file 0ae1..0c70  400 bytes of 53h

The fact that the handler writes to ES:015Dh rather than ES:BX is the strongest clue that this is patching a known in-memory structure or code window, not simply fabricating a disk sector in the ordinary BIOS sense.

The Decoded Screen Data

The first decoded DOS string starts at runtime 0297h. Its high-level layout is:

top line:      The FiRM title
box line:      CABAL / CAPCOM
credit:        cracked by Lord Blix
thanks box:    special thanks to named sysops
key row:       Z / X / Space / Q game controls
greetings:     names and Turbo Pascal joke
prompt:        [ Press any key to continue ]
terminator:    '$'

The same decoded range also contains:

GITUM.FRM\0
Thanks for using this Quality FiRM Crack!
FiRM - Creative Cracking at it's best. (We do the difficult ones...)

No rendering loop exists for the intro screen. The loader relies on DOS text output. The only "visual" loop is therefore the XOR toggler; the CP437 frame, arrows, shaded blocks, and line breaks are all literal decoded bytes.

Execution Timeline

00:00.000  COM entry jumps over the clear MAMILOAD banner.
00:00.000  Current video mode is saved.
00:00.000  The complete IVT is copied to CS:06FC.
00:00.000  Old INT 13h vector is saved; CS:01DE is installed.
00:00.000  Text block 0297h..06FAh is XOR-decoded with key 66h.
00:00.000  DOS AH=09h prints the visible Cabal FiRM screen.
key press  Stack/EXEC block are prepared; child filename is GITUM.FRM.
child run  INT 13h hook patches/fakes selected AH=02h reads.
return     IVT is restored wholesale from CS:06FC.
return     Exit string at 0689h is printed.
return     Text block is XORed again and the loader exits to DOS.

The public screenshots show the beginning and end of this sequence. The middle depends on the missing GITUM.FRM child.

Why This Is Not Just A Text Intro

If you stop at the public frame, this looks like a static cracktro with a keyboard wait. The binary shows a different purpose:

The text page is the announcement layer. The unprotect logic is the INT 13h state machine plus the ES:015Dh patch copy.