Function at 0x1400a4f20
Capabilities:
Write clipboard data

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
mov rbx, rdx
mov rsi, rcx
call fcn.1400076d0
test eax, eax
jne 0x1400a4fc0
mov rax, qword [0x1401241d8]
cmp dword [rax + 0x60], 0
jne 0x1400a4f8c
cmp dword [0x14012cd88], 0
jne 0x1400a4f8c
cmp byte [0x140126ada], 0
jne 0x1400a4f8c
xor edi, edi
lea r9, [0x140100be0]
mov qword [rsp + 0x28], rdi
lea rdx, str.Cant_open_clipboard_for_writing.
lea rcx, [0x14012c670]
mov qword [rsp + 0x20], rdi
lea r8d, [rdi + 9]
call fcn.140010330
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
xor edi, edi
lea r8, [0x140100be0]
mov qword [rsp + 0x28], rdi
lea rdx, str.Cant_open_clipboard_for_writing.
xor r9d, r9d
mov dword [rsp + 0x20], 9
lea rcx, [0x14012c670]
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 0x1400a5082
mov r12d, dword [rsi]
test r12d, r12d
je 0x1400a5082
mov rbp, rbx
add rbx, 4
cmp rbx, r15
ja 0x1400a5082
mov ebp, dword [rbp]
mov rsi, rbx
add rbx, rbp
cmp rbx, r15
ja 0x1400a5082
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 0x1400a519c
test ebp, ebp
je 0x1400a5069
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
test rax, rax
je 0x1400a50e0
mov r8d, ebp
mov rdx, rsi
mov rcx, rax
call fcn.1400e2370
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 0x1400a4ff2
cmp dword [0x14012cedc], edi
je 0x1400a50ba
cmp qword [0x14012cec0], rdi
je 0x1400a50a7
mov rcx, qword [0x14012ceb0]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x14012cec0], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x14012cedc], edi
mov qword [0x14012ceb0], 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 [0x14012cedc], edi
je 0x1400a5121
cmp qword [0x14012cec0], rdi
je 0x1400a510e
mov rcx, qword [0x14012ceb0]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x14012cec0], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x14012cedc], edi
mov qword [0x14012ceb0], rdi
mov rax, qword [0x1401241d8]
cmp dword [rax + 0x60], edi
jne 0x1400a516d
cmp dword [0x14012cd88], edi
jne 0x1400a516d
cmp byte [0x140126ada], dil
jne 0x1400a516d
mov qword [rsp + 0x28], rdi
lea r9, [0x140100be0]
mov r8d, 9
mov qword [rsp + 0x20], rdi
lea rdx, str.An_internal_function_call_failed.
lea rcx, [0x14012c670]
call fcn.140010330
jmp 0x1400a50bf
mov qword [rsp + 0x28], rdi
lea r8, [0x140100be0]
xor r9d, r9d
mov dword [rsp + 0x20], 9
lea rdx, str.An_internal_function_call_failed.
lea rcx, [0x14012c670]
call fcn.14000ef80
jmp 0x1400a50bf
cmp dword [0x14012cedc], edi
je 0x1400a51d4
cmp qword [0x14012cec0], rdi
je 0x1400a51c1
mov rcx, qword [0x14012ceb0]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x14012cec0], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x14012cedc], edi
mov qword [0x14012ceb0], rdi
mov rax, qword [0x14012c4e8]
lea rdx, str.Out_of_memory.
mov qword [rsp + 0x28], rax
lea rcx, [0x14012c670]
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
call fcn.14000f470
jmp 0x1400a50bf