Function at 0x401b10
Capabilities:
Create thread

Disassembly:
sub esp, 0x30
mov eax, dword [esp + 0x34]
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov dword [0x412ff8], eax
call fcn.004096f0
push 0x412600
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x413000
call fcn.00409fa0
add esp, 4
push ebp
push 0x412ff0
push 0x413000
call sub.WINSPOOL.DRV_OpenPrinterW
test eax, eax
jne 0x401b72
push 0x412600
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0x10
mov edx, dword [0x412ff0]
lea ecx, [esp + 0x44]
push ecx
push ebp
push ebp
push 3
push ebp
push edx
call sub.WINSPOOL.DRV_GetPrinterDriverW
mov eax, dword [esp + 0x44]
push eax
call fcn.00409a40
mov esi, eax
add esp, 4
cmp esi, ebp
jne 0x401bbe
mov ecx, dword [0x412ff0]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
push 0x412600
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0x10
mov eax, dword [esp + 0x44]
mov ecx, dword [0x412ff0]
lea edx, [esp + 0x44]
push edx
push eax
push esi
push 3
push ebp
push ecx
call sub.WINSPOOL.DRV_GetPrinterDriverW
mov eax, dword [esi + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
cmp eax, ebp
jne 0x401bf4
mov edx, dword [esi + 4]
push str.Canon_LBP3200
push edx
call edi
test eax, eax
jne 0x401c07
mov eax, dword [esi + 0x20]
cmp eax, ebp
je 0x401c32
push str.CAP4_Monitor
push eax
call edi
test eax, eax
je 0x401c32
mov eax, dword [0x412ff0]
push eax
call sub.WINSPOOL.DRV_ClosePrinter
push esi
call fcn.00409a80
add esp, 4
push 0x412600
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0x10
push esi
call fcn.00409a80
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetACP]
mov edx, dword [0x412ff0]
lea ecx, [esp + 0x10]
push 4
push ecx
push ebp
push str.AnsiCodePage
push edx
mov dword [esp + 0x24], eax
call sub.WINSPOOL.DRV_SetPrinterDataW
push 0x413000
push 0x412720
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ebp
push ebp
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0x4133d8
push ebp
push 0x4126e0
mov dword [0x4126e0], eax
mov eax, dword [0x412ff0]
push 0x409190
push ebp
push ebp
mov dword [0x4126e4], eax
mov dword [0x4126e8], 0xff00
mov dword [0x4126ec], ebp
mov dword [0x4126f0], ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
mov dword [0x412390], eax
call edi
mov ebx, dword [sym.imp.USER32.dll_FindWindowW]
push 0x412720
push str.PSW4WindowClass
call ebx
cmp eax, ebp
je 0x401d18
push 0xffffffffffffffeb
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
cmp eax, 1
jne 0x401f89
xor esi, esi
push 0x1f4
call edi
push 0x412720
push str.PSW4WindowClass
call ebx
inc esi
cmp eax, ebp
je 0x401d0f
cmp esi, 0x1e
jb 0x401cf2
cmp esi, 0x1e
jae 0x401f89
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.00401fc0
test eax, eax
jne 0x401d34
mov dword [esp + 0x2c], 1
jmp 0x401f89
call fcn.00402250
test eax, eax
jne 0x401d4a
mov dword [esp + 0x2c], 1
jmp 0x401f89
push ebp
push 1
call fcn.00406410
mov eax, dword [0x413214]
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
add esp, 8
cmp eax, ebp
push pe_nt_image_headers32
push 0x37
je 0x401da7
call esi
push 4
mov edi, eax
call esi
mov ecx, dword [0x413210]
mov edx, dword [0x412b48]
add edi, eax
add ecx, edx
mov edx, dword [0x412fe8]
lea eax, [edi + ecx - 0x13]
mov ecx, dword [0x412b44]
push eax
mov eax, dword [0x4133d4]
push ecx
mov ecx, dword [0x4133d0]
push edx
push eax
push 0xffffffffffffffff
push ecx
jmp 0x401de0
call esi
push 4
mov edi, eax
call esi
mov edx, dword [0x413210]
add edi, eax
mov eax, dword [0x412b48]
add edx, eax
mov eax, dword [0x412fe8]
lea ecx, [edi + edx - 0x13]
mov edx, dword [0x412b44]
push ecx
mov ecx, dword [0x4133d4]
push edx
mov edx, dword [0x4133d0]
push eax
push ecx
push 0xfffffffffffffffe
push edx
call dword [sym.imp.USER32.dll_SetWindowPos]
lea eax, [esp + 0x18]
push ebp
push eax
push str.LastWindowState
push 0x413000
push 0x80000001
call fcn.00409ca0
add esp, 0x14
lea ecx, [esp + 0x14]
push ebp
push ecx
push str.LastWindowVisiblity
push 0x413000
push 0x80000001
call fcn.00409ca0
mov eax, dword [esp + 0x28]
mov esi, 1
add esp, 0x14
cmp eax, esi
jne 0x401e6d
cmp dword [esp + 0x18], esi
jne 0x401e4a
mov edx, dword [0x4133d0]
push 6
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, esi
mov ebx, dword [esp + 0x1c]
jmp 0x401e81
mov eax, dword [0x4133d0]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov ecx, dword [0x4133d0]
push 5
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, esi
mov ebx, dword [esp + 0x1c]
jmp 0x401e81
mov edx, dword [0x4133d0]
push ebp
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov ebx, esi
mov edi, dword [esp + 0x20]
mov eax, dword [0x4133d0]
push 0x412008
push 0x412620
push 0x413000
push eax
call dword [0x412d78]
test eax, eax
jne 0x401eb9
mov ecx, dword [0x4133d0]
push ebp
push ebp
push 0x403
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x401f89
cmp dword [0x412010], ebp
jne 0x401eed
mov edx, dword [0x412008]
push esi
push edx
call dword [0x413228]
test eax, eax
jne 0x401eed
mov eax, dword [0x4133d0]
push ebp
push 0xbb8
push 5
push eax
call dword [sym.imp.USER32.dll_SetTimer]
mov dword [0x412030], esi
cmp edi, ebp
je 0x401f05
mov ecx, dword [0x4133d0]
push ebp
push ebp
push 0x404
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
cmp ebx, ebp
je 0x401f1f
mov ecx, dword [0x412008]
cmp ecx, ebp
je 0x401f1f
mov eax, dword [0x41322c]
cmp eax, ebp
je 0x401f1f
push ecx
call eax
mov edx, dword [0x412ff8]
push 0x40f170
push edx
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
mov esi, eax
push ebp
push ebp
lea eax, [esp + 0x2c]
push ebp
push eax
call edi
test eax, eax
je 0x401f89
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorW]
mov ebp, dword [sym.imp.USER32.dll_TranslateMessage]
mov edx, dword [0x4133d0]
lea ecx, [esp + 0x24]
push ecx
push esi
push edx
call ebx
test eax, eax
jne 0x401f78
lea eax, [esp + 0x24]
push eax
call ebp
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
lea edx, [esp + 0x2c]
push 0
push edx
call edi
test eax, eax
jne 0x401f53
mov eax, dword [0x4126e0]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [0x412ff0]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
push 0x412600
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
pop edi
pop esi
mov eax, dword [esp + 0x24]
pop ebp
pop ebx
add esp, 0x30
ret 0x10