Function at 0x427410
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x459406
mov eax, dword fs:[0]
push eax
sub esp, 0xac4
mov eax, dword [0x46be4c]
xor eax, esp
mov dword [esp + 0xac0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46be4c]
xor eax, esp
push eax
lea eax, [esp + 0xad8]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x2c], ebx
mov esi, dword [esp + 0xae8]
mov edi, dword [esp + 0xaf0]
call fcn.004316f5
mov ecx, dword [eax + 4]
call fcn.00437e68
xor eax, eax
mov dword [esp + 0xae0], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
call fcn.004316f5
mov eax, dword [eax + 4]
mov dword [esp + 0x30], eax
call fcn.004048c0
push 0
push 0
mov ebp, eax
push 1
push esi
mov dword [esp + 0x38], ebp
call fcn.0040d520
add esp, 0x10
cmp eax, 1
jne 0x4274d0
cmp dword [esp + 0xaf4], 0
jne 0x4274d0
lea ecx, [esp + 0x17]
mov dword [esp + 0xae0], 0xffffffff
call fcn.00407ac0
mov eax, 3
jmp 0x4279d9
push esi
call fcn.0040d780
add esp, 4
push esi
lea ecx, [esp + 0x20]
mov dword [edi], eax
call fcn.004027b0
push 2
push 0x45d5bc
push esi
mov byte [esp + 0xaec], 1
call fcn.00443529
add esp, 0xc
test eax, eax
jne 0x4275e8
mov ecx, dword [esp + 0xaec]
shr ecx, 0x10
cmp ecx, 0x1000
jne 0x4275e8
push 0x410
push eax
lea edx, [esp + 0x6cc]
push edx
call fcn.004413c0
push 0x410
lea eax, [esp + 0x6d4]
push eax
push esi
call fcn.004044e0
add esp, 0x18
push esi
mov edi, eax
call sub.WINSPOOL.DRV_DeletePrinterConnectionA
test eax, eax
jne 0x427586
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
lea ecx, [esp + 0x1c]
jne 0x4279bb
call fcn.00401660
lea ecx, [esp + 0x17]
mov dword [esp + 0xae0], 0xffffffff
call fcn.00407ac0
mov eax, 4
jmp 0x4279d9
test edi, edi
je 0x42759b
lea ecx, [esp + 0x6c4]
push ecx
push esi
call fcn.00417080
add esp, 8
mov edx, dword [esp + 0x30]
add edx, 0x3c4
push 0x45dcd8
push edx
call fcn.004070c0
add esp, 8
test al, al
push esi
mov ecx, ebx
je 0x4275d1
call fcn.00424700
call fcn.004316f5
mov ecx, dword [eax + 4]
call fcn.00437e92
jmp 0x42796c
call fcn.00426b70
call fcn.004316f5
mov ecx, dword [eax + 4]
call fcn.00437e92
jmp 0x42796c
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x1c]
push ecx
xor edi, edi
push esi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], 0xf000c
call sub.WINSPOOL.DRV_OpenPrinterA
cmp eax, edi
mov dword [esp + 0x34], eax
jne 0x427673
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
mov eax, dword [esp + 0x1c]
mov byte [esp + 0xae0], 0
jne 0x42764e
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x427568
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x427568
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4279c0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4279c0
cmp ebp, 2
je 0x42768d
cmp ebp, 3
je 0x42768d
lea ecx, [esp + 0xac]
push ecx
push esi
call fcn.00411e20
jmp 0x42769f
mov eax, dword [esp + 0x18]
lea edx, [esp + 0xac]
push edx
push eax
call fcn.0040e010
mov ebx, eax
or ebp, 0xffffffff
add esp, 8
cmp ebx, ebp
jne 0x4276e8
mov ecx, dword [esp + 0x18]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0xae0], 0
lea edx, [eax + 0xc]
mov ecx, ebp
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4276dc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xae0], ebp
jmp 0x4279cb
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push ecx
push edi
push edi
push 3
push edi
push edx
mov dword [esp + 0x38], edi
call sub.WINSPOOL.DRV_GetPrinterDriverA
test eax, eax
jne 0x42770f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x42774e
mov ecx, dword [esp + 0x20]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edx, dword [esp + 0x18]
mov edi, eax
test edi, edi
mov dword [esp + 0x24], edi
je 0x4277c3
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x20]
push eax
push ecx
push edi
push 3
push 0
push edx
call sub.WINSPOOL.DRV_GetPrinterDriverA
test eax, eax
jne 0x42776d
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x18]
push eax
call sub.WINSPOOL.DRV_ClosePrinter
lea ecx, [esp + 0x1c]
call fcn.00401660
mov dword [esp + 0xae0], ebp
jmp 0x4279cb
mov edx, dword [edi + 0xc]
push 1
lea ecx, [esp + 0x70]
push ecx
push edx
call fcn.00404a10
add esp, 0xc
test eax, eax
je 0x427747
lea eax, [esp + 0xac]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x427790
sub eax, edx
je 0x4277c6
test bl, 8
je 0x4277c6
lea ecx, [esp + 0xac]
push ecx
push 0
call fcn.0040c980
add esp, 8
test eax, eax
jne 0x4277c6
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edx, dword [esp + 0x18]
push edx
jmp 0x427753
push 0x410
lea eax, [esp + 0x2b8]
push 0
push eax
call fcn.004413c0
push 0x410
lea ecx, [esp + 0x2c4]
push ecx
push esi
call fcn.004044e0
lea edx, [esp + 0x7c]
mov ebp, eax
xor eax, eax
push edx
push esi
mov dword [esp + 0x84], eax
mov byte [esp + 0x88], al
call fcn.00404180
add esp, 0x20
test ebp, ebp
mov ebx, eax
je 0x42783b
cmp dword [esp + 0x28], 0xa
je 0x42782a
lea eax, [esp + 0x2b4]
push eax
push esi
call fcn.0040dca0
jmp 0x427838
lea ecx, [esp + 0x2b4]
push ecx
push esi
call fcn.0040dd10
add esp, 8
xor edi, edi
cmp dword [esp + 0x28], 0xa
jne 0x427855
mov edx, dword [esp + 0x18]
push edx
call fcn.00413810
add esp, 4
test eax, eax
jne 0x427865
mov eax, dword [esp + 0x18]
push eax
call sub.WINSPOOL.DRV_DeletePrinter
mov dword [esp + 0x34], eax
jmp 0x427870
push esi
call fcn.00404070
add esp, 4
mov edi, eax
mov ecx, dword [esp + 0x18]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
cmp dword [esp + 0x34], 0
je 0x4279ac
test edi, edi
jne 0x4279ac
mov edi, dword [esp + 0x28]
cmp edi, 2
je 0x42789b
cmp edi, 3
jne 0x4278ad
cmp ebx, 1
jne 0x4278ad
lea edx, [esp + 0x64]
push edx
call fcn.00404340
add esp, 4
cmp edi, 6
je 0x4278b7
cmp edi, 0xa
jne 0x4278cc
test ebp, ebp
je 0x4278cc
lea eax, [esp + 0x2b4]
push eax
push esi
call fcn.00417080
add esp, 8
mov ecx, dword [esp + 0x30]
add ecx, 0x3c4
push 0x45dcd8
push ecx
call fcn.004070c0
add esp, 8
test al, al
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 4]
lea edx, [esp + 0x6c]
push edx
push ecx
mov ecx, dword [esp + 0x34]
push esi
je 0x427901
call fcn.00423f80
jmp 0x427906
call fcn.00425f50
cmp edi, 2
je 0x427910
cmp edi, 3
jne 0x427961
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
push 1
push 0
push 0
push 0
lea edx, [esp + 0x58]
push edx
call esi
test eax, eax
je 0x427961
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebp, dword [sym.imp.USER32.dll_DispatchMessageA]
lea eax, [esp + 0x48]
push eax
call edi
lea ecx, [esp + 0x48]
push ecx
call ebp
push 1
push 0
push 0
push 0
lea edx, [esp + 0x58]
push edx
call esi
test eax, eax
jne 0x427940
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0xae0], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x427994
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x17]
mov dword [esp + 0xae0], 0xffffffff
call fcn.00407ac0
xor eax, eax
jmp 0x4279d9
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea ecx, [esp + 0x1c]
call fcn.00401660
mov dword [esp + 0xae0], 0xffffffff
lea ecx, [esp + 0x17]
call fcn.00407ac0
mov eax, 1
mov ecx, dword [esp + 0xad8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xac0]
xor ecx, esp
call fcn.0044027a
add esp, 0xad0
ret 0x10