Function at 0x41b580
Capabilities:
Check if file exists
Copy file
Create directory
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5929a6
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x12e4
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 - 4], 0
mov byte [ebp - 4], 1
mov eax, dword [0x5b7054]
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 0x41bf20
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 - 0x1260], eax
mov eax, dword [ebp - 0x1260]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
jl 0x41bf20
push 4
lea ecx, [ebp - 0x124c]
push ecx
lea ecx, [ebp + 8]
call fcn.0041dde0
mov dword [ebp - 0x1264], eax
mov edx, dword [ebp - 0x1264]
mov dword [ebp - 0x1268], edx
mov byte [ebp - 4], 2
push str..lnk
mov ecx, dword [ebp - 0x1268]
call fcn.0041dbd0
mov dword [ebp - 0x126c], eax
xor eax, eax
cmp dword [ebp - 0x126c], 0
sete al
mov byte [ebp - 0x1245], al
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x124c]
call fcn.0041dab0
movzx ecx, byte [ebp - 0x1245]
test ecx, ecx
je 0x41bea1
lea ecx, [ebp + 8]
call fcn.0041e1e0
push eax
lea ecx, [ebp - 0x1250]
call fcn.0041e3e0
mov dword [ebp - 0x1270], eax
mov ecx, dword [ebp - 0x1270]
call fcn.0041e410
push eax
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea ecx, [ebp - 0x1250]
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 - 0x1274], eax
mov edx, dword [ebp - 0x1274]
mov dword [ebp - 0x224], edx
cmp dword [ebp - 0x224], 0
jl 0x41be9f
lea ecx, [ebp - 0xa9c]
call fcn.0041d970
mov byte [ebp - 4], 3
push 4
push 8
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 - 0x1278], eax
mov eax, dword [ebp - 0x1278]
mov dword [ebp - 0x224], eax
mov ecx, dword [0x5b7064]
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
lea edx, [ebp - 0xa98]
push edx
lea ecx, [ebp - 0xaa0]
call fcn.0041d9b0
mov dword [ebp - 0x127c], eax
mov byte [ebp - 4], 4
lea eax, [ebp - 0xaa0]
push eax
call fcn.0045ca50
add esp, 4
lea ecx, [ebp - 0xaa0]
call fcn.0041e290
mov dword [ebp - 0x1280], eax
push 0x104
lea ecx, [ebp - 0xa98]
push ecx
mov edx, dword [ebp - 0x1280]
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0xffffffffffffffff
lea ecx, [ebp - 0xaa0]
call fcn.0041e330
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xaa0]
call fcn.0041dab0
mov eax, dword [0x5b7068]
mov dword [ebp - 0x640], eax
push 0x204
push 0
lea ecx, [ebp - 0x63c]
push ecx
call fcn.005533a0
add esp, 0xc
push 0x104
lea edx, [ebp - 0x640]
push edx
mov eax, dword [ebp - 0x438]
push eax
mov ecx, dword [ebp - 0x438]
mov edx, dword [ecx]
mov eax, dword [edx + 0x28]
call eax
push ecx
mov ecx, esp
mov dword [ebp - 0x1254], esp
lea edx, [ebp - 0x430]
push edx
call fcn.0041d9b0
mov dword [ebp - 0x1284], eax
call fcn.0045cbe0
add esp, 4
mov byte [ebp - 0x1285], al
movzx eax, byte [ebp - 0x1285]
test eax, eax
je 0x41b949
mov dword [ebp - 0xdd4], 0x104
lea ecx, [ebp - 0xaf0]
push ecx
lea edx, [ebp - 0xb78]
push edx
lea eax, [ebp - 0xdd0]
push eax
lea ecx, [ebp + 8]
call fcn.0041e1e0
push eax
call dword [sym.imp.msi.dll_MsiEnumComponentCostsW]
mov dword [ebp - 0xaf8], eax
lea ecx, [ebp - 0xdd4]
push ecx
lea edx, [ebp - 0xd80]
push edx
lea eax, [ebp - 0xaf0]
push eax
lea ecx, [ebp - 0xdd0]
push ecx
call dword [sym.imp.msi.dll_MsiAdvertiseScriptW]
mov dword [ebp - 0xaf4], eax
lea edx, [ebp - 0xd80]
push edx
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea ecx, [ebp - 0x430]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x41bbbc
lea edx, [ebp - 0x430]
push edx
lea ecx, [ebp - 0xdd8]
call fcn.0041d9b0
mov dword [ebp - 0x128c], eax
mov byte [ebp - 4], 5
lea eax, [ebp - 0xdd8]
push eax
call fcn.0045ca50
add esp, 4
lea ecx, [ebp - 0xdd8]
call fcn.0041e290
mov dword [ebp - 0x1290], eax
mov ecx, dword [ebp - 0x1290]
mov dword [ebp - 0x1294], ecx
lea edx, [ebp - 0x430]
mov dword [ebp - 0x1298], edx
mov eax, dword [ebp - 0x1298]
mov dword [ebp - 0x129c], eax
mov ecx, dword [ebp - 0x1294]
mov dx, word [ecx]
mov word [ebp - 0x129e], dx
mov eax, dword [ebp - 0x1298]
mov cx, word [ebp - 0x129e]
mov word [eax], cx
mov edx, dword [ebp - 0x1294]
add edx, 2
mov dword [ebp - 0x1294], edx
mov eax, dword [ebp - 0x1298]
add eax, 2
mov dword [ebp - 0x1298], eax
cmp word [ebp - 0x129e], 0
jne 0x41b9be
push 0xffffffffffffffff
lea ecx, [ebp - 0xdd8]
call fcn.0041e330
mov ecx, dword [0x5b706c]
mov dword [ebp - 0xfe0], ecx
push 0x204
push 0
lea edx, [ebp - 0xfdc]
push edx
call fcn.005533a0
add esp, 0xc
push 0x104
lea eax, [ebp - 0xfe0]
push eax
lea ecx, [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea edx, [ebp - 0xfe0]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x41bb99
lea ecx, [ebp - 0x1000]
call fcn.0041e420
mov dword [ebp - 0x12a4], eax
mov byte [ebp - 4], 6
call fcn.00415850
mov dword [ebp - 0x1024], eax
lea ecx, [ebp + 8]
call fcn.0041e1e0
mov dword [ebp - 0x1020], eax
cmp dword [ebp - 0x1020], 0
jne 0x41baa6
mov dword [ebp - 0x12a8], 0
jmp 0x41bb1f
mov eax, dword [ebp - 0x1020]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0xfe4], eax
cmp dword [ebp - 0xfe4], 0x3fffffff
jle 0x41bad4
mov dword [ebp - 0x12ac], 0
jmp 0x41bb13
mov eax, dword [ebp - 0xfe4]
shl eax, 1
call fcn.005576d0
mov dword [ebp - 0x12b0], esp
mov dword [ebp - 0x10], esp
mov ecx, dword [ebp - 0x1024]
push ecx
mov edx, dword [ebp - 0xfe4]
shl edx, 1
push edx
mov eax, dword [ebp - 0x1020]
push eax
mov ecx, dword [ebp - 0x12b0]
push ecx
call fcn.00415860
mov dword [ebp - 0x12ac], eax
mov edx, dword [ebp - 0x12ac]
mov dword [ebp - 0x12a8], edx
mov eax, dword [ebp - 0x12a8]
push eax
lea ecx, [ebp - 0x1000]
call fcn.0041e4f0
lea ecx, [ebp - 0x1000]
push ecx
lea edx, [ebp - 0x101c]
push edx
call fcn.0045ccc0
add esp, 8
push 0x208
push 0
lea eax, [ebp - 0x430]
push eax
call fcn.005533a0
add esp, 0xc
push 0x5b7070
lea ecx, [ebp - 0x101c]
call fcn.0041e510
push eax
lea ecx, [ebp - 0x430]
push ecx
call fcn.00401240
add esp, 0xc
lea ecx, [ebp - 0x101c]
call fcn.0041e490
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x1000]
call fcn.0041e490
jmp 0x41bbad
lea edx, [ebp - 0xfe0]
push edx
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xdd8]
call fcn.0041dab0
lea ecx, [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x41bdb2
push 0x5c
lea ecx, [ebp + 8]
call fcn.0041dcb0
mov dword [ebp - 0x102c], eax
cmp dword [ebp - 0x102c], 0xffffffff
je 0x41bd9c
lea ecx, [ebp + 8]
call fcn.0041e2f0
sub eax, dword [ebp - 0x102c]
sub eax, 1
push eax
lea edx, [ebp - 0x1240]
push edx
lea ecx, [ebp + 8]
call fcn.0041dde0
mov dword [ebp - 0x12b4], eax
mov byte [ebp - 4], 7
mov eax, dword [0x5b7074]
mov dword [ebp - 0x1238], eax
push 0x204
push 0
lea ecx, [ebp - 0x1234]
push ecx
call fcn.005533a0
add esp, 0xc
lea edx, [ebp - 0x1238]
push edx
call fcn.004011a0
add esp, 4
lea eax, [ebp - 0x1238]
push eax
lea ecx, [ebp - 0x123c]
call fcn.0041d9b0
mov dword [ebp - 0x12b8], eax
mov byte [ebp - 4], 8
push 0x5b7078
lea ecx, [ebp - 0x123c]
call fcn.0041db50
push 0
lea ecx, [ebp - 0x123c]
call fcn.0041e1e0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.link
lea ecx, [ebp - 0x123c]
call fcn.0041db50
push 0
lea ecx, [ebp - 0x123c]
call fcn.0041e1e0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x5b7088
lea ecx, [ebp - 0x1258]
call fcn.0041da30
mov dword [ebp - 0x12bc], eax
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x1240]
push ecx
lea edx, [ebp - 0x1258]
push edx
lea eax, [ebp - 0x125c]
push eax
call fcn.0041df30
add esp, 0xc
mov dword [ebp - 0x12c0], eax
mov ecx, dword [ebp - 0x12c0]
mov dword [ebp - 0x12c4], ecx
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x12c4]
push edx
lea ecx, [ebp - 0x123c]
call fcn.0041db10
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x125c]
call fcn.0041dab0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x1258]
call fcn.0041dab0
push 0
lea ecx, [ebp - 0x123c]
call fcn.0041e1e0
push eax
lea ecx, [ebp + 8]
call fcn.0041e1e0
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x41bd66
lea ecx, [ebp - 0x123c]
call fcn.0041e1e0
push eax
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x41bd7c
lea ecx, [ebp + 8]
call fcn.0041e1e0
push eax
lea ecx, [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x123c]
call fcn.0041dab0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1240]
call fcn.0041dab0
jmp 0x41bdb2
lea ecx, [ebp + 8]
call fcn.0041e1e0
push eax
lea edx, [ebp - 0x430]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x640]
mov dword [ebp - 0x12c8], eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x4b0
mov dword [ebp - 0x12cc], ecx
mov edx, dword [ebp - 0x12cc]
mov dword [ebp - 0x12d0], edx
mov eax, dword [ebp - 0x12c8]
mov cx, word [eax]
mov word [ebp - 0x12d2], cx
mov edx, dword [ebp - 0x12cc]
mov ax, word [ebp - 0x12d2]
mov word [edx], ax
mov ecx, dword [ebp - 0x12c8]
add ecx, 2
mov dword [ebp - 0x12c8], ecx
mov edx, dword [ebp - 0x12cc]
add edx, 2
mov dword [ebp - 0x12cc], edx
cmp word [ebp - 0x12d2], 0
jne 0x41bdd9
lea eax, [ebp - 0xa98]
mov dword [ebp - 0x12d8], eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x258
mov dword [ebp - 0x12dc], ecx
mov edx, dword [ebp - 0x12dc]
mov dword [ebp - 0x12e0], edx
mov eax, dword [ebp - 0x12d8]
mov cx, word [eax]
mov word [ebp - 0x12e2], cx
mov edx, dword [ebp - 0x12dc]
mov ax, word [ebp - 0x12e2]
mov word [edx], ax
mov ecx, dword [ebp - 0x12d8]
add ecx, 2
mov dword [ebp - 0x12d8], ecx
mov edx, dword [ebp - 0x12dc]
add edx, 2
mov dword [ebp - 0x12dc], edx
cmp word [ebp - 0x12e2], 0
jne 0x41be48
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xa9c]
call fcn.0041dab0
jmp 0x41beb7
lea ecx, [ebp + 8]
call fcn.0041e1e0
push eax
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea ecx, [ebp - 0x430]
mov dword [ebp - 0x12e8], ecx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x12ec], edx
mov eax, dword [ebp - 0x12ec]
mov dword [ebp - 0x12f0], eax
mov ecx, dword [ebp - 0x12e8]
mov dx, word [ecx]
mov word [ebp - 0x12f2], dx
mov eax, dword [ebp - 0x12ec]
mov cx, word [ebp - 0x12f2]
mov word [eax], cx
mov edx, dword [ebp - 0x12e8]
add edx, 2
mov dword [ebp - 0x12e8], edx
mov eax, dword [ebp - 0x12ec]
add eax, 2
mov dword [ebp - 0x12ec], eax
cmp word [ebp - 0x12f2], 0
jne 0x41bed8
jmp 0x41bf6c
mov dword [ebp - 4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.0041dab0
lea esp, [ebp - 0x1304]
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