Function at 0x401060
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x403f90
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x406018]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push esi
push edi
mov eax, dword [0x406018]
xor eax, esp
push eax
lea eax, [esp + 0x238]
mov dword fs:[0], eax
cmp dword [ebp + 8], 3
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0x14], ebx
je 0x401127
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push eax
push ecx
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push str.wrong_input_
push ecx
call fcn.00402f20
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov eax, dword [ebx]
push edx
push ecx
push str.output_filename
push ecx
push str.___integer
push ecx
push eax
push ecx
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push str.the_format_should_be
push ecx
call fcn.00402f20
add esp, 0xc
push eax
call fcn.00402f20
add esp, 0xc
push eax
call fcn.00402f20
add esp, 0xc
push eax
call fcn.00402f20
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
or eax, 0xffffffff
jmp 0x401c6e
mov edi, dword [ebx + 8]
xor ecx, ecx
lea esp, [esp]
mov eax, edi
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401135
sub eax, esi
lea edx, [edi + eax]
mov al, byte [edx + ecx - 4]
mov byte [esp + ecx + 0x224], al
inc ecx
cmp ecx, 4
jl 0x401130
mov byte [esp + 0x228], 0
mov ecx, str..txt
lea eax, [esp + 0x224]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401186
test dl, dl
je 0x401182
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401186
add eax, 2
add ecx, 2
test dl, dl
jne 0x401166
xor eax, eax
jmp 0x40118b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4011a8
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push ecx
push ecx
push str.wrong_input__the_output_file_could_only_be_a_txt
push edx
jmp 0x40110f
mov esi, dword [ebx + 4]
mov eax, esi
xor edx, edx
lea ebx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4011b2
sub eax, ebx
je 0x4011ed
lea ecx, [ecx]
mov al, byte [esi + edx]
cmp al, 0x39
jg 0x4013f5
cmp al, 0x30
jl 0x4013f5
mov eax, esi
inc edx
lea ebx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4011e0
sub eax, ebx
cmp edx, eax
jb 0x4011c0
push esi
call dword [sym.imp.MSVCR100.dll_atoi]
mov edi, eax
add esp, 4
mov dword [esp + 0x20], eax
cmp edi, 4
jge 0x4015ef
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 8]
push edx
push ecx
push eax
push ecx
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push str.N_must_be_greater_than_4_see_wrong_input_in
push ecx
call fcn.00402f20
add esp, 0xc
push eax
call fcn.00402f20
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov edx, dword [esi + 8]
push edx
lea eax, [esp + 0x30]
push eax
call fcn.00401d80
mov dword [esp + 0x240], 3
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push ecx
push ecx
lea edx, [esp + 0x34]
push str.wrong_input_
push edx
call fcn.00402f20
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
cmp dword [esp + 0x84], 0
mov edi, dword [sym.imp.MSVCR100.dll_fclose]
lea esi, [esp + 0x30]
je 0x4012a9
mov ebx, esi
call fcn.00402aa0
test al, al
jne 0x401298
xor esi, esi
mov eax, dword [esp + 0x84]
push eax
call edi
add esp, 4
test eax, eax
je 0x4012ab
xor esi, esi
lea ecx, [esp + 0x30]
mov byte [esp + 0x80], 0
mov byte [esp + 0x79], 0
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov ecx, dword [0x406550]
xor ebx, ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x74], ebx
cmp esi, ebx
jne 0x4012f1
mov edx, dword [esp + 0x2c]
mov ecx, dword [edx + 4]
push ebx
push 2
lea ecx, [esp + ecx + 0x34]
call dword [sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 4]
lea eax, [esp + 0x8c]
mov dword [esp + 0x224], eax
mov dword [esp + edx + 0x2c], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov dword [esp + 0x240], 4
lea eax, [esp + 0x30]
mov dword [esp + 0x20], eax
mov dword [esp + 0x30], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [esp + 0x240], 5
cmp dword [esp + 0x84], ebx
je 0x40135b
mov ecx, dword [esp + 0x40]
lea edx, [esp + 0x78]
cmp dword [ecx], edx
jne 0x40135b
mov eax, dword [esp + 0x70]
push eax
push eax
mov eax, dword [esp + 0x74]
push eax
lea ecx, [esp + 0x3c]
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
cmp byte [esp + 0x80], 0
je 0x4013b2
cmp dword [esp + 0x84], ebx
je 0x401384
lea ebx, [esp + 0x30]
call fcn.00402aa0
mov ecx, dword [esp + 0x84]
push ecx
call edi
add esp, 4
lea ecx, [esp + 0x30]
mov byte [esp + 0x80], 0
mov byte [esp + 0x79], 0
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov edx, dword [0x406550]
xor eax, eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x7c], edx
mov dword [esp + 0x74], eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x240], 4
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void_]
mov dword [esp + 0x240], 0xffffffff
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 4]
mov edx, dword [sym.imp.MSVCP100.dll_const_std::basic_ostream_char__struct_std::char_traits_char__::vftable]
mov dword [esp + ecx + 0x2c], edx
lea ecx, [esp + 0x8c]
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
or eax, 0xffffffff
jmp 0x401c6e
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push eax
push ecx
push 0x404290
push ecx
push edi
push ecx
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push str.wrong_input__also_seen_in
push ecx
call fcn.00402f20
add esp, 0xc
push eax
call fcn.00402f20
add esp, 0xc
push eax
call fcn.00402f20
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 8]
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.00401d80
mov dword [esp + 0x240], 0
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push edx
push ecx
lea eax, [esp + 0x34]
push str.wrong_input_
push eax
call fcn.00402f20
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
cmp dword [esp + 0x84], 0
mov edi, dword [sym.imp.MSVCR100.dll_fclose]
lea esi, [esp + 0x30]
je 0x4014a3
mov ebx, esi
call fcn.00402aa0
test al, al
jne 0x401492
xor esi, esi
mov ecx, dword [esp + 0x84]
push ecx
call edi
add esp, 4
test eax, eax
je 0x4014a5
xor esi, esi
lea ecx, [esp + 0x30]
mov byte [esp + 0x80], 0
mov byte [esp + 0x79], 0
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov edx, dword [0x406550]
xor ebx, ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x74], ebx
cmp esi, ebx
jne 0x4014eb
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 4]
push ebx
push 2
lea ecx, [esp + ecx + 0x34]
call dword [sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x8c]
mov dword [esp + 0x224], ecx
mov dword [esp + eax + 0x2c], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov dword [esp + 0x240], 1
lea ecx, [esp + 0x30]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x30], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [esp + 0x240], 2
cmp dword [esp + 0x84], ebx
je 0x401555
mov edx, dword [esp + 0x40]
lea ecx, [esp + 0x78]
cmp dword [edx], ecx
jne 0x401555
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x6c]
push eax
push eax
push edx
lea ecx, [esp + 0x3c]
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
cmp byte [esp + 0x80], 0
je 0x4015ac
cmp dword [esp + 0x84], ebx
je 0x40157e
lea ebx, [esp + 0x30]
call fcn.00402aa0
mov eax, dword [esp + 0x84]
push eax
call edi
add esp, 4
lea ecx, [esp + 0x30]
mov byte [esp + 0x80], 0
mov byte [esp + 0x79], 0
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov ecx, dword [0x406550]
xor eax, eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x74], eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x240], 1
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void_]
mov dword [esp + 0x240], 0xffffffff
mov edx, dword [esp + 0x2c]
mov ecx, dword [sym.imp.MSVCP100.dll_const_std::basic_ostream_char__struct_std::char_traits_char__::vftable]
mov eax, dword [edx + 4]
mov dword [esp + eax + 0x2c], ecx
lea ecx, [esp + 0x8c]
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
or eax, 0xffffffff
jmp 0x401c6e
jne 0x40172f
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 8]
push ecx
lea edx, [esp + 0x180]
push edx
call fcn.00401d80
mov dword [esp + 0x240], 6
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push eax
push ecx
lea ecx, [esp + 0x184]
push str.4__2__2
push ecx
call fcn.00402f20
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
cmp dword [esp + 0x1d4], 0
lea esi, [esp + 0x180]
je 0x40166c
mov ebx, esi
call fcn.00402aa0
test al, al
jne 0x401657
xor esi, esi
mov edx, dword [esp + 0x1d4]
push edx
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
test eax, eax
je 0x40166e
xor esi, esi
lea ecx, [esp + 0x180]
mov byte [esp + 0x1d0], 0
mov byte [esp + 0x1c9], 0
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov ecx, dword [0x406550]
xor eax, eax
mov dword [esp + 0x1d4], eax
mov dword [esp + 0x1cc], ecx
mov dword [esp + 0x1c4], eax
cmp esi, eax
jne 0x4016c6
mov edx, dword [esp + 0x17c]
mov ecx, dword [edx + 4]
push eax
push 2
lea ecx, [esp + ecx + 0x184]
call dword [sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov ecx, dword [esp + 0x17c]
mov edx, dword [ecx + 4]
lea eax, [esp + 0x1dc]
mov dword [esp + 0x224], eax
mov dword [esp + edx + method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
lea ecx, [esp + 0x180]
mov dword [esp + 0x240], 7
call fcn.00401e70
mov dword [esp + 0x240], 0xffffffff
mov eax, dword [esp + 0x17c]
mov ecx, dword [eax + 4]
mov edx, dword [sym.imp.MSVCP100.dll_const_std::basic_ostream_char__struct_std::char_traits_char__::vftable]
mov dword [esp + ecx + 0x17c], edx
lea ecx, [esp + 0x1dc]
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov eax, edi
and eax, 0x80000001
jns 0x40173d
dec eax
or eax, 0xfffffffe
inc eax
cmp eax, 1
jne 0x401747
dec edi
mov dword [esp + 0x20], edi
fild dword [esp + 0x20]
call sub.MSVCR100.dll__CIsqrt
fnstcw word [esp + 0x10]
movzx eax, word [esp + 0x10]
fst qword [esp + 0x24]
or eax, 0xc00
mov dword [esp + 0x224], eax
xor ecx, ecx
fldcw word [esp + 0x224]
mov edx, 4
fistp qword [esp + 0x224]
mov eax, dword [esp + 0x224]
fldcw word [esp + 0x10]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040331d
fld qword [esp + 0x28]
fcomp qword [0x404370]
mov dword [esp + 0x20], eax
xor edi, edi
add esp, 4
mov esi, 3
fnstsw ax
xor ecx, ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], edi
test ah, 0x41
jne 0x40185b
cmp dword [esp + 0x10], 0
jne 0x40185b
cmp esi, 2
je 0x40182d
mov eax, esi
and eax, 0x80000001
jns 0x4017e3
dec eax
or eax, 0xfffffffe
inc eax
je 0x401c94
fild dword [esp + 0x18]
mov ebx, 3
call sub.MSVCR100.dll__CIsqrt
fcom qword [0x404368]
fnstsw ax
test ah, 1
jne 0x40182b
mov eax, esi
cdq
idiv ebx
test edx, edx
je 0x401c92
add ebx, 2
mov dword [esp + 0x224], ebx
fild dword [esp + 0x224]
fcomp st(1)
fnstsw ax
test ah, 0x41
jnp 0x401804
fstp st(0)
mov ecx, dword [esp + 0x1c]
mov dword [ecx + edi*4], esi
mov ecx, edi
inc edi
mov dword [esp + 0x224], edi
fild dword [esp + 0x224]
add esi, 2
mov dword [esp + 0x18], esi
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 5
jnp 0x4017c5
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 8]
dec ecx
mov dword [esp + 0x10], ecx
push eax
lea ecx, [esp + 0xd8]
push ecx
call fcn.00401d80
mov dword [esp + 0x240], 8
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push edx
push ecx
lea eax, [esp + 0xdc]
push str.4__2__2
push eax
call fcn.00402f20
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov eax, 6
mov dword [esp + 0x14], eax
cmp dword [esp + 0x20], eax
jl 0x401a9e
xor edi, edi
mov dword [esp + 0x18], edi
cmp dword [esp + 0x10], edi
jl 0x401981
jmp 0x4018d0
cmp dword [esp + 0x18], 0
jne 0x401a89
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
sub ecx, dword [edx + edi*4]
xor ebx, ebx
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + ebx*4]
cmp esi, ecx
jg 0x401909
mov eax, ecx
cdq
idiv esi
test edx, edx
jne 0x401902
cmp ecx, esi
je 0x401909
jg 0x40196b
inc ebx
cmp ebx, dword [esp + 0x10]
jle 0x4018e8
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + edi*4]
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ecx, dword [esp + 0x14]
push edx
mov edx, ecx
sub edx, eax
push edx
push 0x4042e8
push eax
push 0x4042ec
push ecx
lea ecx, [esp + 0xec]
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.00402f20
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.00402f20
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov dword [esp + 0x18], 1
inc edi
cmp edi, dword [esp + 0x10]
jle 0x4018d0
cmp dword [esp + 0x18], 0
jne 0x401a89
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov esi, dword [eax + ecx*4]
add esi, 2
mov dword [esp + 0x224], esi
fild dword [esp + 0x224]
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 0x41
jp 0x401a89
mov edi, dword [esp + 0x14]
sub edi, esi
cmp dword [esp + 0x18], 0
jne 0x401a89
xor ebx, ebx
cmp dword [esp + 0x10], ebx
jl 0x4019ea
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + ebx*4]
cmp ecx, esi
jg 0x4019ea
mov eax, esi
cdq
idiv ecx
test edx, edx
jne 0x4019e3
cmp esi, ecx
je 0x4019ea
jg 0x401a6a
inc ebx
cmp ebx, dword [esp + 0x10]
jle 0x4019c5
xor ebx, ebx
cmp dword [esp + 0x10], ebx
jl 0x401a13
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + ebx*4]
cmp ecx, edi
jg 0x401a13
mov eax, edi
cdq
idiv ecx
test edx, edx
jne 0x401a0c
cmp edi, ecx
je 0x401a13
jg 0x401a6a
inc ebx
cmp ebx, dword [esp + 0x10]
jle 0x4019f2
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [esp + 0x14]
push ecx
push edi
push 0x4042e8
push esi
push 0x4042ec
push edx
lea ecx, [esp + 0xec]
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.00402f20
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.00402f20
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov dword [esp + 0x18], 1
inc esi
mov dword [esp + 0x224], esi
fild dword [esp + 0x224]
dec edi
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 0x41
jnp 0x4019b2
mov eax, dword [esp + 0x14]
add eax, 2
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x20]
jle 0x4018b8
cmp dword [esp + 0x12c], 0
lea esi, [esp + 0xd8]
je 0x401ad1
mov ebx, esi
call fcn.00402aa0
test al, al
jne 0x401abc
xor esi, esi
mov eax, dword [esp + 0x12c]
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
test eax, eax
je 0x401ad3
xor esi, esi
lea ecx, [esp + 0xd8]
mov byte [esp + 0x128], 0
mov byte [esp + 0x121], 0
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov ecx, dword [0x406550]
xor edi, edi
mov dword [esp + 0x12c], edi
mov dword [esp + 0x124], ecx
mov dword [esp + 0x11c], edi
cmp esi, edi
jne 0x401b2b
mov edx, dword [esp + 0xd4]
mov ecx, dword [edx + 4]
push edi
push 2
lea ecx, [esp + ecx + 0xdc]
call dword [sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
mov edx, dword [esp + 0xd8]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x138]
add esp, 4
mov dword [esp + 0x224], ecx
mov dword [esp + eax + 0xd4], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov dword [esp + 0x240], 9
lea ecx, [esp + 0xd8]
mov dword [esp + 0x20], ecx
mov dword [esp + 0xd8], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [esp + 0x240], 0xa
cmp dword [esp + 0x12c], edi
je 0x401bbe
mov edx, dword [esp + 0xe8]
lea ecx, [esp + 0x120]
cmp dword [edx], ecx
jne 0x401bbe
mov eax, dword [esp + 0x118]
mov edx, dword [esp + 0x114]
push eax
push eax
push edx
lea ecx, [esp + 0xe4]
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
cmp byte [esp + 0x128], 0
je 0x401c28
cmp dword [esp + 0x12c], edi
je 0x401bee
lea ebx, [esp + 0xd8]
call fcn.00402aa0
mov eax, dword [esp + 0x12c]
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
lea ecx, [esp + 0xd8]
mov byte [esp + 0x128], 0
mov byte [esp + 0x121], 0
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov ecx, dword [0x406550]
xor eax, eax
mov dword [esp + 0x12c], eax
mov dword [esp + 0x124], ecx
mov dword [esp + 0x11c], eax
lea ecx, [esp + 0xd8]
mov byte [esp + 0x240], 9
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void_]
mov dword [esp + 0x240], 0xffffffff
mov edx, dword [esp + 0xd4]
mov ecx, dword [sym.imp.MSVCP100.dll_const_std::basic_ostream_char__struct_std::char_traits_char__::vftable]
mov eax, dword [edx + 4]
mov dword [esp + eax + 0xd4], ecx
lea ecx, [esp + 0x134]
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
xor eax, eax
mov ecx, dword [esp + 0x238]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.0040333a
mov esp, ebp
pop ebp
ret
fstp st(0)
cmp dword [esp + 0x10], 0
jne 0x40182d
add esi, 2
mov dword [esp + 0x18], esi
fild dword [esp + 0x18]
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 0x41
jne 0x4017d0
mov dword [esp + 0x10], 1
jmp 0x4017d0