forked from x64dbg/Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkkrunchy.txt
54 lines (43 loc) · 857 Bytes
/
kkrunchy.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
//////////////////////////////////////////////////
// FileName : kkrunchy.txt
// Comment : OEP Find For kkrunchy 023
// Author : _pusher_
// Date : 2015-12-13
//////////////////////////////////////////////////
//start
msg "kkrunchy 023 OEP Finder"
msg "make sure you're at the entry point of the program before you continue"
pause
//clear breakpoints
bc
bphwc
//find ret code
find cip,"4631C066AD50EBEB5DC3" //some pattern
log "found: {0}", $result
cmp $result,0
je error1
//go to OEP
bp $result+8
erun
bc
sti
sti
//find OEP jump
find cip,"3B75000F84" //some pattern
log "found: {0}", $result
cmp $result,0
je error2
$dw = 4:[$result+5]
$dest = $result+4 + $dw + 5
log "OEP: {0}", $dest
bphws $dest
erun
cmt cip,"OEP"
//finish script
ret
error1:
msg "didn't find return code"
ret
error2:
msg "didn't find oep jump"
ret