Function at 0x40e9d8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x34
mov ecx, dword [0x52efc0]
mov eax, dword [ebp + 0xc]
xor ecx, ebp
test eax, eax
mov dword [ebp - 0x10], ecx
je 0x40ebfa
mov ecx, dword [ebp + 0x10]
mov edi, 0x64
mov ebx, 0x100000
cmp eax, edi
cmovb edi, eax
cmp ecx, ebx
cmova ebx, ecx
xor eax, eax
push eax
push 0x8000000
push 3
push eax
push 7
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea esi, [ebp - 0x18]
xor ecx, ecx
mov dword [ebp - 0x30], 0
mov dword [esi], ecx
mov ecx, esi
push eax
call fcn.0040e94a
mov eax, dword [esi]
inc eax
cmp eax, 2
jb 0x40ec16
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x40], edi
lea esi, [ebp - 0x24]
xor ebx, ebx
mov edi, 0x400
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov ecx, esi
push edi
call fcn.0040ec44
mov ecx, dword [ebp - 0x18]
mov edx, esi
push edi
call fcn.0040ecb2
add esp, 4
test al, al
je 0x40ec00
lea edx, [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
mov eax, dword [edx]
mov esi, dword [eax + 0x3c]
lea eax, [esi + 0xf8]
push eax
call fcn.0040ecb2
add esp, 4
test al, al
je 0x40ebfe
lea edx, [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
mov eax, dword [edx]
push dword [eax + esi + 0x54]
call fcn.0040ecb2
add esp, 4
test al, al
je 0x40ebfe
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x2c]
mov dword [ecx], 0x4e3328
mov dword [ecx + 4], eax
call fcn.0045ebe6
test al, al
je 0x40ec41
push 4
push 0x1000
push dword [ebp - 0x38]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [ebp - 0x34], eax
je 0x40ebfe
lea ecx, [ebp - 0x2c]
push 0
call fcn.0045e8f0
test eax, eax
je 0x40ebe0
mov ecx, eax
xor esi, esi
lea eax, [ecx + 0x28]
mov dword [ebp - 0x3c], esi
cmp eax, dword [ebp - 0x20]
ja 0x40ec3e
mov eax, dword [ecx + 8]
mov ebx, dword [ecx + 0x10]
cmp eax, ebx
cmovb ebx, eax
test ebx, ebx
je 0x40ebc9
imul ebx, dword [ebp - 0x40]
mov edx, 0x51eb851f
mov eax, ebx
mul edx
mov eax, 1
mov edi, edx
shr edi, 5
cmp ebx, 0x64
cmovb edi, eax
mov eax, dword [ecx + 0x14]
xor ecx, ecx
test eax, eax
js 0x40ec35
mov esi, dword [ebp - 0x18]
push ecx
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40ec35
mov eax, dword [ebp - 0x38]
cmp edi, eax
jbe 0x40eba4
xor ecx, ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x14], ecx
push ecx
lea ecx, [ebp - 0x14]
push ecx
push eax
push dword [ebp - 0x34]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ebe5
cmp dword [ebp - 0x14], ebx
jne 0x40ebe5
mov eax, ebx
sub edi, ebx
jmp 0x40eb73
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0x14]
push eax
push edi
push dword [ebp - 0x34]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ebe5
cmp dword [ebp - 0x14], edi
jne 0x40ebe5
mov esi, dword [ebp - 0x3c]
lea ecx, [ebp - 0x2c]
inc esi
push esi
call fcn.0045e8f0
mov ecx, eax
test eax, eax
jne 0x40eb0e
mov al, 1
mov dword [ebp - 0x30], eax
push 0x8000
push 0
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ebx, dword [ebp - 0x30]
jmp 0x40ec00
mov bl, 1
jmp 0x40ec21
xor ebx, ebx
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x30], ebx
test eax, eax
je 0x40ec16
mov dword [ebp - 0x20], eax
push eax
call fcn.004aeac6
add esp, 4
lea ecx, [ebp - 0x18]
call fcn.0040e9a0
mov ebx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004aeb01
mov eax, ebx
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x30], 0
jmp 0x40ebe5
int3
int3