Function at 0x406afd
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x41de80
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x168
and byte [ebp - 0x11], 0
cmp byte [ebp + 8], 0
push ebx
push esi
push edi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x10], esp
je 0x406d4c
mov eax, dword [ecx + 0x68]
xor edi, edi
cmp eax, edi
mov dword [ebp - 4], edi
jne 0x406b35
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0x428158
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
pop ecx
cmp ebx, edi
pop ecx
je 0x406d39
and byte [ebp - 0x13], 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x13]
push eax
push 0x10
lea ecx, [ebp - 0x4c]
call fcn.0040801a
and byte [ebp - 0x12], 0
lea eax, [ebp - 0x15]
push eax
lea eax, [ebp - 0x12]
mov esi, 0x19000
push eax
push esi
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 1
call fcn.0040801a
lea eax, [ebp - 0x174]
mov byte [ebp - 4], 2
push eax
call fcn.0040f651
pop ecx
test byte [ebx + 0xc], 0x10
jne 0x406bcd
push 0
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push esi
push 1
push dword [ebp - 0x38]
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
test eax, eax
jle 0x406b92
push eax
add edi, eax
push dword [ebp - 0x38]
lea eax, [ebp - 0x174]
push eax
call 0x43bec7
add esp, 0xc
jmp 0x406b92
push dword [ebp - 0x48]
lea eax, [ebp - 0x174]
push eax
call fcn.0041016a
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0xc
lea ecx, [ebp - 0xd8]
push 1
push 2
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_int_]
mov byte [ebp - 4], 3
xor edi, edi
cmp edi, 0x10
jge 0x406c97
mov esi, dword [ebp - 0x48]
lea eax, [ebp - 0x54]
push 0x10
push eax
call dword [sym.imp.MSVCP60.dll_struct_std::_Smanip_int____cdecl_std::setbase_int_]
pop ecx
pop ecx
lea ecx, [ebp - 0xd8]
test ecx, ecx
je 0x406c30
mov ecx, dword [ebp - 0xd8]
mov ecx, dword [ecx + 4]
lea ecx, [ebp + ecx - 0xd8]
push dword [eax + 4]
push ecx
call dword [eax]
pop ecx
lea eax, [ebp - 0x24]
pop ecx
push 2
push eax
call dword [sym.imp.MSVCP60.dll_struct_std::_Smanip_int____cdecl_std::setw_int_]
pop ecx
pop ecx
lea ecx, [ebp - 0xd8]
test ecx, ecx
je 0x406c60
mov ecx, dword [ebp - 0xd8]
mov ecx, dword [ecx + 4]
lea ecx, [ebp + ecx - 0xd8]
push dword [eax + 4]
push ecx
call dword [eax]
mov eax, dword [ebp - 0xd8]
pop ecx
pop ecx
mov eax, dword [eax + 4]
mov byte [ebp + eax - 0xa8], 0x30
lea ecx, [ebp - 0xd8]
lea eax, [ebp + eax - 0xd8]
movzx eax, byte [esi + edi]
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
inc edi
jmp 0x406bfc
mov esi, dword [ebp - 0x1c]
mov eax, dword [esi + 0x120]
cmp eax, 0x20
jne 0x406d0d
mov eax, dword [esi + 0x11c]
mov edi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test eax, eax
je 0x406cb7
mov edi, eax
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0xd8]
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
mov eax, dword [eax + 4]
test eax, eax
jne 0x406cd3
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0x20
push edi
push eax
call dword [sym.imp.MSVCRT.dll__memicmp]
mov ebx, eax
add esp, 0xc
neg ebx
sbb bl, bl
push 1
lea ecx, [ebp - 0x2c]
inc bl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
test bl, bl
je 0x406d0d
mov ecx, esi
call fcn.00405e83
push 1
mov ecx, esi
call fcn.004062dd
mov byte [ebp - 0x11], 1
jmp 0x406d11
and byte [ebp - 0x11], 0
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vbase_dtor_void_]
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 1
call fcn.00408064
and byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.00408064
or dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x11], 0
je 0x406d49
cmp byte [ebp + 8], 0
jne 0x406d93
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + 0x68]
lea edi, [ecx + 0x64]
test eax, eax
jne 0x406d5b
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov esi, dword [sym.imp.MSVCRT.dll__unlink]
push eax
call esi
mov dword [esp], str..tdl
lea eax, [ebp - 0x2c]
push edi
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
mov eax, dword [ebp - 0x28]
add esp, 0xc
test eax, eax
jne 0x406d84
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call esi
pop ecx
push 1
lea ecx, [ebp - 0x2c]
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 ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0x11]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4