Function at 0x40a660
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41627b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xfc
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x120]
mov eax, dword [edi]
mov ebp, ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0x14], eax
xor esi, esi
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x114], esi
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
push 0x41b6d8
lea ecx, [esp + 0x78]
mov byte [esp + 0x118], 1
call fcn.00407fc0
mov ecx, dword [esp + 0x124]
mov edx, dword [edi]
push ecx
push esi
push edx
lea ecx, [esp + 0x80]
mov byte [esp + 0x120], 2
call fcn.0040a300
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x1c], ebx
je 0x40a809
push str.File
lea ecx, [esp + 0x78]
call fcn.00407470
mov edi, eax
mov eax, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [eax]
push 1
push eax
lea ecx, [esp + 0x18]
lea esi, [ebp + 0x20]
push ecx
mov ecx, esi
mov byte [esp + 0x1c], 0x5c
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char_const___unsigned_int__unsigned_int_const]
add eax, 1
push eax
push 0
lea edx, [esp + 0x60]
push edx
mov ecx, esi
call dword [sym.imp.MSVCP80.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__::substr_unsigned_int__unsigned_int_]
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0x118], 3
call dword [sym.imp.MSVCP80.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__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 0x58]
mov byte [esp + 0x114], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push edi
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x60]
push ecx
call dword [sym.imp.MSVCP80.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char__struct_std::char_traits_char___class_std::allocator_char___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
add esp, 0xc
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x118], 4
call dword [sym.imp.MSVCP80.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__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 0x58]
mov byte [esp + 0x114], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp dword [esp + 0x38], 0x10
mov eax, dword [esp + 0x24]
jae 0x40a79e
lea eax, [esp + 0x24]
push 0x41b858
push eax
call fcn.00406670
mov esi, eax
add esp, 8
test esi, esi
je 0x40a809
mov edi, dword [sym.imp.MSVCR80.dll_fseek]
push 2
push 0
push esi
call edi
push esi
call dword [sym.imp.MSVCR80.dll_ftell]
push 0
push 0
push esi
mov ebp, eax
call edi
add esp, 0x1c
test ebp, ebp
jle 0x40a809
lea edx, [ebp + 1]
push edx
call sub.MFC80U.DLL_Ordinal_265
push esi
push 1
mov edi, eax
push ebp
push edi
mov dword [esp + 0x2c], edi
call dword [sym.imp.MSVCR80.dll_fread]
add esp, 0x14
cmp eax, 1
je 0x40a88c
test edi, edi
je 0x40a809
push edi
call sub.MFC80U.DLL_Ordinal_266
add esp, 4
mov eax, dword [esp + 0x128]
mov ecx, dword [esp + 0x120]
mov edi, dword [esp + 0x11c]
mov dword [eax], 0
mov dword [ecx], 0
mov eax, dword [edi]
test eax, eax
je 0x40a83f
push eax
call sub.MFC80U.DLL_Ordinal_266
add esp, 4
mov dword [edi], 0
test esi, esi
je 0x40a84d
push esi
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
lea ecx, [esp + 0x74]
mov byte [esp + 0x114], 1
call fcn.00408030
lea ecx, [esp + 0x3c]
mov byte [esp + 0x114], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x20]
mov dword [esp + 0x114], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
xor al, al
jmp 0x40a976
push esi
call dword [sym.imp.MSVCR80.dll_fclose]
mov edx, dword [esp + 0x12c]
mov byte [edi + ebp], 0
mov esi, dword [edx]
sub esi, ebx
add esi, ebp
add esi, dword [esp + 0x18]
lea eax, [esi + 1]
push eax
call sub.MFC80U.DLL_Ordinal_265
mov ebx, dword [esp + 0x124]
mov ecx, dword [esp + 0x1c]
mov edi, eax
mov eax, dword [ebx]
sub ecx, eax
push ecx
push eax
push edi
call sub.MSVCR80.dll_memcpy
mov edx, dword [esp + 0x2c]
mov eax, edi
sub eax, dword [ebx]
push ebp
add eax, dword [esp + 0x2c]
push edx
push eax
call sub.MSVCR80.dll_memcpy
mov eax, dword [ebx]
mov edx, dword [esp + 0x148]
mov ecx, eax
sub ecx, dword [esp + 0x3c]
add ecx, dword [edx]
mov edx, edi
sub edx, eax
push ecx
mov ecx, dword [esp + 0x40]
add edx, ebp
add edx, dword [esp + 0x38]
push ecx
push edx
call sub.MSVCR80.dll_memcpy
mov byte [edi + esi], 0
mov eax, dword [ebx]
push eax
call sub.MFC80U.DLL_Ordinal_266
mov eax, dword [esp + 0x48]
push eax
call sub.MFC80U.DLL_Ordinal_266
mov edx, dword [esp + 0x154]
mov eax, dword [esp + 0x15c]
mov ecx, edi
sub ecx, dword [ebx]
add esp, 0x34
add ecx, ebp
add ecx, dword [esp + 0x14]
mov byte [esp + 0x114], 1
mov dword [edx], ecx
mov dword [ebx], edi
lea ecx, [esp + 0x74]
mov dword [eax], esi
call fcn.00408030
lea ecx, [esp + 0x3c]
mov byte [esp + 0x114], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x20]
mov dword [esp + 0x114], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov al, 1
mov ecx, dword [esp + 0x10c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x108
ret 0x10