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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x30217e78
push 0x30160f00
mov eax, dword fs:[0]
push eax
sub esp, 0x1d0
mov eax, dword [0x3021be88]
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 0x300043f6
push str.VerifyCodeSection:_Error___no_address_supplied._n
call fcn.30009b40
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.3015f3bd
mov esp, ebp
pop ebp
ret
call fcn.30003fc0
test eax, eax
jle 0x300043d7
push 0x1c
lea eax, [ebp - 0x1e0]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x300043d7
mov eax, dword [ebp - 0x1cc]
test al, 0xee
je 0x300043d7
test eax, 0x101
jne 0x300043d7
test eax, eax
je 0x300043d7
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x300043d7
mov esi, dword [esi + 0x3c]
add esi, dword [ebp - 0x188]
mov ecx, esi
call fcn.300027c0
test eax, eax
je 0x300043d7
cmp dword [esi], 0x4550
jne 0x300043d7
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 0x300043d7
push 0
lea eax, [ebp - 0x1a4]
push eax
push 0x40
lea eax, [ebp - 0x88]
push eax
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
call esi
test eax, eax
je 0x300047e1
mov eax, 0x5a4d
cmp word [ebp - 0x88], ax
jne 0x300047e1
push 0
push 0
push dword [ebp - 0x4c]
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 0x300047db
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 - 0x44]
push eax
push dword [ebp - 0x184]
call esi
test eax, eax
je 0x300047db
cmp dword [ebp - 0x34], 0
jne 0x3000454b
push str.VerifyCodeSection:_SizeOfRawData_zero._n
call fcn.30009b40
add esp, 4
jmp 0x300047db
mov edx, 1
mov ecx, dword [ebp - 0x164]
call fcn.300011a0
mov edi, eax
mov dword [ebp - 0x18c], edi
mov dword [ebp - 0x194], edi
test edi, edi
je 0x300043d7
push 0
push 0
push dword [ebp - 0x30]
push dword [ebp - 0x184]
call ebx
push 0
lea eax, [ebp - 0x1bc]
push eax
push dword [ebp - 0x164]
push edi
push dword [ebp - 0x184]
call esi
test eax, eax
je 0x300043d7
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
lea ecx, [ecx]
cmp eax, ebx
jbe 0x30004643
mov eax, dword [edx + 4]
test eax, eax
je 0x30004643
lea esi, [eax - 8]
shr esi, 1
mov dword [ebp - 0x190], esi
xor ecx, ecx
mov dword [ebp - 0x1ac], ecx
cmp ecx, esi
jae 0x30004629
movzx eax, word [edx + ecx*2 + 8]
test ax, ax
je 0x30004626
and eax, 0xfff
add eax, dword [edx]
mov esi, dword [ebp - 0x19c]
sub eax, dword [esi + 0xc]
cmp eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x190]
jae 0x30004626
mov esi, dword [ebp - 0x18c]
add dword [eax + esi], edi
mov esi, dword [ebp - 0x190]
inc ecx
jmp 0x300045e8
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 0x300045d0
mov dword [ebp - 4], 0xfffffffe
mov ebx, dword [ebp - 0x18c]
mov esi, dword [ebp - 0x188]
jmp 0x30004694
mov eax, dword [ebp - 0x19c]
mov eax, dword [eax + 0xc]
add eax, esi
mov dword [ebp - 0x190], eax
mov edx, dword [ebp - 0x164]
mov ecx, eax
call fcn.30003a30
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 0x30004782
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 0x30004730
mov eax, dword [edx + 0x10]
test eax, eax
je 0x30004730
add eax, dword [ebp - 0x188]
mov ebx, dword [ebp - 0x18c]
mov dword [ebp - 0x1b0], eax
test eax, eax
je 0x30004722
cmp dword [eax], 0
je 0x30004722
add ecx, 4
mov dword [ebp - 0x198], ecx
add eax, 4
jmp 0x30004705
add ecx, 4
mov dword [ebp - 0x198], ecx
add edx, 0x14
jmp 0x300046e8
mov dword [ebp - 4], 0xfffffffe
jmp 0x30004782
test esi, esi
je 0x300047b1
mov eax, dword [ebp - 0x19c]
mov edx, dword [eax + 0xc]
cmp esi, edx
jb 0x300047b1
lea eax, [edx + edi]
cmp esi, eax
jae 0x300047b1
push ecx
mov eax, dword [ebp - 0x188]
add eax, esi
push eax
sub esi, edx
add esi, ebx
push esi
call fcn.301619b0
add esp, 0xc
push edi
push dword [ebp - 0x190]
push ebx
call dword [0x3026d3f0]
cmp eax, edi
jne 0x300047ca
mov edi, 1
jmp 0x300047db
push edi
push eax
push str.VerifyCodeSection:_Executable_code_does_not_match__0x_x_of_0x_x_matching_n
call fcn.30009b40
add esp, 0xc
xor edi, edi
mov ebx, dword [ebp - 0x184]
mov eax, dword [ebp - 0x18c]
test eax, eax
je 0x300047f2
mov ecx, eax
call fcn.300011f0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x300043da