Function at 0x40d920
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42a37b
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x435398]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push edi
mov eax, dword [0x435398]
xor eax, esp
push eax
lea eax, [esp + 0x98]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], eax
xor eax, eax
mov edi, ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x88], eax
mov byte [esp + 0x78], al
lea ebx, [eax + 0x10]
push ecx
lea eax, [esp + 0x78]
mov dword [esp + 0x90], 0xf
call fcn.0040e9e0
push 1
push 0
push 0xfffffffffffffff0
mov dword [esp + 0xac], 0
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call ebx
cmp eax, 0xffffffff
jne 0x40d9ce
cmp dword [esp + 0x8c], 0x10
jb 0x40d9c7
mov edx, dword [esp + 0x78]
push edx
call fcn.00411c84
add esp, 4
xor al, al
jmp 0x40db6e
cmp dword [esp + 0x8c], 0x10
mov eax, dword [esp + 0x78]
jae 0x40d9e0
lea eax, [esp + 0x78]
push 0
lea ecx, [esp + 0x20]
push ecx
push 0x10
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40d9b0
push 1
push 0
push 0xffffffffffffffec
push esi
call ebx
cmp eax, 0xffffffff
jne 0x40da21
cmp dword [esp + 0x8c], 0x10
jb 0x40d9c7
mov eax, dword [esp + 0x78]
push eax
call fcn.00411c84
add esp, 4
xor al, al
jmp 0x40db6e
push 0
lea ecx, [esp + 0x20]
push ecx
push 4
lea edx, [esp + 0x20]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40da03
push 1
mov ecx, 0xfffffffc
sub ecx, dword [esp + 0x18]
push 0
push ecx
push esi
call ebx
cmp eax, 0xffffffff
je 0x40d9b0
mov eax, dword [esp + 0x14]
push 0
push eax
mov ecx, edi
call fcn.0040c84e
cmp dword [edi + 0x18], 0x10
jb 0x40da6d
mov eax, dword [edi + 4]
jmp 0x40da70
lea eax, [edi + 4]
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x20]
push ecx
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40da03
push edi
lea ecx, [esp + 0x40]
push ecx
call fcn.00427585
lea edx, [esp + 0x20]
mov ecx, eax
mov byte [esp + 0xa0], 1
call fcn.004275db
mov byte [esp + 0xa0], 2
mov ecx, dword [esp + 0x78]
mov edi, 0x10
cmp dword [esp + 0x8c], edi
jae 0x40dac8
lea ecx, [esp + 0x78]
mov edx, dword [esp + 0x88]
push edx
push ecx
mov ecx, dword [eax + 0x14]
push ecx
push 0
mov ecx, eax
call fcn.00404506
test eax, eax
setne byte [esp + 0x13]
cmp dword [esp + 0x38], edi
jb 0x40daf8
mov edx, dword [esp + 0x24]
push edx
call fcn.00411c84
add esp, 4
lea eax, [esp + 0x3c]
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], 0
mov byte [esp + 0x24], 0
call fcn.00427311
cmp byte [esp + 0x13], 0
je 0x40db42
mov eax, dword [esp + 0x18]
mov byte [eax], 0
cmp dword [esp + 0x8c], edi
jb 0x40d9c7
mov ecx, dword [esp + 0x78]
push ecx
call fcn.00411c84
add esp, 4
xor al, al
jmp 0x40db6e
mov edx, dword [esp + 0x14]
push 1
push 0
neg edx
push edx
push esi
call ebx
cmp eax, 0xffffffff
setne bl
cmp dword [esp + 0x8c], edi
jb 0x40db6c
mov eax, dword [esp + 0x78]
push eax
call fcn.00411c84
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x98]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [esp + 0x84]
xor ecx, esp
call fcn.00411fc4
mov esp, ebp
pop ebp
ret