Function at 0x4027c0
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 [0x41b418], eax
call fcn.0040b4f0
cmp ax, bp
je 0x402c66
cmp ax, 3
je 0x402c66
cmp ax, 4
je 0x402c66
cmp ax, 2
je 0x402c66
push 0x41a720
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push ebp
push 0x41b410
push 0x41b420
call sub.WINSPOOL.DRV_OpenPrinterW
test eax, eax
jne 0x40283c
push 0x41a720
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 [0x41b410]
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.0040b820
mov esi, eax
add esp, 4
cmp esi, ebp
jne 0x402888
mov ecx, dword [0x41b410]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
push 0x41a720
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 [0x41b410]
lea edx, [esp + 0x44]
push edx
push eax
push esi
push 3
push ebp
push ecx
call sub.WINSPOOL.DRV_GetPrinterDriverW
push esi
call fcn.0040cab0
add esp, 4
test eax, eax
jne 0x4028db
mov edx, dword [0x41b410]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
push esi
call fcn.0040b860
add esp, 4
push 0x41a720
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.0040b860
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetACP]
mov ecx, dword [0x41b410]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push 4
push eax
push ebp
push str.AnsiCodePage
push ecx
call sub.WINSPOOL.DRV_SetPrinterDataW
push 0x41b420
push 0x41a840
call fcn.0040cbb0
add esp, 8
push ebp
push ebp
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edx, dword [0x41b410]
push 0x41ba18
push ebp
push 0x41a800
push 0x40af90
push ebp
push ebp
mov dword [0x41a800], eax
mov dword [0x41a804], edx
mov dword [0x41a808], 0xff00
mov dword [0x41a80c], ebp
mov dword [0x41a810], ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
mov dword [0x41a4c0], eax
call edi
mov ebx, dword [sym.imp.USER32.dll_FindWindowW]
push 0x41a840
push str.PSW3WindowClass
call ebx
cmp eax, ebp
je 0x4029c5
push 0xffffffffffffffeb
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
cmp eax, 1
jne 0x402c35
xor esi, esi
push 0x1f4
call edi
push 0x41a840
push str.PSW3WindowClass
call ebx
inc esi
cmp eax, ebp
je 0x4029bc
cmp esi, 0x1e
jb 0x40299f
cmp esi, 0x1e
jae 0x402c35
call dword [0x41c440]
call fcn.00402c80
test eax, eax
jne 0x4029e1
mov dword [esp + 0x2c], 1
jmp 0x402c35
call fcn.00402f10
test eax, eax
jne 0x4029f7
mov dword [esp + 0x2c], 1
jmp 0x402c35
push ebp
push 1
call fcn.00407fd0
mov eax, dword [0x41b634]
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
add esp, 8
cmp eax, ebp
push pe_nt_image_headers32
push 0x37
je 0x402a52
call esi
push 4
mov edi, eax
call esi
mov ecx, dword [0x41ac68]
add edi, eax
mov eax, dword [0x41b630]
add eax, ecx
mov ecx, dword [0x41b408]
lea edx, [edi + eax - 0x13]
mov eax, dword [0x41ac64]
push edx
mov edx, dword [0x41ba14]
push eax
mov eax, dword [0x41ba10]
push ecx
push edx
push 0xffffffffffffffff
push eax
jmp 0x402a8c
call esi
push 4
mov edi, eax
call esi
mov ecx, dword [0x41b630]
mov edx, dword [0x41ac68]
add edi, eax
add ecx, edx
mov edx, dword [0x41b408]
lea eax, [edi + ecx - 0x13]
mov ecx, dword [0x41ac64]
push eax
mov eax, dword [0x41ba14]
push ecx
mov ecx, dword [0x41ba10]
push edx
push eax
push 0xfffffffffffffffe
push ecx
call dword [sym.imp.USER32.dll_SetWindowPos]
lea edx, [esp + 0x18]
push ebp
push edx
push str.LastWindowState
push 0x41b420
push 0x80000001
call fcn.0040c400
add esp, 0x14
lea eax, [esp + 0x14]
push ebp
push eax
push str.LastWindowVisiblity
push 0x41b420
push 0x80000001
call fcn.0040c400
mov eax, dword [esp + 0x28]
mov esi, 1
add esp, 0x14
cmp eax, esi
jne 0x402b19
cmp dword [esp + 0x18], esi
jne 0x402af6
mov ecx, dword [0x41ba10]
push 6
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, esi
mov ebx, dword [esp + 0x1c]
jmp 0x402b2d
mov edx, dword [0x41ba10]
push edx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov eax, dword [0x41ba10]
push 5
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, esi
mov ebx, dword [esp + 0x1c]
jmp 0x402b2d
mov ecx, dword [0x41ba10]
push ebp
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
mov ebx, esi
mov edi, dword [esp + 0x20]
mov edx, dword [0x41ba10]
push 0x41a138
push 0x41a740
push 0x41b420
push edx
call dword [0x41b0b8]
test eax, eax
jne 0x402b65
mov eax, dword [0x41ba10]
push ebp
push ebp
push 0x403
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x402c35
cmp dword [0x41a13c], ebp
jne 0x402b9a
mov ecx, dword [0x41a138]
push esi
push ecx
call dword [0x41b648]
test eax, eax
jne 0x402b9a
mov edx, dword [0x41ba10]
push ebp
push 0xbb8
push 5
push edx
call dword [sym.imp.USER32.dll_SetTimer]
mov dword [0x41a15c], esi
cmp edi, ebp
je 0x402bb1
mov eax, dword [0x41ba10]
push ebp
push ebp
push 0x404
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
cmp ebx, ebp
je 0x402bcb
mov ecx, dword [0x41a138]
cmp ecx, ebp
je 0x402bcb
mov eax, dword [0x41b64c]
cmp eax, ebp
je 0x402bcb
push ecx
call eax
mov ecx, dword [0x41b418]
push 0x417028
push ecx
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
push ebp
push ebp
lea edx, [esp + 0x2c]
push ebp
push edx
mov esi, eax
call edi
test eax, eax
je 0x402c35
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorW]
mov ebp, dword [sym.imp.USER32.dll_TranslateMessage]
mov ecx, dword [0x41ba10]
lea eax, [esp + 0x24]
push eax
push esi
push ecx
call ebx
test eax, eax
jne 0x402c24
lea edx, [esp + 0x24]
push edx
call ebp
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
lea ecx, [esp + 0x2c]
push 0
push ecx
call edi
test eax, eax
jne 0x402bff
mov edx, dword [0x41a800]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [0x41b410]
push eax
call sub.WINSPOOL.DRV_ClosePrinter
push 0x41a720
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30
ret 0x10