Function at 0x1400a9cd0
Capabilities:
Write clipboard data

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
mov rbx, rdx
mov rsi, rcx
call fcn.140007730
test eax, eax
jne 0x1400a9d6b
mov rax, qword [0x14012c398]
cmp dword [rax + 0x60], 0
jne 0x1400a9d37
cmp dword [0x140135218], 0
jne 0x1400a9d37
cmp byte [0x14012ed1d], 1
je 0x1400a9d37
xor edi, edi
lea r9, [0x140106cb0]
lea rdx, str.Cant_open_clipboard_for_writing.
mov qword [rsp + 0x20], rdi
lea rcx, [0x140134a20]
lea r8d, [rdi + 9]
call fcn.140010b10
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
xor edi, edi
lea r8, [0x140106cb0]
mov qword [rsp + 0x28], rdi
lea rdx, str.Cant_open_clipboard_for_writing.
xor r9d, r9d
mov dword [rsp + 0x20], 9
lea rcx, [0x140134a20]
call fcn.14000f460
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 0x1400a9e30
nop dword [rax]
mov r12d, dword [rsi]
test r12d, r12d
je 0x1400a9e30
mov rbp, rbx
add rbx, 4
cmp rbx, r15
ja 0x1400a9e30
mov ebp, dword [rbp]
mov rsi, rbx
add rbx, rbp
cmp rbx, r15
ja 0x1400a9e30
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 0x1400a9f45
test ebp, ebp
je 0x1400a9e17
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
test rax, rax
je 0x1400a9e8e
mov r8d, ebp
mov rdx, rsi
mov rcx, rax
call fcn.1400e78c0
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 0x1400a9da0
cmp dword [0x14013536c], edi
je 0x1400a9e68
cmp qword [0x140135350], rdi
je 0x1400a9e55
mov rcx, qword [0x140135340]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x140135350], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x14013536c], edi
mov qword [0x140135340], 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 [0x14013536c], edi
je 0x1400a9ecf
cmp qword [0x140135350], rdi
je 0x1400a9ebc
mov rcx, qword [0x140135340]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x140135350], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x14013536c], edi
mov qword [0x140135340], rdi
mov rax, qword [0x14012c398]
cmp dword [rax + 0x60], edi
jne 0x1400a9f16
cmp dword [0x140135218], edi
jne 0x1400a9f16
cmp byte [0x14012ed1d], 1
je 0x1400a9f16
lea r9, [0x140106cb0]
mov qword [rsp + 0x20], rdi
mov r8d, 9
lea rdx, str.An_internal_function_call_failed.
lea rcx, [0x140134a20]
call fcn.140010b10
jmp 0x1400a9e6d
mov qword [rsp + 0x28], rdi
lea r8, [0x140106cb0]
xor r9d, r9d
mov dword [rsp + 0x20], 9
lea rdx, str.An_internal_function_call_failed.
lea rcx, [0x140134a20]
call fcn.14000f460
jmp 0x1400a9e6d
cmp dword [0x14013536c], edi
je 0x1400a9f7d
cmp qword [0x140135350], rdi
je 0x1400a9f6a
mov rcx, qword [0x140135340]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x140135350], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x14013536c], edi
mov qword [0x140135340], rdi
mov rax, qword [0x140134898]
lea rdx, str.Out_of_memory.
mov qword [rsp + 0x28], rax
lea rcx, [0x140134a20]
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
call fcn.14000fb70
jmp 0x1400a9e6d