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

Disassembly:
push 0xffffffffffffffff
push 0x421e98
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
push ebx
push ebp
xor ebp, ebp
push esi
mov dword [eax], ebp
mov esi, dword [ecx + 4]
push 1
push ebp
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x18], ebx
jne 0x40eb9d
mov edx, dword [esp + 0x50]
pop esi
mov eax, 1
mov dword [edx], ebp
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret
push edi
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov al, byte [esp + 0x54]
mov byte [esp + 0x2c], al
xor eax, eax
sub edi, ebx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ebp
cmp edi, ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], ebp
jle 0x40ed8a
mov ebx, edi
mov dword [esp + 0x18], ebx
jmp 0x40ebe0
mov ebx, dword [esp + 0x18]
push 0x1000
call fcn.00411737
add esp, 4
mov dword [esp + 0x24], eax
push 1
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, eax
cmp ebx, 0x1000
mov eax, ebx
jl 0x40ec0f
mov eax, 0x1000
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x10]
push 0
push ecx
push eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ecd4
mov eax, dword [esp + 0x4c]
xor ebx, ebx
mov edx, dword [eax + 0x130]
lea ecx, [eax + 0xc]
push ecx
mov ecx, dword [esp + 0x28]
add eax, 0x2c
push edx
push eax
mov eax, dword [esp + 0x1c]
push eax
push ecx
push ebp
call fcn.0040fce0
mov ecx, dword [esp + 0x28]
add esp, 0x18
xor eax, eax
test ecx, ecx
jbe 0x40ec82
mov edx, dword [esp + 0x24]
cmp byte [eax + edx], 0
je 0x40ec6e
inc eax
cmp eax, ecx
jb 0x40ec61
jmp 0x40ec82
mov ecx, eax
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], eax
mov ebx, 1
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x24]
add eax, ecx
push edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x2c], ecx
push 1
push eax
lea ecx, [esp + 0x38]
call fcn.0040c810
test ebx, ebx
jne 0x40ecf8
mov eax, dword [esp + 0x10]
mov ecx, 0x1000
cmp eax, ecx
jne 0x40ecf8
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
add eax, ecx
sub edx, ecx
cmp eax, edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], edx
jl 0x40ebdc
jmp 0x40ecf8
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0041164e
mov edx, dword [esp + 0x58]
add esp, 4
mov dword [edx], 0
mov edi, dword [esp + 0x14]
test edi, edi
jle 0x40ed86
mov eax, dword [esp + 0x54]
lea ecx, [edi + 1]
push ecx
mov dword [eax], 1
call fcn.0040be90
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x54]
add esp, 4
add edi, edx
mov dword [ebx], eax
push 0
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov ebx, dword [ebx]
cmp ebp, eax
je 0x40ed72
mov ecx, dword [ebp + 4]
mov esi, dword [ebp]
mov eax, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp]
mov edi, dword [ebp + 4]
push ecx
add ebx, edi
call fcn.0041164e
mov eax, dword [esp + 0x38]
add ebp, 8
add esp, 4
cmp ebp, eax
jne 0x40ed40
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x14]
mov eax, dword [edx]
mov byte [eax + ecx], 0
mov eax, dword [esp + 0x34]
jmp 0x40ed94
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x54]
mov dword [edx], 0
mov ecx, dword [esp + 0x30]
cmp eax, eax
mov edx, eax
pop edi
je 0x40edb3
mov esi, dword [eax]
add eax, 8
mov dword [ecx], esi
mov esi, dword [eax - 4]
mov dword [ecx + 4], esi
add ecx, 8
cmp eax, edx
jne 0x40ed9f
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x50]
xor eax, eax
cmp dword [ecx], 0
mov edx, dword [esp + 0x2c]
sete al
push edx
mov esi, eax
call fcn.0041c87f
mov ecx, dword [esp + 0x3c]
add esp, 4
mov eax, esi
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
add esp, 0x38
ret