Function at 0x10064c180
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rdi, qword [sym.imp.USER32.dll_OpenClipboard]
mov ebx, 7
mov esi, 0xa
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [rsp + 0x30], 0xffffffffffffffff
mov r12, rcx
mov qword [rsp + 0x38], 0xffffffffffffffff
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
jmp 0x10064c1d6
mov ecx, esi
add esi, esi
call rbp
xor ecx, ecx
call rdi
test eax, eax
jne 0x10064c1f8
sub ebx, 1
jne 0x10064c1d0
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, dword [r12 + 0x54]
mov rbx, qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
call rbx
test eax, eax
jne 0x10064c270
mov ecx, dword [r12 + 0x58]
call rbx
test eax, eax
je 0x10064c230
mov rdi, qword [sym.vim.exe_p_enc]
mov esi, dword [rsp + 0x3c]
mov rcx, qword [rdi]
call sub.msys_2.0.dll_strlen
cmp esi, eax
jg 0x10064c370
mov ecx, 0xd
call rbx
test eax, eax
je 0x10064c247
mov esi, dword [rsp + 0x38]
test esi, esi
jne 0x10064c4a0
mov ecx, 1
call rbx
test eax, eax
jne 0x10064c2d8
xor r13d, r13d
call qword [sym.imp.USER32.dll_CloseClipboard]
mov rcx, r13
call sym.vim.exe_vim_free
jmp 0x10064c1e3
mov ecx, dword [r12 + 0x54]
call qword [sym.imp.USER32.dll_GetClipboardData]
mov r14, rax
test rax, rax
je 0x10064c20a
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov r15, rax
test rax, rax
je 0x10064c20a
mov rsi, qword [sym.imp.KERNEL32.dll_GlobalSize]
mov rcx, r14
call rsi
mov r8d, 0x10
cmp rax, 0xf
jbe 0x10064c60e
lea rcx, [rsp + 0x30]
mov r9d, 0x10
mov rdx, r15
call fcn.100672a10
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x10064c20a
mov ecx, 1
call qword [sym.imp.USER32.dll_GetClipboardData]
mov r15, rax
test rax, rax
je 0x10064c256
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rcx, r15
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GlobalSize]
mov ebx, dword [rsp + 0x34]
mov dword [rsp + 0x24], eax
mov edx, eax
test ebx, ebx
js 0x10064c51f
cmp eax, ebx
jge 0x10064c603
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x24]
lea r8, [rsp + 0x28]
mov rcx, r13
call sym.vim.exe_acp_to_enc
mov r14, qword [rsp + 0x28]
test r14, r14
je 0x10064c61b
mov eax, dword [rsp + 0x24]
mov dword [rsp + 0x20], eax
test ebx, ebx
jne 0x10064c63c
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
nop dword [rax + rax]
mov r13, qword [rsp + 0x28]
jmp 0x10064c259
mov ecx, dword [r12 + 0x58]
call qword [sym.imp.USER32.dll_GetClipboardData]
mov r14, rax
test rax, rax
je 0x10064c230
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rbp, rax
test rax, rax
je 0x10064c5d4
mov r15, qword [rdi]
mov rdx, rax
mov rcx, r15
call sub.msys_2.0.dll_strcmp
test eax, eax
jne 0x10064c5d4
mov rcx, r15
call sub.msys_2.0.dll_strlen
lea rdx, [rax + 1]
mov eax, esi
sub eax, edx
lea r13, [rbp + rdx]
mov edx, dword [rsp + 0x34]
mov dword [rsp + 0x20], eax
test edx, edx
je 0x10064c48b
xor r15d, r15d
cmp dword [rsp + 0x30], 0xffffffff
jne 0x10064c3e9
mov dword [rsp + 0x30], 0xff
mov ebx, dword [rsp + 0x20]
test ebx, ebx
je 0x10064c5e8
movsxd rcx, ebx
call sym.vim.exe_alloc
mov rsi, rax
test rax, rax
je 0x10064c474
test ebx, ebx
jle 0x10064c458
mov r8, rax
xor edx, edx
jmp 0x10064c41f
add edx, 1
add r8, 1
mov byte [r8 - 1], cl
cmp ebx, edx
jle 0x10064c458
movsxd r9, edx
movzx ecx, byte [r13 + r9]
cmp cl, 0xd
jne 0x10064c410
lea rax, [r13 + r9 + 1]
cmp byte [rax], 0xa
jne 0x10064c410
sub dword [rsp + 0x20], 1
add edx, 1
movzx ecx, byte [rax]
add r8, 1
add edx, 1
mov byte [r8 - 1], cl
cmp ebx, edx
jg 0x10064c41f
nop dword [rax]
mov ecx, dword [rsp + 0x30]
movsxd r8, dword [rsp + 0x20]
mov r9, r12
mov rdx, rsi
call sym.vim.exe_clip_yank_selection
mov rcx, rsi
call sym.vim.exe_vim_free
test r15, r15
je 0x10064c482
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
test r14, r14
je 0x10064c360
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x10064c360
mov ecx, 0xd
call qword [sym.imp.USER32.dll_GetClipboardData]
mov r14, rax
test rax, rax
je 0x10064c256
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rcx, r14
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GlobalSize]
shr rax, 1
mov dword [rsp + 0x24], eax
test esi, esi
js 0x10064c585
cmp esi, eax
cmovg esi, eax
mov dword [rsp + 0x20], esi
mov rcx, r15
lea rdx, [rsp + 0x20]
call sym.vim.exe_utf16_to_enc
mov rcx, r14
mov r13, rax
mov qword [rsp + 0x28], rax
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
test r13, r13
je 0x10064c259
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x10064c360
xor r14d, r14d
jmp 0x10064c3d7
mov dword [rsp + 0x20], 0
test eax, eax
jle 0x10064c635
lea edx, [rax - 1]
mov eax, 1
add rdx, 2
jmp 0x10064c550
mov dword [rsp + 0x20], eax
mov r10d, eax
add rax, 1
cmp rax, rdx
je 0x10064c55d
cmp byte [r13 + rax - 1], 0
jne 0x10064c540
mov r10d, dword [rsp + 0x20]
lea r9, [rsp + 0x24]
lea r8, [rsp + 0x28]
mov edx, r10d
mov rcx, r13
call sym.vim.exe_acp_to_enc
mov r14, qword [rsp + 0x28]
test r14, r14
jne 0x10064c342
jmp 0x10064c3da
mov dword [rsp + 0x20], 0
test eax, eax
jle 0x10064c4e4
lea edx, [rax - 1]
xor ecx, ecx
mov eax, 1
add rdx, 2
jmp 0x10064c5b9
mov r13d, eax
add rax, 1
mov ecx, 1
cmp rax, rdx
je 0x10064c5ca
cmp word [r15 + rax*2 - 2], 0
jne 0x10064c5a8
test cl, cl
je 0x10064c4e4
mov dword [rsp + 0x20], r13d
jmp 0x10064c4e4
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x10064c230
mov ecx, 1
call sym.vim.exe_alloc
mov rsi, rax
test rax, rax
je 0x10064c474
jmp 0x10064c458
mov dword [rsp + 0x20], ebx
mov edx, ebx
jmp 0x10064c322
mov rcx, r14
call rsi
mov r8, rax
jmp 0x10064c2b4
mov r14, r13
test r13, r13
jne 0x10064c34a
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x10064c259
xor edx, edx
jmp 0x10064c322
mov r13, r14
xor r14d, r14d
jmp 0x10064c3da