Function at 0x462f50
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1cc
mov eax, dword [0x4e412c]
xor eax, ebp
mov dword [ebp - 0x24], eax
push esi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xc0], 0x94
lea eax, [ebp - 0xc0]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp + 8], 0
je 0x462fb5
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx]
test edx, edx
jne 0x462fbc
xor eax, eax
jmp 0x4634e3
cmp dword [ebp - 0xb0], 1
jne 0x46310d
mov eax, dword [ebp + 8]
push eax
push str.LTSetDefaultPrinterA___pPrinterName__s__for_98_Me
push 0
call fcn.00464030
add esp, 0xc
push 0
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call sub.WINSPOOL.DRV_OpenPrinterA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x462ffa
cmp dword [ebp - 0xc], 0
jne 0x463001
xor eax, eax
jmp 0x4634e3
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 2
mov ecx, dword [ebp - 0xc]
push ecx
call sub.WINSPOOL.DRV_GetPrinterA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x463046
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x463036
cmp dword [ebp - 0x10], 0
jne 0x463046
mov edx, dword [ebp - 0xc]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
xor eax, eax
jmp 0x4634e3
mov eax, dword [ebp - 0x10]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x46306b
mov ecx, dword [ebp - 0xc]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
xor eax, eax
jmp 0x4634e3
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
push 2
mov edx, dword [ebp - 0xc]
push edx
call sub.WINSPOOL.DRV_GetPrinterA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4630a5
mov eax, dword [ebp - 0xc]
push eax
call sub.WINSPOOL.DRV_ClosePrinter
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x4634e3
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x34]
or eax, 4
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x34], eax
push 0
mov edx, dword [ebp - 0x20]
push edx
push 2
mov eax, dword [ebp - 0xc]
push eax
call sub.WINSPOOL.DRV_SetPrinterA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4630e8
mov ecx, dword [ebp - 0xc]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x4634e3
push 0
push 0x3e8
push 0
push 0x4c87a4
push 0
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutA]
mov dword [ebp - 0x18], eax
jmp 0x4634af
cmp dword [ebp - 0xb0], 2
jne 0x4634af
cmp dword [ebp - 0xbc], 5
jb 0x463154
mov eax, dword [ebp + 8]
push eax
push str.LTSetDefaultPrinterA___pPrinterName__s__for_2000_Over_n
push 0
call fcn.00464030
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
call sub.WINSPOOL.DRV_Ordinal_202
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x46314f
xor eax, eax
jmp 0x4634e3
jmp 0x46347f
mov edx, dword [ebp + 8]
push edx
push str.LTSetDefaultPrinterA___pPrinterName__s__for_NT4_n
push 0
call fcn.00464030
add esp, 0xc
push 0
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.WINSPOOL.DRV_OpenPrinterA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x463185
cmp dword [ebp - 0xc], 0
jne 0x46319b
push str.OpenPrinter_fail_n
push 0
call fcn.00464030
add esp, 8
xor eax, eax
jmp 0x4634e3
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea edx, [ebp - 0x10]
push edx
push 0
push 0
push 2
mov eax, dword [ebp - 0xc]
push eax
call sub.WINSPOOL.DRV_GetPrinterA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4631f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4631d0
cmp dword [ebp - 0x10], 0
jne 0x4631f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetPrinter_fail__d__n
push 0
call fcn.00464030
add esp, 0xc
mov ecx, dword [ebp - 0xc]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
xor eax, eax
jmp 0x4634e3
mov edx, dword [ebp - 0x10]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x463235
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GlobalAlloc_fail__d____d__n
push 0
call fcn.00464030
add esp, 0x10
mov ecx, dword [ebp - 0xc]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
xor eax, eax
jmp 0x4634e3
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
push 2
mov edx, dword [ebp - 0xc]
push edx
call sub.WINSPOOL.DRV_GetPrinterA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x46326b
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x10], 0
je 0x46326b
mov ecx, dword [ebp - 0x20]
cmp dword [ecx + 0xc], 0
jne 0x4632ef
mov edx, dword [ebp - 0x20]
cmp dword [edx + 0xc], 0
je 0x463282
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x1c4], ecx
jmp 0x46328c
mov dword [ebp - 0x1c4], 0x4c8860
mov edx, dword [ebp - 0x20]
cmp dword [edx + 0x10], 0
je 0x4632a3
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x1c8], ecx
jmp 0x4632ad
mov dword [ebp - 0x1c8], str.unknown
mov edx, dword [ebp - 0x1c4]
push edx
mov eax, dword [ebp - 0x1c8]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GlobalPrinter_2_fail__d____d____s____s__n
push 0
call fcn.00464030
add esp, 0x18
mov edx, dword [ebp - 0xc]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x4634e3
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [esi + eax + 3]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x46335d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GlobalAlloc_2_fail__d__n
push 0
call fcn.00464030
add esp, 0xc
mov ecx, dword [ebp - 0xc]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x4634e3
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x4c88b8
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0xfa
lea eax, [ebp - 0x1c0]
push eax
push 0x4c88bc
mov ecx, dword [ebp + 8]
push ecx
push str.Devices
call dword [sym.imp.KERNEL32.dll_GetProfileStringA]
push 0x4c88c8
lea edx, [ebp - 0x1c0]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4633c5
push 0x2c
lea eax, [ebp - 0x1c0]
push eax
call fcn.00464080
add esp, 8
test eax, eax
jne 0x4633f8
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x4c88cc
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x463409
lea edx, [ebp - 0x1c0]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ecx, dword [ebp - 8]
push ecx
push str.device
push str.windows
call dword [sym.imp.KERNEL32.dll_WriteProfileStringA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x46347f
cmp dword [ebp - 8], 0
je 0x463437
mov edx, dword [ebp - 8]
mov dword [ebp - 0x1cc], edx
jmp 0x463441
mov dword [ebp - 0x1cc], str.null
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteProfileString___fail___d___s__n
push 0
call fcn.00464030
add esp, 0x10
mov ecx, dword [ebp - 0xc]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x4634e3
mov ecx, dword [ebp - 8]
push ecx
push str.success___s_._n
push 0
call fcn.00464030
add esp, 0xc
push 0
push 0x3e8
push 0
push 0
push 0
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0xc], 0
je 0x4634be
mov edx, dword [ebp - 0xc]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
cmp dword [ebp - 0x20], 0
je 0x4634ce
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 8], 0
je 0x4634de
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 1
pop esi
mov ecx, dword [ebp - 0x24]
xor ecx, ebp
call fcn.00488550
mov esp, ebp
pop ebp
ret