游戏下载:
http://bbs.pediy.com/showthread.php?t=128298
破解办法.使用WriteProcessMemory写入假数据.真数据的过程看下面汇编代码.自己定位.使用SetDlgItemInt设置游戏血量.因此随便注入一个DLL挂钩这个函数就可以修改.下面的代码动态搜索.先来张图.
由于没看清楚修改方式.只能调试器中修改。大家可以试试对SetDlgItemInt函数下段.然后直接修改SetDlgItemInt函数的参数位置指向假数据.由于代码没办法修改保存.动态解码,只能写个补丁.
生成血量的代码.
00291F0F 90 NOP
00291F10 8B7A F8 MOV EDI,DWORD PTR DS:[EDX-8]
00291F13 23F9 AND EDI,ECX
00291F15 0BC7 OR EAX,EDI
00291F17 8B7A FC MOV EDI,DWORD PTR DS:[EDX-4]
00291F1A D1C1 ROL ECX,1
00291F1C 23F9 AND EDI,ECX
00291F1E 0BC7 OR EAX,EDI
00291F20 8B3A MOV EDI,DWORD PTR DS:[EDX] ;
00291F22 D1C1 ROL ECX,1
00291F24 23F9 AND EDI,ECX
00291F26 0BC7 OR EAX,EDI
00291F28 8B7A 04 MOV EDI,DWORD PTR DS:[EDX+4]
00291F2B D1C1 ROL ECX,1
00291F2D 23F9 AND EDI,ECX
00291F2F 0BC7 OR EAX,EDI
00291F31 D1C1 ROL ECX,1
00291F33 83C2 10 ADD EDX,10
00291F36 4E DEC ESI
00291F37 ^ 75 D7 JNZ SHORT 00291F10
00291F39 5F POP EDI
00291F3A 5E POP ESI
00291F3B C3 RETN
修改为
00291F0F 90 NOP
00291F10 A1 70B22100 MOV EAX,DWORD PTR DS:[21B270] ..随便找个地址修改我们的值
00291F15 83E8 0A SUB EAX,0A
00291F18 A3 70B22100 MOV DWORD PTR DS:[21B270],EAX
00291F1D 90 NOP
00291F1E 90 NOP
00291F1F 90 NOP
00291F20 90 NOP ; 看汇编代码.这里要做一点修改.要调用3次这个函数.设置3个判断.随便再找几个全局地址存放就可以.
00291F21 90 NOP
00291F22 90 NOP
00291F23 90 NOP
00291F24 90 NOP
00291F25 90 NOP
00291F26 90 NOP
00291F27 90 NOP
00291F28 90 NOP
00291F29 90 NOP
00291F2A 90 NOP
00291F2B 90 NOP
00291F2C 90 NOP
00291F2D 90 NOP
00291F2E 90 NOP
00291F2F 90 NOP
00291F30 90 NOP
00291F31 90 NOP
00291F32 90 NOP
00291F33 90 NOP
00291F34 90 NOP
00291F35 90 NOP
00291F36 90 NOP
00291F37 90 NOP
00291F38 90 NOP
00291F39 5F POP EDI
00291F3A 5E POP ESI
00291F3B C3 RETN
002825B5 8B87 B0500000 MOV EAX,DWORD PTR DS:[EDI+50B0]
002825BB 8B08 MOV ECX,DWORD PTR DS:[EAX] ; 访问内存数据2
002825BD 8B97 AC500000 MOV EDX,DWORD PTR DS:[EDI+50AC] ; 减去这个数据
002825C3 6A 0A PUSH 0A
002825C5 51 PUSH ECX
002825C6 8BCF MOV ECX,EDI
002825C8 FFD2 CALL EDX ..假数据修改.SUB指令
//
00275AD8 8B4424 04 MOV EAX,DWORD PTR SS:[ESP+4]
00275ADC 8B11 MOV EDX,DWORD PTR DS:[ECX]
00275ADE 6A 00 PUSH 0
00275AE0 50 PUSH EAX
00275AE1 8B81 9C500000 MOV EAX,DWORD PTR DS:[ECX+509C]
00275AE7 68 E9030000 PUSH 3E9
00275AEC 52 PUSH EDX
00275AED FFD0 CALL EAX USER32.SetDlgItemInt设置游戏数据
00275AEF C2 0400 RETN 4
特征代码
004825B5 8B87 B0500000 MOV EAX,DWORD PTR DS:[EDI+50B0]
004825BB 8B08 MOV ECX,DWORD PTR DS:[EAX]
004825BD 8B97 AC500000 MOV EDX,DWORD PTR DS:[EDI+50AC]
004825C3 6A 0A PUSH 0A
004825C5 51 PUSH ECX
004825C6 8BCF MOV ECX,EDI
004825C8 FFD2 CALL EDX
004825CA 894424 14 MOV DWORD PTR SS:[ESP+14],EAX
004825CE 85C0 TEST EAX,EAX
004825D0 C74424 1C 0000000>MOV DWORD PTR SS:[ESP+1C],0
004825D8 8D4424 14 LEA EAX,DWORD PTR SS:[ESP+14]
004825DC 7F 04 JG SHORT 004825E2
004825DE 8D4424 1C LEA EAX,DWORD PTR SS:[ESP+1C]
004825E2 8B10 MOV EDX,DWORD PTR DS:[EAX]
004825E4 8BB7 B0500000 MOV ESI,DWORD PTR DS:[EDI+50B0]
004825EA 8B87 60500000 MOV EAX,DWORD PTR DS:[EDI+5060]
004825F0 895424 14 MOV DWORD PTR SS:[ESP+14],EDX
004825F4 8B97 5C500000 MOV EDX,DWORD PTR DS:[EDI+505C]
004825FA 85D2 TEST EDX,EDX
004825FC 7E 18 JLE SHORT 00482616
004825FE 8D8F 1C500000 LEA ECX,DWORD PTR DS:[EDI+501C]
00482604 8B19 MOV EBX,DWORD PTR DS:[ECX]
00482606 8B9C9F 1C400000 MOV EBX,DWORD PTR DS:[EDI+EBX*4+401C]
0048260D 8B0418 MOV EAX,DWORD PTR DS:[EAX+EBX]
00482610 83C1 04 ADD ECX,4
00482613 4A DEC EDX
00482614 ^ 75 EE JNZ SHORT 00482604
00482616 8B18 MOV EBX,DWORD PTR DS:[EAX]
00482618 6A 00 PUSH 0
0048261A 6A 04 PUSH 4
0048261C 8D4424 1C LEA EAX,DWORD PTR SS:[ESP+1C]
00482620 50 PUSH EAX
00482621 56 PUSH ESI
00482622 FF97 18400000 CALL DWORD PTR DS:[EDI+4018]
00482628 50 PUSH EAX
00482629 FFD3 CALL EBX
0048262B 8B97 90500000 MOV EDX,DWORD PTR DS:[EDI+5090]
00482631 8DB7 70500000 LEA ESI,DWORD PTR DS:[EDI+5070]
00482637 6A 00 PUSH 0
00482639 8BCE MOV ECX,ESI
0048263B 897424 18 MOV DWORD PTR SS:[ESP+18],ESI
0048263F FFD2 CALL EDX //这里是USER32.SetDlgItemInt
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!