Function at 0x40878a
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, 0x4db684
call fcn.004d1ec0
sub esp, 0x44
mov eax, dword [0x52f220]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
push esi
xor eax, ebp
lea ecx, [ebp - 0x30]
push ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
push 0x4ed6bc
push eax
mov dword [ebp - 0x30], esi
call fcn.004085f8
add esp, 0x10
cmp eax, esi
jne 0x4088e5
cmp dword [ebp - 0x30], esi
je 0x4088e0
push esi
push 0x80
push 3
push esi
push esi
push Ordinal_1
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, esi
mov dword [ebp - 0x38], eax
jne 0x4087fa
mov esi, 0x40000003
jmp 0x408914
lea ecx, [ebp - 0x40]
push ecx
push eax
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x40], esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x408819
mov esi, 0x40000003
jmp 0x40890b
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x40]
xor ebx, ebx
cmp ecx, esi
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], esi
jl 0x40890b
jg 0x40883c
cmp eax, esi
jb 0x40890b
push esi
push 0x1000
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_unsigned_int__char_]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], esi
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
mov edi, eax
push esi
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], esi
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push eax
push edi
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x4088bd
cmp dword [ebp - 0x34], esi
jbe 0x4088fe
push esi
push dword [ebp - 0x34]
push edi
push dword [ebp - 0x30]
call fcn.004077ac
mov ecx, dword [ebp - 0x34]
add esp, 0x10
cmp eax, ecx
jne 0x4088c1
cmp edx, esi
jne 0x4088c1
add dword [ebp - 0x48], eax
lea ecx, [ebp - 0x2c]
adc ebx, edx
or dword [ebp - 4], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp ebx, dword [ebp - 0x4c]
jl 0x40883c
jg 0x40890b
mov eax, dword [ebp - 0x50]
cmp dword [ebp - 0x48], eax
jbe 0x40883c
jmp 0x40890b
cmp eax, esi
jne 0x4088fe
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x30]
call fcn.00407445
or dword [ebp - 4], 0xffffffff
pop ecx
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, 0x40000003
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
xor ecx, ebp
pop ebx
call fcn.004d1f17
leave
ret
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x30]
call fcn.00407445
pop ecx
mov eax, esi
jmp 0x4088e5