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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x51a448]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x170], eax
mov eax, dword [ebp + 0xc]
mov edi, edx
push esi
push esi
push 3
push esi
mov dword [ebp - 0x174], eax
mov eax, dword [ebp + 0x10]
push 3
mov dword [ebp - 0x178], eax
mov eax, dword [ebp + 0x14]
push SysReAllocString
mov dword [ebp - 0x158], eax
mov eax, dword [ebp + 0x18]
push ecx
mov dword [ebp - 0x154], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 0x160], ebx
cmp ebx, 0xffffffff
je 0x40c62b
lea eax, [ebp - 0x188]
push eax
push esi
lea eax, [ebp - 0x180]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x40c624
lea ecx, [ebp - 0x180]
call fcn.00420fc4
mov ecx, dword [ebp - 0x158]
mov dword [ecx], eax
lea ecx, [ebp - 0x188]
call fcn.00420fc4
mov ecx, dword [ebp - 0x154]
push 0x40000
mov dword [ecx], eax
call fcn.004c8d06
mov dword [ebp - 0x15c], eax
pop ecx
test eax, eax
je 0x40c624
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40c618
mov edx, dword [edi + 4]
lea ecx, [ebp - 0x64]
mov ebx, dword [edi]
mov dword [ebp - 0x158], edx
call fcn.004168d1
lea ecx, [ebp - 0x14c]
call fcn.00429510
lea ecx, [ebp - 0xd4]
call fcn.004298eb
xorps xmm0, xmm0
movlpd qword [ebp - 0x16c], xmm0
cmp edx, esi
jb 0x40c5bd
ja 0x40c4dc
cmp ebx, esi
jbe 0x40c5bd
mov ecx, dword [ebp - 0x168]
mov edi, dword [ebp - 0x16c]
mov dword [ebp - 0x154], ecx
mov eax, dword [ebp - 0x158]
mov edx, ebx
sub edx, edi
sbb eax, ecx
mov dword [ebp - 0x168], eax
jne 0x40c510
cmp edx, 0x40000
ja 0x40c510
mov eax, ebx
sub eax, edi
jmp 0x40c515
mov eax, 0x40000
push esi
lea ecx, [ebp - 0x150]
mov dword [ebp - 0x150], eax
push ecx
push eax
push dword [ebp - 0x15c]
push dword [ebp - 0x160]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40c5cb
cmp dword [ebp - 0x150], esi
je 0x40c5cb
push dword [ebp - 0x150]
mov edx, dword [ebp - 0x15c]
lea ecx, [ebp - 0x64]
call fcn.0041702a
mov edx, dword [ebp - 0x15c]
pop ecx
push dword [ebp - 0x150]
lea ecx, [ebp - 0x14c]
call fcn.0042955b
mov edx, dword [ebp - 0x15c]
pop ecx
push dword [ebp - 0x150]
lea ecx, [ebp - 0xd4]
call fcn.0042992f
add edi, dword [ebp - 0x150]
mov edx, dword [ebp - 0x158]
pop ecx
mov ecx, dword [ebp - 0x154]
adc ecx, esi
mov dword [ebp - 0x154], ecx
cmp ecx, edx
jb 0x40c4ee
ja 0x40c5d7
cmp edi, ebx
jb 0x40c4ee
jmp 0x40c5d7
mov ecx, dword [ebp - 0x168]
mov edi, dword [ebp - 0x16c]
jmp 0x40c5d7
mov edx, dword [ebp - 0x158]
mov ecx, dword [ebp - 0x154]
cmp edi, ebx
jne 0x40c612
cmp ecx, edx
jne 0x40c612
mov ecx, dword [ebp - 0x170]
lea edx, [ebp - 0x64]
call fcn.004170c6
mov edx, dword [ebp - 0x174]
lea ecx, [ebp - 0x14c]
call fcn.004295a1
mov edx, dword [ebp - 0x178]
lea ecx, [ebp - 0xd4]
call fcn.00429975
xor esi, esi
inc esi
mov ebx, dword [ebp - 0x160]
push dword [ebp - 0x15c]
call fcn.004c8ceb
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049d307
leave
ret