Function at 0x140040160
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 [0x1401030e0]
mov qword [rsp + 0x20], rax
call fcn.14004dcf0
mov rbp, rax
mov r15d, 1
test rax, rax
je 0x14004019f
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea esi, [rax + 1]
jmp 0x1400401a2
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.14008a870
cmp eax, r15d
je 0x1400401cf
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 0x14004031b
cmp byte [rbx + 0x23], 0
mov qword [rsp + 0x58], r14
jne 0x1400401ee
mov rdi, qword [rbx + 0x10]
jmp 0x1400401f1
mov rdi, rbx
test byte [rdi + 0x21], 8
je 0x1400401ff
mov rcx, rdi
call fcn.140001320
movzx eax, byte [rdi + 0x23]
cmp al, r15b
jne 0x14004021c
test byte [rdi + 0x21], 4
je 0x140040216
mov rdx, rdi
call fcn.1400364a0
mov rcx, qword [rdi + 8]
jmp 0x140040281
cmp al, 2
jne 0x14004027a
mov rcx, qword [0x140103f98]
test rcx, rcx
jne 0x140040281
mov ecx, SafeArrayGetElemsize
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
jne 0x14004025a
lea ecx, [rax + 0xf]
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
lea rdx, [0x1400caf20]
lea rcx, [0x1400e70b8]
cmovne rcx, rdx
jmp 0x140040281
xor edx, edx
call fcn.140004b60
mov edx, 0xffffffff
lea rcx, [0x1400e70b8]
cmp rax, rdx
cmovne rcx, qword [0x140103f90]
jmp 0x140040281
lea rcx, [0x1401032b0]
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 0x14004029f
mov rsi, qword [rbx + 0x10]
jmp 0x1400402a2
mov rsi, rbx
lea rdi, [0x140104bd8]
cmp byte [rsi + 0x23], r15b
jne 0x1400402c3
test byte [rsi + 0x21], 8
je 0x1400402bd
mov rcx, rsi
call fcn.140001320
add rsi, 0x10
jmp 0x1400402c6
mov rsi, rdi
lea rax, [r14 + r14]
mov r14, qword [rsp + 0x58]
mov qword [rsi], rax
cmp byte [rbx + 0x23], 0
jne 0x1400402de
mov rsi, qword [rbx + 0x10]
jmp 0x1400402e1
mov rsi, rbx
cmp byte [rsi + 0x23], r15b
jne 0x1400402f9
test byte [rsi + 0x21], 8
je 0x1400402f5
mov rcx, rsi
call fcn.140001320
lea rdi, [rsi + 0x10]
cmp qword [rdi], 2
jae 0x1400403f2
xor r8d, r8d
mov edx, r15d
mov rcx, rbx
call fcn.140001450
xor esi, esi
mov word [rax], si
jmp 0x1400403f2
cmp byte [rbx + 0x23], 0
jne 0x140040327
mov rdi, qword [rbx + 0x10]
jmp 0x14004032a
mov rdi, rbx
test byte [rdi + 0x21], 8
je 0x140040338
mov rcx, rdi
call fcn.140001320
movzx eax, byte [rdi + 0x23]
cmp al, r15b
jne 0x140040355
test byte [rdi + 0x21], 4
je 0x14004034f
mov rdx, rdi
call fcn.1400364a0
mov rcx, qword [rdi + 8]
jmp 0x1400403ba
cmp al, 2
jne 0x1400403b3
mov rcx, qword [0x140103f98]
test rcx, rcx
jne 0x1400403ba
mov ecx, SafeArrayGetElemsize
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
jne 0x140040393
lea ecx, [rax + 0xf]
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
lea rdx, [0x1400caf20]
lea rcx, [0x1400e70b8]
cmovne rcx, rdx
jmp 0x1400403ba
xor edx, edx
call fcn.140004b60
mov edx, 0xffffffff
lea rcx, [0x1400e70b8]
cmp rax, rdx
cmovne rcx, qword [0x140103f90]
jmp 0x1400403ba
lea rcx, [0x1401032b0]
xor esi, esi
mov word [rcx], si
cmp byte [rbx + 0x23], sil
jne 0x1400403cb
mov rdi, qword [rbx + 0x10]
jmp 0x1400403ce
mov rdi, rbx
cmp byte [rdi + 0x23], r15b
jne 0x1400403e8
test byte [rdi + 0x21], 8
je 0x1400403e2
mov rcx, rdi
call fcn.140001320
add rdi, 0x10
jmp 0x1400403ef
lea rdi, [0x140104bd8]
mov qword [rdi], rsi
cmp byte [rbx + 0x23], 0
mov rdi, qword [rsp + 0x50]
jne 0x140040401
mov rbx, qword [rbx + 0x10]
cmp byte [rbx + 0x23], 2
jne 0x14004042e
cmp qword [0x140103f98], 0
je 0x14004042e
lea rcx, [0x140103f80]
call fcn.140004f30
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