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

Disassembly:
push 0xffffffffffffffff
push 0x451c48
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x4663d8]
xor eax, esp
mov dword [esp + 0x250], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4663d8]
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 0x41b8e0
cmp eax, eax
je 0x41b8e9
call fcn.00439412
mov eax, dword [esp + 0x18]
cmp edi, esi
je 0x41ba39
cmp eax, ebp
jne 0x41b8fe
call fcn.00439412
mov eax, dword [esp + 0x18]
cmp edi, dword [eax + 4]
jne 0x41b908
call fcn.00439412
cmp dword [edi + 0x24], 8
jb 0x41b913
mov eax, dword [edi + 0x10]
jmp 0x41b916
lea eax, [edi + 0x10]
push 0x4584a0
push eax
call fcn.004398a4
add esp, 8
test eax, eax
jne 0x41b973
mov edx, 0x45849c
call fcn.00401e60
test eax, eax
je 0x41b973
mov edx, dword [esp + 0x1c]
push 0x4584a0
push edx
call fcn.004398a4
add esp, 8
test eax, eax
jne 0x41b973
mov ecx, 0x45849c
call fcn.00401f00
mov ecx, eax
lea esi, [ecx + 2]
jmp 0x41b960
mov dx, word [ecx]
add ecx, 2
cmp dx, bp
jne 0x41b960
sub ecx, esi
sar ecx, 1
push ecx
push eax
jmp 0x41b9d1
mov esi, dword [esp + 0x18]
cmp edi, dword [esi + 4]
jne 0x41b981
call fcn.00439412
cmp dword [edi + 0x24], 8
jb 0x41b98c
mov eax, dword [edi + 0x10]
jmp 0x41b98f
lea eax, [edi + 0x10]
push eax
mov eax, dword [esp + 0x20]
push eax
call fcn.004398a4
add esp, 8
test eax, eax
jne 0x41b9d8
cmp edi, dword [esi + 4]
jne 0x41b9ab
call fcn.00439412
cmp dword [edi + 0x40], 8
jb 0x41b9b6
mov edx, dword [edi + 0x2c]
jmp 0x41b9b9
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 0x41b9c0
sub eax, esi
sar eax, 1
push eax
push edx
mov esi, ebx
call fcn.004040c0
cmp byte [edi + 0x45], 0
je 0x41b9e8
call fcn.00439412
jmp 0x41b8d1
mov eax, dword [edi + 8]
cmp byte [eax + 0x45], 0
jne 0x41ba0f
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x45], 0
jne 0x41b8d1
nop
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x45], 0
je 0x41ba00
jmp 0x41b8d1
mov eax, dword [edi + 4]
cmp byte [eax + 0x45], 0
jne 0x41b8cf
lea esp, [esp]
cmp edi, dword [eax + 8]
jne 0x41b8cf
mov edi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x45], 0
je 0x41ba20
jmp 0x41b8cf
cmp dword [ebx + 0x14], ebp
jne 0x41c00e
mov ebp, dword [esp + 0x1c]
xor bl, bl
cmp word [ebp], 0
je 0x41bb33
movzx eax, word [ebp]
cmp ax, 0x29
je 0x41bb33
cmp ax, 0x28
jne 0x41ba6e
mov bl, 1
jmp 0x41bb25
test bl, bl
movzx esi, ax
je 0x41bacd
or ecx, 0xffffffff
sub ecx, dword [esp + 0x54]
cmp ecx, 1
ja 0x41ba86
call fcn.004374f5
mov edi, dword [esp + 0x54]
add edi, 1
lea eax, [esp + 0x40]
call fcn.00404550
test al, al
je 0x41bb25
mov eax, dword [esp + 0x44]
mov ecx, 8
cmp dword [esp + 0x58], ecx
jae 0x41bab1
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 0x41bb1f
lea eax, [esp + 0x44]
jmp 0x41bb1f
or eax, 0xffffffff
sub eax, dword [esp + 0x38]
cmp eax, 1
ja 0x41bade
call fcn.004374f5
mov edi, dword [esp + 0x38]
add edi, 1
lea eax, [esp + 0x24]
call fcn.00404550
test al, al
je 0x41bb25
mov eax, dword [esp + 0x28]
mov ecx, 8
cmp dword [esp + 0x3c], ecx
jae 0x41bb05
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 0x41bb1f
lea eax, [esp + 0x28]
mov word [eax + edi*2], 0
add ebp, 2
cmp word [ebp], 0
jne 0x41ba53
lea eax, [esp + 0x24]
call fcn.00436c50
mov eax, dword [esp + 0x38]
push str.source
mov edi, 6
lea ecx, [esp + 0x28]
call fcn.00405220
test eax, eax
jne 0x41bb9f
mov eax, dword [0x468b50]
cmp dword [eax + 0xaec], 8
jb 0x41bb6d
mov edx, dword [eax + 0xad8]
jmp 0x41bb73
lea edx, [eax + 0xad8]
mov eax, edx
lea esi, [eax + 2]
jmp 0x41bb80
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41bb80
sub eax, esi
mov esi, dword [esp + 0x14]
sar eax, 1
push eax
push edx
call fcn.004040c0
jmp 0x41c00e
mov eax, dword [esp + 0x38]
push str.setup
mov edi, 5
lea ecx, [esp + 0x28]
call fcn.00405220
test eax, eax
jne 0x41bbf6
push 0x104
push 0x468f18
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, 0x468f18
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41bbd3
mov esi, dword [esp + 0x14]
sub eax, edx
sar eax, 1
push eax
push 0x468f18
call fcn.004040c0
jmp 0x41c00e
mov eax, dword [esp + 0x38]
push str.system
mov edi, 6
lea ecx, [esp + 0x28]
call fcn.00405220
test eax, eax
jne 0x41bc3f
push 0x104
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
test eax, eax
jne 0x41bc35
push 0x104
lea ecx, [esp + 0x60]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edx, dword [esp + 0x14]
push edx
jmp 0x41c005
mov esi, str.system64
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
jne 0x41bff0
mov esi, str.systemcuros
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
jne 0x41bff0
mov esi, str.windir
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bc97
push 0x104
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov ecx, dword [esp + 0x14]
push ecx
jmp 0x41c005
mov esi, str.progfilescuros
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bcee
call fcn.00431d40
test al, al
je 0x41bcd1
push 0x104
lea edx, [esp + 0x60]
push edx
push str.ProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, dword [esp + 0x14]
push ecx
jmp 0x41c005
lea eax, [esp + 0x5c]
push eax
push 0
push 0
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ecx, dword [esp + 0x14]
push ecx
jmp 0x41c005
mov esi, str.progfilesdir
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bd18
lea edx, [esp + 0x5c]
push edx
push 0
push 0
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
jmp 0x41c000
mov esi, str.progfilesdir64
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bd49
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 0x41c005
mov esi, str.startmenu
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
jne 0x41bfd6
mov esi, str.programstartmenu
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
jne 0x41bfd6
mov esi, str.CommonStartMenu
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bda4
lea eax, [esp + 0x5c]
push eax
push 0
push 0
push 0x16
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ecx, dword [esp + 0x14]
push ecx
jmp 0x41c005
mov esi, str.commonappsdir
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bdce
lea edx, [esp + 0x5c]
push edx
push 0
push 0
push 0x2b
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
jmp 0x41c000
mov esi, str.commonappsdir64
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bdff
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 0x41c005
mov esi, str.commonappsdircuros
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41be56
call fcn.00431d40
test al, al
je 0x41be39
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 0x41c005
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 0x41c005
mov esi, str.commondesktop
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41be85
lea eax, [esp + 0x5c]
push eax
push 0
push 0
push 0x19
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ecx, dword [esp + 0x14]
push ecx
jmp 0x41c005
mov esi, 0x459dc0
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bea6
mov edx, dword [esp + 0x14]
push edx
mov edx, 0x468c3a
jmp 0x41c009
mov esi, str.getstring
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bef0
cmp dword [esp + 0x58], 8
mov eax, dword [esp + 0x44]
jae 0x41bec7
lea eax, [esp + 0x44]
push 0x104
lea ecx, [esp + 0x60]
push ecx
push eax
call fcn.00439a49
add esp, 4
mov ecx, eax
mov edx, 0x468c28
call fcn.0042e710
mov edx, dword [esp + 0x14]
push edx
jmp 0x41c005
mov esi, str.resource
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bf13
call fcn.004124f0
mov ecx, dword [esp + 0x14]
push ecx
mov edx, eax
jmp 0x41c009
mov esi, str.getswitch
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bf64
mov edx, dword [esp + 0x44]
mov esi, 8
cmp dword [esp + 0x58], esi
jae 0x41bf38
lea edx, [esp + 0x44]
call fcn.00401e60
test eax, eax
je 0x41c00e
cmp dword [esp + 0x58], esi
mov ecx, dword [esp + 0x44]
jae 0x41bf53
lea ecx, [esp + 0x44]
call fcn.00401f00
mov edx, dword [esp + 0x14]
push edx
mov edx, eax
jmp 0x41c009
mov esi, str.getdriverversion
lea ecx, [esp + 0x24]
call fcn.004108d0
test al, al
je 0x41bfb8
mov eax, dword [esp + 0x44]
mov esi, 8
cmp dword [esp + 0x58], esi
jae 0x41bf89
lea eax, [esp + 0x44]
push eax
call fcn.00406db0
cmp eax, 0xffffffff
jne 0x41bfaa
cmp dword [esp + 0x58], esi
mov eax, dword [esp + 0x44]
jae 0x41bfa2
lea eax, [esp + 0x44]
push eax
push str.Driver__s_not_found__ignoring
jmp 0x41bfc2
call fcn.0040b1d0
mov ecx, dword [esp + 0x14]
push ecx
mov edx, eax
jmp 0x41c009
mov edx, dword [esp + 0x1c]
push edx
push str.Unknown_variable___s___ignoring
push 0x4676b8
mov eax, 1
call fcn.0042dae0
add esp, 0xc
jmp 0x41c00e
lea eax, [esp + 0x5c]
push eax
push 0
push 0
push 0x17
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ecx, dword [esp + 0x14]
push ecx
jmp 0x41c005
push 0x104
lea edx, [esp + 0x60]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov eax, dword [esp + 0x14]
push eax
lea edx, [esp + 0x60]
call fcn.00402b40
mov esi, 8
cmp dword [esp + 0x58], esi
jb 0x41c026
mov ecx, dword [esp + 0x44]
push ecx
call fcn.00439935
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 0x41c04c
mov edx, dword [esp + 0x28]
push edx
call fcn.00439935
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.00437ffa
add esp, 0x264
ret 4