Function at 0x30004fb0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x30217f20
push 0x30160f00
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x3021be88]
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 [0x3027399c], 0xa
jb 0x30005017
push 0xa
push esi
push str.DumpPE:_Dump_at_0x_p_skipped_due_to_dump_limit__d
call fcn.30009b40
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 0x30005031
mov eax, dword [esi + 0x3c]
cmp dword [esi + eax], 0x4550
je 0x30005119
call fcn.30002410
mov ebx, eax
mov edx, 1
mov ecx, ebx
call fcn.300011a0
mov edi, eax
mov dword [ebp - 0x1c], edi
test edi, edi
jne 0x3000506e
push str.DumpImageInCurrentProcess:_Failed_to_allocate_memory_page_for_PE_header._n
call fcn.30009b60
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.301619b0
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.30009b40
add esp, 8
mov edx, dword [edi + 0x3c]
test edx, edx
jne 0x30005102
lea ebx, [edi + 0x1c4]
lea ecx, [edi + 0x3c]
xor eax, eax
cmp ecx, ebx
jae 0x300050ea
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 0x300050cf
cmp ax, word [ebp - 0x20]
jne 0x300050d9
lea eax, [edi + 3]
cmp ecx, eax
jbe 0x300050d9
lea ebx, [ecx - 4]
add ecx, 4
lea eax, [edi + 0x1c4]
cmp ecx, eax
jb 0x300050c0
mov eax, edx
jmp 0x300050ed
mov ebx, dword [ebp - 0x20]
mov edx, eax
test ebx, ebx
je 0x300050fa
mov edx, ebx
sub edx, edi
mov dword [edi + 0x3c], edx
test edx, edx
je 0x30005181
cmp edx, 0x20000000
ja 0x30005181
mov eax, 0x5a4d
mov word [edi], ax
mov dword [edx + edi], 0x4550
mov ecx, esi
call fcn.3000b040
test eax, eax
je 0x30005152
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.DumpImageInCurrentProcess:_Attempting_to_dump_raw_PE_image__process__d__n
call fcn.30009b40
add esp, 8
mov ecx, esi
call fcn.30004ef0
test eax, eax
jne 0x3000514b
push esi
push str.DumpImageInCurrentProcess:_Failed_to_dump_raw_PE_image_from_0x_p__dumping_memory_region._n
jmp 0x30005187
mov ebx, 1
jmp 0x30005191
push str.DumpImageInCurrentProcess:_Attempting_to_dump_virtual_PE_image._n
call fcn.30009b40
add esp, 4
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, esi
mov ecx, eax
call fcn.30004e20
add esp, 8
test eax, eax
jne 0x3000514b
push esi
push str.DumpImageInCurrentProcess:_Failed_to_dump_virtual_PE_image_from_0x_p__dumping_memory_region._n
jmp 0x30005187
push edx
push str.DumpImageInCurrentProcess:_Bad_e_lfanew_0x_x_n
call fcn.30009b40
add esp, 8
xor ebx, ebx
test edi, edi
je 0x3000519c
mov ecx, edi
call fcn.300011f0
test ebx, ebx
je 0x300051a6
inc dword [0x3027399c]
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