Function at 0x402c30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42e3aa
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x908
push esi
push edi
mov dword [ebp - 0x908], ecx
mov eax, dword [ebp - 0x908]
mov ecx, dword [eax]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x10], 0xffffffff
mov dl, byte [ebp - 0x894]
mov byte [ebp - 0x30], dl
push 0
lea ecx, [ebp - 0x30]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x4408d0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
mov dword [ebp - 0x8ac], ecx
push 1
mov eax, dword [ebp - 0x8ac]
push eax
lea ecx, [ebp - 0x30]
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
and eax, 0xff
test eax, eax
je 0x402d03
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x8a0], ecx
mov ecx, dword [ebp - 0x8ac]
mov esi, 0x4408d0
mov edi, dword [ebp - 0x8a0]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [ebp - 0x8a4], 0
mov eax, dword [ebp - 0x8ac]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x2c]
add ecx, dword [ebp - 0x8ac]
mov dword [ebp - 0x8a8], ecx
mov edx, dword [ebp - 0x8a8]
mov al, byte [ebp - 0x8a4]
mov byte [edx], al
mov dword [ebp - 4], 0
mov byte [ebp - 0x18], 0
mov ecx, dword [ebp - 0x18]
and ecx, 0xff
test ecx, ecx
jne 0x4030c1
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [ebp - 0x84], 0
lea edx, [ebp - 0x54]
push edx
mov eax, dword [ebp - 0x908]
mov ecx, dword [eax + 0x2c]
push ecx
call dword [sym.imp.MSVCRT.dll__fstat]
add esp, 8
mov dword [ebp - 0x88], eax
lea edx, [ebp - 0x80]
push edx
mov eax, dword [ebp - 0x908]
mov ecx, dword [eax + 0x30]
push ecx
call dword [sym.imp.MSVCRT.dll__fstat]
add esp, 8
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x88], 0
je 0x402d79
cmp dword [ebp - 0x5c], 0
je 0x402d79
jmp 0x4030c1
cmp dword [ebp - 0x6c], 0
jle 0x402eec
push 0x3ff
lea edx, [ebp - 0x48c]
push edx
mov eax, dword [ebp - 0x908]
mov ecx, dword [eax + 0x30]
push ecx
call dword [sym.imp.MSVCRT.dll__read]
add esp, 0xc
mov dword [ebp - 0x8c], eax
mov edx, dword [ebp - 0x8c]
mov byte [ebp + edx - 0x48c], 0
mov eax, dword [ebp - 0x908]
xor ecx, ecx
mov cl, byte [eax + 0x58]
test ecx, ecx
je 0x402ebc
lea edx, [ebp - 0x48c]
push edx
mov eax, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____char_const__]
add esp, 8
mov ecx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov dword [ebp - 0x8c8], ecx
mov dword [ebp - 0x8b0], 0
mov edx, dword [ebp - 0x8c8]
mov eax, dword [edx]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x8c8]
mov eax, dword [edx + ecx + 4]
mov dword [ebp - 0x8b4], eax
mov ecx, dword [ebp - 0x8b4]
and ecx, 6
neg ecx
sbb ecx, ecx
neg ecx
and ecx, 0xff
test ecx, ecx
jne 0x402e72
mov edx, dword [ebp - 0x8c8]
mov eax, dword [edx]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x8c8]
mov eax, dword [edx + ecx + 0x28]
mov dword [ebp - 0x8b8], eax
mov ecx, dword [ebp - 0x8b8]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x8b8]
call dword [edx + 0x2c]
mov dword [ebp - 0x8bc], eax
cmp dword [ebp - 0x8bc], 0xffffffff
jne 0x402e72
mov eax, dword [ebp - 0x8b0]
or al, 4
mov dword [ebp - 0x8b0], eax
mov ecx, dword [ebp - 0x8c8]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x8c8]
add eax, dword [edx + 4]
mov dword [ebp - 0x8c4], eax
cmp dword [ebp - 0x8b0], 0
je 0x402ebc
mov ecx, dword [ebp - 0x8c4]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x8c0], edx
push 0
mov eax, dword [ebp - 0x8c0]
or eax, dword [ebp - 0x8b0]
push eax
mov ecx, dword [ebp - 0x8c4]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool_]
lea edi, [ebp - 0x48c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
push ecx
lea ecx, [ebp - 0x48c]
push ecx
lea ecx, [ebp - 0x30]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov dword [ebp - 0x8cc], eax
mov byte [ebp - 0x84], 1
cmp dword [ebp - 0x40], 0
jle 0x403094
push 0x3ff
lea edx, [ebp - 0x890]
push edx
mov eax, dword [ebp - 0x908]
mov ecx, dword [eax + 0x2c]
push ecx
call dword [sym.imp.MSVCRT.dll__read]
add esp, 0xc
mov dword [ebp - 0x490], eax
mov edx, dword [ebp - 0x490]
mov byte [ebp + edx - 0x890], 0
mov eax, dword [ebp - 0x908]
xor ecx, ecx
mov cl, byte [eax + 0x58]
test ecx, ecx
je 0x403064
lea edx, [ebp - 0x890]
push edx
mov eax, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____char_const__]
add esp, 8
mov ecx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov dword [ebp - 0x8ec], ecx
mov dword [ebp - 0x8d0], 0
mov edx, dword [ebp - 0x8ec]
mov eax, dword [edx]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x8ec]
mov eax, dword [edx + ecx + 4]
mov dword [ebp - 0x8d4], eax
mov ecx, dword [ebp - 0x8d4]
and ecx, 6
neg ecx
sbb ecx, ecx
neg ecx
and ecx, 0xff
test ecx, ecx
jne 0x402fe5
mov edx, dword [ebp - 0x8ec]
mov eax, dword [edx]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x8ec]
mov eax, dword [edx + ecx + 0x28]
mov dword [ebp - 0x8d8], eax
mov ecx, dword [ebp - 0x8d8]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x8d8]
call dword [edx + 0x2c]
mov dword [ebp - 0x8dc], eax
cmp dword [ebp - 0x8dc], 0xffffffff
jne 0x402fe5
mov eax, dword [ebp - 0x8d0]
or al, 4
mov dword [ebp - 0x8d0], eax
mov ecx, dword [ebp - 0x8ec]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x8ec]
add eax, dword [edx + 4]
mov dword [ebp - 0x8e8], eax
cmp dword [ebp - 0x8d0], 0
je 0x403064
mov ecx, dword [ebp - 0x8e8]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x8e0], edx
mov eax, dword [ebp - 0x8e0]
or eax, dword [ebp - 0x8d0]
mov dword [ebp - 0x8e4], eax
mov ecx, dword [ebp - 0x8e8]
cmp dword [ecx + 0x28], 0
jne 0x403043
mov edx, dword [ebp - 0x8e4]
or edx, 4
mov dword [ebp - 0x90c], edx
jmp 0x40304f
mov eax, dword [ebp - 0x8e4]
mov dword [ebp - 0x90c], eax
push 0
mov ecx, dword [ebp - 0x90c]
push ecx
mov ecx, dword [ebp - 0x8e8]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::ios_base::clear_int__bool_]
lea edi, [ebp - 0x890]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
push ecx
lea edx, [ebp - 0x890]
push edx
lea ecx, [ebp - 0x30]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov dword [ebp - 0x8f0], eax
mov byte [ebp - 0x84], 1
mov eax, dword [ebp - 0x84]
and eax, 0xff
test eax, eax
jne 0x4030bc
lea ecx, [ebp - 0x58]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [ebp - 0x58], 0x103
je 0x4030bc
jmp 0x4030c1
jmp 0x402d0e
push 0xffffffffffffffff
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x4030ec
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x4030ec
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
jmp 0x403109
cmp dword [ebp - 0x10], 0xffffffff
je 0x403102
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], esi
mov dword [ebp - 0x10], 0xffffffff
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x908]
mov eax, dword [ebp - 0x10]
mov dword [edx + 0x34], eax
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
push edx
push 0
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x908]
add ecx, 0x38
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov dword [ebp - 0x8f4], eax
mov ecx, dword [ebp - 0x908]
call fcn.00402990
mov byte [ebp - 0x14], al
cmp dword [ebp - 0x10], 0
jl 0x403168
mov ecx, dword [ebp - 0x14]
and ecx, 0xff
test ecx, ecx
jne 0x403209
mov byte [ebp - 0x898], 0
mov dword [ebp - 4], 0xffffffff
mov edx, 1
test edx, edx
je 0x403185
cmp dword [ebp - 0x2c], 0
jne 0x403187
jmp 0x4031e9
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov cl, byte [eax - 1]
test ecx, ecx
je 0x4031a2
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov al, byte [edx - 1]
cmp eax, 0xff
jne 0x4031cb
mov ecx, dword [ebp - 0x24]
add ecx, 2
mov dword [ebp - 0x8fc], ecx
mov edx, dword [ebp - 0x2c]
sub edx, 1
mov dword [ebp - 0x8f8], edx
mov eax, dword [ebp - 0x8f8]
push eax
call fcn.0042da90
add esp, 4
jmp 0x4031e9
mov ecx, dword [ebp - 0x2c]
sub ecx, 1
mov dword [ebp - 0x910], ecx
mov edx, dword [ebp - 0x910]
mov al, byte [edx]
sub al, 1
mov ecx, dword [ebp - 0x910]
mov byte [ecx], al
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov al, byte [ebp - 0x898]
jmp 0x4032a5
mov byte [ebp - 0x89c], 1
mov dword [ebp - 4], 0xffffffff
mov edx, 1
test edx, edx
je 0x403226
cmp dword [ebp - 0x2c], 0
jne 0x403228
jmp 0x40328a
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov cl, byte [eax - 1]
test ecx, ecx
je 0x403243
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov al, byte [edx - 1]
cmp eax, 0xff
jne 0x40326c
mov ecx, dword [ebp - 0x24]
add ecx, 2
mov dword [ebp - 0x904], ecx
mov edx, dword [ebp - 0x2c]
sub edx, 1
mov dword [ebp - 0x900], edx
mov eax, dword [ebp - 0x900]
push eax
call fcn.0042da90
add esp, 4
jmp 0x40328a
mov ecx, dword [ebp - 0x2c]
sub ecx, 1
mov dword [ebp - 0x914], ecx
mov edx, dword [ebp - 0x914]
mov al, byte [edx]
sub al, 1
mov ecx, dword [ebp - 0x914]
mov byte [ecx], al
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov al, byte [ebp - 0x89c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4