Function at 0x4077d0
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x318]
sub esp, 0x318
push 0xffffffffffffffff
push 0x4248a5
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x431134]
xor eax, ebp
mov dword [ebp + 0x314], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x320]
xor ebx, ebx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
xor esi, esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], esi
push 0x105
lea eax, [ebp + 0x20c]
mov byte [ebp - 4], 3
push esi
push eax
call fcn.0040c060
push 0x20a
lea eax, [ebp]
push esi
push eax
call fcn.0040c060
add esp, 0x18
mov dword [ebp - 0x58], esi
lea eax, [ebp - 0x14]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], esi
push eax
push esi
lea eax, [ebp - 0x10]
push eax
push esi
push str.MSIComponentID
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x407a27
mov eax, dword [ebp - 0x10]
cmp eax, 1
je 0x4078a6
cmp eax, 2
je 0x4078a6
cmp eax, 7
jne 0x407a27
mov edi, dword [ebp - 0x14]
dec edi
test edi, edi
jle 0x407a27
add edi, 1
je 0x4078e0
lea ebx, [edi + 0x20]
and ebx, 0xffffffe0
push ebx
push 0
call fcn.0041fb70
mov esi, eax
add esp, 8
test esi, esi
je 0x407a27
lea eax, [ebx - 1]
mov byte [esi], 0
mov dword [ebp - 0x5c], esi
xor ebx, ebx
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x58], edi
test esi, esi
je 0x4078eb
mov byte [esi + edi], 0
test esi, esi
lea ecx, [ebp - 0x14]
push ecx
mov eax, 0x4263aa
cmovne eax, esi
push eax
lea eax, [ebp - 0x10]
push eax
push 0
push str.MSIComponentID
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test edi, edi
je 0x40794f
push 0x104
lea eax, [ebp]
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
push str.mapistub.dll
lea eax, [ebp]
push eax
lea eax, [ebp - 0x44]
push str._s_s
push eax
call fcn.00406dc0
add esp, 0x10
test al, al
jne 0x407965
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x40794f
push eax
call fcn.0041fa50
add esp, 4
test esi, esi
je 0x407a27
push esi
call fcn.0041fa50
add esp, 4
jmp 0x407a27
mov edi, dword [ebp - 0x44]
mov eax, 0x4263a8
test edi, edi
cmovne eax, edi
push eax
call dword [sym.imp.kernel32.dll_LoadLibraryW]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4079a0
push str.FGetComponentPath
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x407a4d
push dword [ebp - 0x14]
call dword [sym.imp.kernel32.dll_FreeLibrary]
push str.mapi32.dll
lea eax, [ebp]
push eax
lea eax, [ebp - 0x44]
push str._s_s
push eax
call fcn.00406dc0
add esp, 0x10
test al, al
jne 0x4079c8
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x407a0c
push eax
jmp 0x407a04
mov edi, dword [ebp - 0x44]
mov eax, 0x4263a8
test edi, edi
cmovne eax, edi
push eax
call dword [sym.imp.kernel32.dll_LoadLibraryW]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4079ff
push str.FGetComponentPath
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x407a4d
push dword [ebp - 0x14]
call dword [sym.imp.kernel32.dll_FreeLibrary]
test edi, edi
je 0x407a0c
push edi
call fcn.0041fa50
add esp, 4
test esi, esi
je 0x407a19
push esi
call fcn.0041fa50
add esp, 4
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x407a27
push eax
call dword [sym.imp.kernel32.dll_FreeLibrary]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x314]
xor ecx, ebp
call fcn.0040a8aa
lea esp, [ebp + 0x318]
pop ebp
ret
lea eax, [ebp - 0x18]
mov dword [ebp - 0x4c], 0
push eax
push 0
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
push 0
push str.MSIApplicationLCID
push dword [ebp - 0x20]
mov dword [ebp - 0x18], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x407afa
mov eax, dword [ebp - 0x1c]
cmp eax, 1
je 0x407a92
cmp eax, 2
je 0x407a92
cmp eax, 7
jne 0x407afa
mov eax, dword [ebp - 0x18]
dec eax
test eax, eax
jle 0x407afa
add eax, 1
mov dword [ebp - 0x28], eax
je 0x407acc
add eax, 0x20
and eax, 0xffffffe0
push eax
push 0
mov dword [ebp - 0x24], eax
call fcn.0041fb70
add esp, 8
test eax, eax
je 0x407afa
mov ebx, eax
mov byte [eax], 0
mov eax, dword [ebp - 0x24]
dec eax
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x4c], eax
test ebx, ebx
je 0x407ad7
mov byte [ebx + eax], 0
test ebx, ebx
lea ecx, [ebp - 0x18]
push ecx
mov eax, 0x4263aa
cmovne eax, ebx
push eax
lea eax, [ebp - 0x1c]
push eax
push 0
push str.MSIApplicationLCID
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x30], 0
push eax
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 0
push str.MSIOfficeLCID
push dword [ebp - 0x20]
mov dword [ebp - 0x1c], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x407bab
mov eax, dword [ebp - 0x18]
cmp eax, 1
je 0x407b3f
cmp eax, 2
je 0x407b3f
cmp eax, 7
jne 0x407bab
mov eax, dword [ebp - 0x1c]
dec eax
test eax, eax
jle 0x407bab
add eax, 1
mov dword [ebp - 0x24], eax
je 0x407b7b
add eax, 0x20
and eax, 0xffffffe0
push eax
push 0
mov dword [ebp - 0x28], eax
call fcn.0041fb70
add esp, 8
test eax, eax
je 0x407bab
mov ecx, eax
mov byte [eax], 0
mov eax, dword [ebp - 0x28]
dec eax
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x24]
jmp 0x407b7d
xor ecx, ecx
mov dword [ebp - 0x30], eax
test ecx, ecx
je 0x407b88
mov byte [ecx + eax], 0
test ecx, ecx
mov eax, 0x4263aa
cmovne eax, ecx
lea ecx, [ebp - 0x1c]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push str.MSIOfficeLCID
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
xor eax, eax
cmp dword [ebp - 0x4c], eax
je 0x407be3
push 1
mov eax, 0x4263aa
lea edx, [ebp + 0x20c]
mov ecx, eax
test ebx, ebx
push 0x104
cmovne ecx, ebx
test esi, esi
push edx
cmovne eax, esi
push ecx
push eax
call dword [ebp - 0x10]
test eax, eax
je 0x407be3
cmp byte [ebp + 0x20c], 0
jne 0x407c4a
cmp dword [ebp - 0x30], 0
je 0x407c12
mov eax, dword [ebp - 0x34]
mov edx, 0x4263aa
test eax, eax
mov ecx, edx
push 1
cmovne ecx, eax
mov eax, edx
push 0x104
lea edx, [ebp + 0x20c]
test esi, esi
push edx
cmovne eax, esi
push ecx
push eax
call dword [ebp - 0x10]
test eax, eax
je 0x407c1f
cmp byte [ebp + 0x20c], 0
jne 0x407c4a
push 1
push 0x104
lea ecx, [ebp + 0x20c]
test esi, esi
push ecx
mov eax, 0x4263aa
cmovne eax, esi
push 0
push eax
call dword [ebp - 0x10]
test eax, eax
je 0x407c5e
cmp byte [ebp + 0x20c], 0
je 0x407c5e
lea eax, [ebp + 0x20c]
push 0
push eax
call fcn.0041fb90
add esp, 8
mov dword [ebp - 0x38], eax
test edi, edi
je 0x407c6b
push edi
call fcn.0041fa50
add esp, 4
test esi, esi
je 0x407c78
push esi
call fcn.0041fa50
add esp, 4
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x407c88
push eax
call fcn.0041fa50
add esp, 4
test ebx, ebx
je 0x407a19
push ebx
jmp 0x407a11