Function at 0x40deb6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push edi
xor eax, eax
lea edi, [ebp - 3]
mov byte [ebp - 4], 0
stosw word es:[edi], ax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40ded2
mov byte [eax], 0
push dword [ebp + 8]
call fcn.0040d86d
mov dword [ebp - 0x20], eax
cmp eax, 1
jae 0x40dee9
xor eax, eax
jmp 0x40e171
lea ecx, [eax + 1]
mov eax, 0x100000
xor edi, edi
push esi
mov esi, 0x1000
cmp ecx, eax
jbe 0x40df02
mov dword [ebp - 0xc], eax
jmp 0x40df09
cmp ecx, esi
mov dword [ebp - 0xc], ecx
jle 0x40df0e
mov eax, dword [ebp - 0xc]
jmp 0x40df10
mov eax, esi
push ebx
push 1
push eax
call fcn.004462a8
cmp dword [ebp - 0xc], esi
pop ecx
mov ebx, eax
pop ecx
mov dword [ebp - 0x10], ebx
jle 0x40df28
mov esi, dword [ebp - 0xc]
push 1
push esi
call fcn.004462a8
mov esi, eax
mov eax, dword [ebp + 0x18]
pop ecx
pop ecx
mov dword [ebp - 0x1c], esi
test eax, eax
je 0x40df44
mov eax, dword [eax]
test eax, eax
jne 0x40df5f
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x40e0ee
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp + 8], eax
cmp dword [ebp - 0x20], eax
ja 0x40df9d
cmp dword [ebp + 0x18], 0
jne 0x40e106
cmp dword [ebp - 8], 0
je 0x40e117
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40e117
mov edi, dword [ebp - 0x24]
xor eax, eax
cmp dword [ebp + 8], eax
jne 0x40df78
push eax
push eax
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0xc]
push ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40e0df
add edi, dword [ebp - 0x28]
mov byte [ebp - 4], 0
mov cl, byte [ebx]
mov dword [ebp - 0x24], edi
xor eax, eax
jmp 0x40dfe9
cmp cl, 0xd
je 0x40dfef
cmp cl, 0xa
je 0x40dfef
inc eax
mov cl, byte [eax + ebx]
test cl, cl
jne 0x40dfdb
jmp 0x40e020
mov cl, byte [eax + ebx]
cmp cl, 0xd
jne 0x40e011
cmp byte [eax + ebx + 1], 0xa
jne 0x40e005
push 0x45c50c
jmp 0x40e016
cmp cl, 0xd
jne 0x40e011
push 0x45c508
jmp 0x40e016
push 0x45c504
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 4]
push eax
xor edi, edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebx], 0
mov dword [ebp - 0x18], eax
je 0x40e0ce
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
inc ebx
cmp ebx, dword [ebp + 0xc]
je 0x40e07c
cmp byte [ebp - 4], 0
je 0x40e073
test esi, esi
je 0x40e060
push dword [ebp - 0x18]
lea eax, [ebp - 4]
push eax
push esi
call fcn.00448060
add esp, 0xc
jmp 0x40e063
xor eax, eax
inc eax
test eax, eax
jne 0x40e073
inc dword [ebp - 0x14]
add edi, dword [ebp - 0x18]
inc ebx
add esi, dword [ebp - 0x18]
jmp 0x40e075
inc edi
inc esi
cmp byte [esi], 0
jne 0x40e03f
jmp 0x40e0c8
mov eax, dword [ebp - 0x10]
push 0
lea esi, [edi + eax]
push 0x459844
push esi
call fcn.0043fbb2
push 0
push 0x45984c
push esi
call fcn.0043fbb2
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call edi
mov ecx, 0xffff0
cmp eax, ecx
jle 0x40e0b2
mov eax, ecx
jmp 0x40e0b5
push esi
call edi
inc eax
push eax
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov dword [ebp + 8], 1
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0x24], eax
jb 0x40df9a
jmp 0x40df78
cmp dword [ebp - 8], 0
je 0x40e0ee
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40e0f9
push ebx
call fcn.00445e06
pop ecx
test esi, esi
je 0x40e161
push esi
call fcn.00445e06
pop ecx
jmp 0x40e161
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x18]
call fcn.00445ea0
add esp, 0xc
cmp dword [ebp + 8], 0
je 0x40e145
cmp dword [ebp + 0x10], 0
je 0x40e145
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call edi
mov ecx, eax
mov eax, dword [ebp + 0x14]
inc ecx
cmp eax, ecx
jl 0x40e13a
push esi
call edi
inc eax
push eax
push esi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
test ebx, ebx
je 0x40e150
push ebx
call fcn.00445e06
pop ecx
test esi, esi
je 0x40e15b
push esi
call fcn.00445e06
pop ecx
cmp dword [ebp + 8], 0
jne 0x40e165
xor eax, eax
jmp 0x40e16f
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
pop ebx
pop esi
pop edi
leave
ret 0x14