Function at 0x140040680
Capabilities:
Get graphical window text

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push r15
sub rsp, 0x30
mov rax, qword [rsp + 0x70]
mov rbx, qword [0x140105130]
mov qword [rsp + 0x20], rax
call fcn.14004e2a0
mov rbp, rax
mov r15d, 1
test rax, rax
je 0x1400406bf
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea esi, [rax + 1]
jmp 0x1400406c2
mov esi, r15d
lea eax, [rsi - 1]
mov byte [rsp + 0x20], r15b
movsxd r8, eax
xor r9d, r9d
xor edx, edx
mov rcx, rbx
call fcn.14008ac50
cmp eax, r15d
je 0x1400406ef
xor eax, eax
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop rsi
pop rbp
ret
mov qword [rsp + 0x50], rdi
test rbp, rbp
je 0x14004083e
cmp byte [rbx + 0x23], 0
mov qword [rsp + 0x58], r14
jne 0x14004070e
mov rdi, qword [rbx + 0x10]
jmp 0x140040711
mov rdi, rbx
test byte [rdi + 0x21], 8
je 0x14004071f
mov rcx, rdi
call fcn.140001500
movzx eax, byte [rdi + 0x23]
cmp al, r15b
jne 0x14004073c
test byte [rdi + 0x21], 4
je 0x140040736
mov rdx, rdi
call fcn.1400366a0
mov rcx, qword [rdi + 8]
jmp 0x1400407a1
cmp al, 2
jne 0x14004079a
mov rcx, qword [0x140105fe8]
test rcx, rcx
jne 0x1400407a1
mov ecx, SafeArrayGetElemsize
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
jne 0x14004077a
lea ecx, [rax + 0xf]
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
lea rdx, [0x1400cbfb0]
lea rcx, [0x1400e8120]
cmovne rcx, rdx
jmp 0x1400407a1
xor edx, edx
call fcn.140004cf0
mov edx, 0xffffffff
lea rcx, [0x1400e8120]
cmp rax, rdx
cmovne rcx, qword [0x140105fe0]
jmp 0x1400407a1
lea rcx, [0x140105300]
mov rdx, rcx
mov r8d, esi
mov rcx, rbp
call qword [sym.imp.USER32.dll_GetWindowTextW]
cmp byte [rbx + 0x23], 0
movsxd r14, eax
jne 0x1400407bf
mov rsi, qword [rbx + 0x10]
jmp 0x1400407c2
mov rsi, rbx
lea rdi, [0x140106c28]
cmp byte [rsi + 0x23], r15b
jne 0x1400407e3
test byte [rsi + 0x21], 8
je 0x1400407dd
mov rcx, rsi
call fcn.140001500
add rsi, 0x10
jmp 0x1400407e6
mov rsi, rdi
lea rax, [r14 + r14]
mov r14, qword [rsp + 0x58]
mov qword [rsi], rax
cmp byte [rbx + 0x23], 0
jne 0x1400407fe
mov rsi, qword [rbx + 0x10]
jmp 0x140040801
mov rsi, rbx
cmp byte [rsi + 0x23], r15b
jne 0x140040819
test byte [rsi + 0x21], 8
je 0x140040815
mov rcx, rsi
call fcn.140001500
lea rdi, [rsi + 0x10]
test qword [rdi], 0xfffffffffffffffe
jne 0x140040915
xor r8d, r8d
mov edx, r15d
mov rcx, rbx
call fcn.140001630
xor esi, esi
mov word [rax], si
jmp 0x140040915
cmp byte [rbx + 0x23], 0
jne 0x14004084a
mov rdi, qword [rbx + 0x10]
jmp 0x14004084d
mov rdi, rbx
test byte [rdi + 0x21], 8
je 0x14004085b
mov rcx, rdi
call fcn.140001500
movzx eax, byte [rdi + 0x23]
cmp al, r15b
jne 0x140040878
test byte [rdi + 0x21], 4
je 0x140040872
mov rdx, rdi
call fcn.1400366a0
mov rcx, qword [rdi + 8]
jmp 0x1400408dd
cmp al, 2
jne 0x1400408d6
mov rcx, qword [0x140105fe8]
test rcx, rcx
jne 0x1400408dd
mov ecx, SafeArrayGetElemsize
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
jne 0x1400408b6
lea ecx, [rax + 0xf]
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
lea rdx, [0x1400cbfb0]
lea rcx, [0x1400e8120]
cmovne rcx, rdx
jmp 0x1400408dd
xor edx, edx
call fcn.140004cf0
mov edx, 0xffffffff
lea rcx, [0x1400e8120]
cmp rax, rdx
cmovne rcx, qword [0x140105fe0]
jmp 0x1400408dd
lea rcx, [0x140105300]
xor esi, esi
mov word [rcx], si
cmp byte [rbx + 0x23], sil
jne 0x1400408ee
mov rdi, qword [rbx + 0x10]
jmp 0x1400408f1
mov rdi, rbx
cmp byte [rdi + 0x23], r15b
jne 0x14004090b
test byte [rdi + 0x21], 8
je 0x140040905
mov rcx, rdi
call fcn.140001500
add rdi, 0x10
jmp 0x140040912
lea rdi, [0x140106c28]
mov qword [rdi], rsi
cmp byte [rbx + 0x23], 0
mov rdi, qword [rsp + 0x50]
jne 0x140040924
mov rbx, qword [rbx + 0x10]
cmp byte [rbx + 0x23], 2
jne 0x140040951
cmp qword [0x140105fe8], 0
je 0x140040951
lea rcx, [0x140105fd0]
call fcn.1400050c0
mov r15d, eax
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop rsi
pop rbp
ret
and byte [rbx + 0x21], 0x86
mov eax, r15d
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop rsi
pop rbp
ret