-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathReturnPasswordPatch.txt
61 lines (57 loc) · 1.33 KB
/
ReturnPasswordPatch.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Patch
Replace
00401042 MOV EAX 6C814000, Exe2Ahk.0040816C; ASCII "BadPassword"
00401047 EB 18 JMP SHORT Exe2Ahk.00401061
00401049 MOV EAX 5C814000, Exe2Ahk.0040815C; ASCII "FileNotFound"
With
00401042 8D8424 400500> LEA EAX, DWORD PTR SS: [ESP + 540]
00401049 90 NOP
0040104A 90 NOP
0040104B 90 NOP
0040104C 90 NOP
0040104D 90 NOP
Function Pseudo
signed int __cdecl sub_401000(int a1, int a2)
{
DWORD v2; // eax@2
int v4; // eax@11
DWORD NumberOfBytesWritten; // [sp+0h] [bp-408h]@10
CHAR String; // [sp+4h] [bp-404h]@11
int v7; // [sp+404h] [bp-4h]@1
v7 = dword_40A06C;
switch ( a1 )
{
case 1:
v2 = (DWORD)"OpenEXE";
break;
case 2:
v2 = (DWORD)"OpenInput";
break;
case 3:
v2 = (DWORD)"NotARC";
break;
case 4:
v2 = (DWORD)"BadVersion";
break;
case 5:
v2 = (DWORD)"BadPassword";
break;
case 6:
v2 = (DWORD)"FileNotFound";
break;
case 7:
v2 = (DWORD)"OpenOutput";
break;
case 8:
v2 = (DWORD)"MemAlloc";
break;
default:
v2 = NumberOfBytesWritten;
break;
}
wsprintfA(&String, "%s: The following error occurred: %s\n", a2, v2);
v4 = lstrlenA(&String);
WriteFile(hFile, &String, v4, &NumberOfBytesWritten, 0);
return 1;
}
Found at http://www.hackerboard.de/hacks-crackmes/47544-ahk-cracken.html