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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42238a
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x42d008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi]
mov esi, dword [ebp + 8]
mov byte [edi + 8], 0
call dword [eax]
push 4
mov dword [ebp - 0x14], 0
call fcn.004107da
mov dword [ebp - 0x70], eax
mov dword [ebp - 4], 0
mov dword [eax], 0
mov dword [eax], 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 1
sub esp, 0xc
lea ecx, [ebp - 0x14]
push esi
call fcn.0040d510
test al, al
jne 0x40c809
lea ecx, [ebp - 0x38]
call fcn.0040dca0
mov byte [ebp - 4], 2
cmp dword [edi + 4], 0
je 0x40c7f5
sub esp, 0x18
lea eax, [ebp - 0x38]
mov ecx, esp
mov dword [ebp - 0x70], esp
push eax
call fcn.004037e0
mov byte [ebp - 4], 3
mov ecx, dword [edi + 4]
push 0
mov eax, dword [ecx]
mov byte [ebp - 4], 2
call dword [eax + 4]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.00401cbb
mov esi, dword [ebp - 0x14]
jmp 0x40ca2a
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x40c9e9
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40c9e9
lea ecx, [ebp - 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40c83f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40c9e9
mov ecx, dword [ebp - 0x1c]
xor eax, eax
add eax, ebx
mov dword [ebp - 0x70], eax
adc ecx, 0
or eax, ecx
mov dword [ebp - 0x7c], ecx
je 0x40c9e9
xorps xmm0, xmm0
mov byte [ebp - 0x69], 1
push 0x10000
mov dword [ebp - 0x18], 0
movlpd qword [ebp - 0x20], xmm0
call fcn.00410a5a
mov ecx, dword [ebp - 0x20]
mov ebx, eax
mov eax, dword [ebp - 0x1c]
add esp, 4
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], ecx
test ebx, ebx
je 0x40c978
cmp dword [esi], 0xffffffff
je 0x40c990
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 0x10000
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40c978
cmp byte [edi + 8], 0
jne 0x40c92d
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x40c975
mov eax, dword [edi]
push ecx
push ebx
mov ecx, edi
call dword [eax + 4]
mov edx, dword [ebp - 0x74]
add edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x78]
mov eax, dword [edi + 4]
adc ecx, 0
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x78], ecx
test eax, eax
je 0x40c91e
mov esi, dword [eax]
mov edx, ecx
mov ecx, dword [ebp - 0x74]
call fcn.00421270
mov edx, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x70]
movsd qword [ebp - 0x20], xmm0
call fcn.00421270
movsd xmm1, qword [ebp - 0x20]
sub esp, 8
divsd xmm1, xmm0
mov ecx, dword [edi + 4]
movsd qword [esp], xmm1
call dword [esi]
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x18], 0
jmp 0x40c885
lea ecx, [ebp - 0x50]
call fcn.00401cc0
mov byte [ebp - 4], 6
cmp dword [edi + 4], 0
je 0x40c964
sub esp, 0x18
lea eax, [ebp - 0x50]
mov ecx, esp
mov dword [ebp - 0x70], esp
push eax
call fcn.004037e0
mov byte [ebp - 4], 7
mov ecx, dword [edi + 4]
push 0
mov eax, dword [ecx]
add eax, 4
mov byte [ebp - 4], 6
call dword [eax]
xor al, al
mov byte [ebp - 0x69], al
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x50]
call fcn.00401cbb
mov esi, dword [ebp - 0x14]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40c990
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40c990
mov dword [esi], 0xffffffff
push ebx
call fcn.00410a55
mov eax, dword [edi]
add esp, 4
mov ecx, edi
call dword [eax + 8]
lea ecx, [ebp - 0x98]
call fcn.00401cc0
mov byte [ebp - 4], 8
cmp dword [edi + 4], 0
je 0x40c9d5
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x70], esp
push eax
call fcn.004037e0
mov byte [ebp - 4], 9
mov ecx, dword [edi + 4]
push 1
mov eax, dword [ecx]
mov byte [ebp - 4], 8
call dword [eax + 4]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x98]
call fcn.00401cbb
mov bl, byte [ebp - 0x69]
jmp 0x40ca2c
lea ecx, [ebp - 0x68]
call fcn.00401cc0
mov byte [ebp - 4], 4
cmp dword [edi + 4], 0
je 0x40ca1e
sub esp, 0x18
lea eax, [ebp - 0x68]
mov ecx, esp
mov dword [ebp - 0x70], esp
push eax
call fcn.004037e0
mov byte [ebp - 4], 5
mov ecx, dword [edi + 4]
push 0
mov eax, dword [ecx]
mov byte [ebp - 4], 4
call dword [eax + 4]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x68]
call fcn.00401cbb
xor bl, bl
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x40ca61
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40ca4f
test eax, eax
je 0x40ca4f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0
push 4
push esi
call fcn.004107cc
add esp, 8
mov dword [ebp - 0x14], 0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00410326
mov esp, ebp
pop ebp
ret 4