Function at 0x40a790
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
mov esi, ecx
push ebx
sub esp, 0x68
mov dword [ebp - 0x48], eax
mov eax, dword [edx + 0x10]
mov ecx, dword [edx + 0x1c]
test eax, eax
je 0x40a8d0
cmp word [eax], 0
mov edx, eax
je 0x40ae00
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x40a7c0
sub edx, eax
add edx, 0x32
test ecx, ecx
je 0x40a7f0
cmp word [ecx], 0
je 0x40adf0
mov eax, ecx
nop
add eax, 2
cmp word [eax], 0
jne 0x40a7e0
sub eax, ecx
add eax, 2
add edx, eax
cmp edx, 0x30
je 0x40a8e0
lea eax, [ebp - 0x44]
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x44], 0xdeadbeef
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 0x14], 0x30
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x48]
mov dword [esp], 0
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_QueryActCtxW]
mov dword [ebp - 0x58], eax
call eax
sub esp, 0x1c
mov ebx, eax
mov eax, esi
call fcn.004012e0
xor eax, eax
test ebx, ebx
mov dword [esp + 4], str.QueryActCtx_succeeded_n
sete al
mov dword [esp], eax
call fcn.00401dd0
mov eax, esi
call fcn.004012e0
mov eax, dword fs:[0x18]
mov ecx, dword [eax + 0x34]
mov dword [esp + 4], 0x582472
mov dword [esp + 8], ecx
cmp dword [eax + 0x34], 0x7a
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
mov eax, esi
call fcn.004012e0
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x4c]
mov dword [esp + 4], str.size_Id__expected__Id_n
cmp eax, edx
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], edx
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x4c]
jmp 0x40a8fa
mov edx, 0x30
test ecx, ecx
jne 0x40a7d2
lea esi, [esi]
mov ebx, dword [sym.imp.kernel32.dll_QueryActCtxW]
mov eax, 0x30
mov edx, 0x30
mov dword [ebp - 0x44], 0x30
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], edx
mov ecx, dword fs:[0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0x50], ecx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ebx, eax
mov eax, dword [ebp - 0x44]
sub esp, 0xc
mov dword [ebp - 0x4c], eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0xfe
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_memset]
lea eax, [ebp - 0x40]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x48]
mov dword [esp], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
call eax
sub esp, 0x1c
mov dword [ebp - 0x48], eax
mov eax, esi
call fcn.004012e0
mov ecx, dword [ebp - 0x50]
mov eax, dword [ecx + 0x34]
mov dword [esp + 4], str.QueryActCtx_failed:__lu_n
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.00401dd0
mov eax, esi
call fcn.004012e0
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], str.size_Id__expected__Id_n
cmp eax, edx
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], edx
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], esi
mov eax, dword [ebx]
mov dword [esp + 4], str.detailed_info__dwFlags_lx_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
mov eax, esi
call fcn.004012e0
mov edx, dword [edi]
mov eax, dword [ebx + 4]
mov dword [esp + 4], str.detailed_info__ulFormatVersion_lu__expected__lu_n
cmp edx, eax
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], edx
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], esi
mov eax, dword [ebx + 8]
mov edx, dword [edi + 8]
mov ecx, dword [edi + 4]
mov dword [esp + 4], str.detailed_info__ulAssemblyCount_lu__expected_between__lu_and__lu_n
mov dword [esp + 8], eax
cmp edx, eax
mov dword [esp + 0x10], edx
setae dl
cmp eax, ecx
mov dword [esp + 0xc], ecx
setae al
movzx eax, al
and eax, edx
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], esi
mov edx, dword [edi + 0xc]
mov eax, dword [ebx + 0xc]
mov dword [esp + 4], str.detailed_info__ulRootManifestPathType_lu__expected__lu_n
mov dword [esp + 0xc], edx
cmp edx, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
mov eax, esi
call fcn.004012e0
mov edx, dword [edi + 0x10]
mov ecx, dword [ebx + 0x10]
test edx, edx
je 0x40add0
cmp word [edx], 0
mov eax, edx
je 0x40ae18
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40aac0
sub eax, edx
sar eax, 1
mov dword [ebp - 0x48], eax
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40aad8
sub eax, edx
sar eax, 1
cmp eax, ecx
mov edx, dword [ebp - 0x48]
mov dword [esp + 8], ecx
sete al
mov dword [esp + 4], str.detailed_info__ulRootManifestPathChars_lu__expected__u_n
movzx eax, al
mov dword [esp + 0xc], edx
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], esi
mov edx, dword [edi + 0x14]
mov eax, dword [ebx + 0x14]
mov dword [esp + 4], str.detailed_info__ulRootConfigurationPathType_lu__expected__lu_n
mov dword [esp + 0xc], edx
cmp edx, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], esi
mov eax, dword [ebx + 0x18]
mov dword [esp + 4], str.detailed_info__ulRootConfigurationPathChars_ld_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], esi
mov edx, dword [edi + 0x18]
mov eax, dword [ebx + 0x1c]
mov dword [esp + 4], str.detailed_info__ulAppDirPathType_lu__expected__lu_n
mov dword [esp + 0xc], edx
cmp edx, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
mov eax, esi
call fcn.004012e0
mov edx, dword [edi + 0x1c]
mov ecx, dword [ebx + 0x20]
test edx, edx
je 0x40adb8
cmp word [edx], 0
mov eax, edx
je 0x40ade0
nop
add eax, 2
cmp word [eax], 0
jne 0x40abc0
sub eax, edx
sar eax, 1
mov dword [ebp - 0x48], eax
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40abd8
sub eax, edx
sar eax, 1
cmp eax, ecx
mov edx, dword [ebp - 0x48]
mov dword [esp + 8], ecx
sete al
mov dword [esp + 4], str.detailed_info__ulAppDirPathChars_lu__expected__u_n
movzx eax, al
mov dword [esp + 0xc], edx
mov dword [esp], eax
call fcn.00401dd0
mov edx, dword [edi + 0x10]
mov eax, esi
test edx, edx
je 0x40ad68
call fcn.004012e0
mov dword [esp + 4], str.detailed_info__lpRootManifestPath__NULL_n
mov edx, dword [ebx + 0x24]
xor eax, eax
test edx, edx
setne al
mov dword [esp], eax
call fcn.00401dd0
mov ecx, dword [ebx + 0x24]
test ecx, ecx
je 0x40ac82
mov eax, esi
call fcn.004012e0
mov eax, dword [ebx + 0x24]
call fcn.004014e0
mov dword [ebp - 0x48], eax
mov eax, dword [edi + 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
mov edx, dword [ebp - 0x48]
sub esp, 8
test eax, eax
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp + 4], str.unexpected_detailed_info__lpRootManifestPath__s_n
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], esi
mov eax, dword [ebx + 0x28]
mov dword [esp + 4], str.detailed_info__lpRootConfigurationPath_p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
mov edx, dword [edi + 0x1c]
mov eax, esi
test edx, edx
je 0x40ad90
call fcn.004012e0
mov dword [esp + 4], str.detailed_info__lpAppDirPath__NULL_n
mov ecx, dword [ebx + 0x2c]
xor eax, eax
test ecx, ecx
setne al
mov dword [esp], eax
call fcn.00401dd0
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x40ad37
mov eax, esi
call fcn.004012e0
mov eax, dword [edi + 0x1c]
call fcn.004014e0
mov dword [ebp - 0x48], eax
mov eax, dword [ebx + 0x2c]
call fcn.004014e0
mov esi, eax
mov eax, dword [ebx + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [edi + 0x1c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
mov edx, dword [ebp - 0x48]
sub esp, 8
test eax, eax
sete al
mov dword [esp + 0xc], edx
movzx eax, al
mov dword [esp + 8], esi
mov dword [esp + 4], str.unexpected_detailed_info__lpAppDirPath__s____s_n
mov dword [esp], eax
call fcn.00401dd0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.004012e0
mov dword [esp + 4], str.detailed_info__lpRootManifestPath___NULL_n
mov ecx, dword [ebx + 0x24]
xor eax, eax
test ecx, ecx
sete al
mov dword [esp], eax
call fcn.00401dd0
jmp 0x40ac82
call fcn.004012e0
mov dword [esp + 4], str.detailed_info__lpAppDirPath___NULL_n
mov edx, dword [ebx + 0x2c]
xor eax, eax
test edx, edx
sete al
mov dword [esp], eax
call fcn.00401dd0
jmp 0x40ad37
mov dword [ebp - 0x48], 0
xor eax, eax
jmp 0x40abe5
mov dword [ebp - 0x48], 0
xor eax, eax
jmp 0x40aae5
mov dword [ebp - 0x48], 0
xor eax, eax
jmp 0x40abe5
mov eax, 2
jmp 0x40a7ee
mov edx, 0x32
test ecx, ecx
jne 0x40a7d2
jmp 0x40a7f9
mov dword [ebp - 0x48], 0
xor eax, eax
jmp 0x40aae5