Posts Tagged ‘code cave

25
Apr
09

[ASM] Minesweeper God Mode Testing III

Fixed the timer now so that it only stops working if you have won the game.
Original
#########################

0100347C w>    8325 64510001 00                AND DWORD PTR DS:[fTimer],0
01003483   |.  56                              PUSH ESI
01003484       8B7424 08                       MOV ESI,DWORD PTR SS:[ESP+8]

#########################
With Jump
#########################

0100347C w>   /E9 0E160000                     JMP winmine.01004A8F
01003481      |90                              NOP
01003482      |90                              NOP
01003483   |. |56                              PUSH ESI
01003484      |8B7424 08                       MOV ESI,DWORD PTR SS:[ESP+8]

#########################
Code Cave
#########################

01004A8F    > \83F8 01                         CMP EAX,1
01004A92    .^ 0F84 EBE9FFFF                   JE winmine.01003483
01004A98    .  8325 64510001 00                AND DWORD PTR DS:[fTimer],0
01004A9F    .^ E9 DFE9FFFF                     JMP winmine.01003483
Advertisements
25
Apr
09

[ASM] Minesweeper God Mode Testing II

Ok after playing around a bit more, i’veĀ  set it up so that after you die, you have the default smiley icon not the dead one:
Original
#########################

0100348C   |.  0F95C0            SETNE AL
0100348F       40                INC EAX
01003490       40                INC EAX
01003491       50                PUSH EAX
01003492       A3 60510001       MOV DWORD PTR DS:[iButtonCur],EAX
01003497       E8 77F4FFFF       CALL winmine.DisplayButton
0100349C       33C0              XOR EAX,EAX

#########################
With Jump
#########################

0100348C   |.  0F95C0            SETNE AL
0100348F       E9 E6150000       JMP winmine.01004A7A
01003494       90                NOP
01003495       90                NOP
01003496       90                NOP
01003497       E8 77F4FFFF       CALL winmine.DisplayButton
0100349C       33C0              XOR EAX,EAX

#########################
Code Cave
#########################

01004A7A       83F8 01           CMP EAX,1
01004A7D       75 05             JNZ SHORT winmine.01004A84
01004A7F       B8 03000000       MOV EAX,3
01004A84       50                PUSH EAX
01004A85       A3 60510001       MOV DWORD PTR DS:[iButtonCur],EAX
01004A8A     ^ E9 08EAFFFF       JMP winmine.01003497