Function at 0x1022084
Capabilities:
Get graphical window text

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
xor edi, edi
mov rsi, rcx
mov rcx, qword [rcx + 0x48]
mov rbp, rdi
mov r13, rdi
mov r15d, edi
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, qword [rsi + 0x50]
mov qword [rsi + 0x48], rdi
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
lea ebx, [rdi + 0x10]
lea rcx, [rsi + 0x68]
mov r8, rbx
xor edx, edx
mov qword [rsi + 0x50], rdi
call sub.msvcrt.dll_memset
lea rcx, [rsi + 0x78]
mov r8, rbx
xor edx, edx
call sub.msvcrt.dll_memset
mov rcx, qword [rsi + 8]
call qword [sym.imp.USER32.dll_GetDC]
mov rcx, qword [rsi + 8]
lea edx, [rdi + 0x31]
xor r9d, r9d
xor r8d, r8d
mov r14, rax
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, r14
mov rdx, rax
call qword [sym.imp.GDI32.dll_SelectObject]
mov rcx, qword [rsi + 8]
mov qword [rsp + 0x80], rax
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
inc eax
movsxd r12, eax
cmp r12, 1
je 0x1022362
lea ebx, [rdi + 2]
lea rbp, [rdi - 1]
mov rax, rbx
mul r12
cmovo rax, rbp
mov rcx, rax
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov r13, rax
mov rax, rbx
mul r12
cmovo rax, rbp
mov rcx, rax
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov rbp, rax
cmp r13, rdi
je 0x1022362
cmp rax, rdi
je 0x1022362
mov rcx, qword [rsi + 8]
mov r8d, r12d
mov rdx, r13
call qword [sym.imp.USER32.dll_GetWindowTextW]
mov rcx, qword [rsi + 8]
mov r8d, r12d
mov rdx, rbp
call qword [sym.imp.USER32.dll_GetWindowTextW]
mov rcx, qword [rsi + 8]
lea rdx, [rsp + 0x40]
call qword [sym.imp.USER32.dll_GetClientRect]
lea rdx, [0x010075d0]
mov rcx, rbp
call qword [sym.imp.SHLWAPI.dll_StrTrimW]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbp
lea r8d, [rax + 0x10]
xor edx, edx
repne scasw ax, word [rdi]
not rcx
lea rbx, [rbp + rcx*2 - 2]
lea rcx, [rsp + 0x30]
call sub.msvcrt.dll_memset
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbp
lea r9, [rsp + 0x30]
mov rdx, rbp
repne scasw ax, word [rdi]
mov dword [rsp + 0x20], 0xc00
not rcx
lea r8, [rcx - 1]
mov rcx, r14
call qword [sym.imp.USER32.dll_DrawTextW]
mov edx, dword [rsp + 0x48]
mov eax, dword [rsp + 0x38]
sub edx, dword [rsp + 0x40]
sub eax, dword [rsp + 0x30]
sub edx, 4
cmp eax, edx
jl 0x102229c
mov r15d, 1
jmp 0x1022235
movzx ecx, word [rbx]
call sub.msvcrt.dll_iswspace
test eax, eax
jne 0x102223a
sub rbx, 2
cmp rbx, rbp
ja 0x1022225
xor eax, eax
mov word [rbx], ax
cmp rbx, rbp
ja 0x10221a6
mov rcx, 0xffffffffffffffff
mov eax, 2
mov dword [rsi + 0x88], r15d
mov qword [rsi + 0x58], r12
mul r12
cmovo rax, rcx
mov rcx, rax
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov rdx, qword [rsi + 0x58]
mov r8, r13
mov rcx, rax
mov qword [rsi + 0x48], rax
call fcn.01015e90
lea rdx, [rsp + 0x40]
lea rcx, [rsi + 0x68]
call qword [sym.imp.USER32.dll_CopyRect]
mov edx, dword [rsp + 0x3c]
mov dword [rsi + 0x74], edx
jmp 0x1022362
sub rbx, rbp
mov r12d, 2
sar rbx, 1
mov rax, r12
lea rdi, [r12 - 3]
lea rcx, [rbx + 1]
mov qword [rsi + 0x58], rcx
mul rcx
cmovo rax, rdi
mov rcx, rax
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov rdx, qword [rsi + 0x58]
mov r8, rbp
mov rcx, rax
mov qword [rsi + 0x48], rax
call fcn.01015e90
lea rdx, [rsp + 0x40]
lea rcx, [rsi + 0x68]
call qword [sym.imp.USER32.dll_CopyRect]
mov ecx, dword [rsp + 0x3c]
xor eax, eax
mov dword [rsi + 0x74], ecx
cmp r15d, eax
je 0x1022362
mov rax, qword [rsi + 0x58]
lea rdx, [0x010075d0]
lea rbx, [r13 + rax*2]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_StrTrimW]
xor eax, eax
mov rcx, rdi
mov rdi, rbx
repne scasw ax, word [rdi]
mov rax, r12
not rcx
mov qword [rsi + 0x60], rcx
mul rcx
lea rcx, [r12 - 3]
cmovo rax, rcx
mov rcx, rax
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov rdx, qword [rsi + 0x60]
mov r8, rbx
mov rcx, rax
mov qword [rsi + 0x50], rax
call fcn.01015e90
lea rdx, [rsp + 0x40]
lea rcx, [rsi + 0x78]
call qword [sym.imp.USER32.dll_CopyRect]
mov edx, dword [rsp + 0x3c]
mov dword [rsi + 0x7c], edx
mov rcx, qword [rsi + 8]
mov rdx, r14
call qword [sym.imp.USER32.dll_ReleaseDC]
mov rdx, qword [rsp + 0x80]
mov rcx, r14
call qword [sym.imp.GDI32.dll_SelectObject]
mov rcx, rbp
call sub.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, r13
call sub.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret