Function at 0x18003aa20
Capabilities:
Check for foreground window switch
Get graphical window text

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x380
mov rax, qword [0x18004d040]
xor rax, rsp
mov qword [rsp + 0x370], rax
mov rax, qword [rcx + 0x50]
mov r14, rcx
cmp rax, 0xa
jb 0x18003aa83
lea rdi, [rcx + 0x38]
cmp rax, 0xf
jbe 0x18003aa60
mov rdi, qword [rcx + 0x38]
mov qword [rcx + 0x48], 0xa
lea rdx, str.Remnant2
mov rcx, rdi
mov r8d, 0xa
call sub.VCRUNTIME140.dll_memmove
mov byte [rdi + 0xa], 0
jmp 0x18003aa98
lea r9, str.Remnant2
mov edx, 0xa
add rcx, 0x38
call fcn.18003acb0
mov rax, qword [r14 + 0x70]
cmp rax, 0xc
jb 0x18003aae3
mov qword [rsp + 0x398], rsi
lea rsi, [r14 + 0x58]
cmp rax, 0xf
jbe 0x18003aab8
mov rsi, qword [r14 + 0x58]
mov r8d, 0xc
mov qword [r14 + 0x68], 0xc
lea rdx, str.UnrealWindow
mov rcx, rsi
call sub.VCRUNTIME140.dll_memmove
mov byte [rsi + 0xc], 0
mov rsi, qword [rsp + 0x398]
jmp 0x18003aaf8
lea r9, str.UnrealWindow
mov edx, 0xc
lea rcx, [r14 + 0x58]
call fcn.18003acb0
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov rcx, rax
lea rdx, [rsp + 0x20]
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp eax, dword [rsp + 0x20]
jne 0x18003aaf8
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [r14], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [r14 + 8], rax
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov r8d, 0x104
lea rdx, [rsp + 0x40]
mov rcx, rax
mov qword [r14 + 0x10], rax
call qword [sym.imp.USER32.dll_GetWindowTextA]
mov rcx, qword [r14 + 0x10]
lea rdx, [rsp + 0x150]
mov r8d, 0x104
call qword [sym.imp.USER32.dll_GetClassNameA]
lea rcx, [rsp + 0x40]
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rcx + rax], 0
jne 0x18003ab70
cmp qword [r14 + 0x50], 0xf
lea rcx, [r14 + 0x38]
mov r8, qword [r14 + 0x48]
jbe 0x18003ab8c
mov rcx, qword [r14 + 0x38]
cmp r8, rax
jne 0x18003abe2
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
jne 0x18003abe2
lea rcx, [rsp + 0x150]
mov rax, 0xffffffffffffffff
nop
inc rax
cmp byte [rcx + rax], 0
jne 0x18003abb0
cmp qword [r14 + 0x70], 0xf
lea rcx, [r14 + 0x58]
mov r8, qword [r14 + 0x68]
jbe 0x18003abcc
mov rcx, qword [r14 + 0x58]
cmp r8, rax
jne 0x18003abe2
lea rdx, [rsp + 0x150]
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x18003ac0b
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x18004d4e8]
lea rdx, str.___GameData::InitWindow_False__n
mov r8d, 0xa
call fcn.180039800
jmp 0x18003aaf8
mov rcx, qword [r14 + 0x10]
lea rax, [rsp + 0x40]
mov qword [r14 + 0x20], rax
lea rdx, [rsp + 0x28]
lea rax, [rsp + 0x150]
mov qword [r14 + 0x28], rax
call qword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [rsp + 0x30]
lea r8, [rsp + 0x260]
sub eax, dword [rsp + 0x28]
mov r9d, 0x104
mov rcx, qword [r14 + 8]
xor edx, edx
mov dword [r14 + 0x18], eax
mov eax, dword [rsp + 0x34]
sub eax, dword [rsp + 0x2c]
mov dword [r14 + 0x1c], eax
call qword [sym.imp.KERNEL32.dll_K32GetModuleFileNameExA]
lea rax, [rsp + 0x260]
mov r8d, 0xa
mov qword [r14 + 0x30], rax
lea rdx, [0x1800457c8]
mov rcx, qword [0x18004d4e8]
call fcn.180039800
mov rcx, qword [rsp + 0x370]
xor rcx, rsp
call fcn.18003d690
lea r11, [rsp + 0x380]
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret