Function at 0x401310
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
push 0x40ed88
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x30], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push esi
mov ebx, eax
push 0xffffffffffffffec
push ebx
call edi
cmp eax, 0xffffffff
jne 0x401362
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 0x18
ret
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x20]
push ecx
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], 4
jb 0x40171a
mov eax, dword [esp + 0x14]
mov edx, eax
and edx, 0xff00
mov ecx, eax
shl ecx, 0x10
or edx, ecx
mov ecx, eax
and ecx, 0xff0000
shr eax, 0x10
or ecx, eax
shl edx, 8
shr ecx, 8
or edx, ecx
cmp edx, 0x38424452
jne 0x40171a
push esi
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esp + 0x2c]
push eax
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], 4
jb 0x40171a
mov ecx, dword [esp + 0x20]
call fcn.00401260
cmp eax, 5
jne 0x40171a
push esi
lea ecx, [esp + 0x14]
push ecx
push 4
lea edx, [esp + 0x24]
push edx
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], 4
jb 0x40171a
mov ecx, dword [esp + 0x18]
call fcn.00401260
push esi
push esi
push eax
push ebx
mov dword [esp + 0x28], eax
call edi
cmp eax, 0xffffffff
je 0x40171a
push esi
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x20]
push ecx
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], 4
jb 0x40171a
mov ecx, dword [esp + 0x14]
call fcn.00401260
cmp eax, 0x38424452
jne 0x40171a
lea esi, [esp + 0x24]
mov edi, 0x40e04c
call fcn.00401290
mov esi, 0x40efc8
mov edi, 0x40ef90
call fcn.00401290
push 0
lea edx, [esp + 0x14]
push edx
mov esi, 1
push esi
push 0x40ef8b
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], esi
jb 0x40171a
push 0
lea eax, [esp + 0x14]
push eax
push esi
push 0x40ef89
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], esi
jb 0x40171a
push 0
lea ecx, [esp + 0x14]
push ecx
push esi
push 0x40ef88
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], esi
jb 0x40171a
push 0
lea edx, [esp + 0x14]
push edx
push esi
push 0x40ed81
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], esi
jb 0x40171a
push 0
lea eax, [esp + 0x14]
push eax
push esi
push 0x40ed83
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], esi
jb 0x40171a
push 0
lea ecx, [esp + 0x14]
push ecx
push 4
push 0x40ed84
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], esi
jb 0x40171a
mov ecx, dword [0x40ed84]
call fcn.00401260
cmp eax, 3
mov dword [0x40ed84], eax
jne 0x401695
push 0
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esp + 0x28]
push eax
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], esi
jb 0x40171a
mov ecx, dword [esp + 0x1c]
call fcn.00401260
push eax
push 0x40
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [0x40ef8c], eax
je 0x401721
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x14]
push ecx
push edx
push eax
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], esi
jb 0x40171a
mov esi, 0x40ef98
push 0
lea eax, [esp + 0x14]
push eax
push 4
push esi
push ebx
call ebp
test eax, eax
je 0x40171a
mov ecx, dword [esi]
call fcn.00401260
mov dword [esi], eax
add esi, 4
cmp esi, 0x40efb0
jl 0x4015e0
mov edi, 0x40efb0
mov edi, edi
lea esi, [esp + 0x10]
call fcn.00401290
add edi, 4
cmp edi, 0x40efc8
jl 0x401610
push 0
mov ecx, esi
push ecx
push 4
push 0x40efd4
push ebx
call ebp
test eax, eax
je 0x40171a
mov ecx, dword [0x40efd4]
call fcn.00401260
push 0
mov edx, esi
push edx
push 1
push 0x40ef8a
push ebx
mov dword [0x40efd4], eax
call ebp
test eax, eax
je 0x40171a
push 0
mov eax, esi
push eax
push 1
push 0x40ed82
push ebx
call ebp
test eax, eax
je 0x40171a
push 0
mov ecx, esi
push ecx
push 1
push 0x40ed80
push ebx
call ebp
test eax, eax
je 0x40171a
mov esi, 1
push 0
lea edx, [esp + 0x14]
push edx
push esi
push 0x40efd0
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], esi
jb 0x40171a
cmp byte [0x40efd0], 0
je 0x40170c
push 0
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x28]
push ecx
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], esi
jb 0x40171a
mov ecx, dword [esp + 0x1c]
call fcn.00401260
push eax
push 0x40
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [0x40ef94], eax
je 0x401721
mov ecx, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x14]
push edx
push ecx
push eax
push ebx
call ebp
test eax, eax
je 0x40171a
cmp dword [esp + 0x10], esi
jb 0x40171a
lea esi, [esp + 0x24]
mov edi, 0x40efcc
call fcn.00401290
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret