Function at 0x401e6a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf64
mov eax, dword [0x434044]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0xf58], 0
push esi
push str.mscms.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp - 0xf5c], eax
je 0x4021d2
cmp byte [ebx + 0x10], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
je 0x401ec1
push str.InstallColorProfileA
push eax
call esi
push str.AssociateColorProfileWithDeviceA
push dword [ebp - 0xf5c]
call esi
jmp 0x401ee2
push str.InstallColorProfileW
push eax
call esi
push str.AssociateColorProfileWithDeviceW
push dword [ebp - 0xf5c]
mov dword [ebp - 0xf54], eax
call esi
mov dword [ebp - 0xf60], eax
cmp byte [ebx + 0x10], 0
jne 0x402086
cmp dword [ebp - 0xf54], 0
je 0x40207b
push edi
push 0
call dword [ebp - 0xf54]
test eax, eax
push edi
je 0x401f21
push str.ICM___install__s_n
call fcn.00403b05
pop ecx
mov dword [ebp - 0xf58], 1
jmp 0x402085
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
push str.ICM___install_fail____ld___s_n
call fcn.00403b05
add esp, 0xc
lea eax, [ebp - 0xd48]
push edi
push eax
call fcn.00417615
lea eax, [ebp - 0xd48]
push 0x5c
push eax
call fcn.004184e4
add esp, 0x10
test eax, eax
je 0x402051
add eax, 2
push eax
lea eax, [ebp - 0xf50]
push eax
call fcn.00417615
pop ecx
pop ecx
lea eax, [ebp - 0x730]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x401f97
push 0x104
lea eax, [ebp - 0x730]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x730]
push eax
lea eax, [ebp - 0x318]
push eax
call fcn.00417615
lea eax, [ebp - 0x730]
push eax
push str.wszTemp_____s__n
call fcn.00403b05
lea eax, [ebp - 0x318]
push eax
push str.wszTempPath_____s__n
call fcn.00403b05
lea eax, [ebp - 0x318]
push eax
call fcn.00417e13
add esp, 0x1c
cmp word [ebp + eax*2 - 0x31a], 0x5c
jne 0x401ffc
lea eax, [ebp - 0x318]
push eax
call fcn.00417e13
and word [ebp + eax*2 - 0x31a], 0
pop ecx
lea eax, [ebp - 0xf50]
push eax
lea eax, [ebp - 0x318]
push eax
lea eax, [ebp - 0xb40]
push 0x42d34c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 1
lea eax, [ebp - 0xb40]
push eax
mov ecx, edi
call fcn.0040648e
lea eax, [ebp - 0xb40]
push eax
push edi
call fcn.00417615
lea eax, [ebp - 0xb40]
push eax
push edi
push 0x42d358
call fcn.00403b05
add esp, 0x14
push edi
push 0
call dword [ebp - 0xf54]
test eax, eax
push edi
je 0x402069
push str.ICM___install_2nd_try__s_n
jmp 0x401f0c
call esi
push eax
push str.ICM___install_2nd_try_fail____ld___s_n
call fcn.00403b05
add esp, 0xc
jmp 0x402086
push str.ICM___error___InstallColorProfile_not_found_n
call fcn.004039f4
pop ecx
mov eax, dword [0x4360f0]
push edi
xor ecx, ecx
lea esi, [ebp - 0x420]
call fcn.0040f0b0
mov eax, esi
push 0x5c
push eax
mov byte [ebp - 0x110], 0
call fcn.004181a0
test eax, eax
pop ecx
pop ecx
je 0x402107
inc eax
push eax
lea eax, [ebp - 0x528]
push eax
call fcn.00417c40
pop ecx
pop ecx
push 0x104
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp byte [ebx + 0x10], 0
lea eax, [ebp - 0x110]
je 0x4020e5
push str.Color_
jmp 0x4020ea
push str._spooldriversColor_
push eax
call fcn.00417c50
pop ecx
pop ecx
lea eax, [ebp - 0x528]
push eax
lea eax, [ebp - 0x110]
push eax
call fcn.00417c50
pop ecx
pop ecx
cmp byte [ebx + 0x10], 0
jne 0x4021c0
cmp dword [ebp - 0xf60], 0
je 0x4021b5
push edi
push str.ICM____s_n
call fcn.00403b05
push 0x934
call fcn.00417923
mov esi, eax
add esp, 0xc
test esi, esi
je 0x402149
call fcn.00405f03
mov dword [ebp - 0xf54], esi
jmp 0x402150
and dword [ebp - 0xf54], 0
push edi
mov esi, str.cmyk
call fcn.00406422
test eax, eax
jne 0x40219a
lea esi, [ebx + 0x6c]
push esi
push edi
push eax
call dword [ebp - 0xf60]
push esi
push edi
push str.ICM___Associate3__s_to__s_n
call fcn.00403b05
add esp, 0xc
cmp dword [ebp - 0xf54], 0
mov dword [ebp - 0xf58], 1
je 0x4021a5
push dword [ebp - 0xf54]
call fcn.00417e0e
jmp 0x4021a4
push str.ICM___Do_not_associate_n
call fcn.004039f4
pop ecx
cmp byte [ebp - 0x110], 0
je 0x4021c0
push str.AddUninstInfo_n
jmp 0x4021ba
push str.ICM___error___AssociateColorProfileWithDevice_not_found_n
call fcn.004039f4
pop ecx
push dword [ebp - 0xf5c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xf58]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004175dc
leave
ret