由于这个程序很短,OD里面的汇编代码也很短。 # T5 {0 r5 P% ?# ~
请看红色的部分,这就是和0x80比较的部分。 5 ?7 b# v5 D0 m* v
把这2句NOP掉,然后保存修改后的文件为exe。
) m2 v0 ]+ m' ]' Z# w1 w; k我们发现input.txt里面的所有内容都能被输出了。 & n2 O, s; T; d
附上修改后的exe. $ b' w" I- i- C: p5 V
深绿,你可以把这个操作过程试一下,练习一下.
; L- Z% s; F0 I5 f) H; l/ h+ a: {
00401000 /$ 55 push ebp * e$ [/ E- ?; |- ~
00401001 |. 89E5 mov ebp, esp ; m8 u- U; ^# @) P. h. j. \5 |
00401003 |. 83EC 18 sub esp, 18
# B! g# Z$ K7 }; T% i: p00401006 |. C745 FC 00000>mov dword ptr [ebp-4], 0 ! G u- L; B0 R1 s5 o& e
0040100D |. 83C4 F4 add esp, -0C
' g! ~+ t3 P- D* o0 L3 V& D00401010 |. 8D45 FC lea eax, dword ptr [ebp-4] # |5 U3 h/ h4 F; V; @
00401013 |. 50 push eax
% V7 @5 a% A' y1 k- o# Y, O9 `00401014 |. FF35 08204000 push dword ptr [402008]
( W {0 I+ t$ K. [( |2 a0040101A |. 8D45 F8 lea eax, dword ptr [ebp-8] ( F: y! a( L1 ?6 K/ C$ m' U
0040101D |. 50 push eax % C- c$ F+ t* l, O
0040101E |. 68 04204000 push 00402004 ) u9 N! L2 R$ l c
00401023 |. 68 00204000 push 00402000 % }0 `0 ], M' p3 h
00401028 |. E8 EB030000 call <jmp.&msvcrt.__getmainargs>
* h; s% [9 F6 {. T# ?6 b! `3 l0040102D |. C9 leave . l' D2 V/ l* w' Z0 e' |& J
0040102E \\. C3 retn
+ |' @+ O" Z: Y. g0040102F 90 nop
0 {8 X1 ?" ^3 n* V# M# \/ i00401030 /$ 55 push ebp
4 K z; d. g2 d00401031 |. 89E5 mov ebp, esp 4 |& j0 l: O! q1 t9 F% h9 C
00401033 |. 83EC 08 sub esp, 8 " c0 ]6 `, m7 t% f1 R" A
00401036 |. 8B15 0C204000 mov edx, dword ptr [40200C] 4 Z9 W& q' d) {3 w
0040103C |. 85D2 test edx, edx 8 k q) _. s( g9 [$ o- n
0040103E |. 74 7B je short 004010BB
% A4 J7 J( g- k- B! X! H00401040 |. A1 AC304000 mov eax, dword ptr [<&msvcrt._fmode>> , m) T5 \; U& n0 [) k+ U9 |, c6 f
00401045 |. 8910 mov dword ptr [eax], edx ( x7 w4 ~; P/ o! d5 F1 O0 _* c, y
00401047 |. A1 B4304000 mov eax, dword ptr [<&msvcrt._iob>]
- D# S& y$ }6 t% e" \8 o, j- \0040104C |. 85C0 test eax, eax
$ ?5 L% L4 x8 ^2 s0040104E |. 74 1E je short 0040106E 5 j- J: x8 f6 l7 I: I! O0 D( V
00401050 |. 83C4 F8 add esp, -8 $ b: ~ E/ ?% s7 H2 I5 \$ I
00401053 |. FF35 0C204000 push dword ptr [40200C] * T# f5 ~5 T& I: Q& I
00401059 |. 83C4 F4 add esp, -0C
" [8 k+ U) U: y& _; L1 [, P0040105C |. 50 push eax ; /pstream => offset msvcrt._iob 4 F1 A! Q: u0 v+ b
0040105D |. E8 A6030000 call <jmp.&msvcrt._fileno> ; \\_fileno 6 V; {# D9 Z6 X! X" l) t# l
00401062 |. 83C4 10 add esp, 10
( Y' [- e9 I+ T/ b( Q! V00401065 |. 50 push eax ; |handle ) |2 @# l9 Y8 F
00401066 |. E8 A5030000 call <jmp.&msvcrt._setmode> ; \\_setmode E: b, ?) y7 l1 g1 e7 Q) ]8 g( ?
0040106B |. 83C4 10 add esp, 10 6 V0 ?7 }% ~0 {2 q9 S. b6 ~5 h
0040106E |> A1 B4304000 mov eax, dword ptr [<&msvcrt._iob>] * {0 R* l5 P7 S& }8 y6 I( ?9 E; X
00401073 |. 83C0 20 add eax, 20
3 F& [& o& A9 E, k00401076 |. 74 1E je short 00401096
) @4 Y, C. P% A" C4 w7 a00401078 |. 83C4 F8 add esp, -8
& G( }4 I2 B* \+ C! N) f# F. k! `7 P" ^0040107B |. FF35 0C204000 push dword ptr [40200C] ; s6 ^1 Y& B1 j/ ~7 _% q
00401081 |. 83C4 F4 add esp, -0C 5 m# d9 U% D" `$ K
00401084 |. 50 push eax ; /pstream
]6 ]/ ~, D$ {1 v& K9 z00401085 |. E8 7E030000 call <jmp.&msvcrt._fileno> ; \\_fileno ' \7 O; ]: x$ J# s" x9 N) P8 u
0040108A |. 83C4 10 add esp, 10
8 P! q8 f! ^. [( u0 r U3 `0040108D |. 50 push eax ; |handle 6 V& X6 l' Z% i& o$ a) l9 A
0040108E |. E8 7D030000 call <jmp.&msvcrt._setmode> ; \\_setmode 3 A5 t3 I n* M. t! o* ?7 m
00401093 |. 83C4 10 add esp, 10 8 f/ P! @- U& {2 v U P! Z
00401096 |> A1 B4304000 mov eax, dword ptr [<&msvcrt._iob>] + ]% i4 P* B. S J, |
0040109B |. 83C0 40 add eax, 40 6 q6 w9 N9 a- K* d3 l0 d' m P
0040109E |. 74 1B je short 004010BB
5 Q3 K( Z3 H5 q# s: ?004010A0 |. 83C4 F8 add esp, -8 2 [3 u( |7 k; K' `% A" U/ M* a
004010A3 |. FF35 0C204000 push dword ptr [40200C]
# Q. Q" U& d. N9 E8 N004010A9 |. 83C4 F4 add esp, -0C . U( f0 ]; j+ C% ]
004010AC |. 50 push eax ; /pstream : X& d- n; B, L) G* d! Y
004010AD |. E8 56030000 call <jmp.&msvcrt._fileno> ; \\_fileno
* X- t5 t: x1 }004010B2 |. 83C4 10 add esp, 10 1 Y) {2 O- b+ c ?2 q0 \
004010B5 |. 50 push eax ; |handle 2 C% L( z! Y* E! C" a) J. F
004010B6 |. E8 55030000 call <jmp.&msvcrt._setmode> ; \\_setmode
" I! `3 J7 _& d2 h004010BB |> C9 leave / m0 C! l0 f3 p5 h" U+ s
004010BC \\. C3 retn
% p5 s. [6 T ?) g! X6 K' D004010BD 8D76 00 lea esi, dword ptr [esi]
( |- z6 U% F% w" U% \8 z M004010C0 /. 55 push ebp
$ Q( D0 S* @$ ^" n3 ~: Q! y; A004010C1 |. 89E5 mov ebp, esp * P3 ]" X j$ O/ d* l/ M$ w
004010C3 |. 83EC 10 sub esp, 10
# L0 ^" y+ R# L# J5 z( E, O004010C6 |. 56 push esi
1 ?- o9 f4 e' ^) A ]! }+ |: X; y004010C7 |. 53 push ebx
" X+ o1 F2 J* t, K. q0 g, W! s004010C8 |. 8B45 08 mov eax, dword ptr [ebp+8]
; Y+ y. E8 I" J: E/ Y- @. M004010CB |. 31DB xor ebx, ebx
% K' m; c3 K8 m. E8 `0 g/ p004010CD |. 31F6 xor esi, esi - x' z& l4 ]5 G5 J
004010CF |. 8B00 mov eax, dword ptr [eax]
4 o; U+ \% v8 `6 V5 E6 Y) O004010D1 |. 8B00 mov eax, dword ptr [eax]
3 s% ^8 \8 }: J% @004010D3 |. 3D 910000C0 cmp eax, C0000091 " o! z3 G. }" i& |
004010D8 |. 77 16 ja short 004010F0 / A' G R0 S1 {3 j* S
004010DA |. 3D 8D0000C0 cmp eax, C000008D
1 I2 z# y7 b0 |6 G4 v+ b004010DF |. 73 4F jnb short 00401130 4 V' L" k9 ?. c# M! _; H
004010E1 |. 3D 050000C0 cmp eax, C0000005 ) I: ~' b+ F; j! h S: A ^
004010E6 |. 74 18 je short 00401100
" t' Q; |) L/ h004010E8 |. E9 86000000 jmp 00401173 m3 {: l! h6 b
004010ED | 8D76 00 lea esi, dword ptr [esi]
( X4 E4 w/ y& N8 C; R004010F0 |> 3D 930000C0 cmp eax, C0000093
9 O4 U/ s& E+ g4 b004010F5 |. 74 39 je short 00401130
% o, x& A) Q. `: ?004010F7 |. 3D 940000C0 cmp eax, C0000094
1 b7 q$ C" i$ c+ J) e8 J7 B* I004010FC |. 74 37 je short 00401135
+ k6 t2 n9 x- ?1 l5 {( f& p& R# P5 Z004010FE |. EB 73 jmp short 00401173 - f- u) Y/ L, t4 W: K8 Q" F
00401100 |> 83C4 F8 add esp, -8 4 [. X; g& n; w5 j' X$ _3 h% `& d
00401103 |. 6A 00 push 0 ; /func = NULL $ H7 O# z6 w1 V9 {" J
00401105 |. 6A 0B push 0B ; |sig = SIGSEGV : ^, ~/ a! C6 Y! T0 B
00401107 |. E8 F4020000 call <jmp.&msvcrt.signal> ; \\signal ! G" }( b9 P6 B: B. x; B. z6 H
0040110C |. 83C4 10 add esp, 10 6 _+ w: q. @3 N( [+ x4 w- v
0040110F |. 83F8 01 cmp eax, 1 5 B: k% _5 a ?8 g z) d
00401112 |. 75 0E jnz short 00401122
% Y" Y( I5 y- @5 D; I; ?00401114 |. 83C4 F8 add esp, -8 1 H- ]2 p( t4 F. F
00401117 |. 6A 01 push 1 ; /func = 00000001
1 B3 \) p0 C8 h, v/ q00401119 |. 6A 0B push 0B ; |sig = SIGSEGV
& n' v1 r4 o- G6 b! F0040111B |. E8 E0020000 call <jmp.&msvcrt.signal> ; \\signal
3 U3 J( }2 G/ Q6 r# d. P7 N00401120 |. EB 4C jmp short 0040116E + {. B9 ~" u2 a+ R4 Q* |3 p
00401122 |> 85C0 test eax, eax
! K4 G$ w5 U$ Q3 _7 B9 [+ D3 Y% x00401124 |. 74 4D je short 00401173 & s% y( J6 l; q! b' T! B/ ]
00401126 |. 83C4 F4 add esp, -0C $ v8 |* n: Q1 n, ?# u2 V
00401129 |. 6A 0B push 0B
7 A% }$ l* R; v) P# Z8 j0040112B |. EB 3F jmp short 0040116C 0 s9 L( S0 F7 a3 R
0040112D | 8D76 00 lea esi, dword ptr [esi] * L/ T% ?. j! m0 M
00401130 |> BE 01000000 mov esi, 1 0 A# B4 T& y. w I3 ?# M, L" g
00401135 |> 83C4 F8 add esp, -8
9 y6 r& V& U0 E0 @: l' S00401138 |. 6A 00 push 0 ; /func = NULL 5 A8 O `) t, |3 U9 r# C- u
0040113A |. 6A 08 push 8 ; |sig = SIGFPE
6 @* q |! [* _% S0040113C |. E8 BF020000 call <jmp.&msvcrt.signal> ; \\signal f* X; |1 D1 L/ E* F
00401141 |. 83C4 10 add esp, 10 n- M' q, f% n6 {" i
00401144 |. 83F8 01 cmp eax, 1 8 u) X# b. ] N# U! j
00401147 |. 75 1A jnz short 00401163 ( k* L# p* m! Z( ^4 Y; m' O
00401149 |. 83C4 F8 add esp, -8 + v0 g. G9 h$ \6 b$ N
0040114C |. 6A 01 push 1 ; /func = 00000001
: s1 V2 h4 T* a) N1 i8 T$ V% C% b0040114E |. 6A 08 push 8 ; |sig = SIGFPE : \. P7 f$ A' f( U' i2 P) \
00401150 |. E8 AB020000 call <jmp.&msvcrt.signal> ; \\signal
% L* Y( |! A; Y2 G8 P& i1 p00401155 |. 83C4 10 add esp, 10
; U/ X) a" ]* m9 f00401158 |. 85F6 test esi, esi 1 q5 ~# a3 Y- q8 _7 P- v7 q
0040115A |. 74 12 je short 0040116E 9 ]4 }2 p3 p# o0 M' N/ n
0040115C |. E8 97020000 call <jmp.&msvcrt._fpreset> ; [_fpreset
! }' z! a3 X; \$ R& d& n9 t00401161 |. EB 0B jmp short 0040116E
, m5 y; x3 h0 j00401163 |> 85C0 test eax, eax ?% v1 g3 j' @( _! h4 `2 p
00401165 |. 74 0C je short 00401173
( o8 X. x$ w D G1 r: l2 Q6 Q00401167 |. 83C4 F4 add esp, -0C ; g/ h1 K& Q4 D0 I* |
0040116A |. 6A 08 push 8 9 H2 W0 k( n4 p
0040116C |> FFD0 call eax
9 C+ h) v! n7 L8 k% b0040116E |> BB FFFFFFFF mov ebx, -1
; [( o2 h9 K# T( t+ b1 N8 ?: i00401173 |> 89D8 mov eax, ebx 6 r/ Z, O! E# r. Y2 z0 Q* i
00401175 |. 8D65 E8 lea esp, dword ptr [ebp-18]
: W1 l' Z) |6 @5 m T6 l9 b6 a00401178 |. 5B pop ebx
# _4 Z' j* I1 {2 n$ L- B7 z00401179 |. 5E pop esi
6 n# i" F+ @ c. N. f3 `0040117A |. C9 leave
/ C# g* y5 q/ E1 N7 E' f0040117B \\. C2 0400 retn 4 & m( }* E3 k' x
0040117E 89F6 mov esi, esi - o6 A# Y+ C2 e4 p1 A
00401180 /$ 55 push ebp
/ I6 W- [1 L2 H0 l8 @- c, u( k- f: w00401181 |. 89E5 mov ebp, esp
* e1 G2 v4 G" t5 m5 _6 S00401183 |. 83EC 14 sub esp, 14
7 q |# A# {0 ], U+ ^8 v+ G( E( X& _00401186 |. 53 push ebx
" H7 Y8 O" T( s1 f- l0 `/ \. R+ g00401187 |. 83C4 F4 add esp, -0C ' n! F6 o7 v9 [3 |
0040118A |. 68 C0104000 push 004010C0 ; /pTopLevelFilter = engoutpu.004010C0
( p4 v e$ N5 B/ @. ?0040118F |. E8 B4020000 call <jmp.&KERNEL32.SetUnhandledExcep>; \\SetUnhandledExceptionFilter 7 \$ {: Z7 o1 G" k' S
00401194 |. 83C4 FC add esp, -4
/ j4 A1 D9 K h* O. [00401197 |. E8 5C020000 call <jmp.&msvcrt._fpreset> ; [_fpreset
7 `0 t l! p3 }4 J7 j0040119C |. E8 5FFEFFFF call 00401000 ' h7 e' ^) y" W- r; Y; T, ?
004011A1 |. E8 8AFEFFFF call 00401030 9 Y( X8 ]# a7 k# c, m
004011A6 |. 83C4 FC add esp, -4 " _9 p% V$ \2 h2 w" L# y
004011A9 |. E8 42020000 call <jmp.&msvcrt.__p__environ> $ a, Y5 k' T/ N7 I& @ P
004011AE |. FF30 push dword ptr [eax]
, b. v8 X; K. e/ K1 d5 o004011B0 |. FF35 04204000 push dword ptr [402004] 6 j# f5 T# e. Q0 k. E# o# y
004011B6 |. FF35 00204000 push dword ptr [402000] 8 M. |& U( v; Q3 I. _4 w% H
004011BC |. E8 AB000000 call 0040126C + \* M, ]7 u f% ]
004011C1 |. 89C3 mov ebx, eax * |; y* N5 V: Q" A+ F
004011C3 |. 83C4 20 add esp, 20 7 @( ^0 \/ {( i+ J0 [/ H4 D
004011C6 |. E8 1D020000 call <jmp.&msvcrt._cexit> ; [msvcrt._cexit i; @ G2 Y- n0 b: J* Q
004011CB |. 83C4 F4 add esp, -0C 0 N, h! ?3 V: l& q1 R
004011CE |. 53 push ebx ; /ExitCode
7 i; c2 T% m* P$ _9 c& h004011CF \\. E8 7C020000 call <jmp.&KERNEL32.ExitProcess> ; \\ExitProcess 7 f% G& B" J* Z
004011D4 >/$ 55 push ebp " @( l3 V5 ^% [3 i9 \4 k
004011D5 |. 89E5 mov ebp, esp
7 J2 G& |( G( U- Z- l2 q6 S004011D7 |. 83EC 08 sub esp, 8
) c. c( F! G- S3 F U0 u004011DA |. 83C4 F4 add esp, -0C * C! }* Z; e+ I/ B5 P' J( L2 Y
004011DD |. 6A 01 push 1 1 e W6 d [& ]. E; `
004011DF |. A1 DC304000 mov eax, dword ptr [<&msvcrt.__set_a> ; {* p- g7 }6 M; Q8 J$ W
004011E4 |. FFD0 call eax ; <&msvcrt.__set_app_type>
* V [9 M: ~! U3 j/ w1 i; Y004011E6 |. E8 95FFFFFF call 00401180 " s4 Y: w5 L% }5 y
004011EB |. 31C0 xor eax, eax l8 O' o" J5 V+ |, T3 J9 h
004011ED |. C9 leave & ^% v. Q+ E, y* |- G
004011EE \\. C3 retn
@0 Y+ e) |5 g( d004011EF 90 nop $ s6 u3 G2 ?' A+ i }0 u5 T$ i0 g
004011F0 /. 55 push ebp ' E# f0 U! l# e* C I
004011F1 |. 89E5 mov ebp, esp
6 b9 L/ I0 R8 I* c u) n% v004011F3 |. 83EC 08 sub esp, 8 8 O. G2 U3 i3 p0 ^, {- h' d
004011F6 |. 83C4 F4 add esp, -0C
; r# ] v; l/ r' G1 Y004011F9 |. 6A 02 push 2
3 }2 w2 m9 P4 T* F' q( b5 k7 }004011FB |. A1 DC304000 mov eax, dword ptr [<&msvcrt.__set_a> : Q# a/ {& e9 E2 u
00401200 |. FFD0 call eax ; <&msvcrt.__set_app_type>
: n! i7 J: {+ c9 g' s4 `/ ]( g. [& R00401202 |. E8 79FFFFFF call 00401180
6 }+ _6 @3 x) z0 l8 \' v& q+ \" q00401207 |. C9 leave
& T/ Q- r; j5 e' I00401208 \\. C3 retn
# F0 B J& ` g6 E00401209 00 db 00
7 `+ x" r' T3 }; H P3 k H0040120A 00 db 00
2 ^. R( u J3 e7 F p9 v0040120B 00 db 00
8 }1 q3 `" c9 f* [% C0040120C 00 db 00
. u7 k; f0 p% i$ u5 L0040120D 00 db 00 # _# h( I/ G: N7 y
0040120E 00 db 00
$ r+ m/ ?8 R6 P5 D3 V! z% Q/ j6 `0040120F 00 db 00
( B* K. x0 b/ @* L00401210 72 db 72 ; CHAR 'r'
M: u& j5 Z) B- _- z; f" c$ `00401211 00 db 00 H# k- Y# K: U5 X
00401212 . 69 6E 70 75 7>ascii "input.txt",0
% o, y: t+ e) k4 g# n0040121C . 43 61 6E 27 7>ascii "Can't Find input" : r+ E1 h, y, m
0040122C . 2E 74 78 74 2>ascii ".txt!",0 3 W8 r, S& P& y) j3 z) \& ?
00401232 77 db 77 ; CHAR 'w' $ ]6 I5 n ] A
00401233 00 db 00 @$ C1 z# b9 Y. A" ]- n
00401234 . 6F 75 74 70 7>ascii "output.txt",0 8 t) T# q8 I. r% x. l( f
0040123F . 43 61 6E 27 7>ascii "Can't Create out"
# n: d$ g1 J; f3 ~7 Y& D& i0040124F . 70 75 74 2E 7>ascii "put.txt!",0
- _ W& g9 ] h8 L8 Y6 X00401258 . 6F 6E 65 20 6>ascii "one char outpute"
( z6 N7 @; B6 k+ T% f00401268 . 64 0A 00 ascii "d
3 d7 U, c8 M$ T",0
. }. u! D& d! f% I* S* }0040126B 90 nop ' u0 z$ K6 t6 \/ g9 \7 ~0 _
0040126C /$ 55 push ebp 1 o/ C, q- {/ R$ m3 p5 }# S
0040126D |. 89E5 mov ebp, esp
1 ], r+ w! w; T$ g' C0040126F |. 83EC 18 sub esp, 18 " `* Y" B C% a9 {# n2 l0 k# m- r
00401272 |. E8 39010000 call 004013B0 , _2 k$ L, O. |# U- @
00401277 |. 83C4 F8 add esp, -8 6 U2 ?3 [6 I& q/ O* _* q L" o' L
0040127A |. 68 10124000 push 00401210 ; /mode = "r"
$ H- t& L2 Q1 ?) n6 W0 l- X0040127F |. 68 12124000 push 00401212 ; |path = "input.txt"
- n4 B# }# s. [% F0 k00401284 |. E8 AF010000 call <jmp.&msvcrt.fopen> ; \\fopen 5 Z, G* g* D- x" w1 I
00401289 |. 83C4 10 add esp, 10
& X5 @$ k( ]& A( o, o& |0040128C |. 89C0 mov eax, eax ' U, j! O9 Y x8 \
0040128E |. 8945 FC mov dword ptr [ebp-4], eax
G/ I# K( l& v# U1 J$ q00401291 |. 837D FC 00 cmp dword ptr [ebp-4], 0 9 [9 h$ x& ?- P! n" o; C+ |
00401295 |. 75 10 jnz short 004012A7
9 c: D5 x* \2 P4 c$ @ h00401297 |. 83C4 F4 add esp, -0C
A9 m8 `& }+ O* k1 W+ ^# P' m0040129A |. 68 1C124000 push 0040121C ; /format = "Can't Find input.txt!"
1 ~9 h$ W, l! [2 W& @ U' P0040129F |. E8 8C010000 call <jmp.&msvcrt.printf> ; \\printf 1 K O. Y; H/ \* r+ G- p2 N- _& q4 J
004012A4 |. 83C4 10 add esp, 10
2 c7 f! D5 ?/ ~/ s$ o004012A7 |> 83C4 F8 add esp, -8 : l7 {; a) M, F, t; q4 J) E
004012AA |. 68 32124000 push 00401232 ; /mode = "w"
8 h& b/ r6 K+ h0 k7 S2 O' l+ f0 }004012AF |. 68 34124000 push 00401234 ; |path = "output.txt"
3 u$ L: a g: R! }& v& [004012B4 |. E8 7F010000 call <jmp.&msvcrt.fopen> ; \\fopen 1 b- A3 \6 r$ `( j, p
004012B9 |. 83C4 10 add esp, 10 ! d5 B v$ X9 O7 X4 N
004012BC |. 89C0 mov eax, eax
$ f! C) u3 S$ l2 x2 E004012BE |. 8945 F8 mov dword ptr [ebp-8], eax 8 g8 I7 O N6 m: U) ?, H# e- y
004012C1 |. 837D F8 00 cmp dword ptr [ebp-8], 0
$ F7 P3 i3 y3 ]/ \; |004012C5 |. 75 10 jnz short 004012D7 % c& d% I7 e/ O
004012C7 |. 83C4 F4 add esp, -0C
3 g0 X5 r( c, }5 _' w. e7 @9 g004012CA |. 68 3F124000 push 0040123F ; /format = "Can't Create output.txt!"
' T5 @4 T3 `' d/ R* i004012CF |. E8 5C010000 call <jmp.&msvcrt.printf> ; \\printf
) i, }2 W8 n( {6 g' f% V004012D4 |. 83C4 10 add esp, 10
, W4 B! y3 w* c004012D7 |> 83C4 F4 /add esp, -0C & ^+ [4 h L: j
004012DA |. 8B45 FC |mov eax, dword ptr [ebp-4]
2 t# X# L" \1 b- o, e: G2 j* F004012DD |. 50 |push eax ; /stream / q- D7 a. E" v7 H8 I+ u
004012DE |. E8 45010000 |call <jmp.&msvcrt.fgetc> ; \\fgetc
6 g1 I* m1 a1 O2 [ y004012E3 |. 83C4 10 |add esp, 10
* E9 C, Z# t0 q y q' M( P004012E6 |. 89C0 |mov eax, eax $ ]9 r9 o, N& I& I
004012E8 |. 8945 F4 |mov dword ptr [ebp-C], eax
' d4 v9 x% Y7 t+ G" I7 u3 T004012EB |. 817D F4 80000>|cmp dword ptr [ebp-C], 80 5 z) v5 y6 }' Q; u: Q9 q
004012F2 |. 7F 23 |jg short 00401317 * q+ [( a+ E) S/ ?, u @0 ` u
004012F4 |. 83C4 F8 |add esp, -8 b$ I6 Y* q) p' D2 z, D- C. I9 R
004012F7 |. 8B45 F8 |mov eax, dword ptr [ebp-8] ; R* X" F' q! A2 u: w
004012FA |. 50 |push eax ; /stream . s' R2 R2 a7 V
004012FB |. 8B45 F4 |mov eax, dword ptr [ebp-C] ; |
- C O; ]+ _+ G5 E& G) ~004012FE |. 50 |push eax ; |c 6 s9 @- {( w; k6 H' }* {
004012FF |. E8 1C010000 |call <jmp.&msvcrt.fputc> ; \\fputc " e6 G' _! q3 C/ N& M
00401304 |. 83C4 10 |add esp, 10 - t( G5 Z2 q0 I# P k8 m+ T* y/ v* x
00401307 |. 83C4 F4 |add esp, -0C
3 B/ r- d) X5 o9 ^ a5 P3 Q0040130A |. 68 58124000 |push 00401258 ; /format = "one char outputed",LF,""
; h: J3 V# w i* b9 e3 Q0040130F |. E8 1C010000 |call <jmp.&msvcrt.printf> ; \\printf 2 i/ O( z/ b! W0 P6 K
00401314 |. 83C4 10 |add esp, 10
% o; [' _, S- ?00401317 |> 837D F4 FF |cmp dword ptr [ebp-C], -1
5 w9 ^) V0 L3 ] |& m0040131B |. 75 03 |jnz short 00401320 3 i/ W3 C( ?3 H" d: C
0040131D |. EB 03 |jmp short 00401322
6 r% B! n$ l3 w! H# \0040131F | 90 |nop 0 P+ q" I, R y$ i. _$ a d
00401320 |>^ EB B5 \\jmp short 004012D7 8 h6 {# s f8 \% ?# x( _( k3 I
00401322 |> C9 leave
' |, Y; m& P4 [: _* J1 I( d( L. `00401323 \\. C3 retn
* i1 F! Q6 G4 k. X. w00401324 00 db 00
! W& U3 v" Z1 C. d/ x00401325 00 db 00 o8 ~1 X: l3 i9 Z3 ^8 i2 i& m, [9 u" b
00401326 00 db 00
5 \1 A2 d9 X, A. S/ B& V( ^; X00401327 00 db 00
+ Q# }7 g7 H7 X: i* a( b00401328 00 db 00 ; ?' Y+ A8 _) z2 R1 c1 R. X
00401329 00 db 00 3 q$ y) j" p* Y! Y) |, @
0040132A 00 db 00 ( T& \/ \ |9 i" E
0040132B 00 db 00 " O& w! c" z0 t- h [) C Z% }& ` \
0040132C 00 db 00
q3 l0 x$ W! B# B5 A* u0040132D 00 db 00 , z1 X" g M* U& k
0040132E 00 db 00 ( `4 G1 M+ ~1 n* c* k$ v# ^
0040132F 00 db 00
+ L6 w4 X- \2 ~2 `00401330 /. 55 push ebp
5 b' S- g/ k7 w" B2 q% {00401331 |. 89E5 mov ebp, esp
- j4 K: A( G7 b6 Z. P00401333 |. 83EC 08 sub esp, 8
2 ^* G4 D% p% m% B" |4 K) V2 ^00401336 |. A1 10204000 mov eax, dword ptr [402010] 0 s2 X, T% m: [# ]& o% y
0040133B |. 8338 00 cmp dword ptr [eax], 0
! B9 d1 \' A' }0040133E |. 74 1D je short 0040135D
9 |! |' @ x( a/ d00401340 |> A1 10204000 /mov eax, dword ptr [402010] ) ]& G! ?( R5 \+ k& q9 s
00401345 |. 8B00 |mov eax, dword ptr [eax] 6 C6 h: r0 r- h# N; k
00401347 |. FFD0 |call eax
8 d2 A) x" Z a! y) m00401349 |. A1 10204000 |mov eax, dword ptr [402010]
$ ~$ R1 L0 N( L( y1 g# d, J) s( {0040134E |. 8D50 04 |lea edx, dword ptr [eax+4]
2 S. p7 h* @8 g! S. [. W+ v8 J" X00401351 |. 8915 10204000 |mov dword ptr [402010], edx ; A$ j1 B6 d: N4 a% J+ U
00401357 |. 8378 04 00 |cmp dword ptr [eax+4], 0
: t7 n1 |# \. i- q }9 B8 F0040135B |.^ 75 E3 \\jnz short 00401340 , ~# c. m! }/ i0 a; G+ k" P
0040135D |> C9 leave
" f8 e* S* O* Z( X$ Q0040135E \\. C3 retn
* F& u% x2 f- b$ ~) [0040135F 90 nop : ]0 M4 v. N: P3 O$ q7 j
00401360 /$ 55 push ebp
) R q s# _6 ^* {00401361 |. 89E5 mov ebp, esp , w6 e9 h }/ v C- ]3 c! k* m" Q
00401363 |. 83EC 14 sub esp, 14 : Y% \; [ w( C
00401366 |. 53 push ebx 9 j- p4 O/ @) P: [& b
00401367 |. A1 58144000 mov eax, dword ptr [401458] ! O4 u" j# E; q2 `* c% p- [
0040136C |. 83F8 FF cmp eax, -1 9 H6 G5 M4 Y0 e
0040136F |. 75 19 jnz short 0040138A
3 {' q4 o' g' p/ b+ n/ P; F00401371 |. 31C0 xor eax, eax
( V7 ~0 k! b9 A: Y% y# C00401373 |. 833D 5C144000>cmp dword ptr [40145C], 0
% K3 O4 Z% I$ h' y# S% g0040137A |. 74 0E je short 0040138A ! a) s9 r- b A( c' |& b1 d: P& l
0040137C |. BA 5C144000 mov edx, 0040145C
9 x: c6 t0 ~$ e# w, w00401381 |> 83C2 04 /add edx, 4 ' S/ a4 I& N5 m/ N
00401384 |. 40 |inc eax ( M* X* P5 ~$ N+ S6 b
00401385 |. 833A 00 |cmp dword ptr [edx], 0
; ~! A4 G9 K2 R. R00401388 |.^ 75 F7 \\jnz short 00401381 . a( X# b% g0 e U
0040138A |> 89C3 mov ebx, eax
" K* {/ l& f7 q- i7 j4 o6 }; z0040138C |. 85DB test ebx, ebx 1 u4 f! t4 M) m- m5 x. [2 A% ~/ K
0040138E |. 74 0C je short 0040139C " w* G1 E8 [& {9 B6 t# R3 U
00401390 |> 8B049D 581440>/mov eax, dword ptr [ebx*4+401458]
, o( a; k, H% R* P6 R00401397 |. FFD0 |call eax / v, Z) H/ D$ W" s `" q/ m1 P: U6 E
00401399 |. 4B |dec ebx
' K N- C" n j- ]/ a& [$ b# g0040139A |.^ 75 F4 \\jnz short 00401390 5 T' O# x' N" Z& H
0040139C |> 83C4 F4 add esp, -0C 1 d1 P7 y1 F* W3 z8 X$ d3 v1 x
0040139F |. 68 30134000 push 00401330 ; /func = engoutpu.00401330
c s; W$ b6 m1 j- W7 M004013A4 |. E8 97000000 call <jmp.&msvcrt.atexit> ; \\atexit
4 A4 O9 @5 H: o7 Q( N4 I004013A9 |. 8B5D E8 mov ebx, dword ptr [ebp-18] / J& }# l# V. a$ ~& Q% \# L
004013AC |. C9 leave 2 ]3 E* X( c' Q! P! j; J6 g& e
004013AD \\. C3 retn
; T0 H+ [/ y7 V5 j004013AE 89F6 mov esi, esi
& o6 u4 N- q$ l! |004013B0 /$ 55 push ebp
/ t, E, W* K$ D/ X# w5 @004013B1 |. 89E5 mov ebp, esp " m! B; U; }/ Q7 K: t" @
004013B3 |. 83EC 08 sub esp, 8 % ?+ t! l5 t0 Y2 Z( g* w5 X
004013B6 |. 833D 14204000>cmp dword ptr [402014], 0
- M& ^9 u, `" G$ S0 Y( i: N; \. u# f0 w004013BD |. 75 0F jnz short 004013CE ( `0 W. z |" x; \. X
004013BF |. C705 14204000>mov dword ptr [402014], 1
$ N9 B4 ^: `9 l0 O9 f) b! X004013C9 |. E8 92FFFFFF call 00401360
% w1 A# f3 ^) W$ F7 y v004013CE |> C9 leave M8 L- B5 D" z8 w8 ?) Y$ T
004013CF \\. C3 retn ! ]0 Q5 D- v+ s z, C" n
004013D0 .- FF25 AC304000 jmp dword ptr [<&msvcrt._fmode>] ; msvcrt._fmode
% v: c6 U* Z* D1 E, Q. _6 D8 j004013D6 90 nop 4 t; L- N* U! q7 K; U
004013D7 90 nop
/ k" _+ y' f7 f004013D8 .- FF25 B4304000 jmp dword ptr [<&msvcrt._iob>] ; msvcrt._iob & c4 |# z; V% }& ?
004013DE 90 nop 8 q1 X! f5 B4 R& a$ Q9 _" S
004013DF 90 nop / U, @: L N8 i K# E) Y9 a/ V
004013E0 .- FF25 DC304000 jmp dword ptr [<&msvcrt.__set_app_ty>; msvcrt.__set_app_type + J. | Q4 y6 `% `
004013E6 90 nop
5 Y. B0 e7 d( d1 k. J; X004013E7 90 nop ( ~3 {% J! o7 Y
004013E8 $- FF25 A4304000 jmp dword ptr [<&msvcrt._cexit>] ; msvcrt._cexit " t2 `0 ^' ~* g5 n* R' _
004013EE 90 nop
8 S$ U$ ?; T: k+ A: S% M004013EF 90 nop
& f$ S# _ |& K0 L" b- e8 C0 ~004013F0 $- FF25 D0304000 jmp dword ptr [<&msvcrt.__p__environ>; msvcrt.__p__environ : c4 M! s( v3 V4 s6 ]* H
004013F6 90 nop
. G. F- ^4 j3 F( M004013F7 90 nop
, \1 w4 v$ C% }$ s- o! r1 p004013F8 $- FF25 B0304000 jmp dword ptr [<&msvcrt._fpreset>] ; msvcrt._fpreset # @, B8 g/ E/ {; I( n; z# ?
004013FE 90 nop - c; ~, }( E" }' a" c3 f
004013FF 90 nop
% h. }( u' {! z O" q00401400 $- FF25 D8304000 jmp dword ptr [<&msvcrt.signal>] ; msvcrt.signal
" ~6 \. ]" k, v; w) e* |00401406 90 nop b8 w% ~8 P5 j) Z9 Y
00401407 90 nop ) V( h ]8 P% d+ ?$ K) j
00401408 $- FF25 A8304000 jmp dword ptr [<&msvcrt._fileno>] ; msvcrt._fileno
Y1 ^+ a* t' l0 ?0 T! a" M! B0040140E 90 nop
1 J& C% V( G; h2 k0040140F 90 nop 3 B+ i g8 s# [8 [: h9 d
00401410 $- FF25 B8304000 jmp dword ptr [<&msvcrt._setmode>] ; msvcrt._setmode
# m2 _6 `& j: b) A- l( |4 ?1 D5 x00401416 90 nop 7 Y) v9 P! Q T
00401417 90 nop 0 I! h* [# P+ z
00401418 $- FF25 BC304000 jmp dword ptr [<&msvcrt.__getmainarg>; msvcrt.__getmainargs 6 _( E) p2 I% |5 W m
0040141E 90 nop 8 F, ]7 b7 K2 _8 F8 K1 q0 v. T# J
0040141F 90 nop 0 ?. l2 R+ Q! q
00401420 $- FF25 CC304000 jmp dword ptr [<&msvcrt.fputc>] ; msvcrt.putc
1 ]) Q5 b( e" E00401426 90 nop
0 W# b& `2 S# z00401427 90 nop
9 G( X$ b! i' J8 J( v: [1 O9 s00401428 $- FF25 C4304000 jmp dword ptr [<&msvcrt.fgetc>] ; msvcrt.getc
/ |1 g+ i- O( O% L0040142E 90 nop
7 B9 ?! |& f* |* j, ? H; C3 @0040142F 90 nop 2 M' y) V* D& F
00401430 $- FF25 D4304000 jmp dword ptr [<&msvcrt.printf>] ; msvcrt.printf
0 j' P6 Z2 x. Q. L00401436 90 nop ?# v2 F( w7 D1 @! J& f8 E
00401437 90 nop & h$ j* f# k, _ e0 C0 u
00401438 $- FF25 C8304000 jmp dword ptr [<&msvcrt.fopen>] ; msvcrt.fopen
- h) _. F: F$ l3 L4 I0040143E 90 nop : I. W$ c. F* k3 g s5 A
0040143F 90 nop ( t& {2 E( V0 }; C
00401440 $- FF25 C0304000 jmp dword ptr [<&msvcrt.atexit>] ; msvcrt.atexit ( z9 @8 B) n! r: W% y$ t3 z
00401446 90 nop
3 m2 \$ K% `6 j) G, j( X9 n* Y# v00401447 90 nop / e5 s, A+ Q8 ^1 R- L! e
00401448 $- FF25 98304000 jmp dword ptr [<&KERNEL32.SetUnhandl>; kernel32.SetUnhandledExceptionFilter
: A$ b+ u. {) m4 I) k0040144E 90 nop - x( @* a4 P0 d r* G" f
0040144F 90 nop 5 |: @; @! W7 T# J+ D
00401450 .- FF25 94304000 jmp dword ptr [<&KERNEL32.ExitProces>; kernel32.ExitProcess
2 `! P( l( ^: H. _; D6 v00401456 90 nop
' H" n5 J1 t; k$ x8 [' v- M6 ?+ g- a00401457 90 nop
) c9 [& A {8 Q9 |: g* k00401458 . FFFFFFFF dd FFFFFFFF
' Y( _6 w6 y# B0040145C . 00000000 dd 00000000 ! @) Y L: |" {" i4 L1 X
00401460 FF db FF
# i3 X" l" R' L' W5 ]00401461 FF db FF
4 ?2 h) d: n4 s$ v# D7 D, r00401462 FF db FF 8 x h! a% o2 W& k
00401463 FF db FF 2 j9 ^2 s' P* `( z( P& F3 l" d
00401464 00 db 00
9 s& f# m; L4 m4 u- |# t- \7 o00401465 00 db 00
( S7 H0 {( O, ^1 ]% m00401466 00 db 00
; S% Y; c7 j) L/ a00401467 00 db 00 |