Function at 0x422040
Capabilities:
Access pe header
Read file via mapping

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff8
mov eax, ecx
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0xcfc
mov edi, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0xcd4], ecx
mov esi, dword [eax + 8]
mov ecx, dword [eax + 0xc]
mov ebx, dword [0x4387d4]
mov dword [ebp - 0xcdc], esi
mov dword [ebp - 0xcd8], ecx
mov edx, dword [eax + 0x10]
cmp ebx, 0x4387d4
jne 0x42209e
jmp 0x4222e1
mov ebx, dword [ebx]
cmp ebx, 0x4387d4
je 0x4222e1
cmp edi, dword [ebx + 8]
jne 0x422090
mov dword [esp], 0x10
mov dword [ebp - 0xce8], edx
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0xce8]
mov esi, eax
test eax, eax
je 0x4222e1
mov eax, dword [ebp - 0xcd8]
mov dword [ebp - 0xce4], 0
mov dword [ebp - 0xce8], eax
mov dword [esp + 0x18], edx
mov eax, dword [ebp - 0xce8]
mov edx, dword [ebp - 0xce4]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xcdc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xcd4]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.dbghelp.dll_SymLoadModuleExW]
sub esp, 0x24
or edx, eax
je 0x4222d8
mov eax, dword [ebp - 0xcd8]
mov dword [esi + 8], eax
mov eax, dword [ebx + 0x24]
mov dword [esi], eax
lea eax, [ebx + 0x24]
mov dword [esi + 4], eax
mov eax, dword [ebx + 0x24]
mov dword [eax + 4], esi
mov eax, dword [ebp - 0xcd4]
mov dword [ebx + 0x24], esi
mov dword [esi + 0xc], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileMappingW]
sub esp, 0x18
mov ebx, eax
test eax, eax
je 0x422264
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_MapViewOfFile]
sub esp, 0x14
test eax, eax
je 0x42225a
mov dword [esp], eax
mov dword [ebp - 0xcd8], eax
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov edx, dword [ebp - 0xcd8]
mov dword [ebp - 0xcd4], eax
push ecx
lea ecx, [ebp - 0xcd0]
mov dword [esp + 0xc], ecx
mov dword [esp], edx
mov dword [esp + 8], 9
mov dword [esp + 4], 1
call dword [sym.imp.ntdll.dll_RtlImageDirectoryEntryToData]
mov edx, dword [ebp - 0xcd8]
mov ecx, eax
mov eax, dword [ebp - 0xcd4]
sub esp, 0x10
mov eax, dword [eax + 0x18]
cmp ax, 0x10b
je 0x4222f1
cmp ax, 0x20b
jne 0x422250
test ecx, ecx
je 0x422250
cmp dword [ebp - 0xcd0], 0x27
jbe 0x422250
mov eax, ecx
sub eax, edx
add eax, 0x10
mov dword [esi + 0xc], eax
lea esi, [esi]
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_UnmapViewOfFile]
push edx
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
lea eax, [ebp - 0xcd0]
mov edx, dword [ebp - 0xce4]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xce8]
mov dword [ebp - 0xcd0], 0xcc0
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], edi
call dword [sym.imp.dbghelp.dll_SymGetModuleInfoW64]
mov ebx, 1
sub esp, 0x10
test eax, eax
je 0x4222e3
mov eax, dword [ebp - 0x38]
or eax, dword [ebp - 0x34]
je 0x4222e3
mov eax, dword [ebp - 0xcdc]
call fcn.004213f0
mov dword [esp], str.Loaded_unmatched_debug_information_for__s_n
mov dword [esp + 4], eax
call fcn.004218d0
lea esp, [ebp - 0x10]
pop ecx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
xor ebx, ebx
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
test ecx, ecx
je 0x422250
cmp dword [ebp - 0xcd0], 0x17
jbe 0x422250
mov eax, ecx
sub eax, edx
add eax, 8
mov dword [esi + 0xc], eax
jmp 0x422250