Function at 0x46e4c0
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xffffffffffffffff
push 0x5215f8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x5a4aa8]
xor eax, ebp
mov dword [ebp + 0x208], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
lea ecx, [ebp - 0x14]
call fcn.00407e60
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 1
call fcn.004290b0
push 0x208
push esi
lea eax, [ebp]
push eax
call fcn.004fd670
add esp, 0xc
push 0x535a4c
lea ecx, [ebp - 0x14]
call fcn.00405ec0
call fcn.0046e9c0
lea ecx, [ebp]
test al, al
je 0x46e549
call fcn.0046e7d0
jmp 0x46e555
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp]
lea edx, [eax + 2]
mov ebx, 2
mov cx, word [eax]
add eax, ebx
cmp cx, si
jne 0x46e560
sub eax, edx
sar eax, 1
je 0x46e5c2
lea esi, [edi + 4]
lea edx, [ebp]
push edx
mov ecx, esi
call fcn.00405ec0
push str.Inf
lea ecx, [ebp - 0x18]
call fcn.00405c00
mov byte [ebp - 4], bl
push eax
push esi
lea eax, [ebp - 0x20]
push eax
call fcn.0046eab0
add esp, 0xc
mov byte [ebp - 4], 3
push eax
lea ecx, [edi + 0xc]
call fcn.004199d0
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x20]
call fcn.00406150
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x18]
call fcn.00406150
jmp 0x46e5c7
call fcn.004c81d0
push 0x208
push 0
lea ecx, [ebp]
push ecx
call fcn.004fd670
add esp, 0xc
push 0x535a4c
lea ecx, [ebp - 0x14]
call fcn.00405ec0
push 0x104
lea edx, [ebp]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x46e608
lea eax, [ebp]
push eax
lea ecx, [edi + 8]
call fcn.00405ec0
jmp 0x46e60d
call fcn.004c81d0
push 0x208
push 0
lea ecx, [ebp]
push ecx
call fcn.004fd670
add esp, 0xc
lea edx, [ebp]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea esi, [edi + 0x14]
lea eax, [ebp]
push eax
mov ecx, esi
call fcn.00405ec0
mov ecx, dword [esi]
mov eax, dword [ecx - 0xc]
add eax, 0xffffffff
push eax
mov ecx, esi
call fcn.00446240
cmp ax, 0x5c
jne 0x46e665
mov edx, dword [esi]
mov eax, dword [edx - 0xc]
push 0
add eax, 0xffffffff
push eax
mov ecx, esi
call fcn.0046eb60
push 0x208
push 0
lea eax, [ebp]
push eax
call fcn.004fd670
add esp, 0xc
push 0
push 0x26
lea ecx, [ebp]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x46e692
lea edx, [ebp]
push edx
jmp 0x46e6bc
push 1
push 0x208
lea eax, [ebp]
push eax
push str.ProgramFilesDir
push reloc.OLEAUT32.dll_SysReAllocString
mov edx, str.SoftwareMicrosoftWindowsCurrentVersion
call fcn.004920e0
add esp, 0x14
test eax, eax
jne 0x46e6c4
lea ecx, [ebp]
push ecx
lea ecx, [edi + 0x10]
call fcn.00405ec0
lea esi, [edi + 0x10]
mov edx, dword [esi]
mov eax, dword [edx - 0xc]
add eax, 0xffffffff
push eax
mov ecx, esi
call fcn.00446240
cmp ax, 0x5c
jne 0x46e6ef
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push 0
add eax, 0xffffffff
push eax
mov ecx, esi
call fcn.0046eb60
push 0x208
push 0
lea ecx, [ebp]
push ecx
call fcn.004fd670
add esp, 0xc
lea edx, [ebp - 0x1c]
push edx
push 0x104
lea eax, [ebp]
push eax
push 1
push 0
push 0
call sub.WINSPOOL.DRV_GetPrinterDriverDirectoryW
test eax, eax
je 0x46e72c
lea ecx, [ebp]
push ecx
lea ecx, [edi + 0x18]
call fcn.00405ec0
jmp 0x46e749
mov edx, dword [edi + 8]
cmp dword [edx - 0xc], 0
je 0x46e749
mov eax, edx
push eax
push str._s_spooldriversw32x86
lea ecx, [edi + 0x18]
push ecx
call fcn.004081a0
add esp, 0xc
lea esi, [edi + 0x18]
mov edx, dword [esi]
mov eax, dword [edx - 0xc]
add eax, 0xffffffff
push eax
mov ecx, esi
call fcn.00446240
cmp ax, 0x5c
jne 0x46e774
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
push 0
add eax, 0xffffffff
push eax
mov ecx, esi
call fcn.0046eb60
mov dword [ebp - 4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00406150
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.004fa103
add ebp, 0x20c
mov esp, ebp
pop ebp
ret