Function at 0x40fbb0
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x738
mov eax, dword [0x48807c]
xor eax, esp
mov dword [esp + 0x734], eax
mov eax, dword [esp + 0x740]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x74c]
mov ebp, ecx
mov ecx, dword [esp + 0x754]
push ecx
push eax
push edi
push str.ApplyProfile___s_____s_____s__n
mov dword [esp + 0x28], edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], ecx
or ebx, 0xffffffff
call fcn.004454c0
lea edx, [esp + 0x344]
add esp, 0x10
mov eax, edi
sub edx, edi
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40fc10
push 0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x33c]
push ecx
mov dword [esp + 0x20], ebx
call sub.WINSPOOL.DRV_OpenPrinterW
test eax, eax
je 0x40fcb6
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edx
push 0
push 0
push 2
push eax
mov dword [esp + 0x24], 0
call sub.WINSPOOL.DRV_GetPrinterW
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40fcaa
push eax
call fcn.00453c61
mov esi, eax
add esp, 4
test esi, esi
je 0x40fcaa
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
push edx
push esi
push 2
push eax
call sub.WINSPOOL.DRV_GetPrinterW
mov eax, dword [esi + 0x10]
lea edx, [esp + 0x53c]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40fc92
push esi
call fcn.004534ca
add esp, 4
mov ecx, dword [esp + 0x14]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
jmp 0x40fccb
lea edx, [esp + 0x334]
push edx
push str.KcInst32_Error___Can_not_open_printer____s_n
call fcn.004454c0
add esp, 8
mov ecx, dword [ebp + 4]
call fcn.0044b710
test eax, eax
jne 0x40fcde
push str.KcProfInst.dll
jmp 0x40fce3
push str.KcProfInst64.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x40fe1b
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.InitKxpApi
push esi
call edi
push str.GetKxpFileListFromDirectory
push esi
mov ebx, eax
call edi
push str.GetProfileListFromKxp
push esi
call edi
push str.ImportProfileFromKxp
push esi
call edi
push str.ImportProfileAsDefault
push esi
call edi
push str.GetKxpFileDeviceModel
push esi
mov dword [esp + 0x24], eax
call edi
push str.CloseKxpApi
push esi
mov dword [esp + 0x18], eax
call edi
push 0x103
mov edi, eax
lea eax, [esp + 0x131]
push 0
push eax
mov byte [esp + 0x138], 0
call fcn.00453450
push 0x103
lea ecx, [esp + 0x39]
push 0
push ecx
mov byte [esp + 0x40], 0
call fcn.00453450
push 0x103
lea edx, [esp + 0x24d]
push 0
push edx
mov byte [esp + 0x254], 0
call fcn.00453450
add esp, 0x24
push 0
lea eax, [esp + 0x338]
push eax
lea ecx, [esp + 0x134]
push ecx
mov ecx, dword [ebp + 4]
call fcn.00449450
mov edx, dword [esp + 0x24]
mov ecx, dword [ebp + 4]
push 0
push edx
lea eax, [esp + 0x30]
push eax
call fcn.00449450
mov ecx, dword [esp + 0x20]
push 0
push ecx
mov ecx, dword [ebp + 4]
lea edx, [esp + 0x238]
push edx
call fcn.00449450
lea eax, [esp + 0x12c]
push eax
push 0
call ebx
lea ecx, [esp + 0x53c]
push ecx
lea edx, [esp + 0x2c]
push edx
call dword [esp + 0x18]
push 7
lea eax, [esp + 0x234]
push eax
lea ecx, [esp + 0x30]
push ecx
call dword [esp + 0x28]
lea edx, [esp + 0x12c]
push edx
xor ebx, ebx
push ebx
call edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, dword [esp + 0x18]
push edi
mov ecx, ebp
call fcn.0040f990
mov ecx, dword [esp + 0x744]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.00453432
add esp, 0x738
ret 0xc