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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4518f1
mov eax, dword fs:[0]
push eax
sub esp, 0x378
mov eax, dword [0x468744]
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 eax, dword [ebp + 8]
mov ebx, edx
mov dword [ebp - 0x2d0], ecx
xor ecx, ecx
mov dword [ebp - 0x2d8], ecx
mov esi, 7
xor edx, edx
mov dword [ebx + 0x14], esi
mov dword [ebx + 0x10], ecx
mov dword [ebp - 0x2d4], eax
mov dword [ebp - 0x2cc], ebx
mov word [ebx], dx
mov edx, 1
xor edi, edi
mov dword [ebp - 0x2d8], edx
mov dword [ebp - 0x224], esi
mov dword [ebp - 0x228], ecx
mov word [ebp - 0x238], di
mov dword [ebp - 4], edx
xor edx, edx
mov dword [ebp - 0x240], esi
mov dword [ebp - 0x244], ecx
mov word [ebp - 0x254], dx
mov byte [ebp - 4], 2
mov eax, dword [eax + 0x10]
mov edi, dword [eax]
cmp edi, eax
je 0x41ab3a
cmp dword [edi + 0x20], 8
lea esi, [edi + 0xc]
jb 0x41aa43
mov eax, dword [esi]
jmp 0x41aa45
mov eax, esi
push 0x4586c8
push eax
call fcn.0043a345
add esp, 8
test eax, eax
jne 0x41aa9d
push 0x4586c4
call fcn.00402130
test eax, eax
je 0x41aa9d
mov eax, dword [ebp - 0x2d0]
push 0x4586c8
push eax
call fcn.0043a345
add esp, 8
test eax, eax
jne 0x41aa9d
mov ecx, 0x4586c4
call fcn.00402200
mov ecx, eax
lea esi, [ecx + 2]
lea esp, [esp]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x41aa90
jmp 0x41aadb
cmp dword [esi + 0x14], 8
jb 0x41aaa5
mov esi, dword [esi]
mov ecx, dword [ebp - 0x2d0]
push esi
push ecx
call fcn.0043a345
add esp, 8
test eax, eax
jne 0x41aae7
cmp dword [edi + 0x3c], 8
lea eax, [edi + 0x28]
jb 0x41aac4
mov eax, dword [eax]
mov ecx, eax
lea esi, [ecx + 2]
lea esp, [esp]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x41aad0
sub ecx, esi
sar ecx, 1
push ecx
mov esi, ebx
call fcn.00406580
cmp byte [edi + 0x45], 0
jne 0x41ab29
mov ecx, dword [edi + 8]
cmp byte [ecx + 0x45], 0
jne 0x41ab0e
mov eax, dword [ecx]
cmp byte [eax + 0x45], 0
jne 0x41ab0a
mov edi, edi
mov ecx, eax
mov eax, dword [ecx]
cmp byte [eax + 0x45], 0
je 0x41ab00
mov edi, ecx
jmp 0x41ab29
mov eax, dword [edi + 4]
cmp byte [eax + 0x45], 0
jne 0x41ab27
cmp edi, dword [eax + 8]
jne 0x41ab27
mov edi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x45], 0
je 0x41ab17
mov edi, eax
mov edx, dword [ebp - 0x2d4]
cmp edi, dword [edx + 0x10]
jne 0x41aa36
xor ecx, ecx
cmp dword [ebx + 0x10], ecx
jne 0x41ae59
mov edi, dword [ebp - 0x2d0]
cmp word [edi], 0
mov byte [ebp - 0x2c5], 0
je 0x41ab97
movzx eax, word [edi]
cmp eax, 0x29
je 0x41ab97
cmp eax, 0x28
jne 0x41ab6c
mov byte [ebp - 0x2c5], 1
jmp 0x41ab8e
cmp byte [ebp - 0x2c5], 0
mov ebx, eax
lea esi, [ebp - 0x254]
jne 0x41ab83
lea esi, [ebp - 0x238]
call fcn.00420dc0
mov ebx, dword [ebp - 0x2cc]
add edi, 2
cmp word [edi], 0
jne 0x41ab56
lea eax, [ebp - 0x238]
call fcn.004370e0
mov eax, dword [ebp - 0x228]
push str.source
mov edi, 6
lea ecx, [ebp - 0x238]
call fcn.00404ab0
test eax, eax
jne 0x41abfc
mov eax, dword [0x46ae98]
add eax, 0xcd0
cmp dword [eax + 0x14], 8
jb 0x41abd3
mov eax, dword [eax]
mov ecx, eax
lea esi, [ecx + 2]
jmp 0x41abe0
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x41abe0
sub ecx, esi
sar ecx, 1
push ecx
mov esi, ebx
call fcn.00406580
jmp 0x41ae59
mov eax, dword [ebp - 0x228]
push str.setup
mov edi, 5
lea ecx, [ebp - 0x238]
call fcn.00404ab0
test eax, eax
jne 0x41aec9
mov eax, 7
xor edi, edi
xor ecx, ecx
mov dword [ebp - 0x294], eax
mov dword [ebp - 0x298], edi
mov word [ebp - 0x2a8], cx
xor edx, edx
mov dword [ebp - 0x278], eax
mov dword [ebp - 0x27c], edi
mov word [ebp - 0x28c], dx
mov byte [ebp - 4], 4
mov eax, dword [0x46ae98]
add eax, 0xcd0
cmp dword [eax + 0x14], 8
jb 0x41ac66
mov eax, dword [eax]
mov ecx, eax
lea esi, [ecx + 2]
jmp 0x41ac70
mov dx, word [ecx]
add ecx, 2
cmp dx, di
jne 0x41ac70
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [ebp - 0x2a8]
call fcn.00406580
push 0x104
push 0x46b4b0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x46b4b0
call dword [sym.imp.SHLWAPI.dll_PathStripPathW]
mov eax, 0x46b4b0
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41acb0
sub eax, edx
sar eax, 1
push eax
mov eax, 0x46b4b0
lea esi, [ebp - 0x28c]
call fcn.00406580
lea eax, [ebp - 0x2a8]
push eax
lea ecx, [ebp - 0x270]
push ecx
call fcn.00422010
add esp, 8
mov ecx, eax
mov eax, esi
lea ebx, [ebp - 0x2c4]
mov byte [ebp - 4], 5
call fcn.00421ef0
mov byte [ebp - 4], 6
mov ebx, dword [ebp - 0x2cc]
mov edi, eax
mov esi, ebx
call fcn.00404010
cmp dword [ebp - 0x2b0], 8
jb 0x41ad24
mov edx, dword [ebp - 0x2c4]
push edx
call fcn.00439b10
add esp, 4
xor eax, eax
mov esi, 8
mov byte [ebp - 4], 4
mov dword [ebp - 0x2b0], 7
mov dword [ebp - 0x2b4], 0
mov word [ebp - 0x2c4], ax
cmp dword [ebp - 0x25c], esi
jb 0x41ad61
mov ecx, dword [ebp - 0x270]
push ecx
call fcn.00439b10
add esp, 4
cmp dword [ebx + 0x14], esi
jb 0x41ad6a
mov eax, dword [ebx]
jmp 0x41ad6c
mov eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41ae03
lea edx, [ebp - 0x2a8]
push edx
lea eax, [ebp - 0x2c4]
push eax
call fcn.00422010
push eax
mov eax, 0x45a02c
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 7
call fcn.00421fc0
add esp, 0xc
mov edi, eax
mov esi, ebx
mov byte [ebp - 4], 8
call fcn.00404010
lea esi, [ebp - 0x270]
call fcn.0042dc30
lea esi, [ebp - 0x2c4]
mov byte [ebp - 4], 4
call fcn.0042dc30
cmp dword [ebx + 0x14], 8
jb 0x41add8
mov eax, dword [ebx]
jmp 0x41adda
mov eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41ae03
push 0x104
push 0x46b4b0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebx
mov eax, 0x46b4b0
call fcn.00402560
mov esi, 8
cmp dword [ebp - 0x278], esi
jb 0x41ae1f
mov ecx, dword [ebp - 0x28c]
push ecx
call fcn.00439b10
add esp, 4
xor edx, edx
mov dword [ebp - 0x278], 7
mov dword [ebp - 0x27c], 0
mov word [ebp - 0x28c], dx
cmp dword [ebp - 0x294], esi
jb 0x41ae53
mov eax, dword [ebp - 0x2a8]
push eax
call fcn.00439b10
add esp, 4
mov ebx, dword [ebp - 0x2cc]
mov esi, 8
cmp dword [ebp - 0x240], esi
jb 0x41ae75
mov edx, dword [ebp - 0x254]
push edx
call fcn.00439b10
add esp, 4
xor eax, eax
mov dword [ebp - 0x240], 7
mov dword [ebp - 0x244], 0
mov word [ebp - 0x254], ax
cmp dword [ebp - 0x224], esi
jb 0x41aea9
mov ecx, dword [ebp - 0x238]
push ecx
call fcn.00439b10
add esp, 4
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 - 0x14]
xor ecx, ebp
call fcn.00438786
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x228]
push str.system
mov edi, 6
lea ecx, [ebp - 0x238]
call fcn.00404ab0
test eax, eax
jne 0x41af42
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
test eax, eax
jne 0x41af10
push 0x104
lea edx, [ebp - 0x21c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x21c]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41af20
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
mov esi, ebx
call fcn.00406580
jmp 0x41ae59
mov eax, dword [ebp - 0x228]
push str.system64
mov edi, 8
lea ecx, [ebp - 0x238]
call fcn.00404ab0
test eax, eax
je 0x41b5fb
mov esi, str.systemcuros
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
jne 0x41b5fb
mov esi, str.windir
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41afb4
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push ebx
lea eax, [ebp - 0x21c]
call fcn.00402560
jmp 0x41ae59
mov esi, str.progfilescuros
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b00b
call fcn.00431270
test al, al
je 0x41aff9
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
push str.ProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push ebx
lea eax, [ebp - 0x21c]
call fcn.00402560
jmp 0x41ae59
lea edx, [ebp - 0x21c]
push edx
push 0
push 0
push 0x26
jmp 0x41b24c
mov esi, str.progfilesdir
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b031
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
push 0x26
jmp 0x41b24c
mov esi, str.progfilesdir64
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b06d
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
push str.ProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push ebx
lea eax, [ebp - 0x21c]
call fcn.00402560
jmp 0x41ae59
mov esi, str.progdata
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b093
lea edx, [ebp - 0x21c]
push edx
push 0
push 0
push 0x23
jmp 0x41b24c
mov esi, str.userdata
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b0b9
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
push 0x1a
jmp 0x41b24c
mov esi, str.langid
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b12e
lea ecx, [ebp - 0x384]
push ecx
call fcn.00402710
mov byte [ebp - 4], 9
movzx edx, word [0x46af98]
push edx
lea eax, [ebp - 0x374]
push eax
call fcn.0041faf0
lea ecx, [ebp - 0x270]
lea eax, [ebp - 0x384]
call fcn.004027b0
mov edi, eax
mov esi, ebx
mov byte [ebp - 4], 0xa
call fcn.00404010
lea esi, [ebp - 0x270]
call fcn.0042dc30
lea ecx, [ebp - 0x384]
mov byte [ebp - 4], 2
call fcn.00401bf0
jmp 0x41ae59
mov esi, str.startmenu
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
jne 0x41b5e9
mov esi, str.programstartmenu
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
jne 0x41b5e9
mov esi, str.CommonStartMenu
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b184
lea ecx, [ebp - 0x21c]
push ecx
push 0
push 0
push 0x16
jmp 0x41b24c
mov esi, str.commonappsdir
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b1aa
lea edx, [ebp - 0x21c]
push edx
push 0
push 0
push 0x2b
jmp 0x41b24c
mov esi, str.commonappsdir64
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b1e6
push 0x104
lea eax, [ebp - 0x21c]
push eax
push str.CommonProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push ebx
lea eax, [ebp - 0x21c]
call fcn.00402560
jmp 0x41ae59
mov esi, str.commonappsdircuros
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b22b
call fcn.00431270
test al, al
je 0x41b198
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
push str.CommonProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push ebx
lea eax, [ebp - 0x21c]
call fcn.00402560
jmp 0x41ae59
mov esi, str.commondesktop
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b265
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
push 0x19
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push ebx
lea eax, [ebp - 0x21c]
call fcn.00402560
jmp 0x41ae59
mov esi, 0x45a240
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b289
push ebx
mov eax, 0x46af9a
call fcn.00402560
jmp 0x41ae59
mov esi, str.getstring
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b2e3
mov eax, dword [ebp - 0x254]
cmp dword [ebp - 0x240], edi
jae 0x41b2b1
lea eax, [ebp - 0x254]
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
push eax
call fcn.0043a74b
add esp, 4
mov ecx, eax
mov edx, 0x46af88
call fcn.0042dce0
push ebx
lea eax, [ebp - 0x21c]
call fcn.00402560
jmp 0x41ae59
mov esi, str.resource
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b307
call fcn.00410f80
push ebx
call fcn.00402560
jmp 0x41ae59
mov esi, str.getswitch
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b361
mov eax, dword [ebp - 0x254]
cmp dword [ebp - 0x240], edi
jae 0x41b32f
lea eax, [ebp - 0x254]
push eax
call fcn.00402130
test eax, eax
je 0x41ae59
mov ecx, dword [ebp - 0x254]
cmp dword [ebp - 0x240], edi
jae 0x41b351
lea ecx, [ebp - 0x254]
call fcn.00402200
push ebx
call fcn.00402560
jmp 0x41ae59
mov esi, str.getdriverversion
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b3b4
mov esi, dword [ebp - 0x240]
cmp esi, edi
mov edi, dword [ebp - 0x254]
mov eax, edi
jae 0x41b38d
lea eax, [ebp - 0x254]
push eax
call fcn.00406810
cmp eax, 0xffffffff
jne 0x41b43b
mov eax, edi
cmp esi, 8
jae 0x41b3a9
lea eax, [ebp - 0x254]
push eax
push str.Driver__s_not_found__ignoring
jmp 0x41b5d2
mov eax, dword [ebp - 0x238]
cmp dword [ebp - 0x224], edi
jae 0x41b3c8
lea eax, [ebp - 0x238]
push str.getpackageversion
push eax
call fcn.0043a345
add esp, 8
test eax, eax
jne 0x41b44b
mov ecx, ebx
call fcn.0042c930
test al, al
jne 0x41ae59
push str.Version.ini_not_found_falling_back_to_driver_versioning
push 0x4699d4
mov eax, 1
call fcn.0042d020
mov esi, dword [ebp - 0x240]
add esp, 8
cmp esi, edi
mov edi, dword [ebp - 0x254]
mov eax, edi
jae 0x41b418
lea eax, [ebp - 0x254]
push eax
call fcn.00406810
cmp eax, 0xffffffff
jne 0x41b43b
mov eax, edi
cmp esi, 8
jae 0x41b430
lea eax, [ebp - 0x254]
push eax
push str.Driver__s_not_found_for_versioning__ignoring
jmp 0x41b5d2
call fcn.0040a450
push ebx
call fcn.00402560
jmp 0x41ae59
mov esi, str.installeddir
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b47b
mov eax, dword [0x46ae98]
add eax, 0xa1c
cmp dword [eax + 0x14], edi
jb 0x41b470
mov eax, dword [eax]
push ebx
call fcn.00402560
jmp 0x41ae59
mov esi, 0x45a3f8
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b49f
call fcn.00430ee0
push ebx
call fcn.00402560
jmp 0x41ae59
mov esi, 0x45a400
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b4c3
call fcn.00430f70
push ebx
call fcn.00402560
jmp 0x41ae59
mov esi, str._logpath
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b50a
push str.report
call fcn.00402130
test eax, eax
je 0x41b4fa
mov ecx, str.report
call fcn.00402200
push ebx
call fcn.00402560
jmp 0x41ae59
call fcn.00430b20
push ebx
call fcn.00402560
jmp 0x41ae59
mov esi, str.netframework
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b52e
call fcn.00432be0
push ebx
call fcn.00402560
jmp 0x41ae59
mov esi, str.installutil
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b559
lea edx, [ebp - 0x270]
push 0
push edx
call fcn.004330e0
add esp, 8
mov byte [ebp - 4], 0xb
jmp 0x41b5ad
mov esi, str.installutil32
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b584
lea eax, [ebp - 0x270]
push 1
push eax
call fcn.004330e0
add esp, 8
mov byte [ebp - 4], 0xc
jmp 0x41b5ad
mov esi, str.installutil64
lea ecx, [ebp - 0x238]
call fcn.0040ecc0
test al, al
je 0x41b5c6
lea ecx, [ebp - 0x270]
push 2
push ecx
call fcn.004330e0
add esp, 8
mov byte [ebp - 4], 0xd
mov edi, eax
mov esi, ebx
call fcn.00404010
lea esi, [ebp - 0x270]
call fcn.0042dc30
jmp 0x41ae59
mov edx, dword [ebp - 0x2d0]
push edx
push str.Unknown_variable___s___ignoring
push 0x4699d4
mov eax, 1
call fcn.0042d020
add esp, 0xc
jmp 0x41ae59
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
push 0x17
jmp 0x41b24c
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push ebx
lea eax, [ebp - 0x21c]
call fcn.00402560
jmp 0x41ae59