Function at 0x403680
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 0x4038b0
test ebx, ebx
je 0x4038b0
mov eax, dword [0x527160]
push esi
push 0x1c
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x4036c9
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 0x403704
push str._BugReport__VirtualQuery_Failed__n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov dword [ebp - 4], 0
jmp 0x403820
xor edi, edi
cmp dword [esi + 4], edi
jne 0x40371e
push str._BugReport__Error__AllocationBaseNULL___n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov dword [ebp - 4], edi
jmp 0x403820
mov ecx, dword [esi + 4]
mov dword [ebx + 0x104], ecx
mov ecx, dword [esi + 4]
mov edx, 0x5a4d
cmp word [ecx], dx
je 0x403747
push str._BugReport__Error__IMAGE_DOS_SIGNATURE___n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov dword [ebp - 4], edi
jmp 0x403820
mov eax, dword [ecx + 0x3c]
add eax, ecx
je 0x40389d
cmp dword [eax], 0x4550
jne 0x40389d
mov ecx, dword [eax + 8]
mov dword [ebx + 0x108], ecx
mov ecx, dword [esi + 0x18]
cmp ecx, 0x20000
je 0x403854
cmp ecx, 0x40000
je 0x403854
cmp ecx, 0x1000000
je 0x4037a4
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 0x403820
mov edx, dword [0x527160]
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 0x4037d3
push str._BugReport__pModulePath_HeapAlloc_Failed__n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov dword [ebp - 4], edi
jmp 0x403820
push 0x104
push 0
push edi
call fcn.004868c0
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 0x403838
push str._BugReport__GetMappedFileName_Failed__n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov dword [ebp - 4], 0
mov edx, dword [0x527160]
push edi
push 0
push edx
call dword [sym.imp.KERNEL32.DLL_HeapFree]
mov eax, dword [0x527160]
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.004830e6
add esp, 0xc
mov dword [ebp - 4], 1
jmp 0x403810
mov dword [ebx + 0x10c], 1
mov ecx, dword [eax + 0x78]
cmp ecx, edi
je 0x40388d
cmp dword [eax + 0x7c], edi
je 0x40388d
mov eax, dword [esi + 4]
add ecx, eax
cmp ecx, edi
je 0x403820
mov ecx, dword [ecx + 0xc]
add ecx, eax
push ecx
push 0x40
push ebx
call fcn.004830e6
add esp, 0xc
mov dword [ebp - 4], 1
jmp 0x403820
push str._BugReport__Error__Module_No_Export___n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov dword [ebp - 4], edi
jmp 0x403820
push str._BugReport__Error__IMAGE_NT_SIGNATURE___n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov dword [ebp - 4], edi
jmp 0x403820
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