DOOM - Tutorial: Cracken von Commandos (German)


Spiel: 		Commandos (German) V1.0
Beschreibung:	Absolut cooles Strategie-Game
Schutz:		Illegal TOC (Oversize), CD-Abfrage, Entschrft 
Autor: 		(C) 1998 Pyro Studios (Vertrieb : EIDOS)
Gre:		2.469.376 Bytes (Comandos.exe)

Werkzeuge: - W32DSM89
           - HView 

1. Als erstes schauen wir mal nach,ob "Commandos" nen Kopierschutz hat.

   Dies ist eigentlich schon klar,da "EIDOS" das Spiel vertreibt.
   Dazu schnappen wir uns erstmal den Windows-CD-Player,um zu schauen,ob
   "Commandos" Audiotracks hat (Stichwort : Abspecken und Brennen).
   Da haben wir ja 3 Audiotracks.Komischerweise ist kein Ton zu hren,wenn
   wir diese abspielen wollen (ist der typische EIDOS Kopierschutz).

2. Merkmale des Kopierschutzes suchen.

   Dazu durchforsten wir die CD nach versteckten Dateien.
   Wir finden 5 versteckte Dateien :  BBVN.AFP
                                      BTBW.AFP
                                      ETAO.AFP
                                      TBTP.AFP
                                      CONFIG.AFP

   In der CONFIG.AFP stehen die Positionen an denen sich die "sogenannten" 4 Audiotracks 
   befinden.Aber wir haben nur 3 Audiotracks gesehen.

   -> Das ist erstmal eh !!!

   Jede Fake-Datei hat eine Gre von mehr als 600 MB. 

3. Lade und disassembliere nun die Comandos.exe in W32DSM89.

   Wir machen das jetzt schon,bevor wir sinnlos nen Rohling aus Testzwecken verbraten haben.
   Immerhin kostet ein besserer Rohling ja im Schnitt 3 DM und wir wollen unser Geld nicht
   sinnlos aus dem Fenster werfen :)

   So fertig.Nun speichern wir uns mal den disassemblierten Source ab (Platte gro genug ???),um diesen
   evtl. spter nutzen zu knnen.

4. Suche nun mittels [Refs/String Data References] nach einer Fehlermeldung wie
   "Bitte legen Sie die Original Commandos CD ein".

   Nichts zu finden :( Suchen wir mal nach den Namen der Fake-Dateien.Bingo !!! Alle 4 sind zu finden.
   Das hilft uns schonmal mchtig weiter. 

* Referenced by a CALL at Addresses:
|:00447E9C   , :00448015   									; merken wir uns !!!
|
:0044CAF0 83EC0C                  sub esp, 0000000C
:0044CAF3 A1980A5F00              mov eax, dword ptr [005F0A98]
:0044CAF8 85C0                    test eax, eax
:0044CAFA 90                      nop
:0044CAFB 53                      push ebx
:0044CAFC 56                      push esi
:0044CAFD 7413                    je 0044CB12
:0044CAFF E8EC7E0400              call 004949F0
:0044CB04 85C0                    test eax, eax
:0044CB06 740A                    je 0044CB12
:0044CB08 C705980A5F0000000000    mov dword ptr [005F0A98], 00000000

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:0044CAFD(C), :0044CB06(C)
|

* Possible StringData Ref from Data Obj ->"rb"
                                  |
:0044CB12 68900F5F00              push 005F0F90
:0044CB17 BB00000000              mov ebx, 00000000

* Possible StringData Ref from Data Obj ->"d:\TBTP.AFP"				; TBTP.AFP
                                  |
:0044CB1C 6810266000              push 00602610
:0044CB21 E8EA271800              call 005CF310
:0044CB26 83C408                  add esp, 00000008
:0044CB29 8BF0                    mov esi, eax
:0044CB2B 85F6                    test esi, esi
:0044CB2D 742A                    je 0044CB59
:0044CB2F 6A00                    push 00000000
:0044CB31 6800A08329              push 2983A000
:0044CB36 56                      push esi
:0044CB37 33DB                    xor ebx, ebx
:0044CB39 E8E22C1800              call 005CF820
:0044CB3E 83C40C                  add esp, 0000000C
:0044CB41 56                      push esi
:0044CB42 E8992C1800              call 005CF7E0
:0044CB47 83C404                  add esp, 00000004
:0044CB4A 83F829                  cmp eax, 00000029
:0044CB4D 0F94C3                  sete bl
:0044CB50 56                      push esi
:0044CB51 E81A271800              call 005CF270
:0044CB56 83C404                  add esp, 00000004

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0044CB2D(C)
|

* Possible StringData Ref from Data Obj ->"rb"
                                  |
:0044CB59 68900F5F00              push 005F0F90

* Possible StringData Ref from Data Obj ->"d:\BBVN.AFP"				; BBVN.AFP
                                  |
:0044CB5E 6820266000              push 00602620
:0044CB63 E8A8271800              call 005CF310
:0044CB68 83C408                  add esp, 00000008
:0044CB6B 8BF0                    mov esi, eax
:0044CB6D 85F6                    test esi, esi
:0044CB6F 750A                    jne 0044CB7B
:0044CB71 C744241000000000        mov [esp+10], 00000000
:0044CB79 EB2E                    jmp 0044CBA9

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0044CB6F(C)
|
:0044CB7B 6A00                    push 00000000
:0044CB7D 6800C88429              push 2984C800
:0044CB82 56                      push esi
:0044CB83 E8982C1800              call 005CF820
:0044CB88 83C40C                  add esp, 0000000C
:0044CB8B 56                      push esi
:0044CB8C E84F2C1800              call 005CF7E0
:0044CB91 83C404                  add esp, 00000004
:0044CB94 33C9                    xor ecx, ecx
:0044CB96 83F862                  cmp eax, 00000062
:0044CB99 0F94C1                  sete cl
:0044CB9C 894C2410                mov dword ptr [esp+10], ecx
:0044CBA0 56                      push esi
:0044CBA1 E8CA261800              call 005CF270
:0044CBA6 83C404                  add esp, 00000004

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0044CB79(U)
|

* Possible StringData Ref from Data Obj ->"rb"
                                  |
:0044CBA9 68900F5F00              push 005F0F90

* Possible StringData Ref from Data Obj ->"d:\ETAO.AFP"				; ETAO.AFP
                                  |
:0044CBAE 6830266000              push 00602630
:0044CBB3 E858271800              call 005CF310
:0044CBB8 83C408                  add esp, 00000008
:0044CBBB 8BF0                    mov esi, eax
:0044CBBD 85F6                    test esi, esi
:0044CBBF 750A                    jne 0044CBCB
:0044CBC1 C744240C00000000        mov [esp+0C], 00000000
:0044CBC9 EB2E                    jmp 0044CBF9

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0044CBBF(C)
|
:0044CBCB 6A00                    push 00000000
:0044CBCD 6800988129              push 29819800
:0044CBD2 56                      push esi
:0044CBD3 E8482C1800              call 005CF820
:0044CBD8 83C40C                  add esp, 0000000C
:0044CBDB 56                      push esi
:0044CBDC E8FF2B1800              call 005CF7E0
:0044CBE1 83C404                  add esp, 00000004
:0044CBE4 33C9                    xor ecx, ecx
:0044CBE6 83F84D                  cmp eax, 0000004D
:0044CBE9 0F94C1                  sete cl
:0044CBEC 894C240C                mov dword ptr [esp+0C], ecx
:0044CBF0 56                      push esi
:0044CBF1 E87A261800              call 005CF270
:0044CBF6 83C404                  add esp, 00000004

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0044CBC9(U)
|

* Possible StringData Ref from Data Obj ->"rb"
                                  |
:0044CBF9 68900F5F00              push 005F0F90

* Possible StringData Ref from Data Obj ->"d:\BTBW.AFP"				; BTBW.AFP
                                  |
:0044CBFE 6840266000              push 00602640
:0044CC03 E808271800              call 005CF310
:0044CC08 83C408                  add esp, 00000008
:0044CC0B 8BF0                    mov esi, eax
:0044CC0D 85F6                    test esi, esi
:0044CC0F 750A                    jne 0044CC1B
:0044CC11 C744240800000000        mov [esp+08], 00000000
:0044CC19 EB2E                    jmp 0044CC49

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0044CC0F(C)
|
:0044CC1B 6A00                    push 00000000
:0044CC1D 6800E88229              push 2982E800
:0044CC22 56                      push esi
:0044CC23 E8F82B1800              call 005CF820
:0044CC28 83C40C                  add esp, 0000000C
:0044CC2B 56                      push esi
:0044CC2C E8AF2B1800              call 005CF7E0
:0044CC31 83C404                  add esp, 00000004
:0044CC34 33C9                    xor ecx, ecx
:0044CC36 83F811                  cmp eax, 00000011
:0044CC39 0F94C1                  sete cl
:0044CC3C 894C2408                mov dword ptr [esp+08], ecx
:0044CC40 56                      push esi
:0044CC41 E82A261800              call 005CF270
:0044CC46 83C404                  add esp, 00000004

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0044CC19(U)
|
:0044CC49 8B442408                mov eax, dword ptr [esp+08]
:0044CC4D 8B4C240C                mov ecx, dword ptr [esp+0C]
:0044CC51 23C1                    and eax, ecx
:0044CC53 8B542410                mov edx, dword ptr [esp+10]
:0044CC57 23C2                    and eax, edx
:0044CC59 5E                      pop esi
:0044CC5A 23C3                    and eax, ebx
:0044CC5C 5B                      pop ebx
:0044CC5D 83C40C                  add esp, 0000000C
:0044CC60 C3                      ret

SNIP

 So hier ist das Ende des Fake-Dateien Checks.Der gesamte Check wird 2 Mal aufgerufen.
 Also gehen wir zu diesen Aufrufen mittels "Goto Code Location".

* Referenced by a CALL at Addresses:
|:00447E9C   , :00448015   
|

 SNIP

* Possible Reference to Dialog: D_EA_EXPLOTA, CONTROL_ID:0005, "+"
                                  |
:00447E89 6A05                    push 00000005
:00447E8B 8883110C0000            mov byte ptr [ebx+00000C11], al
:00447E91 8883100D0000            mov byte ptr [ebx+00000D10], al
:00447E97 E834321200              call 0056B0D0
:00447E9C E84F4C0000              call 0044CAF0					; hier -> mov  eax,1
:00447EA1 85C0                    test eax, eax					; eax = 0 ? YES
:00447EA3 7418                    je 00447EBD				      	; than ERROR
:00447EA5 8D442418                lea eax, dword ptr [esp+18]
:00447EA9 8B4C2434                mov ecx, dword ptr [esp+34]
:00447EAD 50                      push eax
:00447EAE 51                      push ecx
:00447EAF 55                      push ebp
:00447EB0 53                      push ebx
:00447EB1 E83A750E00              call 0052F3F0
:00447EB6 83C410                  add esp, 00000010
:00447EB9 85C0                    test eax, eax
:00447EBB 750A                    jne 00447EC7

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00447EA3(C)
|
:00447EBD C7838400000001000000    mov dword ptr [ebx+00000084], 00000001

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00447EBB(C)
|
:00447EC7 8BCB                    mov ecx, ebx
:00447EC9 E852FBFFFF              call 00447A20
:00447ECE 8D4C2418                lea ecx, dword ptr [esp+18]
:00447ED2 E829301200              call 0056AF00
:00447ED7 5D                      pop ebp
:00447ED8 5F                      pop edi
:00447ED9 5E                      pop esi
:00447EDA 5B                      pop ebx
:00447EDB 83C41C                  add esp, 0000001C
:00447EDE C20800                  ret 0008

 SNIP

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0044800C(U)
|
:00448015 E8D64A0000              call 0044CAF0					; hier -> mov  eax,1
:0044801A 85C0                    test eax, eax
:0044801C 7418                    je 00448036
:0044801E 8D442418                lea eax, dword ptr [esp+18]
:00448022 8B4C2434                mov ecx, dword ptr [esp+34]
:00448026 50                      push eax
:00448027 51                      push ecx
:00448028 55                      push ebp
:00448029 53                      push ebx
:0044802A E8F1860B00              call 00500720
:0044802F 83C410                  add esp, 00000010
:00448032 85C0                    test eax, eax
:00448034 750A                    jne 00448040

 SNIP

5. Patchen :

 Die beiden CALL Aufrufe werden wir nun umgehen.Dazu merken wir uns
 die Offsets.Nun schnell HView starten und dann testen :)

 Offsets to patch : 4729C -> mov eax, 1	= B80100h
                    47415 -> mov eax, 1  = B80100h

6. Allgemeine Hinweise :

 Bei jedem CD-Kopierschutz (z.B. CD-Abfrage) ist eine tiefgrndige Analyse 
 des Schutzes ein Mu !!! 

 Jeder noch so gute Schutz ist zu knacken :)

 Ach ja,ein khler Kopf und nen khles Bier sind auch nicht schlecht :)


Viel Spa beim CRACKEN!
Promax [DOOM]
09.03.1999


