Function at 0x140006f80
Capabilities:
Write clipboard data

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x30
cmp qword [0x140127d78], 0
mov rbx, r8
mov rsi, rdx
jne 0x140007023
xor edi, edi
test rdx, rdx
je 0x14000718b
mov eax, 0xffffffff
cmp rbx, rax
jne 0x140006fcc
mov rax, 0xffffffffffffffff
inc rax
cmp word [rdx + rax*2], di
jne 0x140006fc1
mov ebx, eax
test rbx, rbx
je 0x14000718b
lea r14, [rbx + 1]
test r14, r14
je 0x140007023
lea rdx, [r14 + r14]
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov qword [0x140127d68], rax
test rax, rax
jne 0x14000703b
mov rax, qword [0x1401273b8]
lea rdx, str.Out_of_memory.
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
xor r8d, r8d
lea rcx, [0x140127530]
call fcn.14000f6a0
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop r14
ret
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov qword [0x140127d78], rax
test rax, rax
jne 0x14000715e
mov rcx, qword [0x140127d68]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [0x140127be0]
mov qword [0x140127d68], rax
test rcx, rcx
je 0x1400070ef
cmp byte [0x140127cbc], dil
lea rdx, str.An_internal_function_call_failed.
je 0x14000709d
mov qword [rsp + 0x28], rdi
lea r8, [0x1400fcb50]
mov qword [rsp + 0x20], rcx
xor r9d, r9d
jmp 0x140007017
cmp byte [0x140127cbf], dil
je 0x1400070ca
mov eax, dword [rcx + 4]
lea r8, [0x1400fcb50]
movzx r9d, word [rcx + 2]
lea rcx, [0x140127530]
mov dword [rsp + 0x20], eax
call fcn.14000f540
jmp 0x140007023
mov qword [rsp + 0x28], rdi
lea r9, [0x1400fcb50]
mov qword [rsp + 0x20], rcx
xor r8d, r8d
lea rcx, [0x140127530]
call fcn.140010690
jmp 0x140007023
cmp byte [0x140127cbf], dil
je 0x140007132
cmp byte [0x140127cbc], dil
jne 0x140007132
mov eax, dword [0x140127804]
lea r8, [0x1400fcb50]
movzx r9d, word [0x140127800]
lea rdx, str.An_internal_function_call_failed.
lea rcx, [0x140127530]
mov dword [rsp + 0x20], eax
call fcn.14000f540
jmp 0x140007023
mov qword [rsp + 0x28], rdi
lea r9, [0x1400fcb50]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, str.An_internal_function_call_failed.
lea rcx, [0x140127530]
call fcn.140010690
jmp 0x140007023
mov dword [0x140127d88], r14d
mov word [rax], di
mov r14, qword [0x140127d78]
test r14, r14
je 0x140007023
mov r8, rbx
mov rdx, rsi
mov rcx, r14
call fcn.1400d02a4
mov word [r14 + rbx*2], di
cmp dword [0x140127d8c], edi
jne 0x1400071ad
call fcn.140007760
test eax, eax
jne 0x1400071ad
lea rdx, str.Cant_open_clipboard_for_writing.
call fcn.140007300
jmp 0x140007025
call qword [sym.imp.USER32.dll_EmptyClipboard]
test eax, eax
jne 0x140007200
cmp dword [0x140127d8c], edi
je 0x1400071ef
cmp qword [0x140127d70], rdi
je 0x1400071dc
mov rcx, qword [0x140127d60]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x140127d70], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x140127d8c], edi
mov qword [0x140127d60], rdi
lea rdx, [0x1400fed48]
call fcn.140007300
jmp 0x140007025
mov rdx, qword [0x140127d68]
test rdx, rdx
je 0x14000724a
mov rax, qword [0x140127d78]
test rax, rax
je 0x140007293
movzx ebx, word [rax]
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x140127d78], rdi
mov dword [0x140127d88], edi
test bx, bx
jne 0x14000728c
mov rcx, qword [0x140127d68]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov qword [0x140127d68], rax
cmp dword [0x140127d8c], edi
je 0x140007282
cmp qword [0x140127d70], rdi
je 0x14000726f
mov rcx, qword [0x140127d60]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x140127d70], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x140127d8c], edi
mov qword [0x140127d60], rdi
mov eax, 1
jmp 0x140007025
mov rdx, qword [0x140127d68]
mov ecx, recv
call qword [sym.imp.USER32.dll_SetClipboardData]
test rax, rax
je 0x1400072ac
mov qword [0x140127d68], rdi
jmp 0x14000724a
cmp dword [0x140127d8c], edi
je 0x1400072e4
cmp qword [0x140127d70], rdi
je 0x1400072d1
mov rcx, qword [0x140127d60]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov qword [0x140127d70], rdi
call qword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x140127d8c], edi
mov qword [0x140127d60], rdi
lea rdx, [0x1400fed68]
call fcn.140007300
jmp 0x140007025