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

Disassembly:
push 0xffffffffffffffff
push 0x4719ab
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x49274c]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x49274c]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov esi, ecx
mov ebp, dword [esp + 0x74]
test esi, esi
je 0x40ed81
cmp word [esi], 0
je 0x40ed81
push 4
call fcn.004514bd
add esp, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0x68], 0
test eax, eax
je 0x40eac2
mov dword [eax], 0
mov dword [eax], 0xffffffff
jmp 0x40eac4
xor eax, eax
mov dword [esp + 0x68], 0xffffffff
mov dword [esp + 0x34], eax
mov dword [esp + 0x68], 1
xor eax, eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
cmp word [esi], ax
jne 0x40eb08
xor ecx, ecx
jmp 0x40eb1f
mov ecx, esi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40eb10
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [esp + 0x24]
call fcn.004073e0
mov byte [esp + 0x68], 2
lea eax, [esp + 0x1c]
push ecx
push 3
push ecx
push SysReAllocString
push eax
lea ecx, [esp + 0x48]
call fcn.004157c0
test al, al
sete bl
mov byte [esp + 0x68], 1
cmp dword [esp + 0x30], 8
jb 0x40eb63
push dword [esp + 0x1c]
call fcn.0044fd7a
add esp, 4
mov esi, dword [esp + 0x34]
xor eax, eax
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
test bl, bl
je 0x40eb89
xor ebp, ebp
jmp 0x40ed2e
test esi, esi
je 0x40ed2b
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40ed2b
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40ebbd
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40ed2b
mov eax, dword [esp + 0x18]
xor ecx, ecx
add ecx, edi
mov dword [esp + 0x18], ecx
adc eax, 0
mov dword [esp + 0x20], eax
lea edi, [ecx + 1]
push edi
call fcn.0044c49a
add esp, 4
mov ebx, eax
push edi
push 0
push ebx
call fcn.00455ee0
add esp, 0xc
mov dword [esp + 0x38], ebx
mov byte [esp + 0x68], 3
mov dword [esp + 0x14], 0
test ebx, ebx
je 0x40ed14
cmp dword [esi], 0xffffffff
je 0x40ed14
push 0
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push dword [esp + 0x20]
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ed14
push ecx
lea ecx, [esp + 0x40]
call fcn.00414ed0
xorps xmm0, xmm0
mov dword [esp + 0x24], 0
movq qword [esp + 0x1c], xmm0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov byte [esp + 0x68], 4
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x18]
push ebx
call fcn.00415210
test al, al
jne 0x40eca1
mov ebp, 0xfffffffe
mov byte [esp + 0x68], 3
lea ecx, [esp + 0x1c]
call fcn.0040e8d0
mov byte [esp + 0x68], 1
push ebx
call fcn.00451046
add esp, 4
jmp 0x40ed2e
mov eax, dword [ebp + 0x14]
cmp eax, 0x10
jb 0x40ecae
mov ecx, dword [ebp]
jmp 0x40ecb0
mov ecx, ebp
mov edx, dword [ebp + 0x10]
add ecx, edx
cmp eax, 0x10
jb 0x40ecbf
mov eax, dword [ebp]
jmp 0x40ecc1
mov eax, ebp
push dword [esp + 0x20]
mov edi, dword [esp + 0x20]
add eax, edx
push edi
push ecx
push eax
mov ecx, ebp
call fcn.0040eed0
mov byte [esp + 0x68], 3
test edi, edi
je 0x40ecff
push edi
call fcn.0044fd7a
add esp, 4
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov byte [esp + 0x68], 1
push ebx
call fcn.00451046
add esp, 4
mov ebp, 1
jmp 0x40ed2e
or ebp, 0xffffffff
mov byte [esp + 0x68], 1
test ebx, ebx
je 0x40ed2e
push ebx
call fcn.00451046
add esp, 4
jmp 0x40ed2e
or ebp, 0xffffffff
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40ed4c
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40ed4c
push eax
call edi
test eax, eax
je 0x40ed4c
mov dword [esi], 0xffffffff
mov dword [esp + 0x68], 0xffffffff
test esi, esi
je 0x40ed7d
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40ed6c
test eax, eax
je 0x40ed6c
push eax
call edi
mov dword [esi], 0
push esi
call fcn.0044fd7a
add esp, 4
mov dword [esp + 0x34], 0
mov eax, ebp
jmp 0x40ed84
or eax, 0xffffffff
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.0044fd7f
add esp, 0x58
ret