Function at 0x42ad27
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ab4b9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x198
push 0
push 0
push 3
push 0
push 3
push closesocket
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x144], eax
cmp dword [ebp - 0x144], 0xffffffff
jne 0x42ad74
xor eax, eax
jmp 0x42b0b4
push 0
lea ecx, [ebp - 0x13c]
push ecx
push 0x40
lea edx, [ebp - 0x184]
push edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42ae0d
mov ecx, dword [ebp - 0x184]
and ecx, 0xffff
cmp ecx, 0x5a4d
jne 0x42ae0d
push 0
push 0
mov edx, dword [ebp - 0x148]
push edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x148]
jne 0x42ae0d
push 0
lea ecx, [ebp - 0x13c]
push ecx
push 0xf8
lea edx, [ebp - 0x134]
push edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42ae0d
cmp dword [ebp - 0x134], 0x4550
jne 0x42ae0d
mov ecx, dword [ebp - 0x12e]
and ecx, 0xffff
test ecx, ecx
jne 0x42ae21
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x42b0b4
mov dword [ebp - 0x138], 0
push 0x1000
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x19c], eax
mov eax, dword [ebp - 0x19c]
push eax
lea ecx, [ebp - 0x3c]
call fcn.0042e510
mov dword [ebp - 4], 0
push 1
push 0
mov ecx, dword [ebp - 0x120]
and ecx, 0xffff
sub ecx, 0xe0
push ecx
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x140], 0
jmp 0x42ae93
mov eax, dword [ebp - 0x140]
add eax, 1
mov dword [ebp - 0x140], eax
mov ecx, dword [ebp - 0x12e]
and ecx, 0xffff
cmp dword [ebp - 0x140], ecx
jae 0x42b086
push 0
lea edx, [ebp - 0x13c]
push edx
push 0x28
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42aed4
cmp dword [ebp - 0x13c], 0x28
je 0x42af05
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1a0], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.0042e540
mov eax, dword [ebp - 0x1a0]
jmp 0x42b0b4
cmp dword [ebp + 0xc], 0
je 0x42af3b
push 8
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call sub.ntdll.dll_memcmp
add esp, 0xc
test eax, eax
je 0x42af3b
push 8
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.0042e430
add esp, 0xc
test eax, eax
jne 0x42b081
push 0
push 0
push 0
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x188], eax
push 0
push 0
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x20]
jne 0x42b069
push 0
lea ecx, [ebp - 0x13c]
push ecx
push 0x1000
lea ecx, [ebp - 0x3c]
call fcn.0047c540
push eax
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42b069
lea ecx, [ebp - 0x3c]
call fcn.0047c540
mov dword [ebp - 0x190], eax
mov eax, dword [ebp - 0x190]
add eax, dword [ebp - 0x13c]
mov dword [ebp - 0x18c], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x194], ecx
mov edx, dword [ebp - 0x194]
add edx, dword [ebp + 0x14]
mov dword [ebp - 0x198], edx
mov eax, dword [ebp - 0x190]
cmp eax, dword [ebp - 0x18c]
jae 0x42b05e
mov ecx, dword [ebp - 0x194]
cmp ecx, dword [ebp - 0x198]
jne 0x42affe
mov dword [ebp - 0x138], 1
jmp 0x42b05e
mov edx, dword [ebp - 0x194]
xor eax, eax
mov al, byte [edx]
mov ecx, dword [ebp - 0x190]
xor edx, edx
mov dl, byte [ecx]
cmp eax, edx
jne 0x42b036
mov eax, dword [ebp - 0x190]
add eax, 1
mov dword [ebp - 0x190], eax
mov ecx, dword [ebp - 0x194]
add ecx, 1
mov dword [ebp - 0x194], ecx
jmp 0x42b059
mov edx, dword [ebp - 0x194]
sub edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x190]
sub eax, edx
add eax, 1
mov dword [ebp - 0x190], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x194], ecx
jmp 0x42afd6
cmp dword [ebp - 0x138], 0
je 0x42b069
jmp 0x42b086
push 0
push 0
mov edx, dword [ebp - 0x188]
push edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x42ae84
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x138]
mov dword [ebp - 0x1a4], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.0042e540
mov eax, dword [ebp - 0x1a4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret