Function at 0x4109a0
Capabilities:
Get common file path
Get program files directory
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x442668
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x4513e0]
xor eax, esp
mov dword [esp + 0x250], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4513e0]
xor eax, esp
push eax
lea eax, [esp + 0x26c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x27c]
mov ebx, edx
xor ebp, ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ebp
mov ecx, 7
mov dword [ebx + 0x18], ecx
mov dword [ebx + 0x14], ebp
mov dword [esp + 0x14], ebx
mov word [ebx + 4], bp
mov edx, 1
mov dword [esp + 0x20], edx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x38], ebp
mov word [esp + 0x28], bp
mov dword [esp + 0x274], edx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x54], ebp
mov word [esp + 0x44], bp
add eax, 0xc
mov byte [esp + 0x274], 2
mov dword [esp + 0x18], eax
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov edi, eax
mov eax, dword [esp + 0x18]
cmp eax, ebp
mov esi, dword [eax + 4]
je 0x410a50
cmp eax, eax
je 0x410a59
call fcn.00429e93
mov eax, dword [esp + 0x18]
cmp edi, esi
je 0x410ba9
cmp eax, ebp
jne 0x410a6e
call fcn.00429e93
mov eax, dword [esp + 0x18]
cmp edi, dword [eax + 4]
jne 0x410a78
call fcn.00429e93
cmp dword [edi + 0x24], 8
jb 0x410a83
mov eax, dword [edi + 0x10]
jmp 0x410a86
lea eax, [edi + 0x10]
push 0x44718c
push eax
call fcn.0042a42f
add esp, 8
test eax, eax
jne 0x410ae3
mov edx, 0x447188
call fcn.004051c0
test eax, eax
je 0x410ae3
mov edx, dword [esp + 0x1c]
push 0x44718c
push edx
call fcn.0042a42f
add esp, 8
test eax, eax
jne 0x410ae3
mov ecx, 0x447188
call fcn.00405260
mov ecx, eax
lea esi, [ecx + 2]
jmp 0x410ad0
mov dx, word [ecx]
add ecx, 2
cmp dx, bp
jne 0x410ad0
sub ecx, esi
sar ecx, 1
push ecx
push eax
jmp 0x410b41
mov esi, dword [esp + 0x18]
cmp edi, dword [esi + 4]
jne 0x410af1
call fcn.00429e93
cmp dword [edi + 0x24], 8
jb 0x410afc
mov eax, dword [edi + 0x10]
jmp 0x410aff
lea eax, [edi + 0x10]
push eax
mov eax, dword [esp + 0x20]
push eax
call fcn.0042a42f
add esp, 8
test eax, eax
jne 0x410b48
cmp edi, dword [esi + 4]
jne 0x410b1b
call fcn.00429e93
cmp dword [edi + 0x40], 8
jb 0x410b26
mov edx, dword [edi + 0x2c]
jmp 0x410b29
lea edx, [edi + 0x2c]
mov eax, edx
lea esi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x410b30
sub eax, esi
sar eax, 1
push eax
push edx
mov esi, ebx
call fcn.004035b0
cmp byte [edi + 0x45], 0
je 0x410b58
call fcn.00429e93
jmp 0x410a41
mov eax, dword [edi + 8]
cmp byte [eax + 0x45], 0
jne 0x410b7f
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x45], 0
jne 0x410a41
nop
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x45], 0
je 0x410b70
jmp 0x410a41
mov eax, dword [edi + 4]
cmp byte [eax + 0x45], 0
jne 0x410a3f
lea esp, [esp]
cmp edi, dword [eax + 8]
jne 0x410a3f
mov edi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x45], 0
je 0x410b90
jmp 0x410a3f
cmp dword [ebx + 0x14], ebp
jne 0x411114
mov ebp, dword [esp + 0x1c]
xor bl, bl
cmp word [ebp], 0
je 0x410ca3
movzx eax, word [ebp]
cmp ax, 0x29
je 0x410ca3
cmp ax, 0x28
jne 0x410bde
mov bl, 1
jmp 0x410c95
test bl, bl
movzx esi, ax
je 0x410c3d
or ecx, 0xffffffff
sub ecx, dword [esp + 0x54]
cmp ecx, 1
ja 0x410bf6
call fcn.00427e30
mov edi, dword [esp + 0x54]
add edi, 1
lea eax, [esp + 0x40]
call fcn.00403e80
test al, al
je 0x410c95
mov eax, dword [esp + 0x44]
mov ecx, 8
cmp dword [esp + 0x58], ecx
jae 0x410c21
lea eax, [esp + 0x44]
mov edx, dword [esp + 0x54]
mov word [eax + edx*2], si
cmp dword [esp + 0x58], ecx
mov eax, dword [esp + 0x44]
mov dword [esp + 0x54], edi
jae 0x410c8f
lea eax, [esp + 0x44]
jmp 0x410c8f
or eax, 0xffffffff
sub eax, dword [esp + 0x38]
cmp eax, 1
ja 0x410c4e
call fcn.00427e30
mov edi, dword [esp + 0x38]
add edi, 1
lea eax, [esp + 0x24]
call fcn.00403e80
test al, al
je 0x410c95
mov eax, dword [esp + 0x28]
mov ecx, 8
cmp dword [esp + 0x3c], ecx
jae 0x410c75
lea eax, [esp + 0x28]
mov edx, dword [esp + 0x38]
mov word [eax + edx*2], si
cmp dword [esp + 0x3c], ecx
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], edi
jae 0x410c8f
lea eax, [esp + 0x28]
mov word [eax + edi*2], 0
add ebp, 2
cmp word [ebp], 0
jne 0x410bc3
lea eax, [esp + 0x24]
call fcn.004275c0
mov eax, dword [esp + 0x38]
push str.source
mov edi, 6
lea ecx, [esp + 0x28]
call fcn.00404360
test eax, eax
jne 0x410d0f
mov eax, dword [0x453b6c]
cmp dword [eax + 0xaec], 8
jb 0x410cdd
mov edx, dword [eax + 0xad8]
jmp 0x410ce3
lea edx, [eax + 0xad8]
mov eax, edx
lea esi, [eax + 2]
jmp 0x410cf0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x410cf0
sub eax, esi
mov esi, dword [esp + 0x14]
sar eax, 1
push eax
push edx
call fcn.004035b0
jmp 0x411114
mov eax, dword [esp + 0x38]
push str.setup
mov edi, 5
lea ecx, [esp + 0x28]
call fcn.00404360
test eax, eax
jne 0x410d66
push 0x104
push 0x453f28
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, 0x453f28
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x410d43
mov esi, dword [esp + 0x14]
sub eax, edx
sar eax, 1
push eax
push 0x453f28
call fcn.004035b0
jmp 0x411114
mov eax, dword [esp + 0x38]
push str.system
mov edi, 6
lea ecx, [esp + 0x28]
call fcn.00404360
test eax, eax
jne 0x410daf
push 0x104
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
test eax, eax
jne 0x410da5
push 0x104
lea ecx, [esp + 0x60]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edx, dword [esp + 0x14]
push edx
jmp 0x41110b
mov esi, str.system64
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
jne 0x4110f6
mov esi, str.systemcuros
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
jne 0x4110f6
mov esi, str.windir
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x410e02
push 0x104
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x411106
mov esi, str.progfilescuros
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x410e4f
call fcn.004232a0
test al, al
je 0x410e37
push 0x104
lea edx, [esp + 0x60]
push edx
push str.ProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x411106
lea eax, [esp + 0x5c]
push eax
push 0
push 0
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
jmp 0x411106
mov esi, str.progfilesdir
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x410e7e
lea edx, [esp + 0x5c]
push edx
push 0
push 0
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov eax, dword [esp + 0x14]
push eax
jmp 0x41110b
mov esi, str.progfilesdir64
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x410eaf
push 0x104
lea ecx, [esp + 0x60]
push ecx
push str.ProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, dword [esp + 0x14]
push edx
jmp 0x41110b
mov esi, str.startmenu
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
jne 0x4110dc
mov esi, str.programstartmenu
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
jne 0x4110dc
mov esi, str.CommonStartMenu
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x410f05
lea eax, [esp + 0x5c]
push eax
push 0
push 0
push 0x16
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
jmp 0x411106
mov esi, str.commonappsdir
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x410f34
lea edx, [esp + 0x5c]
push edx
push 0
push 0
push 0x2b
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov eax, dword [esp + 0x14]
push eax
jmp 0x41110b
mov esi, str.commonappsdir64
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x410f65
push 0x104
lea ecx, [esp + 0x60]
push ecx
push str.CommonProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, dword [esp + 0x14]
push edx
jmp 0x41110b
mov esi, str.commonappsdircuros
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x410fbc
call fcn.004232a0
test al, al
je 0x410f9f
push 0x104
lea eax, [esp + 0x60]
push eax
push str.CommonProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, dword [esp + 0x14]
push edx
jmp 0x41110b
lea ecx, [esp + 0x5c]
push ecx
push 0
push 0
push 0x2b
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edx, dword [esp + 0x14]
push edx
jmp 0x41110b
mov esi, str.commondesktop
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x410fe6
lea eax, [esp + 0x5c]
push eax
push 0
push 0
push 0x19
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
jmp 0x411106
mov esi, 0x448a28
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x411007
mov edx, dword [esp + 0x14]
push edx
mov edx, 0x453c4a
jmp 0x41110f
mov esi, str.getstring
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x411051
cmp dword [esp + 0x58], 8
mov eax, dword [esp + 0x44]
jae 0x411028
lea eax, [esp + 0x44]
push 0x104
lea ecx, [esp + 0x60]
push ecx
push eax
call fcn.0042a4d1
add esp, 4
mov ecx, eax
mov edx, 0x453c38
call fcn.0041fc10
mov edx, dword [esp + 0x14]
push edx
jmp 0x41110b
mov esi, str.resource
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x411074
call fcn.00408240
mov ecx, dword [esp + 0x14]
push ecx
mov edx, eax
jmp 0x41110f
mov esi, str.getswitch
lea ecx, [esp + 0x24]
call fcn.00419e40
test al, al
je 0x4110be
mov edx, dword [esp + 0x44]
mov esi, 8
cmp dword [esp + 0x58], esi
jae 0x411099
lea edx, [esp + 0x44]
call fcn.004051c0
test eax, eax
je 0x411114
cmp dword [esp + 0x58], esi
mov ecx, dword [esp + 0x44]
jae 0x4110b0
lea ecx, [esp + 0x44]
call fcn.00405260
mov edx, dword [esp + 0x14]
push edx
mov edx, eax
jmp 0x41110f
mov eax, dword [esp + 0x1c]
push eax
push str.Unknown_variable___s___ignoring
push 0x4524d8
mov eax, 1
call fcn.0041eee0
add esp, 0xc
jmp 0x411114
lea ecx, [esp + 0x5c]
push ecx
push 0
push 0
push 0x17
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edx, dword [esp + 0x14]
push edx
jmp 0x41110b
push 0x104
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ecx, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x60]
call fcn.00402860
mov esi, 8
cmp dword [esp + 0x58], esi
jb 0x41112c
mov edx, dword [esp + 0x44]
push edx
call fcn.00429d64
add esp, 4
xor eax, eax
cmp dword [esp + 0x3c], esi
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], eax
mov word [esp + 0x44], ax
jb 0x411152
mov eax, dword [esp + 0x28]
push eax
call fcn.00429d64
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x26c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x250]
xor ecx, esp
call fcn.004289ca
add esp, 0x264
ret 4