Function at 0x42ecc9
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4332e0
push 0x42eb0a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1a0
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor esi, esi
mov dword [ebp - 0x13c], esi
push esi
push esi
push 3
push esi
push 1
push reloc.KERNEL32.dll_GetFileSize
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x184], ebx
cmp ebx, 0xffffffff
je 0x42ee4a
push esi
lea eax, [ebp - 0x140]
push eax
push 0x40
lea eax, [ebp - 0x180]
push eax
push ebx
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
call edi
test eax, eax
je 0x42ee3e
cmp dword [ebp - 0x140], 0x40
jne 0x42ee3e
cmp word [ebp - 0x180], 0x5a4d
jne 0x42ee3e
push esi
push esi
push dword [ebp - 0x144]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x144]
jne 0x42ee3e
push esi
lea eax, [ebp - 0x140]
push eax
mov ebx, 0xf8
push ebx
lea eax, [ebp - 0x11c]
push eax
push dword [ebp - 0x184]
call edi
test eax, eax
je 0x42ee3e
cmp dword [ebp - 0x140], ebx
jne 0x42ee3e
cmp dword [ebp - 0x11c], 0x4550
jne 0x42ee3e
cmp word [ebp - 0x116], si
je 0x42ee3e
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x90]
mov dword [ebp - 0x20], ecx
cmp eax, esi
je 0x42ee3e
push esi
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x140], eax
push 4
push 0x1000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
mov dword [ebp - 0x120], ebx
cmp ebx, esi
je 0x42ee3e
push esi
push esi
push esi
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 0x140]
push eax
push dword [ebp - 0x140]
push ebx
push dword [ebp - 0x184]
call edi
test eax, eax
jne 0x42ee5b
push 0x8000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x144]
lea edi, [ebx + eax]
mov dword [ebp - 0x190], edi
push dword [ebp - 0x24]
push edi
push ebx
call fcn.0042f000
add esp, 0xc
add eax, ebx
mov dword [ebp - 0x198], eax
lea edx, [eax + 0x10]
mov dword [ebp - 0x194], edx
movzx ecx, word [eax + 0xe]
movzx esi, word [eax + 0xc]
add ecx, esi
mov dword [ebp - 0x18c], ecx
mov esi, ecx
dec ecx
mov dword [ebp - 0x18c], ecx
test esi, esi
je 0x42efb0
test byte [edx + 3], 0x80
jne 0x42efc4
cmp word [edx], 0xa
jne 0x42efc4
mov ecx, dword [edx + 4]
mov esi, GetFileSize
and ecx, esi
add ecx, eax
mov dword [ebp - 0x19c], ecx
lea edx, [ecx + 0x10]
mov dword [ebp - 0x1a0], edx
movzx edx, word [ecx + 0xe]
movzx ecx, word [ecx + 0xc]
add edx, ecx
mov dword [ebp - 0x1a4], edx
mov ecx, edx
dec edx
mov dword [ebp - 0x1a4], edx
test ecx, ecx
je 0x42efb0
mov ecx, dword [ebp - 0x1a0]
cmp word [ecx], 0x360
jne 0x42efb6
mov ecx, dword [ecx + 4]
test ecx, reloc.KERNEL32.dll_GetFileSize
je 0x42ef3e
and ecx, esi
add ecx, eax
mov dword [ebp - 0x1ac], ecx
add ecx, 0x10
mov dword [ebp - 0x1b0], ecx
mov esi, dword [ecx + 4]
add esi, eax
jmp 0x42ef41
lea esi, [ecx + eax]
mov dword [ebp - 0x1a8], esi
xor eax, eax
mov dword [edi + 0x58], eax
mov dword [edi + 0x98], eax
mov dword [edi + 0x9c], eax
mov dword [ebp - 0x138], 0x18
mov dword [ebp - 0x134], ebx
push dword [ebp - 0x24]
push edi
push ebx
call fcn.0042f000
mov dword [ebp - 0x130], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x12c], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x124], eax
push dword [esi]
push edi
push ebx
call fcn.0042f000
add eax, ebx
mov dword [ebp - 0x128], eax
lea eax, [ebp - 0x138]
push eax
call fcn.0042f076
add esp, 0x1c
mov dword [ebp - 0x13c], eax
or dword [ebp - 4], 0xffffffff
jmp 0x42efe3
add ecx, 8
mov dword [ebp - 0x1a0], ecx
jmp 0x42eef7
add edx, 8
mov dword [ebp - 0x194], edx
jmp 0x42eea7
test ebx, ebx
je 0x42eff5
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x13c]
jmp 0x42ee4c