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

Disassembly:
mov eax, 0x4da608
call fcn.004d1d50
sub esp, 0x44
mov eax, dword [0x52e400]
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 0x4ec6cc
push eax
mov dword [ebp - 0x30], esi
call fcn.00408a4c
add esp, 0x10
cmp eax, esi
jne 0x408d39
cmp dword [ebp - 0x30], esi
je 0x408d34
push esi
push 0x80
push 3
push esi
push esi
push closesocket
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, esi
mov dword [ebp - 0x38], eax
jne 0x408c4e
mov esi, 0x40000003
jmp 0x408d68
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 0x408c6d
mov esi, 0x40000003
jmp 0x408d5f
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 0x408d5f
jg 0x408c90
cmp eax, esi
jb 0x408d5f
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 0x408d11
cmp dword [ebp - 0x34], esi
jbe 0x408d52
push esi
push dword [ebp - 0x34]
push edi
push dword [ebp - 0x30]
call fcn.00407c05
mov ecx, dword [ebp - 0x34]
add esp, 0x10
cmp eax, ecx
jne 0x408d15
cmp edx, esi
jne 0x408d15
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 0x408c90
jg 0x408d5f
mov eax, dword [ebp - 0x50]
cmp dword [ebp - 0x48], eax
jbe 0x408c90
jmp 0x408d5f
cmp eax, esi
jne 0x408d52
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x30]
call fcn.00407908
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.004d1da7
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.00407908
pop ecx
mov eax, esi
jmp 0x408d39