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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x30211bf8
push 0x3015b760
mov eax, dword fs:[0]
push eax
sub esp, 0x1d0
mov eax, dword [0x30215e88]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov ebx, edx
mov esi, ecx
mov dword [ebp - 0x188], esi
mov dword [ebp - 0x1a8], esi
mov dword [ebp - 0x18c], 0
or edi, 0xffffffff
test esi, esi
jne 0x30004986
push str.VerifyCodeSection:_Error___no_address_supplied._n
call fcn.3000a0d0
add esp, 4
or eax, 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.30159c2d
mov esp, ebp
pop ebp
ret
call fcn.300042b0
test eax, eax
jle 0x30004967
push 0x1c
lea eax, [ebp - 0x1e0]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x30004967
mov eax, dword [ebp - 0x1cc]
test al, 0xee
je 0x30004967
test eax, 0x101
jne 0x30004967
test eax, eax
je 0x30004967
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x30004967
mov esi, dword [esi + 0x3c]
add esi, dword [ebp - 0x188]
mov ecx, esi
call fcn.30002a00
test eax, eax
je 0x30004967
cmp dword [esi], 0x4550
jne 0x30004967
movzx ecx, word [esi + 0x14]
mov edx, dword [ebp - 0x188]
mov eax, dword [edx + 0x3c]
add eax, 0x18
add eax, ecx
mov dword [ebp - 0x194], eax
add eax, edx
mov dword [ebp - 0x19c], eax
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x184], ebx
cmp ebx, 0xffffffff
je 0x30004967
push 0
lea eax, [ebp - 0x1a4]
push eax
push 0x40
lea eax, [ebp - 0x60]
push eax
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
call esi
test eax, eax
je 0x30004d60
mov eax, 0x5a4d
cmp word [ebp - 0x60], ax
jne 0x30004d60
push 0
push 0
push dword [ebp - 0x24]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
call ebx
push 0
lea eax, [ebp - 0x1a4]
push eax
push 0xf8
lea eax, [ebp - 0x180]
push eax
push dword [ebp - 0x184]
call esi
test eax, eax
je 0x30004d5a
push 0
push 0
push dword [ebp - 0x194]
push dword [ebp - 0x184]
call ebx
push 0
lea eax, [ebp - 0x1a4]
push eax
push 0x28
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0x184]
call esi
test eax, eax
je 0x30004d5a
mov ecx, dword [ebp - 0x78]
test ecx, ecx
jne 0x30004ad9
push str.VerifyCodeSection:_SizeOfRawData_zero._n
call fcn.3000a0d0
add esp, 4
jmp 0x30004d5a
mov edx, 1
call fcn.300011a0
mov edi, eax
mov dword [ebp - 0x18c], edi
mov dword [ebp - 0x194], edi
test edi, edi
je 0x30004967
push 0
push 0
push dword [ebp - 0x74]
push dword [ebp - 0x184]
call ebx
push 0
lea eax, [ebp - 0x1bc]
push eax
push dword [ebp - 0x78]
push edi
push dword [ebp - 0x184]
call esi
test eax, eax
je 0x30004967
mov edx, dword [ebp - 0xe0]
add edx, dword [ebp - 0x188]
mov eax, dword [ebp - 0xdc]
mov dword [ebp - 0x1a0], eax
mov edi, dword [ebp - 0x188]
sub edi, dword [ebp - 0x14c]
mov dword [ebp - 4], 0
xor ebx, ebx
cmp eax, ebx
jbe 0x30004bc5
mov eax, dword [edx + 4]
test eax, eax
je 0x30004bc5
lea esi, [eax - 8]
shr esi, 1
mov dword [ebp - 0x190], esi
xor ecx, ecx
mov dword [ebp - 0x1ac], ecx
cmp ecx, esi
jae 0x30004bab
movzx eax, word [edx + ecx*2 + 8]
test ax, ax
je 0x30004ba8
and eax, 0xfff
add eax, dword [edx]
mov esi, dword [ebp - 0x19c]
sub eax, dword [esi + 0xc]
cmp eax, dword [ebp - 0x78]
mov esi, dword [ebp - 0x190]
jae 0x30004ba8
mov esi, dword [ebp - 0x18c]
add dword [eax + esi], edi
mov esi, dword [ebp - 0x190]
inc ecx
jmp 0x30004b6a
add edx, dword [edx + 4]
mov dword [ebp - 0x1c0], edx
add ebx, dword [edx + 4]
mov dword [ebp - 0x1c4], ebx
mov eax, dword [ebp - 0x1a0]
jmp 0x30004b52
mov dword [ebp - 4], 0xfffffffe
mov ebx, dword [ebp - 0x18c]
mov esi, dword [ebp - 0x188]
jmp 0x30004c16
mov eax, dword [ebp - 0x19c]
mov eax, dword [eax + 0xc]
add eax, esi
mov dword [ebp - 0x190], eax
mov edx, dword [ebp - 0x78]
mov ecx, eax
call fcn.30003cb0
mov edi, eax
mov dword [ebp - 0x1a0], edi
xor ecx, ecx
mov dword [ebp - 0x198], ecx
xor esi, esi
mov edx, dword [ebp - 0x100]
test edx, edx
je 0x30004d01
mov dword [ebp - 4], 1
add edx, dword [ebp - 0x188]
mov esi, dword [edx + 0x10]
mov dword [ebp - 0x1b8], esi
mov dword [ebp - 0x1b4], edx
test edx, edx
je 0x30004caf
mov eax, dword [edx + 0x10]
test eax, eax
je 0x30004caf
add eax, dword [ebp - 0x188]
mov ebx, dword [ebp - 0x18c]
mov dword [ebp - 0x1b0], eax
test eax, eax
je 0x30004ca1
cmp dword [eax], 0
je 0x30004ca1
add ecx, 4
mov dword [ebp - 0x198], ecx
add eax, 4
jmp 0x30004c84
add ecx, 4
mov dword [ebp - 0x198], ecx
add edx, 0x14
jmp 0x30004c67
mov dword [ebp - 4], 0xfffffffe
jmp 0x30004d01
test esi, esi
je 0x30004d30
mov eax, dword [ebp - 0x19c]
mov edx, dword [eax + 0xc]
cmp esi, edx
jb 0x30004d30
lea eax, [edx + edi]
cmp esi, eax
jae 0x30004d30
push ecx
mov eax, dword [ebp - 0x188]
add eax, esi
push eax
sub esi, edx
add esi, ebx
push esi
call fcn.3015c210
add esp, 0xc
push edi
push dword [ebp - 0x190]
push ebx
call dword [0x30267730]
cmp eax, edi
jne 0x30004d49
mov edi, 1
jmp 0x30004d5a
push edi
push eax
push str.VerifyCodeSection:_Executable_code_does_not_match__0x_x_of_0x_x_matching_n
call fcn.3000a0d0
add esp, 0xc
xor edi, edi
mov ebx, dword [ebp - 0x184]
mov eax, dword [ebp - 0x18c]
test eax, eax
je 0x30004d71
mov ecx, eax
call fcn.300011f0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x3000496a