Function at 0x45d4c0
Capabilities:
Check if file exists
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x592b5a
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1188
call fcn.00555270
mov eax, dword [0x5deba8]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1148], 0
mov dword [ebp - 4], 0
mov byte [ebp - 4], 1
mov eax, dword [0x5b163c]
mov dword [ebp - 0x430], eax
push 0x204
push 0
lea ecx, [ebp - 0x42c]
push ecx
call fcn.005533a0
add esp, 0xc
push 0
push 0
lea edx, [ebp - 0x220]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov dword [ebp - 0x434], 0
lea eax, [ebp - 0x434]
push eax
push 0x5adce0
push 1
push 0
push 0x5a6e3c
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
jl 0x45db3d
mov dword [ebp - 0x438], 0
lea ecx, [ebp - 0x438]
push ecx
push 0x5a658c
mov edx, dword [ebp - 0x434]
push edx
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax]
mov edx, dword [ecx]
call edx
mov dword [ebp - 0x114c], eax
mov eax, dword [ebp - 0x114c]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
jl 0x45db3d
push 4
lea ecx, [ebp - 0x113c]
push ecx
lea ecx, [ebp + 0xc]
call fcn.0041dde0
mov dword [ebp - 0x1150], eax
mov edx, dword [ebp - 0x1150]
mov dword [ebp - 0x1154], edx
mov byte [ebp - 4], 2
push 0x5b1640
mov ecx, dword [ebp - 0x1154]
call fcn.0041dbd0
mov dword [ebp - 0x1158], eax
xor eax, eax
cmp dword [ebp - 0x1158], 0
sete al
mov byte [ebp - 0x1135], al
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x113c]
call fcn.0041dab0
movzx ecx, byte [ebp - 0x1135]
test ecx, ecx
je 0x45db27
lea ecx, [ebp + 0xc]
call fcn.0041e1e0
push eax
lea ecx, [ebp - 0x1140]
call fcn.0041e3e0
mov dword [ebp - 0x115c], eax
mov ecx, dword [ebp - 0x115c]
call fcn.0041e410
push eax
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea ecx, [ebp - 0x1140]
call fcn.0041e400
push 0
lea eax, [ebp - 0x220]
push eax
mov ecx, dword [ebp - 0x434]
push ecx
mov edx, dword [ebp - 0x434]
mov eax, dword [edx]
mov ecx, dword [eax + 0x14]
call ecx
mov dword [ebp - 0x1160], eax
mov edx, dword [ebp - 0x1160]
mov dword [ebp - 0x224], edx
cmp dword [ebp - 0x224], 0
jl 0x45db25
lea ecx, [ebp - 0xa9c]
call fcn.0041d970
mov byte [ebp - 4], 3
push 2
push 4
call fcn.004169c0
add esp, 8
push eax
lea eax, [ebp - 0x890]
push eax
push 0x104
lea ecx, [ebp - 0x430]
push ecx
mov edx, dword [ebp - 0x438]
push edx
mov eax, dword [ebp - 0x438]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
mov dword [ebp - 0x1164], eax
mov eax, dword [ebp - 0x1164]
mov dword [ebp - 0x224], eax
mov ecx, dword [0x5b164c]
mov dword [ebp - 0xa98], ecx
push 0x204
push 0
lea edx, [ebp - 0xa94]
push edx
call fcn.005533a0
add esp, 0xc
push 0x104
lea eax, [ebp - 0xa98]
push eax
mov ecx, dword [ebp - 0x438]
push ecx
mov edx, dword [ebp - 0x438]
mov eax, dword [edx]
mov ecx, dword [eax + 0x20]
call ecx
mov edx, dword [0x5b1650]
mov dword [ebp - 0x640], edx
push 0x204
push 0
lea eax, [ebp - 0x63c]
push eax
call fcn.005533a0
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x640]
push ecx
mov edx, dword [ebp - 0x438]
push edx
mov eax, dword [ebp - 0x438]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x28]
call edx
push ecx
mov ecx, esp
mov dword [ebp - 0x1144], esp
lea eax, [ebp - 0x430]
push eax
call fcn.0041d9b0
mov dword [ebp - 0x1168], eax
call fcn.0045cbe0
add esp, 4
mov byte [ebp - 0x1169], al
movzx ecx, byte [ebp - 0x1169]
test ecx, ecx
je 0x45d823
mov dword [ebp - 0xdd4], 0x104
lea edx, [ebp - 0xaf0]
push edx
lea eax, [ebp - 0xb78]
push eax
lea ecx, [ebp - 0xdd0]
push ecx
lea ecx, [ebp + 0xc]
call fcn.0041e1e0
push eax
call dword [sym.imp.msi.dll_MsiEnumComponentCostsW]
mov dword [ebp - 0xaf8], eax
lea edx, [ebp - 0xdd4]
push edx
lea eax, [ebp - 0xd80]
push eax
lea ecx, [ebp - 0xaf0]
push ecx
lea edx, [ebp - 0xdd0]
push edx
call dword [sym.imp.msi.dll_MsiAdvertiseScriptW]
mov dword [ebp - 0xaf4], eax
lea eax, [ebp - 0xd80]
push eax
lea ecx, [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea edx, [ebp - 0x430]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45db16
lea eax, [ebp - 0x430]
push eax
lea ecx, [ebp - 0xdd8]
call fcn.0041d9b0
mov dword [ebp - 0x1170], eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xdd8]
push ecx
call fcn.0045ca50
add esp, 4
lea ecx, [ebp - 0xdd8]
call fcn.0041e290
mov dword [ebp - 0x1174], eax
mov edx, dword [ebp - 0x1174]
mov dword [ebp - 0x1178], edx
lea eax, [ebp - 0x430]
mov dword [ebp - 0x117c], eax
mov ecx, dword [ebp - 0x117c]
mov dword [ebp - 0x1180], ecx
mov edx, dword [ebp - 0x1178]
mov ax, word [edx]
mov word [ebp - 0x1182], ax
mov ecx, dword [ebp - 0x117c]
mov dx, word [ebp - 0x1182]
mov word [ecx], dx
mov eax, dword [ebp - 0x1178]
add eax, 2
mov dword [ebp - 0x1178], eax
mov ecx, dword [ebp - 0x117c]
add ecx, 2
mov dword [ebp - 0x117c], ecx
cmp word [ebp - 0x1182], 0
jne 0x45d898
push 0xffffffffffffffff
lea ecx, [ebp - 0xdd8]
call fcn.0041e330
mov edx, dword [0x5b1654]
mov dword [ebp - 0xfe0], edx
push 0x204
push 0
lea eax, [ebp - 0xfdc]
push eax
call fcn.005533a0
add esp, 0xc
push 0x104
lea ecx, [ebp - 0xfe0]
push ecx
lea edx, [ebp - 0x430]
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0xfe0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45daf3
lea ecx, [ebp - 0x1108]
call fcn.0041e420
mov dword [ebp - 0x1188], eax
mov byte [ebp - 4], 5
call fcn.00415850
mov dword [ebp - 0x1130], eax
lea ecx, [ebp + 0xc]
call fcn.0041e1e0
mov dword [ebp - 0x1128], eax
cmp dword [ebp - 0x1128], 0
jne 0x45d980
mov dword [ebp - 0x118c], 0
jmp 0x45d9f9
mov ecx, dword [ebp - 0x1128]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0x10ec], eax
cmp dword [ebp - 0x10ec], 0x3fffffff
jle 0x45d9ae
mov dword [ebp - 0x1190], 0
jmp 0x45d9ed
mov eax, dword [ebp - 0x10ec]
shl eax, 1
call fcn.005576d0
mov dword [ebp - 0x1194], esp
mov dword [ebp - 0x10], esp
mov edx, dword [ebp - 0x1130]
push edx
mov eax, dword [ebp - 0x10ec]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x1128]
push ecx
mov edx, dword [ebp - 0x1194]
push edx
call fcn.00415860
mov dword [ebp - 0x1190], eax
mov eax, dword [ebp - 0x1190]
mov dword [ebp - 0x118c], eax
mov ecx, dword [ebp - 0x118c]
push ecx
lea ecx, [ebp - 0x1108]
call fcn.0041e4f0
lea edx, [ebp - 0x1108]
push edx
lea eax, [ebp - 0x1124]
push eax
call fcn.0045ccc0
add esp, 8
mov dword [ebp - 0x1198], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x112c]
call fcn.0041d970
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x1124]
call fcn.0041e510
push eax
push 0x5b1658
lea ecx, [ebp - 0x112c]
push ecx
call fcn.00423c30
add esp, 0xc
mov dx, word [0x5b1660]
mov word [ebp - 0x10e8], dx
push 0x102
push 0
lea eax, [ebp - 0x10e6]
push eax
call fcn.005533a0
add esp, 0xc
lea ecx, [ebp - 0x1124]
call fcn.0041e510
push eax
lea ecx, [ebp - 0x10e8]
push ecx
call fcn.00460460
add esp, 8
lea edx, [ebp - 0x10e8]
push edx
lea ecx, [ebp - 0x112c]
call fcn.0041f760
lea ecx, [ebp - 0x112c]
call fcn.0041e1e0
push eax
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x112c]
call fcn.0041dab0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x1124]
call fcn.0041e490
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x1108]
call fcn.0041e490
jmp 0x45db07
lea ecx, [ebp - 0xfe0]
push ecx
lea edx, [ebp - 0x430]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xdd8]
call fcn.0041dab0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xa9c]
call fcn.0041dab0
jmp 0x45db3d
lea ecx, [ebp + 0xc]
call fcn.0041e1e0
push eax
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea ecx, [ebp - 0x430]
push ecx
mov ecx, dword [ebp + 8]
call fcn.0041d9b0
mov edx, dword [ebp - 0x1148]
or edx, 1
mov dword [ebp - 0x1148], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.0041dab0
mov eax, dword [ebp + 8]
jmp 0x45dbe9
lea esp, [ebp - 0x11a8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0055338c
mov esp, ebp
pop ebp
ret