Function at 0x405590
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x427120]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor eax, eax
push 0x206
mov ebx, ecx
push eax
lea ecx, [ebp - 0x20a]
push ecx
mov word [ebp - 0x20c], ax
call fcn.0040ae90
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x412]
push eax
mov word [ebp - 0x414], dx
call fcn.0040ae90
add esp, 0x18
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jbe 0x4057fc
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405603
sub eax, edx
sar eax, 1
je 0x4057fc
push edi
push str.IsWow64Process
push 0x41e9bc
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea edi, [ebp - 0x20c]
add edi, 0xfffffffe
test eax, eax
jne 0x405660
lea ecx, [ecx]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x405640
mov ecx, 0xb
mov esi, str._spooldriversw32x86_
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp 0x405778
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x405660
mov ecx, 8
mov esi, str._spooldrivers_
rep movsd dword es:[edi], dword [esi]
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [ebp + eax - 0x20c]
mov word [ebp + eax - 0x414], cx
add eax, 2
test cx, cx
jne 0x405680
call fcn.00401880
test eax, eax
lea eax, [ebp - 0x20c]
je 0x405712
add eax, 0xfffffffe
lea ebx, [ebx]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x4056b0
mov edx, dword [str.x64_]
mov ecx, dword [0x420e5c]
mov dword [eax], edx
mov dx, word [0x420e60]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [ebp - 0x414]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x4056e1
mov ecx, dword [str.w32x86_]
mov edx, dword [0x420e4c]
mov dword [eax], ecx
mov ecx, dword [0x420e50]
mov dword [eax + 4], edx
mov edx, dword [0x420e54]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
jmp 0x405778
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x405715
mov ecx, dword [str.w32x86_]
mov edx, dword [0x420e4c]
mov dword [eax], ecx
mov ecx, dword [0x420e50]
mov dword [eax + 4], edx
mov edx, dword [0x420e54]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
lea eax, [ebp - 0x414]
add eax, 0xfffffffe
lea ecx, [ecx]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x405750
mov ecx, dword [str.x64_]
mov edx, dword [0x420e5c]
mov dword [eax], ecx
mov cx, word [0x420e60]
mov dword [eax + 4], edx
mov word [eax + 8], cx
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
pop edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405782
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x20c]
push edx
lea ecx, [ebx + 0x33c]
call fcn.00403fe0
call fcn.004065d0
test eax, eax
je 0x4057c7
lea eax, [ebp - 0x20c]
push eax
push str.PdfsInstaller.GetPrinterDriversFolders__printer_drivers_directory_is:___s_
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
call fcn.004065d0
test eax, eax
je 0x4057ea
lea ecx, [ebp - 0x414]
push ecx
push str.PdfsInstaller.GetPrinterDriversFolders__other_printer_drivers_directory_is:___s_
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040ae4c
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.004065d0
test eax, eax
je 0x405821
push esi
push str.PdfsInstaller.GetPrinterDriversFolders__FAILED_to_get_printer_drivers_directory__Error___d
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040ae4c
mov esp, ebp
pop ebp
ret