Function at 0x40ef58
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
and dword [ebp - 0x24], 0
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 0x40ef78
mov byte [eax], 0
push dword [ebp + 8]
call fcn.0040e912
mov ecx, eax
mov dword [ebp - 0x28], ecx
cmp ecx, 1
jae 0x40ef91
xor eax, eax
jmp 0x40f241
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x40ef9c
mov edi, dword [eax]
jmp 0x40efa3
and dword [ebp - 0x14], 0
mov edi, dword [ebp - 0x14]
inc ecx
mov eax, 0x100000
push esi
mov esi, 0x1000
cmp ecx, eax
jbe 0x40efb8
mov dword [ebp - 0xc], eax
jmp 0x40efbf
mov dword [ebp - 0xc], ecx
cmp ecx, esi
jle 0x40efc4
mov eax, dword [ebp - 0xc]
jmp 0x40efc6
mov eax, esi
push ebx
push 1
push eax
call fcn.00447e84
pop ecx
mov ebx, eax
pop ecx
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0xc], esi
jle 0x40efde
mov esi, dword [ebp - 0xc]
push 1
push esi
call fcn.00447e84
mov esi, eax
mov eax, dword [ebp + 0x18]
pop ecx
pop ecx
mov dword [ebp - 0x20], esi
test eax, eax
je 0x40effa
mov eax, dword [eax]
test eax, eax
jne 0x40f015
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 0x40f1be
and dword [ebp - 0x1c], 0
and dword [ebp - 0x18], 0
cmp edi, dword [ebp - 0x28]
jb 0x40f053
cmp dword [ebp + 0x18], 0
jne 0x40f1d6
cmp dword [ebp - 8], 0
je 0x40f1e7
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40f1e7
mov edi, dword [ebp - 0x14]
xor eax, eax
cmp dword [ebp - 0x18], eax
jne 0x40f02e
push eax
push eax
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0xc]
push ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f1af
add edi, dword [ebp - 0x24]
mov byte [ebp - 4], 0
mov cl, byte [ebx]
mov dword [ebp - 0x14], edi
xor eax, eax
jmp 0x40f09f
cmp cl, 0xd
je 0x40f0a5
cmp cl, 0xa
je 0x40f0a5
inc eax
mov cl, byte [eax + ebx]
test cl, cl
jne 0x40f091
jmp 0x40f0d6
mov cl, byte [eax + ebx]
cmp cl, 0xd
jne 0x40f0c7
cmp byte [eax + ebx + 1], 0xa
jne 0x40f0bb
push 0x45f75c
jmp 0x40f0cc
cmp cl, 0xd
jne 0x40f0c7
push 0x45f758
jmp 0x40f0cc
push 0x45f754
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 + 8], eax
je 0x40f19b
mov ebx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x10]
inc ebx
cmp ebx, dword [ebp + 0xc]
je 0x40f138
cmp dword [ebp + 0x1c], 0
jne 0x40f138
cmp byte [ebp - 4], 0
je 0x40f12f
test esi, esi
je 0x40f11c
push dword [ebp + 8]
lea eax, [ebp - 4]
push eax
push esi
call fcn.00449ba0
add esp, 0xc
jmp 0x40f11f
xor eax, eax
inc eax
test eax, eax
jne 0x40f12f
inc dword [ebp - 0x1c]
add edi, dword [ebp + 8]
inc ebx
add esi, dword [ebp + 8]
jmp 0x40f131
inc edi
inc esi
cmp byte [esi], 0
jne 0x40f0f5
jmp 0x40f198
mov eax, dword [ebp - 0x10]
push 0
lea esi, [edi + eax]
push 0x45c848
push esi
call fcn.004417cc
push 0
push 0x45c850
push esi
call fcn.004417cc
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call edi
mov ecx, 0xffff0
cmp eax, ecx
jle 0x40f16e
mov eax, ecx
jmp 0x40f171
push esi
call edi
lea edi, [eax + 1]
push edi
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp dword [ebp + 0x1c], 0
mov dword [ebp - 0x18], 1
je 0x40f198
mov eax, dword [ebp + 8]
lea ecx, [eax + edi - 1]
mov eax, dword [ebp + 0x1c]
add dword [eax], ecx
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp - 0x20]
cmp dword [ebp - 0x14], eax
jb 0x40f050
jmp 0x40f02e
cmp dword [ebp - 8], 0
je 0x40f1be
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40f1c9
push ebx
call fcn.00447ab6
pop ecx
test esi, esi
je 0x40f231
push esi
call fcn.00447ab6
pop ecx
jmp 0x40f231
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x18]
call fcn.00447af0
add esp, 0xc
cmp dword [ebp - 0x18], 0
je 0x40f215
cmp dword [ebp + 0x10], 0
je 0x40f215
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call edi
lea ecx, [eax + 1]
mov eax, dword [ebp + 0x14]
cmp eax, ecx
jl 0x40f20a
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 0x40f220
push ebx
call fcn.00447ab6
pop ecx
test esi, esi
je 0x40f22b
push esi
call fcn.00447ab6
pop ecx
cmp dword [ebp - 0x18], 0
jne 0x40f235
xor eax, eax
jmp 0x40f23f
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
pop ebx
pop esi
pop edi
leave
ret 0x18