Function at 0x1400a6450
Capabilities:
Write clipboard data

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
mov rbx, rdx
mov rsi, rcx
call fcn.1400077a0
test eax, eax
jne 0x1400a64f2
mov rax, qword [0x1401251d8]
cmp dword [rax + 0x60], 0
jne 0x1400a64be
cmp dword [0x14012dd98], 0
jne 0x1400a64be
cmp byte [0x140127ada], 0
jne 0x1400a64be
xor edi, edi
lea r9, [0x140101bd0]
mov qword [rsp + 0x28], rdi
lea rdx, str.Cant_open_clipboard_for_writing.
mov r8d, 9
mov qword [rsp + 0x20], rdi
lea rcx, [0x14012d680]
call fcn.140010340
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
xor edi, edi
lea r8, [0x140101bd0]
mov qword [rsp + 0x28], rdi
lea rdx, str.Cant_open_clipboard_for_writing.
xor r9d, r9d
mov dword [rsp + 0x20], 9
lea rcx, [0x14012d680]
call fcn.14000ef80
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r15
call qword [sym.imp.USER32.dll_EmptyClipboard]
lea r15, [rsi + rbx]
xor edi, edi
lea rbx, [rsi + 4]
cmp rbx, r15
ja 0x1400a65b4
mov r12d, dword [rsi]
test r12d, r12d
je 0x1400a65b4
mov rbp, rbx
add rbx, 4
cmp rbx, r15
ja 0x1400a65b4
mov ebp, dword [rbp]
mov rsi, rbx
add rbx, rbp
cmp rbx, r15
ja 0x1400a65b4
mov eax, edi
test ebp, ebp
mov ecx, 0x42
sete al
lea edx, [rax + rbp]
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov r14, rax
test rax, rax
je 0x1400a66ce
test ebp, ebp
je 0x1400a659b
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
test rax, rax
je 0x1400a6612
mov r8d, ebp
mov rdx, rsi
mov rcx, rax
call fcn.1400e2970
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rsi, rbx
mov rdx, r14
mov ecx, r12d
call qword [sym.imp.USER32.dll_SetClipboardData]
lea rbx, [rsi + 4]
cmp rbx, r15
jbe 0x1400a6524
cmp dword [0x14012deec], edi
je 0x1400a65ec
cmp qword [0x14012ded0], rdi
je 0x1400a65d9
mov rcx, qword [0x14012dec0]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x14012ded0], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x14012deec], edi
mov qword [0x14012dec0], rdi
mov eax, 1
mov r14, qword [rsp + 0x38]
mov r13, qword [rsp + 0x70]
mov r12, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x60]
mov r15, qword [rsp + 0x30]
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [0x14012deec], edi
je 0x1400a6653
cmp qword [0x14012ded0], rdi
je 0x1400a6640
mov rcx, qword [0x14012dec0]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x14012ded0], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x14012deec], edi
mov qword [0x14012dec0], rdi
mov rax, qword [0x1401251d8]
cmp dword [rax + 0x60], edi
jne 0x1400a669f
cmp dword [0x14012dd98], edi
jne 0x1400a669f
cmp byte [0x140127ada], dil
jne 0x1400a669f
mov qword [rsp + 0x28], rdi
lea r9, [0x140101bd0]
mov r8d, 9
mov qword [rsp + 0x20], rdi
lea rdx, str.An_internal_function_call_failed.
lea rcx, [0x14012d680]
call fcn.140010340
jmp 0x1400a65f1
mov qword [rsp + 0x28], rdi
lea r8, [0x140101bd0]
xor r9d, r9d
mov dword [rsp + 0x20], 9
lea rdx, str.An_internal_function_call_failed.
lea rcx, [0x14012d680]
call fcn.14000ef80
jmp 0x1400a65f1
cmp dword [0x14012deec], edi
je 0x1400a6706
cmp qword [0x14012ded0], rdi
je 0x1400a66f3
mov rcx, qword [0x14012dec0]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x14012ded0], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x14012deec], edi
mov qword [0x14012dec0], rdi
mov rax, qword [0x14012d4f8]
lea rdx, str.Out_of_memory.
mov qword [rsp + 0x28], rax
lea rcx, [0x14012d680]
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
call fcn.14000f470
jmp 0x1400a65f1