Function at 0x4036d0
Capabilities:
Parse pe header
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], 0
test edi, edi
je 0x403900
test ebx, ebx
je 0x403900
mov eax, dword [0x525120]
push esi
push 0x1c
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x403719
push str._BugReport__pMemInfo_HeapAlloc_Failed__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop esi
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
push 0x1c
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
push esi
mov dword [esi + 0x14], eax
push edi
mov dword [esi + 0x18], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x403754
push str._BugReport__VirtualQuery_Failed__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 4], 0
jmp 0x403870
xor edi, edi
cmp dword [esi + 4], edi
jne 0x40376e
push str._BugReport__Error__AllocationBaseNULL___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 4], edi
jmp 0x403870
mov ecx, dword [esi + 4]
mov dword [ebx + 0x104], ecx
mov ecx, dword [esi + 4]
mov edx, 0x5a4d
cmp word [ecx], dx
je 0x403797
push str._BugReport__Error__IMAGE_DOS_SIGNATURE___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 4], edi
jmp 0x403870
mov eax, dword [ecx + 0x3c]
add eax, ecx
je 0x4038ed
cmp dword [eax], 0x4550
jne 0x4038ed
mov ecx, dword [eax + 8]
mov dword [ebx + 0x108], ecx
mov ecx, dword [esi + 0x18]
cmp ecx, 0x20000
je 0x4038a4
cmp ecx, 0x40000
je 0x4038a4
cmp ecx, 0x1000000
je 0x4037f4
push str._BugReport__unknown_memory_type__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebx + 0x10c], 0xffffffff
mov dword [ebp - 4], edi
jmp 0x403870
mov edx, dword [0x525120]
push 0x104
push edi
push edx
mov dword [ebx + 0x10c], edi
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x403823
push str._BugReport__pModulePath_HeapAlloc_Failed__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 4], edi
jmp 0x403870
push 0x104
push 0
push edi
call fcn.00484cd0
mov eax, dword [ebp + 8]
add esp, 0xc
push 0x104
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.PSAPI.DLL_GetMappedFileNameA]
test eax, eax
jne 0x403888
push str._BugReport__GetMappedFileName_Failed__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 4], 0
mov edx, dword [0x525120]
push edi
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [0x525120]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 4]
pop esi
pop edi
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
push 0x40
push ebx
call fcn.004816f2
add esp, 0xc
mov dword [ebp - 4], 1
jmp 0x403860
mov dword [ebx + 0x10c], 1
mov ecx, dword [eax + 0x78]
cmp ecx, edi
je 0x4038dd
cmp dword [eax + 0x7c], edi
je 0x4038dd
mov eax, dword [esi + 4]
add ecx, eax
cmp ecx, edi
je 0x403870
mov ecx, dword [ecx + 0xc]
add ecx, eax
push ecx
push 0x40
push ebx
call fcn.004816f2
add esp, 0xc
mov dword [ebp - 4], 1
jmp 0x403870
push str._BugReport__Error__Module_No_Export___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 4], edi
jmp 0x403870
push str._BugReport__Error__IMAGE_NT_SIGNATURE___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 4], edi
jmp 0x403870
push str._BugReport___ERROR_INVALID_PARAMETER___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret