Function at 0x14004e700
Capabilities:
Terminate thread

Disassembly:
push rsi
push rdi
push r12
sub rsp, 0x40
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbp
mov rsi, rcx
mov rax, qword [rcx + 0x110]
mov rdi, qword [rax + 0x178]
xor ebx, ebx
test rdi, rdi
je 0x14004e7d3
mov rax, qword [rdi]
cmp dword [rax + 0x174], 4
jl 0x14004e7d3
call fcn.14009d5e8
mov r11, rax
mov ecx, ebx
test rax, rax
setne cl
test ecx, ecx
jne 0x14004e767
mov ecx, 0x80004005
call fcn.1400034f0
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x60], rax
lea rax, [0x1400fb278]
mov qword [rsp + 0x20], rax
lea r9, str.ChkAndWaitThread
lea r8, str.CPrinterCstmPage
lea rdx, str.private__s::_s__s_
lea rcx, [rsp + 0x60]
call fcn.14000a800
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.14002f200
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14004e7d3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test byte [rsi + 0x67c], 0x40
je 0x14004e96a
call fcn.1400a0754
test rax, rax
je 0x14004e7f8
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + pe_nt_image_headers64]
jmp 0x14004e7fb
mov rax, rbx
xor r9d, r9d
mov edx, 0x2b10
mov r8d, 0x261
mov rcx, qword [rax + 0x40]
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [rsi + 0x40]
call qword [sym.imp.USER32.dll_GetParent]
mov rcx, rax
call fcn.140095810
mov rdi, rax
call fcn.1400a0754
test rax, rax
je 0x14004e840
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + pe_nt_image_headers64]
jmp 0x14004e843
mov rax, rbx
xor r9d, r9d
mov r8, rdi
mov edx, 0x2b11
mov rcx, qword [rax + 0x40]
call qword [sym.imp.USER32.dll_SendMessageW]
call fcn.1400a0754
test rax, rax
je 0x14004e870
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + pe_nt_image_headers64]
jmp 0x14004e873
mov rax, rbx
mov r9d, 0x30001
mov r12d, 1
mov r8, r12
mov edx, 0x2b12
mov rcx, qword [rax + 0x40]
call qword [sym.imp.USER32.dll_SendMessageW]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2b3b
mov ecx, dword [rsi + 0x678]
call qword [sym.imp.USER32.dll_PostThreadMessageW]
mov ebp, 0x7530
mov edi, ebx
xor edx, edx
mov rcx, qword [rsi + 0x670]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14004e92f
test edi, edi
jne 0x14004e920
call fcn.1400a0754
test rax, rax
je 0x14004e8de
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + pe_nt_image_headers64]
jmp 0x14004e8e1
mov rax, rbx
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2b3d
mov rcx, qword [rax + 0x40]
call qword [sym.imp.USER32.dll_SendMessageW]
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
sub rbp, 0x64
cmovs edi, r12d
xor edx, edx
mov rcx, qword [rsi + 0x670]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x14004e8c2
test edi, edi
je 0x14004e92f
xor edx, edx
mov rcx, qword [rsi + 0x670]
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rcx, qword [rsi + 0x670]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.1400a0754
test rax, rax
je 0x14004e955
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + pe_nt_image_headers64]
mov rbx, rax
xor r9d, r9d
mov r8, r12
mov edx, 0x2b13
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.USER32.dll_SendMessageW]
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
add rsp, 0x40
pop r12
pop rdi
pop rsi
ret