Function at 0x40e9e0
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x738
mov eax, dword [0x47b038]
xor eax, esp
mov dword [esp + 0x734], eax
mov eax, dword [esp + 0x740]
push ebx
push esi
mov esi, dword [esp + 0x744]
push edi
push eax
mov edi, ecx
push esi
push str.ImportProfiles___s_____s__n
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], eax
or ebx, 0xffffffff
call fcn.0043e2c0
lea edx, [esp + 0x544]
add esp, 0xc
mov eax, esi
sub edx, esi
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40ea30
push 0
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x540]
push ecx
mov dword [esp + 0x18], ebx
call sub.WINSPOOL.DRV_OpenPrinterW
test eax, eax
je 0x40ea78
mov edx, dword [esp + 0xc]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
mov ecx, dword [edi + 4]
call fcn.00444240
test eax, eax
jne 0x40eaa9
push str.KcProfInst.dll
jmp 0x40eaae
lea eax, [esp + 0x538]
push eax
push str.KcInst32_Error___Can_not_open_printer____s_n
call fcn.0043e2c0
add esp, 8
mov eax, ebx
mov ecx, dword [esp + 0x740]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0044ac80
add esp, 0x738
ret 8
push str.KcProfInst64.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x40ea8d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebp
push str.InitKxpApi
push edi
call esi
push str.GetKxpFileListFromDirectory
push edi
mov ebx, eax
call esi
push str.GetProfileListFromKxp
push edi
call esi
push str.ImportProfileFromKxp
push edi
mov ebp, eax
call esi
push str.ImportProfileAsDefault
push edi
mov dword [esp + 0x24], eax
call esi
push str.GetKxpFileDeviceModel
push edi
call esi
push str.CloseKxpApi
push edi
mov dword [esp + 0x20], eax
call esi
push 0x103
lea ecx, [esp + 0x131]
push 0
push ecx
mov dword [esp + 0x20], eax
mov byte [esp + 0x138], 0
call fcn.0044ac90
push 0x103
lea edx, [esp + 0x39]
push 0
push edx
mov byte [esp + 0x40], 0
call fcn.0044ac90
mov esi, dword [esp + 0x3c]
add esp, 0x18
push 0
lea eax, [esp + 0x540]
push eax
lea ecx, [esp + 0x134]
push ecx
mov ecx, dword [esi + 4]
call fcn.00441f80
mov edx, dword [esp + 0x20]
mov ecx, dword [esi + 4]
push 0
push edx
lea eax, [esp + 0x30]
push eax
call fcn.00441f80
lea ecx, [esp + 0x12c]
push ecx
push 0
call ebx
lea edx, [esp + 0x438]
push edx
lea eax, [esp + 0x2c]
push eax
call dword [esp + 0x20]
lea ecx, [esp + 0x438]
push ecx
push str.Device_for_this_Profile___s__n
call fcn.0043e1d0
add esp, 8
push 0
push 0
push 0
push 0
lea edx, [esp + 0x38]
push edx
call ebp
mov esi, eax
push esi
push str.nProfCount___d__n
call fcn.0043e2c0
add esp, 8
test esi, esi
jle 0x40ec67
mov eax, esi
shl eax, 5
push eax
call fcn.0044b473
add esp, 4
push esi
push 0
push 0
mov ebx, eax
push ebx
lea ecx, [esp + 0x38]
push ecx
call ebp
test esi, esi
jle 0x40ec5a
mov ebp, ebx
lea esp, [esp]
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x23a]
push eax
mov word [esp + 0x23c], dx
call fcn.0044ac90
push 0x20
lea ecx, [esp + 0x240]
push ebp
push ecx
call fcn.0044b54c
lea edx, [esp + 0x248]
push edx
push str.szProfile___s__n
call fcn.0043e2c0
add esp, 0x20
cmp word [esp + 0x230], 0
je 0x40ec52
push 1
push 1
lea eax, [esp + 0x238]
push eax
lea ecx, [esp + 0x34]
push ecx
call dword [esp + 0x2c]
add ebp, 0x20
sub esi, 1
jne 0x40ebf0
test ebx, ebx
je 0x40ec67
push ebx
call fcn.0044ad0a
add esp, 4
lea edx, [esp + 0x12c]
push edx
xor esi, esi
push esi
call dword [esp + 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
pop ebp
jmp 0x40ea8f