Function at 0x403e8b
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
sub esp, 0x210
lea ebp, [esp - 4]
mov eax, dword [0x664e94]
xor eax, ebp
mov dword [ebp + 0x210], eax
push 0x3c
mov eax, 0x5b7f30
call fcn.0058f9b8
mov esi, ecx
xor edi, edi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x14], edi
call fcn.00496dcd
push eax
lea ecx, [ebp - 0x34]
call fcn.0040141e
mov eax, dword [esi + 4]
mov dword [ebp - 4], edi
cmp eax, edi
jne 0x403ed9
mov dword [ebp - 0x14], edi
jmp 0x404730
xor ecx, ecx
inc ecx
cmp eax, ecx
jne 0x403ee8
mov dword [ebp - 0x14], ecx
jmp 0x404730
cmp eax, 2
je 0x4043a0
cmp eax, 3
je 0x4043a0
cmp eax, 4
jne 0x40414a
mov dword [ebp - 0x18], edi
call fcn.00496dcd
push eax
lea ecx, [ebp - 0x1c]
call fcn.0040141e
mov eax, dword [esi + 0x1c]
push edi
push edi
push edi
push edi
push edi
push edi
push 3
lea ecx, [ebp + 0x208]
push ecx
push eax
mov byte [ebp - 4], 0xa
call fcn.00590065
lea eax, [ebp + 0x208]
push eax
call fcn.0058f15d
add esp, 0x28
test eax, eax
jne 0x403fbc
lea ebx, [esi + 0x28]
mov eax, dword [ebx]
cmp dword [eax - 0xc], edi
je 0x403fbc
push 1
lea eax, [ebp - 0x20]
push eax
mov ecx, ebx
call fcn.00403ded
mov edi, 0x5d4dc0
push edi
mov ecx, eax
mov byte [ebp - 4], 0xb
call fcn.00401ba2
mov ecx, dword [ebp - 0x20]
test eax, eax
setne byte [ebp - 0x25]
add ecx, 0xfffffff0
mov byte [ebp - 4], 0xa
call fcn.00401019
cmp byte [ebp - 0x25], 0
je 0x403f8e
push edi
mov ecx, ebx
call fcn.004022ca
lea edi, [esi + 0x1c]
push edi
lea eax, [ebp - 0x20]
push ebx
push eax
call fcn.00403e34
add esp, 0xc
push eax
mov ecx, edi
mov byte [ebp - 4], 0xc
call fcn.0040227d
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
mov byte [ebp - 4], 0xa
call fcn.00401019
xor edi, edi
cmp dword [esi + 0x10], edi
je 0x40403b
lea eax, [esi + 0x1c]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401db5
lea ebx, [esi + 0x20]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xd
call fcn.00401db5
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0xe
call fcn.004020c6
lea ecx, [ebp - 0x24]
call fcn.004020c6
push edi
push str.MSIEXEC
lea ecx, [ebp - 0x2c]
call fcn.00401d2f
test eax, eax
jl 0x404021
push edi
push str.REBOOT
lea ecx, [ebp - 0x24]
call fcn.00401d2f
test eax, eax
jge 0x404021
push str._REBOOTSuppress
mov ecx, ebx
call fcn.004022ca
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.00401019
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
mov byte [ebp - 4], 0xa
call fcn.00401019
cmp dword [esi + 0x14], edi
je 0x404086
lea eax, [esi + 0x1c]
push eax
lea ecx, [ebp - 0x24]
call fcn.00401db5
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xf
call fcn.004020c6
push edi
push str.MSIEXEC
lea ecx, [ebp - 0x24]
call fcn.00401d2f
test eax, eax
jl 0x404077
lea ecx, [esi + 0x20]
push str.__qn
call fcn.004022ca
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
mov byte [ebp - 4], 0xa
call fcn.00401019
push 8
call fcn.00453786
push dword [esi + 0x20]
lea eax, [ebp - 0x1c]
push dword [esi + 0x1c]
mov dword [ebp - 0x14], edi
push str.__s___s
push eax
call fcn.00401518
mov ebx, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push eax
push edi
push ebx
call fcn.00403a1b
add esp, 0x20
test eax, eax
jne 0x4040c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
jmp 0x40411e
push 0xffffffffffffffff
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4040e4
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x4040ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x18], edi
je 0x4040fb
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x10], edi
je 0x40411e
cmp dword [ebp - 0x14], 0x669
je 0x40411b
cmp dword [ebp - 0x14], 0xbc2
je 0x40411b
cmp dword [ebp - 0x14], 0x70669
jne 0x40411e
mov dword [ebp - 0x14], edi
push dword [ebp - 0x14]
lea eax, [ebp - 0x34]
push ebx
push str.Run_command:__s_returned:__d
push eax
call fcn.00401518
push dword [ebp - 0x34]
call fcn.004437b6
push 1
call fcn.00453786
add esp, 0x18
lea ecx, [ebx - 0x10]
jmp 0x40472b
cmp eax, 5
jne 0x403ee0
call fcn.00496dcd
push eax
lea ecx, [ebp - 0x18]
call fcn.0040141e
xor edi, edi
push edi
push edi
push edi
push edi
push edi
push edi
push 3
lea ecx, [ebp + 0x208]
lea ebx, [esi + 0x1c]
mov eax, dword [ebx]
push ecx
push eax
mov byte [ebp - 4], 0x10
mov dword [ebp - 0x24], edi
call fcn.00590065
lea eax, [ebp + 0x208]
push eax
call fcn.0058f15d
add esp, 0x28
test eax, eax
jne 0x404210
mov eax, dword [esi + 0x28]
cmp dword [eax - 0xc], edi
je 0x404210
push 1
lea eax, [ebp - 0x20]
push eax
lea ecx, [esi + 0x28]
call fcn.00403ded
mov edi, 0x5d4dc0
push edi
mov ecx, eax
mov byte [ebp - 4], 0x11
call fcn.00401ba2
mov ecx, dword [ebp - 0x20]
test eax, eax
setne byte [ebp - 0x25]
add ecx, 0xfffffff0
mov byte [ebp - 4], 0x10
call fcn.00401019
cmp byte [ebp - 0x25], 0
je 0x4041e2
push edi
lea ecx, [esi + 0x28]
call fcn.004022ca
push ebx
lea eax, [esi + 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00403e34
add esp, 0xc
push eax
mov ecx, ebx
mov byte [ebp - 4], 0x12
call fcn.0040227d
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
mov byte [ebp - 4], 0x10
call fcn.00401019
xor edi, edi
push ebx
lea ecx, [ebp - 0x18]
call fcn.0040227d
push 0x5c
lea ecx, [ebp - 0x18]
call fcn.00403913
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
je 0x404267
lea eax, [ebp]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x404267
push dword [ebp - 0x20]
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x24], 1
call fcn.00401f0b
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.00401019
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x1c], eax
cmp eax, edi
je 0x404363
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x20], eax
cmp eax, edi
je 0x404293
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x404297
xor eax, eax
jmp 0x4042b4
lea edi, [eax + eax]
mov eax, edi
call fcn.00590290
mov dword [ebp - 0x10], esp
mov eax, esp
push 3
push edi
push dword [ebp - 0x20]
push eax
call fcn.00403d96
xor edi, edi
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
je 0x4042fe
push dword [0x666ab4]
mov byte [ebp - 4], 0x13
call eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0x10
jmp 0x404326
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebx]
mov dword [ebp - 0x14], eax
push dword [esi + 0x24]
lea eax, [ebp - 0x34]
push str.Could_not_load_entry_point__s_from_module__s__error_code___08X
push eax
call fcn.00401518
push dword [ebp - 0x34]
call fcn.004437b6
add esp, 0x18
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
jne 0x404388
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push dword [esi + 0x1c]
lea eax, [ebp - 0x34]
push str.Unable_to_free_module__s__error_code___08X
push eax
call fcn.00401518
push dword [ebp - 0x34]
call fcn.004437b6
add esp, 0x14
cmp dword [ebp - 0x14], 0
jne 0x404388
mov dword [ebp - 0x14], edi
jmp 0x404388
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebx]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x34]
push str.Could_not_load_module__s__error_code___08X
push eax
call fcn.00401518
push dword [ebp - 0x34]
call fcn.004437b6
add esp, 0x14
cmp dword [ebp - 0x24], 1
jne 0x404398
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [ebp - 0x18]
jmp 0x404728
call fcn.00496dcd
push eax
lea ecx, [ebp - 0x20]
call fcn.0040141e
mov byte [ebp - 4], 1
call fcn.00496dcd
push eax
lea ecx, [ebp - 0x30]
call fcn.0040141e
mov byte [ebp - 4], 2
call fcn.00496dcd
push eax
lea ecx, [ebp - 0x24]
call fcn.0040141e
mov byte [ebp - 4], 3
call fcn.00496dcd
push eax
lea ecx, [ebp - 0x38]
call fcn.0040141e
movzx ecx, byte [esi + 0x18]
mov eax, dword [esi + 8]
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
mov byte [ebp - 4], 4
mov dword [ebp - 0x18], edi
call fcn.00409eb3
mov bl, al
mov eax, dword [ebp - 0x24]
add esp, 0x14
cmp dword [eax - 0xc], edi
je 0x404420
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x30]
call fcn.0040227d
jmp 0x404452
test bl, bl
je 0x4046f4
mov eax, dword [esi + 8]
lea ecx, [ebp - 0x38]
push ecx
push str.DisplayName
push eax
call fcn.0040a4a0
add esp, 0xc
neg al
sbb al, al
inc al
cmp dword [esi + 4], 3
jne 0x40444d
mov bl, al
jmp 0x404452
test al, al
sete bl
test bl, bl
je 0x4046f4
mov eax, dword [esi + 0x2c]
cmp dword [eax - 0xc], edi
je 0x4044a6
or dword [ebp - 0x3c], 0xffffffff
xor eax, eax
lea ecx, [ebp - 0x48]
mov word [ebp - 0x3e], ax
mov word [ebp - 0x40], ax
mov word [ebp - 0x42], ax
mov word [ebp - 0x44], ax
mov eax, dword [esi + 8]
push ecx
push eax
mov dword [ebp - 0x48], vtable.CVersionInfo.0
call fcn.0040a19e
pop ecx
pop ecx
test al, al
je 0x4044a4
push dword [esi + 0x2c]
lea eax, [ebp - 0x48]
push eax
call fcn.00415ce8
pop ecx
pop ecx
test al, al
jne 0x4044a6
xor bl, bl
test bl, bl
je 0x4046f4
mov eax, dword [esi + 0x30]
cmp dword [eax - 0xc], edi
je 0x404534
call fcn.00496dcd
push eax
lea ecx, [ebp - 0x1c]
call fcn.0040141e
mov byte [ebp - 4], 5
call fcn.00496dcd
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040141e
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 6
call fcn.0040116b
lea eax, [ebp - 0x1c]
push eax
push ecx
lea eax, [ebp - 0x2c]
mov dword [ebp + 0x208], esp
mov ecx, esp
push eax
call fcn.00401db5
push dword [esi + 0x34]
call fcn.00416ee5
add esp, 0xc
test al, al
je 0x40451a
push dword [esi + 0x30]
push dword [ebp - 0x1c]
call fcn.004169d5
pop ecx
pop ecx
test al, al
jne 0x40451a
xor bl, bl
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.00401019
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
mov byte [ebp - 4], 4
call fcn.00401019
test bl, bl
je 0x4046f4
cmp dword [esi + 0xc], edi
je 0x4046f4
cmp dword [esi + 0x10], edi
je 0x4045a2
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401db5
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call fcn.004020c6
push edi
push str.MSIEXEC
lea ecx, [ebp - 0x2c]
call fcn.00401d2f
test eax, eax
jl 0x404593
push edi
push str.REBOOT
lea ecx, [ebp - 0x2c]
call fcn.00401d2f
test eax, eax
jge 0x404593
push str._REBOOTReallySuppress
lea ecx, [ebp - 0x30]
call fcn.004022ca
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
mov byte [ebp - 4], 4
call fcn.00401019
cmp dword [esi + 0x14], edi
je 0x40463c
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401db5
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 8
call fcn.004020c6
push edi
push str.MSIEXEC
lea ecx, [ebp - 0x1c]
call fcn.00401d2f
test eax, eax
jl 0x4045e2
push str.__qn
lea ecx, [ebp - 0x30]
call fcn.004022ca
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
mov byte [ebp - 4], 4
call fcn.00401019
cmp dword [esi + 0x14], edi
je 0x40463c
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401db5
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 9
call fcn.004020c6
push edi
push 0x5d4b50
lea ecx, [ebp - 0x1c]
call fcn.00401d2f
test eax, eax
jl 0x40462d
push str._REMOVEALL
lea ecx, [ebp - 0x30]
call fcn.004022ca
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
mov byte [ebp - 4], 4
call fcn.00401019
push 1
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x30]
call fcn.00403bfb
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp eax, edi
jne 0x4046d3
push 0xffffffffffffffff
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40466b
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40469f
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x4046a2
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov dword [ebp - 0x14], eax
cmp eax, 6
jne 0x4046a2
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
jne 0x4046a2
call ebx
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x18], edi
je 0x4046b0
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x10], edi
je 0x4046d3
cmp dword [ebp - 0x14], 0x669
je 0x4046d0
cmp dword [ebp - 0x14], 0xbc2
je 0x4046d0
cmp dword [ebp - 0x14], 0x70669
jne 0x4046d3
mov dword [ebp - 0x14], edi
push dword [ebp - 0x14]
lea eax, [ebp - 0x34]
push dword [ebp - 0x30]
push str.___Run_uninstall_command:__s_returned:__d
push eax
call fcn.00401518
push dword [ebp - 0x34]
call fcn.004437b6
add esp, 0x14
jmp 0x404704
xor eax, eax
test bl, bl
setne al
dec eax
and eax, 0x490
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x38]
add ecx, 0xfffffff0
call fcn.00401019
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.00401019
mov ecx, dword [ebp - 0x30]
add ecx, 0xfffffff0
call fcn.00401019
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.00401019
mov ecx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00401019
mov eax, esi
lea esp, [ebp - 0x58]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x210]
xor ecx, ebp
call fcn.0058f976
add ebp, 0x214
leave
ret