Function at 0x140002e90
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 [0x140063cf0]
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.140004c98
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x140002ef9
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.140004c98
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x140002f28
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.140004c98
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x140002f57
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 0x14000318d
cmp word [rdi], 0
je 0x14000318d
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 0x14000318d
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 0x1400030ee
mov rcx, rdx
call fcn.1400037b0
mov rdi, rax
test rax, rax
je 0x1400030ee
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 0x1400030d5
mov r8, qword [rdi + 0x20]
test r8, r8
je 0x1400030d5
lea rdx, [rsp + 0x60]
mov rcx, r12
call fcn.1400029f0
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rbx, 0xffffffffffffffe8
cmp rcx, rbx
je 0x1400030a0
cmp dword [rbx + 0x10], 0
jl 0x140003091
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x140003091
call fcn.140001b70
mov rbp, rax
mov eax, esi
lock xadd dword [rbx + 0x10], eax
dec eax
test eax, eax
jg 0x140003086
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 0x1400030a0
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x38]
call fcn.140001fb0
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400030cb
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 0x1400030d5
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x1400030ee
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [rbx - 0x10], 0
je 0x140003185
mov rcx, rbp
call fcn.1400028c0
mov r12, rax
test rax, rax
je 0x140003140
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.140001fb0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x140003140
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call fcn.1400027e0
mov r12, rax
test rax, rax
je 0x140003185
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.140001fb0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x140003185
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.140004c98
mov rcx, rax
test rax, rax
setne r13b
test r13d, r13d
jne 0x1400031ac
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 0x14000329d
mov rax, qword [rsp + 0x40]
cmp dword [rax - 0x10], 0
je 0x14000329d
mov rax, qword [rsp + 0x48]
cmp dword [rax - 0x10], 0
je 0x14000329d
lea rdx, str.EBAPI.DLL
mov rcx, rbx
call fcn.14002ea20
test eax, eax
je 0x140003286
lea rdx, str.EBAPI2.DLL
mov rcx, rbx
call fcn.14002ea20
test eax, eax
je 0x140003286
lea rdx, str.EBAPI3.DLL
mov rcx, rbx
call fcn.14002ea20
test eax, eax
je 0x140003286
xor edx, edx
mov r8d, 0x114
lea rcx, [rsp + 0x90]
call fcn.140030880
mov dword [rsp + 0x90], 0x114
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp eax, 1
jne 0x140003286
cmp dword [rsp + 0xa0], 2
jne 0x140003286
cmp dword [rsp + 0x94], 5
jb 0x140003286
mov r9, rbx
mov r8, qword [rsp + 0x40]
lea rdx, str._s_s
mov rcx, r14
call fcn.140003610
jmp 0x14000329d
mov r9, rbx
mov r8, qword [rsp + 0x48]
lea rdx, str._s_s
mov rcx, r14
call fcn.140003610
mov r8, qword [r14]
lea rdx, str.EBAPI_Path___s__r_n
lea rcx, vtable.CWriteLog.0
call fcn.140001440
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400032d4
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 0x1400032f4
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 0x140003311
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.14002ce30
add rsp, 0x1c0
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret