Function at 0x140012a20
Capabilities:
Get graphical window text

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x450
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov rax, qword [0x140267b40]
xor rax, rsp
mov qword [rsp + 0x440], rax
mov r15d, 1
call fcn.140023c3c
mov rcx, rax
xor r13d, r13d
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x140012a83
mov ecx, 0x80004005
call fcn.140019e30
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x20], rdi
call fcn.140023c3c
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x140012ab2
mov ecx, 0x80004005
call fcn.140019e30
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x28], rbx
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov rsi, rax
mov r8d, 0x100
lea rdx, [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowTextW]
mov r8d, 0x100
lea rdx, [rsp + 0x240]
mov rcx, rsi
call qword [sym.imp.USER32.dll_GetClassNameW]
lea rax, [rsp + 0x40]
or rbp, 0xffffffffffffffff
mov rsi, rbp
inc rsi
cmp word [rax + rsi*2], 0
jne 0x140012b01
test esi, esi
jne 0x140012b6d
lea rdx, [rbx - 0x18]
mov rsi, qword [rdx]
cmp dword [rdx + 8], 0
je 0x140012bea
cmp dword [rdx + 0x10], 0
jge 0x140012b44
cmp dword [rbx - 0xc], 0
jge 0x140012b37
mov ecx, 0x80070057
call fcn.140019e30
int3
mov dword [rbx - 0x10], r13d
mov word [rbx], r13w
jmp 0x140012bea
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140012b54
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x28], rbx
mov rdi, qword [rsp + 0x20]
jmp 0x140012bea
mov r12d, dword [rbx - 0x10]
lea r14, [rsp + 0x40]
sub r14, rbx
sar r14, 1
test esi, esi
jns 0x140012b8b
mov ecx, 0x80070057
call fcn.140019e30
int3
mov ecx, r15d
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, esi
or eax, ecx
jge 0x140012bab
mov edx, esi
lea rcx, [rsp + 0x28]
call fcn.140019dd0
mov rbx, qword [rsp + 0x28]
movsxd rax, esi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp r14, r12
lea r12, [rax + rax]
mov r9, r12
ja 0x140012bcf
lea r8, [rbx + r14*2]
call fcn.14019a16c
jmp 0x140012bd9
lea r8, [rsp + 0x40]
call fcn.14019a0e4
cmp esi, dword [rbx - 0xc]
jg 0x140012e15
mov dword [rbx - 0x10], esi
mov word [r12 + rbx], r13w
lea rax, [rsp + 0x240]
mov rsi, rbp
inc rsi
cmp word [rax + rsi*2], 0
jne 0x140012bf5
test esi, esi
jne 0x140012c64
lea rdx, [rdi - 0x18]
mov rsi, qword [rdx]
cmp dword [rdx + 8], 0
je 0x140012ce7
cmp dword [rdx + 0x10], 0
jge 0x140012c38
cmp dword [rdi - 0xc], 0
jge 0x140012c2b
mov ecx, 0x80070057
call fcn.140019e30
int3
mov dword [rdi - 0x10], r13d
mov word [rdi], r13w
jmp 0x140012ce7
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140012c48
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x20], rax
mov rbx, qword [rsp + 0x28]
jmp 0x140012ce7
mov r12d, dword [rdi - 0x10]
lea r14, [rsp + 0x240]
sub r14, rdi
sar r14, 1
test esi, esi
jns 0x140012c85
mov ecx, 0x80070057
call fcn.140019e30
int3
mov ecx, r15d
sub ecx, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
sub eax, esi
or eax, ecx
jge 0x140012ca5
mov edx, esi
lea rcx, [rsp + 0x20]
call fcn.140019dd0
mov rdi, qword [rsp + 0x20]
movsxd rax, esi
movsxd rdx, dword [rdi - 0xc]
mov rcx, rdi
add rdx, rdx
cmp r14, r12
lea r12, [rax + rax]
mov r9, r12
ja 0x140012cc9
lea r8, [rdi + r14*2]
call fcn.14019a16c
jmp 0x140012cd6
lea r8, [rsp + 0x240]
call fcn.14019a0e4
cmp esi, dword [rdi - 0xc]
jg 0x140012e0a
mov dword [rdi - 0x10], esi
mov word [r12 + rdi], r13w
cmp dword [rbx - 0x10], 0
jl 0x140012dd6
lea rdx, str.Microsoft_Word
mov rcx, rbx
call fcn.14019aaf8
test rax, rax
je 0x140012d13
sub rax, rbx
sar rax, 1
test eax, eax
jns 0x140012dd3
cmp dword [rbx - 0x10], 0
jl 0x140012dd6
lea rdx, str.___Word
mov rcx, rbx
call fcn.14019aaf8
test rax, rax
je 0x140012d3f
sub rax, rbx
sar rax, 1
test eax, eax
jns 0x140012dd3
cmp dword [rbx - 0x10], 0
jl 0x140012dd6
lea rdx, str.Microsoft_Excel
mov rcx, rbx
call fcn.14019aaf8
test rax, rax
je 0x140012d67
sub rax, rbx
sar rax, 1
test eax, eax
jns 0x140012dd3
cmp dword [rbx - 0x10], 0
jl 0x140012dd6
lea rdx, str.___Excel
mov rcx, rbx
call fcn.14019aaf8
test rax, rax
je 0x140012d8b
sub rax, rbx
sar rax, 1
test eax, eax
jns 0x140012dd3
cmp dword [rbx - 0x10], 0
jl 0x140012dd6
lea rdx, str.Microsoft_PowerPoint
mov rcx, rbx
call fcn.14019aaf8
test rax, rax
je 0x140012daf
sub rax, rbx
sar rax, 1
test eax, eax
jns 0x140012dd3
cmp dword [rbx - 0x10], 0
jl 0x140012dd6
lea rdx, str.___PowerPoint
mov rcx, rbx
call fcn.14019aaf8
test rax, rax
je 0x140012dd6
sub rax, rbx
sar rax, 1
test eax, eax
js 0x140012dd6
mov r15d, r13d
lea rdx, [rbx - 0x18]
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140012deb
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140012e05
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov eax, r15d
jmp 0x140012e20
mov ecx, 0x80070057
call fcn.140019e30
int3
mov ecx, 0x80070057
call fcn.140019e30
nop
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.140199f00
lea r11, [rsp + 0x450]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret