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

Disassembly:
push 0x18c
push 0x501720
call fcn.00497620
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x174], ecx
xor esi, esi
mov dword [ebp - 0x168], esi
push esi
push esi
push 3
push esi
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x42cf9e
push esi
lea eax, [ebp - 0x158]
push eax
push 0x40
lea eax, [ebp - 0x154]
push eax
push edi
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
call ebx
test eax, eax
je 0x42cf97
cmp dword [ebp - 0x158], 0x40
jne 0x42cf97
mov eax, 0x5a4d
cmp word [ebp - 0x154], ax
jne 0x42cf97
push esi
push esi
push dword [ebp - 0x118]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x118]
jne 0x42cf97
push esi
lea eax, [ebp - 0x158]
push eax
push 0xf8
lea eax, [ebp - 0x114]
push eax
push edi
call ebx
test eax, eax
je 0x42cf97
cmp dword [ebp - 0x158], 0xf8
jne 0x42cf97
cmp dword [ebp - 0x114], 0x4550
jne 0x42cf97
cmp word [ebp - 0x10e], si
je 0x42cf97
mov ecx, dword [ebp - 0x8c]
mov dword [ebp - 0x160], ecx
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x180], eax
test ecx, ecx
je 0x42cf97
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x158], eax
push 4
push 0x1000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
mov dword [ebp - 0x180], ebx
test ebx, ebx
je 0x42cf97
push esi
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 0x158]
push eax
push dword [ebp - 0x158]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x42cfb0
push 0x8000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x118]
add eax, ebx
mov dword [ebp - 0x164], eax
push dword [ebp - 0x160]
push eax
push ebx
call fcn.0042d144
add esp, 0xc
add eax, ebx
mov dword [ebp - 0x15c], eax
lea edx, [eax + 0x10]
movzx edi, word [eax + 0xe]
movzx ecx, word [eax + 0xc]
add edi, ecx
mov dword [ebp - 0x16c], edi
mov dword [ebp - 0x17c], edx
mov eax, edi
dec edi
mov dword [ebp - 0x16c], edi
test eax, eax
je 0x42d0f9
cmp dword [edx], esi
jl 0x42d10a
cmp word [edx], 0xa
jne 0x42d10a
mov eax, dword [edx + 4]
and eax, 0x7fffffff
add eax, dword [ebp - 0x15c]
lea ecx, [eax + 0x10]
movzx edx, word [eax + 0xe]
movzx eax, word [eax + 0xc]
add edx, eax
mov dword [ebp - 0x170], edx
mov dword [ebp - 0x178], ecx
mov eax, edx
dec edx
mov dword [ebp - 0x170], edx
test eax, eax
je 0x42d0f9
mov eax, 0x360
cmp word [ecx], ax
jne 0x42d102
mov edi, dword [ecx + 4]
test edi, edi
jns 0x42d078
and edi, 0x7fffffff
add edi, dword [ebp - 0x15c]
mov edi, dword [edi + 0x14]
mov eax, dword [ebp - 0x164]
mov dword [eax + 0x58], esi
mov dword [eax + 0x98], esi
mov dword [eax + 0x9c], esi
mov dword [ebp - 0x19c], 0x18
mov dword [ebp - 0x198], ebx
push dword [ebp - 0x160]
push eax
push ebx
call fcn.0042d144
mov dword [ebp - 0x194], eax
mov eax, dword [ebp - 0x174]
mov dword [ebp - 0x190], eax
mov ecx, dword [ebp - 0x15c]
mov eax, dword [ecx + edi + 4]
mov dword [ebp - 0x188], eax
push dword [ecx + edi]
mov eax, dword [ebp - 0x164]
push eax
push ebx
call fcn.0042d144
add eax, ebx
mov dword [ebp - 0x18c], eax
lea eax, [ebp - 0x19c]
push eax
call fcn.0042d1c3
add esp, 0x1c
mov dword [ebp - 0x168], eax
mov dword [ebp - 4], 0xfffffffe
jmp 0x42d128
add ecx, 8
jmp 0x42d03d
add edx, 8
jmp 0x42cff3
test ebx, ebx
je 0x42d139
push 0x8000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x168]
jmp 0x42cfa0