Function at 0x30005530
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x30211ca0
push 0x3015b760
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x30215e88]
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 [0x3026ed3c], 0xa
jb 0x30005597
push 0xa
push esi
push str.DumpPE:_Dump_at_0x_p_skipped_due_to_dump_limit__d
call fcn.3000a0d0
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 0x300055b1
mov eax, dword [esi + 0x3c]
cmp dword [esi + eax], 0x4550
je 0x30005699
call fcn.30002650
mov ebx, eax
mov edx, 1
mov ecx, ebx
call fcn.300011a0
mov edi, eax
mov dword [ebp - 0x1c], edi
test edi, edi
jne 0x300055ee
push str.DumpImageInCurrentProcess:_Failed_to_allocate_memory_page_for_PE_header._n
call fcn.3000a0f0
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.3015c210
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.3000a0d0
add esp, 8
mov edx, dword [edi + 0x3c]
test edx, edx
jne 0x30005682
lea ebx, [edi + 0x1c4]
lea ecx, [edi + 0x3c]
xor eax, eax
cmp ecx, ebx
jae 0x3000566a
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 0x3000564f
cmp ax, word [ebp - 0x20]
jne 0x30005659
lea eax, [edi + 3]
cmp ecx, eax
jbe 0x30005659
lea ebx, [ecx - 4]
add ecx, 4
lea eax, [edi + 0x1c4]
cmp ecx, eax
jb 0x30005640
mov eax, edx
jmp 0x3000566d
mov ebx, dword [ebp - 0x20]
mov edx, eax
test ebx, ebx
je 0x3000567a
mov edx, ebx
sub edx, edi
mov dword [edi + 0x3c], edx
test edx, edx
je 0x30005701
cmp edx, 0x20000000
ja 0x30005701
mov eax, 0x5a4d
mov word [edi], ax
mov dword [edx + edi], 0x4550
mov ecx, esi
call fcn.3000b5e0
test eax, eax
je 0x300056d2
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.DumpImageInCurrentProcess:_Attempting_to_dump_raw_PE_image__process__d__n
call fcn.3000a0d0
add esp, 8
mov ecx, esi
call fcn.30005470
test eax, eax
jne 0x300056cb
push esi
push str.DumpImageInCurrentProcess:_Failed_to_dump_raw_PE_image_from_0x_p__dumping_memory_region._n
jmp 0x30005707
mov ebx, 1
jmp 0x30005711
push str.DumpImageInCurrentProcess:_Attempting_to_dump_virtual_PE_image._n
call fcn.3000a0d0
add esp, 4
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, esi
mov ecx, eax
call fcn.300053a0
add esp, 8
test eax, eax
jne 0x300056cb
push esi
push str.DumpImageInCurrentProcess:_Failed_to_dump_virtual_PE_image_from_0x_p__dumping_memory_region._n
jmp 0x30005707
push edx
push str.DumpImageInCurrentProcess:_Bad_e_lfanew_0x_x_n
call fcn.3000a0d0
add esp, 8
xor ebx, ebx
test edi, edi
je 0x3000571c
mov ecx, edi
call fcn.300011f0
test ebx, ebx
je 0x30005726
inc dword [0x3026ed3c]
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