Function at 0x140002d60
Capabilities:
Check os version

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x1c0
mov qword [rsp + 0x88], 0xfffffffffffffffe
mov rax, qword [0x140068cf8]
xor rax, rsp
mov qword [rsp + 0x1b0], rax
mov rdi, r8
mov r14, rdx
mov r12, rcx
mov qword [rsp + 0x80], rdx
xor r13d, r13d
mov dword [rsp + 0x58], r13d
call fcn.140009b20
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x140002dc9
mov ecx, 0x80004005
call fcn.140002150
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x38], rbx
call fcn.140009b20
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x140002df8
mov ecx, 0x80004005
call fcn.140002150
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
call fcn.140009b20
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x140002e27
mov ecx, 0x80004005
call fcn.140002150
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
or rsi, 0xffffffffffffffff
test rdi, rdi
je 0x14000305d
cmp word [rdi], 0
je 0x14000305d
mov qword [rsp + 0x50], r13
xor eax, eax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x78], 8
lea r8, [rsp + 0x68]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call sub.WINSPOOL.DRV_OpenPrinterW
cmp eax, 1
jne 0x14000305d
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor edx, edx
lea r8d, [rsi + 3]
mov rbp, qword [rsp + 0x50]
mov rcx, rbp
call sub.WINSPOOL.DRV_GetPrinterDriverW
mov edx, dword [rsp + 0x30]
test edx, edx
je 0x140002fbe
mov rcx, rdx
call fcn.140003c20
mov rdi, rax
test rax, rax
je 0x140002fbe
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x20], eax
mov r9, rdi
xor edx, edx
lea r8d, [rsi + 3]
mov rcx, rbp
call sub.WINSPOOL.DRV_GetPrinterDriverW
cmp eax, 1
jne 0x140002fa5
mov r8, qword [rdi + 0x20]
test r8, r8
je 0x140002fa5
lea rdx, [rsp + 0x60]
mov rcx, r12
call fcn.1400028d0
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rbx, 0xffffffffffffffe8
cmp rcx, rbx
je 0x140002f70
cmp dword [rbx + 0x10], 0
jl 0x140002f61
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x140002f61
call fcn.140001b20
mov rbp, rax
mov eax, esi
lock xadd dword [rbx + 0x10], eax
dec eax
test eax, eax
jg 0x140002f56
mov rcx, qword [rbx]
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp + 0x18]
mov qword [rsp + 0x38], rax
jmp 0x140002f70
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x38]
call fcn.140001f50
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140002f9b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x50]
jmp 0x140002fa5
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x140002fbe
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [rbx - 0x10], 0
je 0x140003055
mov rcx, rbp
call fcn.1400027a0
mov r12, rax
test rax, rax
je 0x140003010
xor eax, eax
mov rcx, rsi
mov rdi, r12
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r12
lea rcx, [rsp + 0x40]
call fcn.140001f50
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x140003010
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call fcn.1400026c0
mov r12, rax
test rax, rax
je 0x140003055
xor eax, eax
mov rcx, rsi
mov rdi, r12
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r12
lea rcx, [rsp + 0x48]
call fcn.140001f50
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x140003055
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rbp
call sub.WINSPOOL.DRV_ClosePrinter
call fcn.140009b20
mov rcx, rax
test rax, rax
setne r13b
test r13d, r13d
jne 0x14000307c
mov ecx, 0x80004005
call fcn.140002150
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [r14], rax
mov dword [rsp + 0x58], 1
cmp dword [rbx - 0x10], 0
je 0x14000316d
mov rax, qword [rsp + 0x40]
cmp dword [rax - 0x10], 0
je 0x14000316d
mov rax, qword [rsp + 0x48]
cmp dword [rax - 0x10], 0
je 0x14000316d
lea rdx, str.EBAPI.DLL
mov rcx, rbx
call fcn.140032774
test eax, eax
je 0x140003156
lea rdx, str.EBAPI2.DLL
mov rcx, rbx
call fcn.140032774
test eax, eax
je 0x140003156
lea rdx, str.EBAPI3.DLL
mov rcx, rbx
call fcn.140032774
test eax, eax
je 0x140003156
xor edx, edx
mov r8d, 0x114
lea rcx, [rsp + 0x90]
call fcn.140034670
mov dword [rsp + 0x90], 0x114
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp eax, 1
jne 0x140003156
cmp dword [rsp + 0xa0], 2
jne 0x140003156
cmp dword [rsp + 0x94], 5
jb 0x140003156
mov r9, rbx
mov r8, qword [rsp + 0x40]
lea rdx, str._s_s
mov rcx, r14
call fcn.140003a00
jmp 0x14000316d
mov r9, rbx
mov r8, qword [rsp + 0x48]
lea rdx, str._s_s
mov rcx, r14
call fcn.140003a00
mov r8, qword [r14]
lea rdx, str.EBAPI_Path___s__r_n
lea rcx, vtable.CWriteLog.0
call fcn.140001380
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400031a4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400031c4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x1400031e1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, r14
mov rcx, qword [rsp + 0x1b0]
xor rcx, rsp
call fcn.140031950
add rsp, 0x1c0
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret