Function at 0x416ad0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
lea eax, [ebp - 0x118]
xor esi, esi
push eax
mov dword [ebp - 0x124], ebx
mov dword [ebp - 0x120], esi
mov dword [ebp - 0x11c], esi
xor edi, edi
mov dword [ebp - 0x118], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test ebx, ebx
jne 0x416b3f
push str.Parameter_Error_n
push 0x56dce8
call fcn.00415550
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x108]
cmp eax, 1
jne 0x416cab
push 0
lea ecx, [ebp - 0x11c]
push ecx
push ebx
call sub.WINSPOOL.DRV_OpenPrinterW
test eax, eax
je 0x416b2c
cmp dword [ebp - 0x11c], esi
je 0x416b2c
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x11c]
lea edx, [ebp - 0x120]
push edx
push 0
push 0
push 2
push eax
call sub.WINSPOOL.DRV_GetPrinterW
test eax, eax
jne 0x416bc0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x416ba1
cmp dword [ebp - 0x120], esi
jne 0x416bc0
mov ecx, dword [ebp - 0x11c]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x120]
push 0x159b
push str.DevConFunc.cpp
push edx
call fcn.0043e4e0
mov esi, eax
mov eax, dword [ebp - 0x11c]
add esp, 0xc
test esi, esi
je 0x416dff
mov edx, dword [ebp - 0x120]
lea ecx, [ebp - 0x120]
push ecx
push edx
push esi
push 2
push eax
call sub.WINSPOOL.DRV_GetPrinterW
test eax, eax
jne 0x416c2c
mov ecx, dword [ebp - 0x11c]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
push esi
call fcn.0043e500
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
or dword [esi + 0x34], 4
mov edx, dword [ebp - 0x11c]
push 0
push esi
push 2
push edx
call sub.WINSPOOL.DRV_SetPrinterW
test eax, eax
jne 0x416c4e
mov eax, dword [ebp - 0x11c]
push eax
jmp 0x416c0b
push 0
push 0x3e8
push 0
push str.windows
push 0
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
mov eax, dword [ebp - 0x11c]
test eax, eax
je 0x416c7b
push eax
call sub.WINSPOOL.DRV_ClosePrinter
test esi, esi
je 0x416c88
push esi
call fcn.0043e500
add esp, 4
test edi, edi
je 0x416c95
push edi
call fcn.0043e500
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x416c6b
cmp dword [ebp - 0x114], 5
jb 0x416d9e
push str.Windows_2000_or_later._n
push 0x56dce8
call fcn.00415550
add esp, 8
push str.winspool.drv
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
jne 0x416d05
push str.LoadLibrary_failed_n
push 0x56dce8
call fcn.00415550
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
push str.SetDefaultPrinterW
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x416d41
push str.GetProcAddress_failed_n
push 0x56dce8
call fcn.00415550
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x124]
push ecx
call eax
push ebx
mov dword [ebp - 0x128], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x128], esi
jne 0x416f3d
mov edx, dword [ebp - 0x124]
push edx
push str.fnSetDefaultPrinter_failed._Printer___s_n
call fcn.00415550
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ErrorCode__0x_x_n
call fcn.00415550
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x11c]
push eax
push ebx
call sub.WINSPOOL.DRV_OpenPrinterW
test eax, eax
je 0x416b2c
cmp dword [ebp - 0x11c], esi
je 0x416b2c
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0x11c]
lea ecx, [ebp - 0x120]
push ecx
push 0
push 0
push 2
push edx
call sub.WINSPOOL.DRV_GetPrinterW
test eax, eax
jne 0x416e18
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x416df9
cmp dword [ebp - 0x120], esi
jne 0x416e18
mov eax, dword [ebp - 0x11c]
push eax
call sub.WINSPOOL.DRV_ClosePrinter
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x120]
push 0x15f5
push str.DevConFunc.cpp
push ecx
call fcn.0043e4e0
mov edx, dword [ebp - 0x11c]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x416e56
push edx
call sub.WINSPOOL.DRV_ClosePrinter
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x120]
lea eax, [ebp - 0x120]
push eax
push ecx
push esi
push 2
push edx
call sub.WINSPOOL.DRV_GetPrinterW
test eax, eax
je 0x416f4d
mov eax, dword [esi + 0x10]
test eax, eax
je 0x416f4d
cmp dword [esi + 0xc], edi
je 0x416f4d
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
call edi
mov ebx, eax
mov eax, dword [esi + 0xc]
push eax
call edi
mov ecx, dword [ebp - 0x124]
push 0x160a
push str.DevConFunc.cpp
push ecx
add ebx, eax
call edi
add eax, ebx
lea edx, [eax + eax + 6]
push edx
call fcn.0043e4e0
mov edi, eax
add esp, 0xc
test edi, edi
je 0x416c45
mov ecx, dword [ebp - 0x124]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x56b914
push edi
call ebx
mov edx, dword [esi + 0x10]
push edx
push edi
call ebx
push 0x56b914
push edi
call ebx
mov eax, dword [esi + 0xc]
push eax
push edi
call ebx
push edi
push str.device
push str.windows
call dword [sym.imp.KERNEL32.dll_WriteProfileStringW]
test eax, eax
jne 0x416f3d
mov ecx, dword [ebp - 0x11c]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
push esi
call fcn.0043e500
push edi
call fcn.0043e500
mov ecx, dword [ebp - 4]
add esp, 8
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
push 0
push 0x3e8
push 0
push 0
jmp 0x416c5c
mov edx, dword [ebp - 0x11c]
push edx
jmp 0x416c0b