Function at 0x4010a0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x41a004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov ebx, edx
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x22c], eax
xor edi, edi
xor eax, eax
mov dword [ebp - 0x230], ecx
push eax
push dword [ebp + 0x18]
mov dword [ebp - 0x228], edi
mov dword [ebp - 0x210], edi
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x220], eax
call dword [sym.imp.msi.dll_MsiSetPropertyW]
test esi, esi
je 0x401112
push 1
push esi
push 0x1fdf
call dword [sym.imp.msi.dll_MsiGetComponentPathW]
mov edi, eax
jmp 0x40130f
test ebx, ebx
je 0x40130f
mov esi, ebx
lea ecx, [esi + 2]
nop
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x401120
sub esi, ecx
sar esi, 1
cmp esi, 0x100
jae 0x401145
cmp esi, 0x7fffffff
jae 0x40130f
jmp 0x40114a
mov esi, pe_nt_image_headers32
lea eax, [esi + esi]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x218], eax
test eax, eax
je 0x40130f
push 0
push 0
push esi
push eax
push 0
push 0
push 0
push 0
push ebx
call fcn.0040749e
add esp, 0x24
test eax, eax
jne 0x4012ed
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x224], edi
push eax
push 0x104
mov esi, 0x80004005
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x4011d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4011c0
movzx esi, si
or esi, 0x80070000
mov ecx, dword [ebp - 0x218]
mov dword [ebp - 0x214], ecx
test esi, esi
js 0x40130f
jmp 0x4011dc
mov ecx, dword [ebp - 0x218]
xor ebx, ebx
or eax, 0xffffffff
cmp eax, 0xffffffff
jne 0x40127d
push 0x41880c
push ebx
push ecx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x224]
push str._s_s_05d._s
push eax
call fcn.00403050
mov esi, eax
add esp, 0x18
test esi, esi
js 0x40129d
push 0
push 0x80
push 1
push 0
push 1
push 0x40000000
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x214], eax
cmp eax, 0xffffffff
jne 0x40126a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x401254
movzx esi, si
or esi, 0x80070000
cmp esi, 0x80070050
jne 0x401260
xor esi, esi
jmp 0x401264
test esi, esi
js 0x40129d
mov eax, dword [ebp - 0x214]
mov ecx, dword [ebp - 0x218]
inc ebx
cmp ebx, 0x3e8
jl 0x4011e1
mov ecx, dword [ebp - 0x224]
mov dword [ebp - 0x228], ecx
cmp eax, 0xffffffff
je 0x4012c5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x228]
jmp 0x4012c5
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x4012c3
push eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0
call eax
push eax
mov eax, dword [sym.imp.KERNEL32.dll_HeapFree]
call eax
test eax, eax
jne 0x4012c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
mov ebx, dword [ebp - 0x218]
mov dword [ebp - 0x214], ebx
test esi, esi
js 0x40130f
push 0
push ecx
push 0x1fdf
call dword [sym.imp.msi.dll_MsiGetComponentPathW]
mov edi, eax
mov dword [ebp - 0x214], ebx
jmp 0x40130f
mov ebx, dword [ebp - 0x218]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 0
call eax
push eax
mov eax, dword [sym.imp.KERNEL32.dll_HeapFree]
call eax
test eax, eax
jne 0x40130f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x22c]
mov edx, 0x418808
test eax, eax
push ecx
cmovne edx, eax
lea ecx, [ebp - 0x210]
call fcn.00402d70
mov esi, eax
test esi, esi
js 0x4014a6
mov ecx, dword [ebp + 0x14]
dec ecx
cmp ecx, 6
ja case.default.0x401342
jmp dword [ecx*4 + 0x401534]
movzx esi, di
or esi, 0x80070000
jmp 0x4013ed
mov ebx, dword [ebp - 0x210]
push ebx
push 0
push 0
push dword [ebp - 0x21c]
call dword [sym.imp.msi.dll_MsiGetPatchInfoW]
jmp 0x4013d9
push ecx
mov edx, str._REINSTALLMODE_vdmus_
lea ecx, [ebp - 0x210]
call fcn.00402f30
mov esi, eax
test esi, esi
js 0x4014a6
mov ebx, dword [ebp - 0x210]
push ebx
push 5
push 0
push dword [ebp - 0x230]
call dword [sym.imp.msi.dll_MsiGetFileVersionA]
jmp 0x4013d9
mov edx, str._REINSTALLALL_REINSTALLMODE_vomus_
jmp 0x4013b0
mov edx, str._REMOVEALL
push ecx
lea ecx, [ebp - 0x210]
call fcn.00402f30
mov esi, eax
test esi, esi
js 0x4014a6
mov ebx, dword [ebp - 0x210]
push ebx
push dword [ebp - 0x21c]
call dword [sym.imp.msi.dll_MsiOpenDatabaseW]
mov edi, eax
test edi, edi
jg 0x401349
mov esi, edi
jmp 0x4013ed
mov ebx, dword [ebp - 0x210]
test esi, esi
jns case.0x401421.1602
cmp dword [ebp + 0x1c], 0
je 0x401405
mov esi, 1
jmp case.0x401421.1602
cmp edi, 0x661
ja 0x401428
je case.0x401421.1605
add edi, 0xfffff9be
cmp edi, 0x1d
ja case.0x401421.1604
movzx eax, byte [edi + 0x40155c]
jmp dword [eax*4 + 0x401550]
cmp edi, 0x66a
ja 0x401487
je 0x40143f
sub edi, 0x666
je case.0x401421.1602
sub edi, 3
jmp 0x40148d
cmp dword [ebp + 0x20], 0
jne case.0x401421.1605
mov esi, 1
jmp case.0x401421.1602
push 0
push 0
lea eax, [ebp - 0x220]
push eax
push 0x400
push esi
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je case.0x401421.1602
push 0
push 0x10
push str.Install_Error
push dword [ebp - 0x220]
push 0
call dword [sym.imp.USER32.dll_MessageBoxExW]
jmp case.0x401421.1602
cmp edi, 0xbc2
je case.0x401421.1602
push 0
push 0
lea eax, [ebp - 0x220]
push eax
push 0x400
push 0x8007042b
jmp 0x40145d
mov ebx, dword [ebp - 0x210]
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x4014bd
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test ebx, ebx
je 0x4014e1
push ebx
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4014e7
call ebx
jmp 0x4014e7
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x401503
push eax
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jne 0x401503
call ebx
mov eax, dword [ebp - 0x214]
test eax, eax
je 0x40151f
push eax
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jne 0x40151f
call ebx
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403614
mov esp, ebp
pop ebp
ret