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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005c316
mov eax, dword fs:[0]
push eax
sub esp, 0x6b8
mov eax, dword [0x10080440]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x6c4], 0
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 4], 0
test esi, esi
jne 0x10017ca3
push 0x1005f708
mov ecx, ebx
call fcn.1000f3b0
mov ecx, dword [ebp + 0x20]
cmp ecx, 8
jb 0x10018708
inc ecx
push ecx
push dword [ebp + 0xc]
lea ecx, [ebp + 0xc]
call fcn.10008830
jmp 0x10018708
mov edi, dword [ebp + 0x20]
lea eax, [ebp + 0xc]
push 3
cmp edi, 8
push 0x10062588
cmovae eax, dword [ebp + 0xc]
push esi
push eax
call fcn.1000f320
add esp, 0x10
test eax, eax
jne 0x10017d34
push 0x208
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.10044800
push 0
push 0x26
lea eax, [ebp - 0x218]
push eax
push 0
call fcn.10019280
lea edi, [ebp - 0x218]
add esp, 0x1c
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x10017cf5
mov eax, dword [0x10060018]
mov ecx, ebx
mov dword [edi], eax
lea eax, [ebp - 0x218]
push eax
call fcn.1000f3b0
mov eax, dword [ebp + 0x20]
cmp eax, 8
jb 0x10018708
inc eax
lea ecx, [ebp + 0xc]
push eax
push dword [ebp + 0xc]
call fcn.10008830
jmp 0x10018708
push 3
cmp edi, 8
lea eax, [ebp + 0xc]
push 0x10062590
cmovae eax, dword [ebp + 0xc]
push esi
push eax
call fcn.1000f320
add esp, 0x10
test eax, eax
jne 0x10017da9
push 0x208
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.10044800
push 0
push 5
lea eax, [ebp - 0x218]
push eax
push 0
call fcn.10019280
lea edi, [ebp - 0x218]
add esp, 0x1c
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x10017d83
mov eax, dword [0x10060018]
mov dword [edi], eax
lea eax, [ebp - 0x218]
mov ecx, ebx
push eax
call fcn.1000f3b0
jmp 0x10018700
lea eax, [ebp + 0xc]
push str.desktop
push eax
call fcn.10017550
add esp, 8
test al, al
je 0x10017e06
push 0
push 0
lea eax, [ebp - 0x424]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x424]
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x10017de0
mov eax, dword [0x10060018]
mov ecx, ebx
mov dword [edi], eax
lea eax, [ebp - 0x424]
push eax
call fcn.1000f3b0
jmp 0x10018700
lea eax, [ebp + 0xc]
push 0x100625a8
push eax
call fcn.10017550
add esp, 8
test al, al
je 0x10017e4e
push 0
push 6
lea eax, [ebp - 0x424]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x424]
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x10017e40
jmp 0x10017dec
lea eax, [ebp + 0xc]
push str.program
push eax
call fcn.10017550
add esp, 8
test al, al
je 0x10017f1d
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.10044800
push 0
push 0x26
lea eax, [ebp - 0x218]
push eax
push 0
call fcn.10019280
lea ecx, [ebp - 0x218]
add esp, 0x1c
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10017ea0
sub ecx, edx
sar ecx, 1
cmp ecx, 3
jl 0x10017d96
push 0x208
lea eax, [ebp - 0x424]
push 0
push eax
call fcn.10044800
push 3
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x424]
push eax
call fcn.1004b35e
lea edi, [ebp - 0x424]
add esp, 0x18
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10017ef0
mov ecx, 7
lea eax, [ebp - 0x424]
mov esi, str.Program_Files_
rep movsd dword es:[edi], dword [esi]
push eax
mov ecx, ebx
movsw word es:[edi], word [esi]
call fcn.1000f3b0
jmp 0x10018700
lea eax, [ebp + 0xc]
push str.curr
push eax
call fcn.10017550
add esp, 8
test al, al
je 0x10017f86
push 0x208
lea eax, [ebp - 0x424]
push 0
push eax
call fcn.10044800
add esp, 0xc
lea eax, [ebp - 0x424]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x424]
push 0x5c
push eax
call fcn.10045e32
xor ecx, ecx
add esp, 8
mov word [eax + 2], cx
lea eax, [ebp - 0x424]
push eax
mov ecx, ebx
call fcn.1000f3b0
jmp 0x10018700
lea eax, [ebp + 0xc]
push str.temp
push eax
call fcn.10017550
add esp, 8
test al, al
je 0x100180af
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.10044800
push 0x208
lea eax, [ebp - 0x424]
push 0
push eax
call fcn.10044800
add esp, 0x18
call fcn.10018a00
test al, al
je 0x10018040
push 0
push 0x1c
lea eax, [ebp - 0x218]
push eax
push 0
call fcn.10019280
add esp, 0x10
test eax, eax
je 0x1001809c
lea ecx, [ebp - 0x218]
add ecx, 0xfffffffe
nop word [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10018000
mov eax, dword [str.Temp_]
mov dword [ecx], eax
mov eax, dword [0x100625fc]
mov dword [ecx + 4], eax
mov eax, dword [0x10062600]
mov dword [ecx + 8], eax
mov ax, word [0x10062604]
mov word [ecx + 0xc], ax
lea eax, [ebp - 0x218]
push eax
mov ecx, ebx
call fcn.1000f3b0
jmp 0x10018700
lea eax, [ebp - 0x424]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x104
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10018074
sub ecx, edx
sar ecx, 1
jne 0x1001809c
push 0x104
lea eax, [ebp - 0x218]
push eax
push str.TEMP
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x218]
mov ecx, ebx
push eax
call fcn.1000f3b0
jmp 0x10018700
lea eax, [ebp + 0xc]
push str.recirle
push eax
call fcn.10017550
add esp, 8
test al, al
je 0x100180ff
push 0x208
lea eax, [ebp - 0x424]
push 0
push eax
call fcn.10044800
push 0
push 0xa
lea eax, [ebp - 0x424]
push eax
push 0
call fcn.10019280
add esp, 0x1c
lea eax, [ebp - 0x424]
mov ecx, ebx
push eax
call fcn.1000f3b0
jmp 0x10018700
lea eax, [ebp + 0xc]
push str.downloads
push eax
call fcn.10017550
add esp, 8
test al, al
je 0x1001825e
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.10044800
push 0
push 0x10
lea eax, [ebp - 0x218]
push eax
push 0
call fcn.10019280
lea ecx, [ebp - 0x218]
add esp, 0x1c
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10018150
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
je 0x100181d1
push 0x5c
push eax
call fcn.10045e32
xor ecx, ecx
add esp, 8
mov word [eax + 2], cx
lea ecx, [ebp - 0x218]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10018181
mov eax, dword [0x10062638]
mov dword [ecx], eax
mov eax, dword [0x1006263c]
mov dword [ecx + 4], eax
mov eax, dword [0x10062640]
mov dword [ecx + 8], eax
mov eax, dword [0x10062644]
mov dword [ecx + 0xc], eax
mov eax, dword [0x10062648]
mov dword [ecx + 0x10], eax
mov ax, word [0x1006264c]
mov word [ecx + 0x14], ax
lea eax, [ebp - 0x218]
push eax
mov ecx, ebx
call fcn.1000f3b0
jmp 0x10018700
push 0x104
push eax
push str.USERPROFILE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100181f0
sub ecx, edx
sar ecx, 1
je 0x1001824b
lea ecx, [ebp - 0x218]
add ecx, 0xfffffffe
nop word [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10018210
mov eax, dword [str.Downloads_]
mov dword [ecx], eax
mov eax, dword [0x1006266c]
mov dword [ecx + 4], eax
mov eax, dword [0x10062670]
mov dword [ecx + 8], eax
mov eax, dword [0x10062674]
mov dword [ecx + 0xc], eax
mov eax, dword [0x10062678]
mov dword [ecx + 0x10], eax
mov eax, dword [0x1006267c]
mov dword [ecx + 0x14], eax
lea eax, [ebp - 0x218]
mov ecx, ebx
push eax
call fcn.1000f3b0
jmp 0x10018700
xor eax, eax
mov dword [ebp - 0x630], 7
mov dword [ebp - 0x634], 0
mov word [ebp - 0x644], ax
push 0x208
push eax
lea eax, [ebp - 0x62c]
mov byte [ebp - 4], 1
push eax
call fcn.10044800
add esp, 0xc
lea eax, [ebp - 0x62c]
push 0x104
push eax
push str.USERPROFILE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edi, [ebp - 0x62c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x100182b4
mov ecx, 9
lea eax, [ebp - 0x62c]
mov esi, str.AppDataLocalLow_
rep movsd dword es:[edi], dword [esi]
push eax
lea ecx, [ebp - 0x644]
movsw word es:[edi], word [esi]
call fcn.1000f970
lea eax, [ebp + 0xc]
push str.locallow
push eax
call fcn.10017550
add esp, 8
test al, al
je 0x100183d2
push 0
push 0x1a
lea eax, [ebp - 0x62c]
push eax
push 0
call fcn.10019280
add esp, 0x10
lea eax, [ebp - 0x62c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x62c]
push eax
lea ecx, [ebp - 0x68c]
call fcn.1000f3b0
push str.LocalLow
lea ecx, [ebp - 0x674]
mov byte [ebp - 4], 2
call fcn.1000f3b0
push str.Roaming
lea ecx, [ebp - 0x65c]
mov byte [ebp - 4], 3
call fcn.1000f3b0
lea eax, [ebp - 0x674]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x65c]
push eax
lea eax, [ebp - 0x68c]
push eax
call fcn.1001d4d0
add esp, 0xc
lea ecx, [ebp - 0x65c]
call fcn.10007740
lea ecx, [ebp - 0x674]
mov byte [ebp - 4], 2
call fcn.10007740
cmp dword [ebp - 0x678], 8
lea eax, [ebp - 0x68c]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmovae eax, dword [ebp - 0x68c]
push eax
call esi
test eax, eax
je 0x100183c7
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x68c]
push eax
lea ecx, [ebp - 0x644]
call fcn.10008610
lea ecx, [ebp - 0x68c]
jmp 0x10018687
lea eax, [ebp + 0xc]
push str.roaming
push eax
call fcn.10017550
add esp, 8
test al, al
jne 0x1001858f
lea eax, [ebp + 0xc]
push str.Roaming
push eax
call fcn.10017550
add esp, 8
test al, al
jne 0x1001858f
lea eax, [ebp + 0xc]
push str.local
push eax
call fcn.10017550
add esp, 8
test al, al
je 0x1001851a
push 0
push 0x1c
lea eax, [ebp - 0x62c]
push eax
push 0
call fcn.10019280
add esp, 0x10
lea eax, [ebp - 0x62c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x62c]
push eax
call esi
test eax, eax
je 0x10018469
lea eax, [ebp - 0x62c]
push eax
lea ecx, [ebp - 0x644]
call fcn.1000f970
jmp 0x10018690
lea eax, [ebp - 0x644]
push eax
lea ecx, [ebp - 0x6a4]
call fcn.100154d0
push str.Local
lea ecx, [ebp - 0x65c]
mov byte [ebp - 4], 8
call fcn.1000f3b0
push str.LocalLow
lea ecx, [ebp - 0x674]
mov byte [ebp - 4], 9
call fcn.1000f3b0
lea eax, [ebp - 0x65c]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x674]
push eax
lea eax, [ebp - 0x6a4]
push eax
call fcn.1001d4d0
add esp, 0xc
lea ecx, [ebp - 0x674]
call fcn.10007740
lea ecx, [ebp - 0x65c]
mov byte [ebp - 4], 8
call fcn.10007740
cmp dword [ebp - 0x690], 8
lea eax, [ebp - 0x6a4]
cmovae eax, dword [ebp - 0x6a4]
push eax
call esi
test eax, eax
je 0x1001850f
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x6a4]
push eax
lea ecx, [ebp - 0x644]
call fcn.10008610
lea ecx, [ebp - 0x6a4]
jmp 0x10018687
lea eax, [ebp + 0xc]
push str.system
push eax
call fcn.10017550
add esp, 8
test al, al
je 0x1001857f
push 0
push 0x29
lea eax, [ebp - 0x62c]
push eax
push 0
call fcn.10019280
add esp, 0x10
lea eax, [ebp - 0x62c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x62c]
push eax
call esi
test eax, eax
je 0x10018690
lea eax, [ebp - 0x62c]
push eax
lea ecx, [ebp - 0x644]
call fcn.1000f970
jmp 0x10018690
lea eax, [ebp + 0xc]
mov ecx, ebx
push eax
call fcn.10014ee0
jmp 0x100186f5
push 0
push 0x1a
lea eax, [ebp - 0x62c]
push eax
push 0
call fcn.10019280
add esp, 0x10
lea eax, [ebp - 0x62c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x62c]
push eax
call esi
test eax, eax
je 0x100185db
lea eax, [ebp - 0x62c]
push eax
lea ecx, [ebp - 0x644]
call fcn.1000f970
jmp 0x10018690
lea eax, [ebp - 0x644]
push eax
lea ecx, [ebp - 0x6bc]
call fcn.100154d0
push str.Roaming
lea ecx, [ebp - 0x65c]
mov byte [ebp - 4], 5
call fcn.1000f3b0
push str.LocalLow
lea ecx, [ebp - 0x674]
mov byte [ebp - 4], 6
call fcn.1000f3b0
lea eax, [ebp - 0x65c]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x674]
push eax
lea eax, [ebp - 0x6bc]
push eax
call fcn.1001d4d0
add esp, 0xc
lea ecx, [ebp - 0x674]
call fcn.10007740
lea ecx, [ebp - 0x65c]
mov byte [ebp - 4], 5
call fcn.10007740
cmp dword [ebp - 0x6a8], 8
lea eax, [ebp - 0x6bc]
cmovae eax, dword [ebp - 0x6bc]
push eax
call esi
test eax, eax
je 0x10018681
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x6bc]
push eax
lea ecx, [ebp - 0x644]
call fcn.10008610
lea ecx, [ebp - 0x6bc]
mov byte [ebp - 4], 1
call fcn.10007740
cmp dword [ebp - 0x630], 8
lea eax, [ebp - 0x644]
cmovae eax, dword [ebp - 0x644]
push eax
call esi
test eax, eax
je 0x100186e9
push 0
push str.system32
lea ecx, [ebp - 0x644]
call fcn.10019300
cmp eax, 0xffffffff
jne 0x100186e9
push 0
push str.systemprofile
lea ecx, [ebp - 0x644]
call fcn.10019300
cmp eax, 0xffffffff
jne 0x100186e9
lea eax, [ebp - 0x644]
mov ecx, ebx
push eax
call fcn.10014ee0
jmp 0x100186f5
push 0x1005f708
mov ecx, ebx
call fcn.1000f3b0
lea ecx, [ebp - 0x644]
call fcn.10007740
lea ecx, [ebp + 0xc]
call fcn.10007740
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1002c484
mov esp, ebp
pop ebp
ret