Function at 0x30004f30
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x30216e58
push 0x3015f8a0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x3021ae88]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, ecx
mov dword [ebp - 0x20], esi
xor edi, edi
cmp dword [0x3027289c], 0xa
jb 0x30004f97
push 0xa
push esi
push str.DumpPE:_Dump_at_0x_p_skipped_due_to_dump_limit__d
call fcn.30009b00
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x30004fb1
mov eax, dword [esi + 0x3c]
cmp dword [esi + eax], 0x4550
je 0x30005099
call fcn.30002520
mov ebx, eax
mov edx, 1
mov ecx, ebx
call fcn.300011a0
mov edi, eax
mov dword [ebp - 0x1c], edi
test edi, edi
jne 0x30004fee
push str.DumpImageInCurrentProcess:_Failed_to_allocate_memory_page_for_PE_header._n
call fcn.30009b20
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0
push ebx
push esi
push edi
call fcn.30160350
add esp, 0xc
mov dword [ebp - 4], 0xfffffffe
push esi
push str.DumpImageInCurrentProcess:_Disguised_PE_image__bad_MZ_and_or_PE_headers__at_0x_p_n
call fcn.30009b00
add esp, 8
mov edx, dword [edi + 0x3c]
test edx, edx
jne 0x30005082
lea ebx, [edi + 0x1c4]
lea ecx, [edi + 0x3c]
xor eax, eax
cmp ecx, ebx
jae 0x3000506a
mov dword [ebp - 0x1c], 0x14c
mov dword [ebp - 0x20], 0x8664
mov ebx, dword [ebp - 0x20]
lea esp, [esp]
movzx eax, word [ecx]
cmp ax, word [ebp - 0x1c]
je 0x3000504f
cmp ax, word [ebp - 0x20]
jne 0x30005059
lea eax, [edi + 3]
cmp ecx, eax
jbe 0x30005059
lea ebx, [ecx - 4]
add ecx, 4
lea eax, [edi + 0x1c4]
cmp ecx, eax
jb 0x30005040
mov eax, edx
jmp 0x3000506d
mov ebx, dword [ebp - 0x20]
mov edx, eax
test ebx, ebx
je 0x3000507a
mov edx, ebx
sub edx, edi
mov dword [edi + 0x3c], edx
test edx, edx
je 0x30005101
cmp edx, 0x20000000
ja 0x30005101
mov eax, 0x5a4d
mov word [edi], ax
mov dword [edx + edi], 0x4550
mov ecx, esi
call fcn.3000afb0
test eax, eax
je 0x300050d2
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.DumpImageInCurrentProcess:_Attempting_to_dump_raw_PE_image__process__d__n
call fcn.30009b00
add esp, 8
mov ecx, esi
call fcn.30004e70
test eax, eax
jne 0x300050cb
push esi
push str.DumpImageInCurrentProcess:_Failed_to_dump_raw_PE_image_from_0x_p__dumping_memory_region._n
jmp 0x30005107
mov ebx, 1
jmp 0x30005111
push str.DumpImageInCurrentProcess:_Attempting_to_dump_virtual_PE_image._n
call fcn.30009b00
add esp, 4
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, esi
mov ecx, eax
call fcn.30004da0
add esp, 8
test eax, eax
jne 0x300050cb
push esi
push str.DumpImageInCurrentProcess:_Failed_to_dump_virtual_PE_image_from_0x_p__dumping_memory_region._n
jmp 0x30005107
push edx
push str.DumpImageInCurrentProcess:_Bad_e_lfanew_0x_x_n
call fcn.30009b00
add esp, 8
xor ebx, ebx
test edi, edi
je 0x3000511c
mov ecx, edi
call fcn.300011f0
test ebx, ebx
je 0x30005126
inc dword [0x3027289c]
mov eax, ebx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret