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

Disassembly:
push 0xffffffffffffffff
push 0x587dfb
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x5e173c]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e173c]
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 0x40de45
cmp word [esi], 0
je 0x40de45
push 4
call fcn.0056590a
add esp, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0x68], 0
test eax, eax
je 0x40db82
mov dword [eax], 0
mov dword [eax], 0xffffffff
jmp 0x40db84
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 0x40dbc8
xor ecx, ecx
jmp 0x40dbdf
mov ecx, esi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40dbd0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [esp + 0x24]
call fcn.00404a80
mov byte [esp + 0x68], 2
lea eax, [esp + 0x1c]
push 0x80
push 3
push ecx
push SysReAllocString
push eax
lea ecx, [esp + 0x48]
call fcn.004b47d0
test al, al
sete bl
mov byte [esp + 0x68], 1
cmp dword [esp + 0x30], 8
jb 0x40dc27
push dword [esp + 0x1c]
call fcn.00564de3
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 0x40dc4d
xor ebp, ebp
jmp 0x40ddf2
test esi, esi
je 0x40ddef
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40ddef
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40dc81
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40ddef
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.00560e4f
add esp, 4
mov ebx, eax
push edi
push 0
push ebx
call fcn.0056cbb0
add esp, 0xc
mov dword [esp + 0x38], ebx
mov byte [esp + 0x68], 3
mov dword [esp + 0x14], 0
test ebx, ebx
je 0x40ddd8
cmp dword [esi], 0xffffffff
je 0x40ddd8
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 0x40ddd8
push ecx
lea ecx, [esp + 0x40]
call fcn.004b4020
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.004b4360
test al, al
jne 0x40dd65
mov ebp, 0xfffffffe
mov byte [esp + 0x68], 3
lea ecx, [esp + 0x1c]
call fcn.00405d20
mov byte [esp + 0x68], 1
push ebx
call fcn.0056503c
add esp, 4
jmp 0x40ddf2
mov eax, dword [ebp + 0x14]
cmp eax, 0x10
jb 0x40dd72
mov ecx, dword [ebp]
jmp 0x40dd74
mov ecx, ebp
mov edx, dword [ebp + 0x10]
add ecx, edx
cmp eax, 0x10
jb 0x40dd83
mov eax, dword [ebp]
jmp 0x40dd85
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.0040e4b0
mov byte [esp + 0x68], 3
test edi, edi
je 0x40ddc3
push edi
call fcn.00564de3
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.0056503c
add esp, 4
mov ebp, 1
jmp 0x40ddf2
or ebp, 0xffffffff
mov byte [esp + 0x68], 1
test ebx, ebx
je 0x40ddf2
push ebx
call fcn.0056503c
add esp, 4
jmp 0x40ddf2
or ebp, 0xffffffff
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40de10
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40de10
push eax
call edi
test eax, eax
je 0x40de10
mov dword [esi], 0xffffffff
mov dword [esp + 0x68], 0xffffffff
test esi, esi
je 0x40de41
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40de30
test eax, eax
je 0x40de30
push eax
call edi
mov dword [esi], 0
push esi
call fcn.00564de3
add esp, 4
mov dword [esp + 0x34], 0
mov eax, ebp
jmp 0x40de48
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.00564de8
add esp, 0x58
ret