MASM Junk Code

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
;//Junk  & SEH
 junkxx_01  db 0E8h, 24h, 0, 0  ; DATA XREF: FillJunkXX+2Ct
     db 0, 8Bh, 44h,  24h
     db 4, 8Bh, 0, 3Dh
     db 4, 0, 0, 80h
     db 75h,  8, 8Bh,  64h
     db 24h,  8, 0EBh, 4
     db 58h,  0EBh, 0Ch, 0E9h
     db 64h,  8Fh, 5,  0
     db 0, 0, 0, 74h
     db 0F3h, 75h, 0F1h, 0EBh
     db 24h,  64h, 0FFh, 35h
     db 0, 0, 0, 0
     db 0EBh, 12h, 0FFh, 9Ch
     db 74h,  3, 75h,  1
     db 0E9h, 81h, 0Ch, 24h
     db 0, 1, 0, 0
     db 9Dh,  90h, 0EBh, 0F4h
     db 64h,  89h, 25h, 0
     db 0, 0, 0, 0EBh
     db 0E6h
 junkxx_02  db 0EBh, 1, 0Fh, 31h  ; DATA XREF: FillJunkXX+46t
     db 0F0h, 0EBh, 0Ch, 33h
     db 0C8h, 0EBh, 3, 0EBh
     db 9, 0Fh, 59h,  74h
     db 5, 75h, 0F8h, 51h
     db 0EBh, 0F1h

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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
 junkxx_03  db 0B9h, 4, 0, 0  ; DATA XREF: FillJunkXX+60t
     db 0, 0E8h, 1Fh, 0
     db 0, 0, 0EBh, 0FAh
     db 0E8h, 16h, 0, 0
     db 0, 0E9h, 0EBh, 0F8h
     db 0, 0, 58h, 0EBh
     db 9, 0Fh, 25h,  0E8h
     db 0F2h, 0FFh, 0FFh, 0FFh
     db 0Fh,  0B9h, 49h, 75h
     db 0F1h, 0EBh, 5, 0EBh
     db 0F9h, 0EBh, 0F0h, 0D6h
 junkxx_04  db 0E8h, 7, 0, 0  ; DATA XREF: FillJunkXX+77t
     db 0, 0C7h, 83h, 83h
     db 0C0h, 13h, 0EBh, 0Bh
     db 58h,  0EBh, 2, 0CDh
     db 20h,  83h, 0C0h, 2
     db 0EBh, 1, 0E9h, 50h
     db 0C3h, 0E8h
 junkxx_05  db 0E8h, 3, 0, 0  ; DATA XREF: FillJunkXX+8Et
     db 0, 0C7h, 84h, 0
     db 58h,  0EBh, 1, 0E9h
     db 83h,  0C0h, 7, 50h
     db 0C3h, 0FFh, 35h
 junkxx_06  db 0E8h, 8, 0, 0  ; DATA XREF: FillJunkXX+A5t
     db 0, 0Fh, 1, 83h
     db 0C0h, 0Fh, 50h, 0C3h
     db 0FFh, 58h, 83h, 0C0h
     db 2, 0FFh, 0E0h, 0Fh
     db 1, 0Ch
 junkxx_07  db 0E8h, 16h, 0, 0  ; DATA XREF: FillJunkXX+BCt
     db 0, 8Bh, 5Ch,  24h
     db 0Ch,  8Bh, 0A3h, 0C4h
     db 0, 0, 0, 64h
     db 8Fh,  5, 0, 0
     db 0, 0, 83h, 0C4h
     db 4, 0EBh, 14h, 64h
     db 0FFh, 35h, 0, 0
     db 0, 0, 64h, 89h
     db 25h,  0, 0, 0
     db 0, 33h, 0C9h, 99h
     db 0F7h, 0F1h, 0E9h
 junkxx_08  db 33h,  0F6h, 0E8h, 10h  ; DATA XREF: FillJunkXX+D3t
     db 0, 0, 0, 8Bh
     db 64h,  24h, 8,  64h
     db 8Fh,  5, 0, 0
     db 0, 0, 58h, 0EBh
     db 13h,  0C7h, 83h, 64h
     db 0FFh, 35h, 0, 0
     db 0, 0, 64h, 89h
     db 25h,  0, 0, 0
     db 0, 0ADh, 0CDh, 20h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
     ;Junk code only
     lea eax,obaby
    obaby:
     add eax,0eh
     db 0xeb
     db 0x05
     db 0xeb
     db 0xf3
     db 0xdb
     db 0x30
     db 0x57
     jmp eax
     db 0xe9
     db 0x21
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
;FASM Macro
macro jmp Go
{
 push Go
 ret
}
macro call Proc
{
 push @f
 jmp Proc
@@:
}
 
macro ret AddEspNum
{
if ~ AddEspNum eq
if (AddEspNum mod 4)<>0
 .err
 end if
 lea esp, [esp+(AddEspNum+4)]
 jmp dword [esp-(AddEspNum+4)]
else
 sub esp, -4
 jmp dword [esp-4]
end if
}

原创文章,转载请注明: 转载自 obaby@mars

本文标题: 《MASM Junk Code》

本文链接地址: http://www.h4ck.org.cn/2011/10/masm-junk-code/

You may also like

发表评论

电子邮件地址不会被公开。 必填项已用*标注