Function at 0x401000
Capabilities:
Link many functions at runtime

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push esi
mov esi, ecx
push edi
xor ebx, ebx
push str.Winspool.drv
mov dword [esi], 0x4183c8
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
call ebp
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [esi + 4], eax
je 0x4010c6
push str.SetDefaultPrinterA
push eax
call edi
cmp eax, ebx
mov dword [esi + 0x10], eax
jne 0x401074
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.GetProcAddress_SetDefaultPrinterA
call fcn.0041119c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405530
add esp, 8
mov eax, dword [esi + 4]
push str.GetPrinterDataExA
push eax
call edi
cmp eax, ebx
mov dword [esi + 0x14], eax
jne 0x4010a6
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.GetProcAddress_GetPrinterDataExA
call fcn.0041119c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405530
add esp, 8
mov ecx, dword [esi + 4]
push str.GetDefaultPrinterA
push ecx
call edi
cmp eax, ebx
mov dword [esi + 0xc], eax
jne 0x4010e9
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.GetProcAddress_GetDefaultPrinterA
jmp 0x4010d5
push ecx
mov dword [esi + 4], ebx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.LoadLibrary_Winspool_
call fcn.0041119c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405530
add esp, 8
push str.SetupAPI.dll
call ebp
cmp eax, ebx
mov dword [esi + 8], eax
je 0x401222
push str.CMP_WaitNoPendingInstallEvents
push eax
call edi
cmp eax, ebx
mov dword [esi + 0x18], eax
jne 0x40112e
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.GetProcAddress_CMP_WaitNoPendingInstallEvents
call fcn.0041119c
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
push eax
call fcn.00405530
add esp, 8
jmp 0x401134
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esi + 8]
push str.SetupDiGetClassDevsA
push edx
call edi
cmp eax, ebx
mov dword [esi + 0x1c], eax
jne 0x401162
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push str._GetProcAddress_SetupDiGetClassDevsA
call fcn.0041119c
call ebp
push eax
call fcn.00405530
add esp, 8
mov eax, dword [esi + 8]
push str.SetupDiEnumDeviceInterfaces
push eax
call edi
cmp eax, ebx
mov dword [esi + 0x20], eax
jne 0x401190
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.GetProcAddress_SetupDiEnumDeviceInterfaces
call fcn.0041119c
call ebp
push eax
call fcn.00405530
add esp, 8
mov ecx, dword [esi + 8]
push str.SetupDiGetDeviceInterfaceDetailA
push ecx
call edi
cmp eax, ebx
mov dword [esi + 0x24], eax
jne 0x4011be
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.GetProcAddress_SetupDiGetDeviceInterfaceDetail
call fcn.0041119c
call ebp
push eax
call fcn.00405530
add esp, 8
mov edx, dword [esi + 8]
push str.SetupDiDestroyDeviceInfoList
push edx
call edi
cmp eax, ebx
mov dword [esi + 0x28], eax
jne 0x4011ec
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.GetProcAddress_SetupDiDestroyDeviceInfoList
call fcn.0041119c
call ebp
push eax
call fcn.00405530
add esp, 8
mov eax, dword [esi + 8]
push str.SetupDiOpenDeviceInterfaceRegKey
push eax
call edi
cmp eax, ebx
mov dword [esi + 0x2c], eax
jne 0x401245
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.GetProcAddress_SetupDiOpenDeviceInterfaceRegKey
call fcn.0041119c
call ebp
push eax
call fcn.00405530
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push ecx
mov dword [esi + 8], ebx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.LoadLibrary_SetupApi_
call fcn.0041119c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405530
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret