Function at 0x140002d40
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.140009770
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x140002da9
mov ecx, 0x80004005
call fcn.140002160
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x38], rbx
call fcn.140009770
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x140002dd8
mov ecx, 0x80004005
call fcn.140002160
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
call fcn.140009770
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x140002e07
mov ecx, 0x80004005
call fcn.140002160
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
or rsi, 0xffffffffffffffff
test rdi, rdi
je 0x14000303d
cmp word [rdi], 0
je 0x14000303d
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 0x14000303d
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 0x140002f9e
mov rcx, rdx
call fcn.140003c00
mov rdi, rax
test rax, rax
je 0x140002f9e
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 0x140002f85
mov r8, qword [rdi + 0x20]
test r8, r8
je 0x140002f85
lea rdx, [rsp + 0x60]
mov rcx, r12
call fcn.1400028b0
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rbx, 0xffffffffffffffe8
cmp rcx, rbx
je 0x140002f50
cmp dword [rbx + 0x10], 0
jl 0x140002f41
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x140002f41
call fcn.140001b20
mov rbp, rax
mov eax, esi
lock xadd dword [rbx + 0x10], eax
dec eax
test eax, eax
jg 0x140002f36
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 0x140002f50
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x38]
call fcn.140001f60
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140002f7b
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 0x140002f85
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x140002f9e
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [rbx - 0x10], 0
je 0x140003035
mov rcx, rbp
call fcn.140002780
mov r12, rax
test rax, rax
je 0x140002ff0
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.140001f60
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x140002ff0
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call fcn.1400026a0
mov r12, rax
test rax, rax
je 0x140003035
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.140001f60
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x140003035
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.140009770
mov rcx, rax
test rax, rax
setne r13b
test r13d, r13d
jne 0x14000305c
mov ecx, 0x80004005
call fcn.140002160
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 0x14000314d
mov rax, qword [rsp + 0x40]
cmp dword [rax - 0x10], 0
je 0x14000314d
mov rax, qword [rsp + 0x48]
cmp dword [rax - 0x10], 0
je 0x14000314d
lea rdx, str.EBAPI.DLL
mov rcx, rbx
call fcn.1400323c4
test eax, eax
je 0x140003136
lea rdx, str.EBAPI2.DLL
mov rcx, rbx
call fcn.1400323c4
test eax, eax
je 0x140003136
lea rdx, str.EBAPI3.DLL
mov rcx, rbx
call fcn.1400323c4
test eax, eax
je 0x140003136
xor edx, edx
mov r8d, 0x114
lea rcx, [rsp + 0x90]
call fcn.1400342c0
mov dword [rsp + 0x90], 0x114
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp eax, 1
jne 0x140003136
cmp dword [rsp + 0xa0], 2
jne 0x140003136
cmp dword [rsp + 0x94], 5
jb 0x140003136
mov r9, rbx
mov r8, qword [rsp + 0x40]
lea rdx, str._s_s
mov rcx, r14
call fcn.1400039e0
jmp 0x14000314d
mov r9, rbx
mov r8, qword [rsp + 0x48]
lea rdx, str._s_s
mov rcx, r14
call fcn.1400039e0
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 0x140003184
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 0x1400031a4
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 0x1400031c1
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.1400315a0
add rsp, 0x1c0
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret