Function at 0x140039990
Capabilities:
Check os version

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x208
mov rax, qword [0x14008c080]
xor rax, rsp
mov qword [rsp + 0x1f0], rax
mov rax, qword [rsp + 0x210]
mov rax, qword [rax]
mov r8d, 0xf000c
mov rdx, qword [rsp + 0x218]
mov rcx, qword [rsp + 0x210]
call qword [rax + 0x38]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140039a7c
mov edx, 0x7fffffff
mov rcx, qword [rsp + 0x218]
call fcn.140039530
mov qword [rsp + 0x190], rax
cmp qword [rsp + 0x220], 0
je 0x140039a43
mov eax, dword [rsp + 0x190]
cmp dword [rsp + 0x228], eax
jbe 0x140039a43
mov edx, dword [rsp + 0x228]
mov r8, qword [rsp + 0x218]
mov rcx, qword [rsp + 0x220]
call fcn.140001c10
cmp qword [rsp + 0x230], 0
je 0x140039a63
mov ecx, dword [rsp + 0x190]
add rcx, 1
mov rax, qword [rsp + 0x230]
mov dword [rax], ecx
xor edx, edx
mov rcx, qword [rsp + 0x210]
call fcn.140005c60
mov eax, 1
jmp 0x140039e62
mov rcx, qword [rsp + 0x20]
call sub.WINSPOOL.DRV_ClosePrinter
lea rcx, [0x140072ce0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rsp + 0x188], rax
cmp qword [rsp + 0x188], 0
jne 0x140039abf
mov edx, 0x7e
mov rcx, qword [rsp + 0x210]
call fcn.140005c60
xor eax, eax
jmp 0x140039e62
mov dword [rsp + 0x60], 0x114
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
mov ecx, 0x208
call fcn.140006748
mov qword [rsp + 0x198], rax
mov rax, qword [rsp + 0x198]
mov qword [rsp + 0x38], rax
cmp dword [rsp + 0x64], 5
jbe 0x140039b05
mov dword [rsp + 0x1d8], 0x4a38
jmp 0x140039b10
mov dword [rsp + 0x1d8], 0x3a08
mov r9d, 0x104
mov r8, qword [rsp + 0x38]
mov edx, dword [rsp + 0x1d8]
mov rcx, qword [rsp + 0x188]
call qword [sym.imp.USER32.dll_LoadStringW]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0x104
jl 0x140039be0
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x1a0], rax
mov rcx, qword [rsp + 0x1a0]
call fcn.140006750
movsxd rax, dword [rsp + 0x30]
add rax, 1
mov dword [rsp + 0x30], eax
movsxd rcx, dword [rsp + 0x30]
mov eax, 2
mul rcx
mov rcx, rax
mov rax, 0xffffffffffffffff
cmovo rcx, rax
call fcn.140006748
mov qword [rsp + 0x1a8], rax
mov rax, qword [rsp + 0x1a8]
mov qword [rsp + 0x38], rax
cmp dword [rsp + 0x64], 5
jbe 0x140039bb2
mov dword [rsp + 0x1dc], 0x4a38
jmp 0x140039bbd
mov dword [rsp + 0x1dc], 0x3a08
mov r9d, dword [rsp + 0x30]
mov r8, qword [rsp + 0x38]
mov edx, dword [rsp + 0x1dc]
mov rcx, qword [rsp + 0x188]
call qword [sym.imp.USER32.dll_LoadStringW]
mov dword [rsp + 0x30], eax
mov edx, 0x7fffffff
mov rcx, qword [rsp + 0x218]
call fcn.140039530
mov r11, rax
movsxd rax, dword [rsp + 0x30]
lea rax, [r11 + rax + 0x104]
mov qword [rsp + 0x180], rax
mov eax, 2
mul qword [rsp + 0x180]
mov rcx, rax
mov rax, 0xffffffffffffffff
cmovo rcx, rax
call fcn.140006748
mov qword [rsp + 0x1b0], rax
mov rax, qword [rsp + 0x1b0]
mov qword [rsp + 0x28], rax
mov eax, 2
mul qword [rsp + 0x180]
mov rcx, rax
mov rax, 0xffffffffffffffff
cmovo rcx, rax
call fcn.140006748
mov qword [rsp + 0x1b8], rax
mov rax, qword [rsp + 0x1b8]
mov qword [rsp + 0x40], rax
cmp dword [rsp + 0x70], 2
jne 0x140039c96
cmp dword [rsp + 0x64], 5
jne 0x140039c96
cmp dword [rsp + 0x68], 0
jne 0x140039c96
mov dword [rsp + 0x1e0], 2
jmp 0x140039ca1
mov dword [rsp + 0x1e0], 1
mov eax, dword [rsp + 0x1e0]
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0x270f
jg 0x140039d4d
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x1e4], eax
mov r9d, dword [rsp + 0x1e4]
mov r8, qword [rsp + 0x38]
mov rdx, qword [rsp + 0x180]
mov rcx, qword [rsp + 0x40]
call fcn.140001d90
mov eax, dword [rsp + 0x48]
add eax, 1
mov dword [rsp + 0x48], eax
mov r9, qword [rsp + 0x218]
mov r8, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x180]
mov rcx, qword [rsp + 0x28]
call fcn.140001d90
mov rax, qword [rsp + 0x210]
mov rax, qword [rax]
mov r8d, 0xf000c
mov rdx, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x210]
call qword [rax + 0x38]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140039d3e
jmp 0x140039d4d
mov rcx, qword [rsp + 0x20]
call sub.WINSPOOL.DRV_ClosePrinter
jmp 0x140039cac
mov edx, 0x7fffffff
mov rcx, qword [rsp + 0x28]
call fcn.140039530
mov qword [rsp + 0x180], rax
cmp qword [rsp + 0x220], 0
je 0x140039d99
mov eax, dword [rsp + 0x228]
cmp rax, qword [rsp + 0x180]
jbe 0x140039d99
mov edx, dword [rsp + 0x228]
mov r8, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x220]
call fcn.140001c10
cmp qword [rsp + 0x230], 0
je 0x140039db9
mov ecx, dword [rsp + 0x180]
add rcx, 1
mov rax, qword [rsp + 0x230]
mov dword [rax], ecx
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x1c0], rax
mov rcx, qword [rsp + 0x1c0]
call fcn.140006750
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x1c8], rax
mov rcx, qword [rsp + 0x1c8]
call fcn.140006750
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x1d0], rax
mov rcx, qword [rsp + 0x1d0]
call fcn.140006750
cmp qword [rsp + 0x20], 0
je 0x140039e1c
mov dword [rsp + 0x1e8], 0x70a
jmp 0x140039e27
mov dword [rsp + 0x1e8], 0
mov edx, dword [rsp + 0x1e8]
mov rcx, qword [rsp + 0x210]
call fcn.140005c60
cmp qword [rsp + 0x20], 0
jne 0x140039e50
mov dword [rsp + 0x1ec], 1
jmp 0x140039e5b
mov dword [rsp + 0x1ec], 0
mov eax, dword [rsp + 0x1ec]
mov rcx, qword [rsp + 0x1f0]
xor rcx, rsp
call fcn.14001b9f0
add rsp, 0x208
ret