由于这个程序很短,OD里面的汇编代码也很短。
0 v4 I& h4 D8 U% P请看红色的部分,这就是和0x80比较的部分。 0 P- [. E8 S, _6 f1 j0 A
把这2句NOP掉,然后保存修改后的文件为exe。 6 g# u1 U- R% t# C$ @2 ~
我们发现input.txt里面的所有内容都能被输出了。
8 ]( F6 F; S) c& m) t. x1 C附上修改后的exe.
3 I& }/ N7 O7 k! r+ A深绿,你可以把这个操作过程试一下,练习一下.
$ L$ e9 |" T; \
6 R* o7 y4 V$ R$ i, h% K, U00401000 /$ 55 push ebp : A& p+ n4 m1 x |5 G
00401001 |. 89E5 mov ebp, esp 8 ^; E ^; X; \7 }
00401003 |. 83EC 18 sub esp, 18 3 O+ C' M8 N; _& @! x
00401006 |. C745 FC 00000>mov dword ptr [ebp-4], 0 ) C' [0 c+ w% _2 r5 W
0040100D |. 83C4 F4 add esp, -0C
8 I$ \) c0 ^: U+ Y; R8 s00401010 |. 8D45 FC lea eax, dword ptr [ebp-4] ) M2 i+ D! W+ v7 W
00401013 |. 50 push eax
' T1 o$ s: m; d* a; h2 ^) m00401014 |. FF35 08204000 push dword ptr [402008] 2 }: t1 K+ t) A
0040101A |. 8D45 F8 lea eax, dword ptr [ebp-8]
% @9 f D, \$ n4 J" ]. B0040101D |. 50 push eax
6 s- n, Z" P$ J' V" |$ T4 e+ b0040101E |. 68 04204000 push 00402004 " l) U7 t* _6 i" x
00401023 |. 68 00204000 push 00402000
1 H; K, Z; f' X2 \- `00401028 |. E8 EB030000 call <jmp.&msvcrt.__getmainargs> 1 w! ^4 E. k2 v0 a0 v( |1 }
0040102D |. C9 leave ' p9 {! G! A6 }, E
0040102E \\. C3 retn
4 e7 ]+ p/ d% m* Z% I! ~5 M0040102F 90 nop
/ O+ _) s/ k3 @6 p& i; P* c" G00401030 /$ 55 push ebp # n% F, X6 l! w' |! E0 C( a
00401031 |. 89E5 mov ebp, esp
2 V$ I9 H6 P6 A00401033 |. 83EC 08 sub esp, 8
9 h5 Z- x8 s9 Q- T, H! j' b; K00401036 |. 8B15 0C204000 mov edx, dword ptr [40200C]
! p- L. N+ }! Z3 T0040103C |. 85D2 test edx, edx $ s8 ]( \) L! e; i( D" Z
0040103E |. 74 7B je short 004010BB - h) {: Q M3 o- e
00401040 |. A1 AC304000 mov eax, dword ptr [<&msvcrt._fmode>>
7 ]& S2 r* f q& s! \% B00401045 |. 8910 mov dword ptr [eax], edx
F+ t: G+ a( |00401047 |. A1 B4304000 mov eax, dword ptr [<&msvcrt._iob>]
; S7 u" L' v, G" _2 ?# F/ o, U, a0040104C |. 85C0 test eax, eax
# m/ ~' a3 [& W! \9 r0 M0040104E |. 74 1E je short 0040106E
' v! f6 e# W. k00401050 |. 83C4 F8 add esp, -8
6 [# o4 y9 k9 K6 u$ T4 ?" {/ y00401053 |. FF35 0C204000 push dword ptr [40200C] $ L( _, E! Z) o' S, U2 r9 F
00401059 |. 83C4 F4 add esp, -0C " }8 w9 }& m% I# X. B4 e, p5 i) t
0040105C |. 50 push eax ; /pstream => offset msvcrt._iob - `+ v6 G; v, f+ g7 T5 C7 A
0040105D |. E8 A6030000 call <jmp.&msvcrt._fileno> ; \\_fileno
+ Y Z/ g# g7 y, o$ P00401062 |. 83C4 10 add esp, 10 / d2 m/ t; ]) ]' }3 ^
00401065 |. 50 push eax ; |handle " ?% b& x+ n7 G
00401066 |. E8 A5030000 call <jmp.&msvcrt._setmode> ; \\_setmode 2 |3 S2 B) Y+ V
0040106B |. 83C4 10 add esp, 10 ( ^( ]3 Z/ v/ A! t- H( y6 v
0040106E |> A1 B4304000 mov eax, dword ptr [<&msvcrt._iob>]
+ L$ v- S* {# O- c1 s! y& v8 J00401073 |. 83C0 20 add eax, 20
* l1 ]7 a9 u& e( k7 a) X* S6 B00401076 |. 74 1E je short 00401096 * _; v' I1 [. A" ~. x; r% m' |
00401078 |. 83C4 F8 add esp, -8 # B7 N6 c+ J( x/ s
0040107B |. FF35 0C204000 push dword ptr [40200C] $ e) ^. s( E/ D- j1 G
00401081 |. 83C4 F4 add esp, -0C
9 k7 S: k; t1 I1 B' n00401084 |. 50 push eax ; /pstream
% U5 h! i9 E4 _00401085 |. E8 7E030000 call <jmp.&msvcrt._fileno> ; \\_fileno $ ?7 L8 R0 a4 r; p& g
0040108A |. 83C4 10 add esp, 10
& f2 Z( O: I$ r- J0040108D |. 50 push eax ; |handle 8 B, F# L w+ Y5 ]/ c& X [
0040108E |. E8 7D030000 call <jmp.&msvcrt._setmode> ; \\_setmode * D0 I l, S! K, G( D3 t
00401093 |. 83C4 10 add esp, 10
( E% P. t: c/ L9 u7 D5 y00401096 |> A1 B4304000 mov eax, dword ptr [<&msvcrt._iob>] + {4 z# m1 i! O9 {: N
0040109B |. 83C0 40 add eax, 40 q' q, @% q% g
0040109E |. 74 1B je short 004010BB
& \8 P" u1 U- E: G9 s1 k9 P6 z1 w004010A0 |. 83C4 F8 add esp, -8
0 @ e; v% }4 O* ?004010A3 |. FF35 0C204000 push dword ptr [40200C]
v2 b0 p4 _" e4 Z5 }5 s004010A9 |. 83C4 F4 add esp, -0C
" o4 E( R# V# t/ d7 K0 ~' u004010AC |. 50 push eax ; /pstream
( D* E5 y+ M& M8 k$ c004010AD |. E8 56030000 call <jmp.&msvcrt._fileno> ; \\_fileno
" G1 h) v0 E1 W004010B2 |. 83C4 10 add esp, 10 6 G4 X9 O$ y1 @( s2 l( C8 l0 a4 O
004010B5 |. 50 push eax ; |handle 6 G. E+ y$ f, P2 ^# k2 s$ R- W; p
004010B6 |. E8 55030000 call <jmp.&msvcrt._setmode> ; \\_setmode
M' E& ?" ^; ^* C) o$ r004010BB |> C9 leave ; K ? P6 g g$ y2 c* t9 d% j
004010BC \\. C3 retn
3 q! ~; ]5 @. X' i; k004010BD 8D76 00 lea esi, dword ptr [esi]
- N8 \( A1 u+ k7 A0 _5 y004010C0 /. 55 push ebp
' e. u- {* w) u! y004010C1 |. 89E5 mov ebp, esp
' p# j& Y4 O+ n) ^, S004010C3 |. 83EC 10 sub esp, 10
4 E2 v/ c% c' a7 @004010C6 |. 56 push esi
- ^$ z l- \! B$ c9 z004010C7 |. 53 push ebx # Q; \% h/ U% |' y: g0 u4 W
004010C8 |. 8B45 08 mov eax, dword ptr [ebp+8] 6 ~$ g/ ^' T9 K/ W: k5 m
004010CB |. 31DB xor ebx, ebx : C# g6 |, ~! X0 B- x( a
004010CD |. 31F6 xor esi, esi
0 i Y* Q0 R$ B8 P, T004010CF |. 8B00 mov eax, dword ptr [eax] / u1 \" j& M2 b- Q" x" y0 r. P
004010D1 |. 8B00 mov eax, dword ptr [eax]
- g O* H7 R' p9 a: K8 C- T% q. f004010D3 |. 3D 910000C0 cmp eax, C0000091
1 p& R& `0 f7 @, A' `0 }004010D8 |. 77 16 ja short 004010F0 ! G/ q6 `- s* E4 D: z- o
004010DA |. 3D 8D0000C0 cmp eax, C000008D & r! }; T- f/ ^1 M4 O
004010DF |. 73 4F jnb short 00401130 : I: `+ C' b. }6 \
004010E1 |. 3D 050000C0 cmp eax, C0000005 : x$ h( H! `4 v, N& b) Q
004010E6 |. 74 18 je short 00401100 $ t8 p! x+ r0 i& x
004010E8 |. E9 86000000 jmp 00401173 % }% M7 U( y% R
004010ED | 8D76 00 lea esi, dword ptr [esi] / U! ]0 X/ }1 `7 v
004010F0 |> 3D 930000C0 cmp eax, C0000093
9 ^, |8 d0 z% Q- R+ M N3 w004010F5 |. 74 39 je short 00401130
; j* K) `1 `6 N; d z d- m004010F7 |. 3D 940000C0 cmp eax, C0000094
% H9 } K+ U) l+ `7 Y! D8 F004010FC |. 74 37 je short 00401135 ) D; P! Y$ ]5 `& `
004010FE |. EB 73 jmp short 00401173 ; r$ I* V. z4 G5 J! H- n
00401100 |> 83C4 F8 add esp, -8 ' V7 x+ V" [: S4 h4 {: z
00401103 |. 6A 00 push 0 ; /func = NULL
" t5 k$ `( @# Q# x" L- Z! w- k00401105 |. 6A 0B push 0B ; |sig = SIGSEGV 2 F- H3 W7 p: O4 l: h1 x7 y/ Y& s6 f
00401107 |. E8 F4020000 call <jmp.&msvcrt.signal> ; \\signal 4 r- r' F! `! J: w* k# E; f' n
0040110C |. 83C4 10 add esp, 10 , X J1 B- a& `" M- j
0040110F |. 83F8 01 cmp eax, 1
1 b3 ^7 E. N) G% ~( _, f4 [6 L0 n3 x00401112 |. 75 0E jnz short 00401122
, U" Q) Z& t, q2 w) g" e( `3 {00401114 |. 83C4 F8 add esp, -8 1 f& t/ V0 o i; ^3 D+ j
00401117 |. 6A 01 push 1 ; /func = 00000001 # j& _6 \0 b3 g t$ \* M1 w
00401119 |. 6A 0B push 0B ; |sig = SIGSEGV
# q4 G: l7 {0 X7 n2 K' Z1 I0040111B |. E8 E0020000 call <jmp.&msvcrt.signal> ; \\signal $ ^1 z% J7 Z( @/ J Z; M
00401120 |. EB 4C jmp short 0040116E
w/ H. W- B2 B G" \; O7 _9 ~00401122 |> 85C0 test eax, eax
0 |6 o4 H U2 x2 I: n) Y' V& {00401124 |. 74 4D je short 00401173
, W3 o. V* b% p" a00401126 |. 83C4 F4 add esp, -0C : {, {8 U' N& Y* n& v9 C0 _
00401129 |. 6A 0B push 0B $ N: n/ W! P8 p! K
0040112B |. EB 3F jmp short 0040116C 4 a5 N4 A. a+ B8 l
0040112D | 8D76 00 lea esi, dword ptr [esi]
l& T8 `( U5 g9 f' J00401130 |> BE 01000000 mov esi, 1
+ Z1 c2 ?( A/ R1 p; E7 k$ C( P. b; w00401135 |> 83C4 F8 add esp, -8
( w$ Y' I, E! L& R0 T5 H4 a00401138 |. 6A 00 push 0 ; /func = NULL
, ]- T7 G& z, q0 q0040113A |. 6A 08 push 8 ; |sig = SIGFPE 9 D5 H$ w1 k9 K4 |1 D7 h" C
0040113C |. E8 BF020000 call <jmp.&msvcrt.signal> ; \\signal
. T/ J4 j" ~" M# r00401141 |. 83C4 10 add esp, 10
4 e) l; {0 Y/ q00401144 |. 83F8 01 cmp eax, 1
( ~4 J; D% h4 u' Y5 @. P4 L, w00401147 |. 75 1A jnz short 00401163 ( c. t2 V6 z9 J
00401149 |. 83C4 F8 add esp, -8 % I% C% X) v" C9 J) q1 f4 @) I
0040114C |. 6A 01 push 1 ; /func = 00000001
! \8 [: }. [5 f7 |; X; {0040114E |. 6A 08 push 8 ; |sig = SIGFPE : {( B- r! a6 ^2 t
00401150 |. E8 AB020000 call <jmp.&msvcrt.signal> ; \\signal
" Z" {) K0 ^' q2 N8 q. e00401155 |. 83C4 10 add esp, 10
' t3 O/ a- e3 [ n/ n- Q' H! B0 m00401158 |. 85F6 test esi, esi
) |, B- {( C/ _, w$ G) F, z0040115A |. 74 12 je short 0040116E ; D9 y1 t8 A5 s' f( t# L( V9 e7 K
0040115C |. E8 97020000 call <jmp.&msvcrt._fpreset> ; [_fpreset
, K7 V4 w2 s) m' d+ c" e' W00401161 |. EB 0B jmp short 0040116E
# _1 ^8 V/ \0 u- z! @00401163 |> 85C0 test eax, eax 5 \2 Y; i! S; b1 S
00401165 |. 74 0C je short 00401173
0 p5 U, z# y# ?- a0 g3 w, h00401167 |. 83C4 F4 add esp, -0C A5 L+ ^' \$ j, P) x' f8 L9 |0 z
0040116A |. 6A 08 push 8
% u0 h4 w# G t* M& \0040116C |> FFD0 call eax
# X8 w$ i1 b" R8 I+ T2 x8 `, H$ C: G0040116E |> BB FFFFFFFF mov ebx, -1 - Q0 j4 m8 E3 s# {9 Q
00401173 |> 89D8 mov eax, ebx C3 q3 X( ^/ u, k' E
00401175 |. 8D65 E8 lea esp, dword ptr [ebp-18] ! u r. y, @, Z/ d3 l) c8 F/ P" a
00401178 |. 5B pop ebx 6 l4 m) K C5 Z3 M; f- ^: y4 E
00401179 |. 5E pop esi
5 w0 Y) f6 Z5 }* ]- e7 S0040117A |. C9 leave 3 |) E" _* h' T( S! a# t# B4 g/ ]
0040117B \\. C2 0400 retn 4
# y8 x$ G, }7 O* n! h" \2 e$ d0040117E 89F6 mov esi, esi + e- W2 X, f& {% L, ]5 [9 t
00401180 /$ 55 push ebp ; N6 J4 k+ \( l6 H/ n8 w
00401181 |. 89E5 mov ebp, esp
3 l+ A0 |" ~: S00401183 |. 83EC 14 sub esp, 14
2 L" G, f' w3 n0 u00401186 |. 53 push ebx $ A* A( d' r; e3 K0 y" ^
00401187 |. 83C4 F4 add esp, -0C
. W1 j, P, m$ c: A4 T3 ]$ D) @0040118A |. 68 C0104000 push 004010C0 ; /pTopLevelFilter = engoutpu.004010C0
0 f8 T' l! m! A- t7 }& b. [" }0040118F |. E8 B4020000 call <jmp.&KERNEL32.SetUnhandledExcep>; \\SetUnhandledExceptionFilter
/ B( x; P" [. y+ i- E00401194 |. 83C4 FC add esp, -4
% s. w( }( D7 d00401197 |. E8 5C020000 call <jmp.&msvcrt._fpreset> ; [_fpreset 2 e* O, K$ R( e0 V% s. e
0040119C |. E8 5FFEFFFF call 00401000 : z: D- c* Y+ w1 J9 A9 u3 G
004011A1 |. E8 8AFEFFFF call 00401030
+ R3 H' ]( e7 s' M6 `7 X. {004011A6 |. 83C4 FC add esp, -4 ! ]9 f0 o( `; v- I9 t: O: h( p
004011A9 |. E8 42020000 call <jmp.&msvcrt.__p__environ> ! r9 g8 p0 l7 ?+ K0 _- y* d
004011AE |. FF30 push dword ptr [eax]
2 G; f' t3 ?: b% s7 h; y% ?004011B0 |. FF35 04204000 push dword ptr [402004]
5 S) B, E' t& ?8 I' ?004011B6 |. FF35 00204000 push dword ptr [402000] ! Q6 I8 P a/ T
004011BC |. E8 AB000000 call 0040126C
$ J3 B. F4 @. q004011C1 |. 89C3 mov ebx, eax
! `, Z: d. o$ Y5 R5 K$ d004011C3 |. 83C4 20 add esp, 20
0 \ k+ R9 P2 J4 E! _+ i004011C6 |. E8 1D020000 call <jmp.&msvcrt._cexit> ; [msvcrt._cexit
7 _! [" B, I" A6 `5 U004011CB |. 83C4 F4 add esp, -0C
" E- ]. _+ |1 f, s5 m' U" e0 _004011CE |. 53 push ebx ; /ExitCode
/ V# l% x3 U m2 T$ t+ V( l& i% l004011CF \\. E8 7C020000 call <jmp.&KERNEL32.ExitProcess> ; \\ExitProcess - Y K( P, z" ]9 b' ^$ b, z
004011D4 >/$ 55 push ebp % b& J% {/ @' q T; T
004011D5 |. 89E5 mov ebp, esp 1 k6 W$ s) S& Y: w: k+ @+ {% [4 j
004011D7 |. 83EC 08 sub esp, 8 % Y% m8 m! [1 ^$ l: N" x, ?: i2 _
004011DA |. 83C4 F4 add esp, -0C 4 q4 v; V5 j5 F: v/ N
004011DD |. 6A 01 push 1 " Q; s" {& g5 l
004011DF |. A1 DC304000 mov eax, dword ptr [<&msvcrt.__set_a> 8 j6 o0 Q: d% B9 `8 e0 i
004011E4 |. FFD0 call eax ; <&msvcrt.__set_app_type>
4 L1 F1 M- Q8 r6 Y9 p, L004011E6 |. E8 95FFFFFF call 00401180 " I$ @, i* ]$ u, v2 O
004011EB |. 31C0 xor eax, eax
8 v- n3 q3 ^, {6 R6 \/ @' g004011ED |. C9 leave
- L* w- z! ]( u004011EE \\. C3 retn
X! A; a) n4 h& t1 \" w4 y004011EF 90 nop . P7 B% F4 |0 G. B( M! e4 t
004011F0 /. 55 push ebp 5 b, j! q$ S5 W; G3 D& r
004011F1 |. 89E5 mov ebp, esp 0 k5 ^3 s. c4 q, l) T
004011F3 |. 83EC 08 sub esp, 8 9 u5 O1 Q. k/ o* C' Z/ M2 V) y
004011F6 |. 83C4 F4 add esp, -0C 2 f& i) n: q3 Q% N7 ]9 `
004011F9 |. 6A 02 push 2 ) J5 Q; |0 r; F6 l/ _4 Q
004011FB |. A1 DC304000 mov eax, dword ptr [<&msvcrt.__set_a>
$ w6 l/ E' @' g' H7 G, ]00401200 |. FFD0 call eax ; <&msvcrt.__set_app_type> 4 c% h, E8 ?$ M5 H: M# B2 C; T+ P
00401202 |. E8 79FFFFFF call 00401180
: l; f1 P1 S/ c' [$ N. p00401207 |. C9 leave ; I0 G3 D* x& ^4 s
00401208 \\. C3 retn & A4 r2 i( ]* f# B0 j
00401209 00 db 00 ' ]" }; P) H1 R' Y. ~) r) V
0040120A 00 db 00 7 }- {4 U# t6 ?+ Z5 r9 ]) r/ z
0040120B 00 db 00
8 Y- A' d: M/ ~! [0040120C 00 db 00 ( e: ^. D: W+ [" |
0040120D 00 db 00
4 Z' {/ n" d) S' a- J' i9 ?0040120E 00 db 00 . [' u. W2 y. Y- ^: z# j% f. Y* v
0040120F 00 db 00 / x& s7 b2 [) l9 L* l' l$ L" r
00401210 72 db 72 ; CHAR 'r' . v# P5 ]6 n9 y
00401211 00 db 00 ) U+ J6 S$ v+ {1 h
00401212 . 69 6E 70 75 7>ascii "input.txt",0 4 J; I$ s5 {8 J2 Q/ h$ s
0040121C . 43 61 6E 27 7>ascii "Can't Find input"
\; d/ O' A9 B" u! P0040122C . 2E 74 78 74 2>ascii ".txt!",0
5 J/ d- _* T8 d* \ `6 d00401232 77 db 77 ; CHAR 'w'
4 @$ y2 ]# y6 T5 M% ?/ t3 f) X* V00401233 00 db 00 ) J0 D1 j3 ^% m
00401234 . 6F 75 74 70 7>ascii "output.txt",0 & ?' g. H, U4 s% v( V9 a$ X
0040123F . 43 61 6E 27 7>ascii "Can't Create out"
" O* ^" `4 b7 p1 e) E/ F0040124F . 70 75 74 2E 7>ascii "put.txt!",0 6 ?, _3 w. v; z0 E
00401258 . 6F 6E 65 20 6>ascii "one char outpute"
+ M) [! I; k# V/ S+ P j00401268 . 64 0A 00 ascii "d . ?4 i$ n1 G- s3 D- K
",0 0 C4 m5 U% g! b/ i" o9 Q/ c E2 Q
0040126B 90 nop b6 W; E% K# g* E8 u
0040126C /$ 55 push ebp 1 j( X, L$ Q" g9 K# u
0040126D |. 89E5 mov ebp, esp
$ W4 e0 {3 K' o7 L& B0040126F |. 83EC 18 sub esp, 18 - Z/ s, K6 D* r0 }
00401272 |. E8 39010000 call 004013B0 # w4 A7 O% o" D1 J/ v$ H* I
00401277 |. 83C4 F8 add esp, -8 " j* y, o0 B; L0 Z' i5 I1 E
0040127A |. 68 10124000 push 00401210 ; /mode = "r"
) o/ [. O1 h0 U+ |' q e0040127F |. 68 12124000 push 00401212 ; |path = "input.txt"
4 f3 ^3 g' @; a) Y6 \$ a4 d00401284 |. E8 AF010000 call <jmp.&msvcrt.fopen> ; \\fopen
$ A- Y% Z: a+ r3 i: h6 r6 ^00401289 |. 83C4 10 add esp, 10
3 t+ e8 g, k0 h$ {0040128C |. 89C0 mov eax, eax
9 T; q; A( B8 ?) Y0040128E |. 8945 FC mov dword ptr [ebp-4], eax & k3 @# v# [' L8 W5 e2 F; I
00401291 |. 837D FC 00 cmp dword ptr [ebp-4], 0
& R: p# U" X/ i+ ?' b& J00401295 |. 75 10 jnz short 004012A7
0 f1 e$ K& l- ^, V. n/ t: d$ I! J00401297 |. 83C4 F4 add esp, -0C # u1 D6 n2 i. Z% _' o
0040129A |. 68 1C124000 push 0040121C ; /format = "Can't Find input.txt!" 2 c/ z- p+ L v" Y: f* ]
0040129F |. E8 8C010000 call <jmp.&msvcrt.printf> ; \\printf
9 p, t& q. Q+ K) F- r: ^- E r) x004012A4 |. 83C4 10 add esp, 10 + O2 }! ]( N9 |$ W1 h
004012A7 |> 83C4 F8 add esp, -8
# B8 p( Z! G: c' W004012AA |. 68 32124000 push 00401232 ; /mode = "w" & z# j- x- _/ f( T4 C6 c
004012AF |. 68 34124000 push 00401234 ; |path = "output.txt"
& ]# @- U, q3 {3 A Y2 x; w8 L004012B4 |. E8 7F010000 call <jmp.&msvcrt.fopen> ; \\fopen 6 w J5 f+ k$ Z# n" b# f
004012B9 |. 83C4 10 add esp, 10 : {4 A0 j1 T/ F, q0 g+ f
004012BC |. 89C0 mov eax, eax
6 O! F- f4 K3 |, D4 P6 E8 o004012BE |. 8945 F8 mov dword ptr [ebp-8], eax * g$ R x4 o2 q& y; \, h
004012C1 |. 837D F8 00 cmp dword ptr [ebp-8], 0
) c8 P6 \9 V7 O+ I3 p) ]$ K004012C5 |. 75 10 jnz short 004012D7 5 |. B4 D. K2 D7 e
004012C7 |. 83C4 F4 add esp, -0C
! p. T) {2 }/ G. l2 M004012CA |. 68 3F124000 push 0040123F ; /format = "Can't Create output.txt!" : G# [8 ^1 L% D" _6 V! e
004012CF |. E8 5C010000 call <jmp.&msvcrt.printf> ; \\printf
# ^8 R. B$ l- D+ a& S6 h, n004012D4 |. 83C4 10 add esp, 10
2 c5 |% _' j6 z1 A004012D7 |> 83C4 F4 /add esp, -0C - h9 H8 H* e2 w5 ^
004012DA |. 8B45 FC |mov eax, dword ptr [ebp-4]
8 C' n* H5 D8 X5 r3 b004012DD |. 50 |push eax ; /stream
$ Z: i- v4 a& H, a0 s- c004012DE |. E8 45010000 |call <jmp.&msvcrt.fgetc> ; \\fgetc - w4 a0 a; p# E# X" U7 p3 H: H
004012E3 |. 83C4 10 |add esp, 10
% C( Q! L# t% n: u' w004012E6 |. 89C0 |mov eax, eax
# t3 `; h# I7 B$ ^' w" y004012E8 |. 8945 F4 |mov dword ptr [ebp-C], eax - w- H! a3 c" n: j) I
004012EB |. 817D F4 80000>|cmp dword ptr [ebp-C], 80
+ i) F; w3 l# k4 Q$ s E) m004012F2 |. 7F 23 |jg short 00401317 2 x0 K) h; ~6 B& w6 ^
004012F4 |. 83C4 F8 |add esp, -8
( R, N6 D2 f. X; o7 Z8 t$ D004012F7 |. 8B45 F8 |mov eax, dword ptr [ebp-8]
, ~2 y5 C5 g; ]* `004012FA |. 50 |push eax ; /stream ' s4 t1 `8 S1 M" h+ I
004012FB |. 8B45 F4 |mov eax, dword ptr [ebp-C] ; |
: p* }) _4 W$ P" E i004012FE |. 50 |push eax ; |c
. D% `+ X1 K1 ]) h- @1 H004012FF |. E8 1C010000 |call <jmp.&msvcrt.fputc> ; \\fputc , ~1 U5 { a" P" F
00401304 |. 83C4 10 |add esp, 10
# C( ?6 M' b R1 Z! r* l00401307 |. 83C4 F4 |add esp, -0C
7 _% A% \5 q. Y' A$ ?. E# h6 n( Y0 A0040130A |. 68 58124000 |push 00401258 ; /format = "one char outputed",LF,""
+ D2 P2 ]7 J* C z9 u0040130F |. E8 1C010000 |call <jmp.&msvcrt.printf> ; \\printf % }" W' A5 K; N9 e! ^
00401314 |. 83C4 10 |add esp, 10 2 `, f& f u1 N6 O' ] ]! n& w
00401317 |> 837D F4 FF |cmp dword ptr [ebp-C], -1 : ?, O2 L$ U$ J6 K; L5 \
0040131B |. 75 03 |jnz short 00401320
H/ K) \. T4 o8 M" f' M, v& ]0040131D |. EB 03 |jmp short 00401322
2 l& L. O2 M! r; ^0040131F | 90 |nop . ^; O a* Q1 @2 C: y
00401320 |>^ EB B5 \\jmp short 004012D7 4 `* C/ l f5 F& V2 O6 i
00401322 |> C9 leave
' v9 ^' x2 v* U" a2 y L c' I7 v4 i00401323 \\. C3 retn & i& ]* u. n/ f) y! g( S# W$ k+ _
00401324 00 db 00
/ Q2 L) w0 U1 A# o7 [00401325 00 db 00
: O6 f \" g) g: D* w00401326 00 db 00 5 t" Z: l# @# V2 z7 d U# n
00401327 00 db 00 ( Z& C5 f' t) Z4 z, X
00401328 00 db 00 3 T. p9 ^6 M0 X6 N7 ?0 I
00401329 00 db 00 8 ~: x4 ]' f' \0 R
0040132A 00 db 00
3 @0 M$ w1 ~0 W% g0040132B 00 db 00
( W6 P- C0 {/ d2 b! j0040132C 00 db 00 2 _+ t! [9 ^8 D8 A( q: I9 [4 i
0040132D 00 db 00 / {3 Q$ f8 f$ L& \
0040132E 00 db 00 ) [+ z. B! v r9 R' u
0040132F 00 db 00
) t$ u7 H4 f/ Q( T- u$ K+ |00401330 /. 55 push ebp
9 \! X* c/ j7 R* |- Q l' O00401331 |. 89E5 mov ebp, esp
5 ?) ^6 K2 l$ F! X6 p: D00401333 |. 83EC 08 sub esp, 8
2 W' ]' S9 ~( H/ O# L) A00401336 |. A1 10204000 mov eax, dword ptr [402010] 2 S5 z' P& y& I6 l
0040133B |. 8338 00 cmp dword ptr [eax], 0 ! Q0 F0 V# s: N( G
0040133E |. 74 1D je short 0040135D . _- K! {5 l: l1 C
00401340 |> A1 10204000 /mov eax, dword ptr [402010]
! }2 a/ X ~$ P' r5 o" Q2 L00401345 |. 8B00 |mov eax, dword ptr [eax] 5 E" N3 y+ `7 {6 K0 `
00401347 |. FFD0 |call eax
" Z ~* |0 }! n& ?8 C) A1 [* W4 `00401349 |. A1 10204000 |mov eax, dword ptr [402010]
6 L; l$ i3 Y t, T# \! B0040134E |. 8D50 04 |lea edx, dword ptr [eax+4]
4 p+ _6 l. B/ U/ M# A7 N$ \00401351 |. 8915 10204000 |mov dword ptr [402010], edx
0 F, z- Q1 o6 l; c: g! o; d( x00401357 |. 8378 04 00 |cmp dword ptr [eax+4], 0
0 d' O& W; X- z1 Z& V2 }0040135B |.^ 75 E3 \\jnz short 00401340 + v R; {4 C& H% R* V. f
0040135D |> C9 leave 0 |5 J' R% A: r6 J7 s9 j
0040135E \\. C3 retn 7 M; @% V6 j$ K) R# L, n/ h/ Q6 P
0040135F 90 nop ) x! M1 M) g1 l+ n# `
00401360 /$ 55 push ebp / _, Y: W) R* a3 U
00401361 |. 89E5 mov ebp, esp , ? ?# n7 x R% `5 i( [; R$ }
00401363 |. 83EC 14 sub esp, 14
, o& C! G) x, J9 X0 i; |00401366 |. 53 push ebx
. K6 l' m" ^/ U4 i00401367 |. A1 58144000 mov eax, dword ptr [401458] , f' p6 x) T! d! f
0040136C |. 83F8 FF cmp eax, -1 & O6 ?$ [0 U" \7 t: X$ l" X
0040136F |. 75 19 jnz short 0040138A
0 |; V' {' x5 m00401371 |. 31C0 xor eax, eax : V( }. W, D# S& t0 P) R
00401373 |. 833D 5C144000>cmp dword ptr [40145C], 0
5 W9 w2 R2 I8 r0 A% [" C/ Y0040137A |. 74 0E je short 0040138A
2 _7 ?5 F' A u g3 r; A" e' X0040137C |. BA 5C144000 mov edx, 0040145C
5 N& p5 ^( Y9 c00401381 |> 83C2 04 /add edx, 4 # R l! l9 H. ~. {
00401384 |. 40 |inc eax
! c) o# _5 w% S( k- v. z00401385 |. 833A 00 |cmp dword ptr [edx], 0 / ]. ^" c# r0 F0 V- q
00401388 |.^ 75 F7 \\jnz short 00401381
9 w" I P8 {8 x. U5 _9 r& d0040138A |> 89C3 mov ebx, eax
2 K" _$ L5 m4 ?" s0040138C |. 85DB test ebx, ebx a5 J- |% n1 u* }7 Q7 F8 F0 Q
0040138E |. 74 0C je short 0040139C
1 y @9 ?7 t' g% D4 U00401390 |> 8B049D 581440>/mov eax, dword ptr [ebx*4+401458] . o p2 j8 l* U* P2 F
00401397 |. FFD0 |call eax
! U$ Y4 v$ f0 i8 U* H; e4 x/ D00401399 |. 4B |dec ebx $ C3 H' G+ T' f
0040139A |.^ 75 F4 \\jnz short 00401390 , L8 w4 P: w* q
0040139C |> 83C4 F4 add esp, -0C 0 F: O- W8 x% f4 p) Z. w k7 D
0040139F |. 68 30134000 push 00401330 ; /func = engoutpu.00401330 1 H$ \/ U% @5 |1 S
004013A4 |. E8 97000000 call <jmp.&msvcrt.atexit> ; \\atexit ' k" Y5 z- t: ?9 q/ K
004013A9 |. 8B5D E8 mov ebx, dword ptr [ebp-18] / e R# ~3 l- {) F7 E; F
004013AC |. C9 leave
' _# z8 u# Q+ U% \5 O004013AD \\. C3 retn 3 K/ ?+ ~) a8 b4 B; }7 u% j# m z
004013AE 89F6 mov esi, esi
# F2 v7 Y7 w$ _% t6 w004013B0 /$ 55 push ebp ' [4 F8 \& y" K! S% P0 Z
004013B1 |. 89E5 mov ebp, esp 1 J2 i5 e* l4 p
004013B3 |. 83EC 08 sub esp, 8
6 ~# W, @+ k8 G* \/ q- v5 [2 e004013B6 |. 833D 14204000>cmp dword ptr [402014], 0 2 A( R: X0 d: n- ]3 A6 C: g
004013BD |. 75 0F jnz short 004013CE s# [# G1 Z2 U# `& U& q
004013BF |. C705 14204000>mov dword ptr [402014], 1
. ?; k" g# \7 K8 T004013C9 |. E8 92FFFFFF call 00401360 q' m3 ?) {# S2 G8 y
004013CE |> C9 leave
# ^/ b3 l# T3 R( @0 e004013CF \\. C3 retn
) }0 C: P+ D/ }004013D0 .- FF25 AC304000 jmp dword ptr [<&msvcrt._fmode>] ; msvcrt._fmode
. s+ \( k4 U+ A7 T004013D6 90 nop
8 B) z# Z) _8 M4 }004013D7 90 nop $ G6 q2 |9 v5 ^
004013D8 .- FF25 B4304000 jmp dword ptr [<&msvcrt._iob>] ; msvcrt._iob 6 [) r. ~1 ^! ]6 ?5 [( k( F
004013DE 90 nop 8 S2 w# S& b2 z. J2 i5 e
004013DF 90 nop
8 L; ]8 ?. [2 X004013E0 .- FF25 DC304000 jmp dword ptr [<&msvcrt.__set_app_ty>; msvcrt.__set_app_type 2 @% g4 K3 s; M/ [
004013E6 90 nop
- H% G& z! ^9 n) [# h& Q' m004013E7 90 nop
! \1 p# a6 i, ?, ]5 M) _4 n004013E8 $- FF25 A4304000 jmp dword ptr [<&msvcrt._cexit>] ; msvcrt._cexit ( W9 Q% j* E: U% W" ?
004013EE 90 nop
3 W; H& u+ l3 G z004013EF 90 nop
5 y0 w. h+ Z& ?7 i; X004013F0 $- FF25 D0304000 jmp dword ptr [<&msvcrt.__p__environ>; msvcrt.__p__environ
5 |8 B! L* ?- h004013F6 90 nop
_1 g4 d: A2 Q e2 Y6 m; @- r004013F7 90 nop
# v' E- n( c1 q. e* X% L( d004013F8 $- FF25 B0304000 jmp dword ptr [<&msvcrt._fpreset>] ; msvcrt._fpreset 0 h2 f6 V+ r* u
004013FE 90 nop + ~+ U5 m' L5 F* |7 M! a9 i+ E
004013FF 90 nop
( X. v3 J' [4 V% L _! O00401400 $- FF25 D8304000 jmp dword ptr [<&msvcrt.signal>] ; msvcrt.signal , P0 T3 |% I! c; J A) ?& |; n
00401406 90 nop
2 g5 M+ m8 x2 `: a7 P4 J3 m00401407 90 nop $ {2 @& M$ d4 D! o) r _
00401408 $- FF25 A8304000 jmp dword ptr [<&msvcrt._fileno>] ; msvcrt._fileno
+ I8 V' X4 Z0 u4 ~+ u0040140E 90 nop
m3 v: Y/ E F5 a2 e2 h* K0040140F 90 nop
7 H+ D$ Q9 f; y# V% q$ w00401410 $- FF25 B8304000 jmp dword ptr [<&msvcrt._setmode>] ; msvcrt._setmode 8 E! j- z% i" y8 k$ K# V/ ?
00401416 90 nop
0 v. V, L, |/ ~& X0 O00401417 90 nop
. j3 @& u) f& O3 n00401418 $- FF25 BC304000 jmp dword ptr [<&msvcrt.__getmainarg>; msvcrt.__getmainargs
3 n% E9 u! {' H1 U& i0040141E 90 nop
5 X0 v: @4 s, |3 F* S0040141F 90 nop 5 F. F j5 W/ o4 ?* Z' A
00401420 $- FF25 CC304000 jmp dword ptr [<&msvcrt.fputc>] ; msvcrt.putc 4 ~. B' M J0 q8 M2 t6 k5 i2 ~
00401426 90 nop ( B3 `4 i) w1 i, L$ R/ W7 A6 p
00401427 90 nop % s8 A) ~: v2 o
00401428 $- FF25 C4304000 jmp dword ptr [<&msvcrt.fgetc>] ; msvcrt.getc
/ @7 G, k u( z9 R% I8 T% G0040142E 90 nop 6 h" c" p* Z0 A
0040142F 90 nop
) j! ~6 h3 n* z+ K( v00401430 $- FF25 D4304000 jmp dword ptr [<&msvcrt.printf>] ; msvcrt.printf
$ V( S( R3 E. Q% l0 [4 M00401436 90 nop
: @! N$ P( R. E% B5 a$ @1 H00401437 90 nop " e, h/ @7 @8 R! q
00401438 $- FF25 C8304000 jmp dword ptr [<&msvcrt.fopen>] ; msvcrt.fopen
* Z* T1 r7 i! E# d! [4 Q6 s; N0040143E 90 nop
. H3 f J8 O+ E0040143F 90 nop
; \! b, T& [* R8 w00401440 $- FF25 C0304000 jmp dword ptr [<&msvcrt.atexit>] ; msvcrt.atexit
9 n5 C, B! B, K- O0 q1 X' _00401446 90 nop
1 T; K# F; G6 _2 {) M00401447 90 nop $ i, y# t; m7 d7 f$ Y& x9 c
00401448 $- FF25 98304000 jmp dword ptr [<&KERNEL32.SetUnhandl>; kernel32.SetUnhandledExceptionFilter * s# w9 i2 t4 K# y! d
0040144E 90 nop
) D/ g8 V y: n1 I! g" e2 v0040144F 90 nop : `; l9 a/ b [* I" V
00401450 .- FF25 94304000 jmp dword ptr [<&KERNEL32.ExitProces>; kernel32.ExitProcess ) ?- m5 t+ ]) M& T& j/ N( H# S3 x
00401456 90 nop
2 l. t6 a- P! R# A: Q @( o00401457 90 nop ! y) a: G6 S/ n+ [# F# E
00401458 . FFFFFFFF dd FFFFFFFF - S0 N8 U; O& q; g$ p) D" X
0040145C . 00000000 dd 00000000
5 m# P( W" t# c00401460 FF db FF 1 e' D& s! T* g! a8 @6 U' i% m4 ^
00401461 FF db FF
O# M/ Z# ]1 ^" p9 h3 w00401462 FF db FF
+ N6 U* T* Z B( b" J# A- |3 T00401463 FF db FF % S. n$ C7 M Q; k
00401464 00 db 00 d$ e6 l; [ ]! L4 H$ J
00401465 00 db 00
3 \1 \% F2 f P9 K2 y: T. J00401466 00 db 00
3 \# ~$ T, E; X) y$ B2 o e00401467 00 db 00 |