Function at 0x40eb90
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
mov edx, dword [esp + 0xc]
test edx, edx
mov dword [esp + 4], 0
mov dword [esp], 0
jne 0x40ebb1
lea eax, [edx - 0x66]
add esp, 8
ret
push esi
mov esi, dword [edx + 0x7c]
test esi, esi
jne 0x40ebc1
lea eax, [esi - 0x66]
pop esi
add esp, 8
ret
cmp dword [esi], 0
jne 0x40ebd0
mov eax, 0xffffff9c
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40ebdd
pop esi
add esp, 8
ret
cmp dword [esi + 0x64], 6
push ebx
push ebp
push edi
jne 0x40ec35
mov ecx, dword [esi + 0x5c]
cmp ecx, eax
jae 0x40ebef
mov eax, ecx
mov ecx, dword [edx + 0x30]
mov edx, dword [esp + 0x20]
push ecx
push eax
mov eax, dword [esi + 0x60]
push edx
push eax
call fcn.0040e010
sub dword [esi + 0x5c], eax
mov ecx, dword [esi + 0x5c]
add dword [esi + 0x6c], eax
add esp, 0x10
test ecx, ecx
mov dword [esp + 0x14], eax
jne 0x40ec1e
call fcn.0040e210
mov dword [esi + 0x50], eax
cmp dword [esp + 0x14], 0
jne 0x40eda6
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x10], ecx
mov ecx, dword [esi + 0x5c]
cmp eax, ecx
mov dword [esi + 0x14], eax
jbe 0x40ec49
mov dword [esi + 0x14], ecx
cmp dword [esi + 0x14], 0
jbe 0x40ec29
nop
cmp dword [esi + 8], 0
jne 0x40ece7
mov eax, dword [esi + 0x58]
test eax, eax
jbe 0x40ece7
mov edi, 0x4000
cmp eax, edi
jae 0x40ec78
mov edi, eax
test edi, edi
je 0x40ed91
mov eax, dword [esi + 0x68]
add eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x60]
push 0
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40ed9b
mov eax, dword [esi]
mov ecx, dword [esi + 0x60]
push 0
lea edx, [esp + 0x20]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40ed9b
xor edx, edx
div edi
cmp eax, 1
jne 0x40ed9b
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40ecd9
mov edx, dword [esi]
push edi
push edx
push eax
call fcn.0040db20
add esp, 0xc
mov eax, dword [esi]
add dword [esi + 0x3c], edi
sub dword [esi + 0x58], edi
mov dword [esi + 4], eax
mov dword [esi + 8], edi
cmp dword [esi + 0x64], 0
jne 0x40ed3f
mov eax, dword [esi + 0x14]
mov edi, dword [esi + 8]
cmp eax, edi
jae 0x40ecf9
mov edi, eax
xor eax, eax
test edi, edi
jbe 0x40ed13
nop
mov ecx, dword [esi + 4]
mov cl, byte [eax + ecx]
mov edx, dword [esi + 0x10]
mov byte [eax + edx], cl
add eax, 1
cmp eax, edi
jb 0x40ed00
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x50]
push edi
push edx
push eax
call fcn.00418a20
sub dword [esi + 0x5c], edi
sub dword [esi + 8], edi
sub dword [esi + 0x14], edi
add dword [esi + 0x10], edi
add dword [esi + 4], edi
add dword [esi + 0x18], edi
add esp, 0xc
add dword [esp + 0x10], edi
mov dword [esi + 0x50], eax
jmp 0x40ed82
mov ebx, dword [esi + 0x18]
mov ebp, dword [esi + 0x10]
lea ecx, [esi + 4]
push 2
push ecx
call fcn.00418640
mov edi, dword [esi + 0x18]
mov edx, dword [esi + 0x50]
sub edi, ebx
push edi
push ebp
push edx
mov dword [esp + 0x28], eax
call fcn.00418a20
sub dword [esi + 0x5c], edi
add dword [esp + 0x24], edi
mov dword [esi + 0x50], eax
mov eax, dword [esp + 0x28]
add esp, 0x14
cmp eax, 1
je 0x40ec29
test eax, eax
jne 0x40eda6
cmp dword [esi + 0x14], 0
ja 0x40ec50
jmp 0x40ec1e
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 8
ret
pop edi
pop ebp
pop ebx
or eax, 0xffffffff
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x14]
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret