Function at 0x4003a30
Capabilities:
Get graphical window text

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x290]
sub rsp, 0x390
mov qword [rbp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x3d8], rbx
mov rbx, rdx
mov r13, rcx
xor r15d, r15d
mov qword [rsp + 0x50], r15
mov qword [rbp + 0x2e8], r15
mov qword [rsp + 0x78], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x60], r15
xor r9d, r9d
xor r8d, r8d
mov edx, 0x147
mov rcx, qword [rcx + 0x80]
call qword [sym.imp.USER32.dll_SendMessageW]
cmp eax, 0xffffffff
je 0x4004345
movsxd r8, eax
xor r9d, r9d
mov edx, 0x150
mov rcx, qword [r13 + 0x80]
call qword [sym.imp.USER32.dll_SendMessageW]
mov r12, rax
mov qword [rsp + 0x30], rax
mov r8d, 0x104
lea rdx, [rbp + 0x80]
mov rcx, qword [r13 + 0x70]
call qword [sym.imp.USER32.dll_GetWindowTextW]
cmp r12d, 0xffffffff
jne 0x4003afa
movzx ecx, word [rbp + 0x80]
cmp cx, word [0x04009770]
jne 0x4003afa
lea eax, [r15 + 1]
jmp 0x4004347
mov rdx, rbx
lea rcx, [rbp + 0x2e0]
call qword [sym.imp.maxutil.dll_public:_void___cdecl_WStr::constructor_wchar_t_const____ptr64____ptr64]
nop
xor r8d, r8d
lea rdx, [rsp + 0x38]
mov rcx, rax
call qword [sym.imp.maxutil.dll_public:_class_MaxSDK::Util::MaxStringCast_wchar_t____cdecl_WStr::ToUTF16_unsigned_long_long_unsigned___int64_____ptr64____ptr64]
nop
mov rdx, qword [rax + 8]
lea rcx, [0x0401f6f8]
test rdx, rdx
cmovne rcx, rdx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 0x20]
call qword [sym.imp.ole32.dll_StgOpenStorage]
mov ebx, eax
lea rcx, [rsp + 0x38]
call qword [sym.imp.maxutil.dll_public:_void___cdecl_MaxSDK::Util::MaxString::destructor_void____ptr64]
nop
lea rcx, [rbp + 0x2e0]
call qword [sym.imp.maxutil.dll_public:_void___cdecl_WStr::destructor_void____ptr64]
test ebx, ebx
jne 0x4004345
mov rcx, qword [rsp + 0x50]
mov rax, qword [rcx]
lea r8, [rbp + 0x2e8]
lea rdx, [0x04009e38]
call qword [rax]
test eax, eax
jne 0x400433a
lea ebx, [rax + 1]
mov r14d, 0x4b0
test r12b, r12b
je 0x4003d7c
mov rcx, qword [rbp + 0x2e8]
mov rax, qword [rcx]
lea r9, [rsp + 0x78]
lea r8d, [rbx + 0xf]
lea rdx, [0x04009e08]
call qword [rax + 0x20]
test eax, eax
jne 0x4003d7c
mov edi, r15d
mov dword [rbp + 0x10], ebx
mov dword [rbp + 0x18], 2
mov dword [rbp + 0x20], ebx
mov dword [rbp + 0x28], 3
mov dword [rbp + 0x30], ebx
mov dword [rbp + 0x38], 4
mov dword [rbp + 0x40], ebx
mov dword [rbp + 0x48], 5
mov dword [rbp + 0x50], ebx
mov dword [rbp + 0x58], 6
mov dword [rbp + 0x60], ebx
mov dword [rbp + 0x68], ebx
mov rcx, qword [rsp + 0x78]
mov rax, qword [rcx]
lea r9, [rbp - 0x80]
lea r8, [rbp + 0x10]
lea edx, [rbx + 5]
call qword [rax + 0x18]
test eax, eax
jne 0x4003d3f
cmp word [rbp - 8], 2
jne 0x4003c9b
movzx eax, word [rbp]
cmp ax, r14w
je 0x4003c9b
movzx esi, ax
call qword [sym.imp.KERNEL32.dll_GetACP]
cmp esi, eax
je 0x4003c9b
mov r8d, esi
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x80]
call qword [sym.imp.maxutil.dll_bool___cdecl_MaxSDK::Util::VariantConvertToUTF16_struct_tagPROPVARIANT____ptr64__struct_tagPROPVARIANT_const____ptr64__unsigned_int_]
movzx r8d, word [rbp]
lea rdx, [rbp - 0x68]
lea rcx, [rbp - 0x68]
call qword [sym.imp.maxutil.dll_bool___cdecl_MaxSDK::Util::VariantConvertToUTF16_struct_tagPROPVARIANT____ptr64__struct_tagPROPVARIANT_const____ptr64__unsigned_int_]
movzx r8d, word [rbp]
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x50]
call qword [sym.imp.maxutil.dll_bool___cdecl_MaxSDK::Util::VariantConvertToUTF16_struct_tagPROPVARIANT____ptr64__struct_tagPROPVARIANT_const____ptr64__unsigned_int_]
movzx r8d, word [rbp]
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x38]
call qword [sym.imp.maxutil.dll_bool___cdecl_MaxSDK::Util::VariantConvertToUTF16_struct_tagPROPVARIANT____ptr64__struct_tagPROPVARIANT_const____ptr64__unsigned_int_]
movzx r8d, word [rbp]
lea rdx, [rbp - 0x20]
lea rcx, [rbp - 0x20]
call qword [sym.imp.maxutil.dll_bool___cdecl_MaxSDK::Util::VariantConvertToUTF16_struct_tagPROPVARIANT____ptr64__struct_tagPROPVARIANT_const____ptr64__unsigned_int_]
test bl, r12b
je 0x4003cbe
lea r8, [rbp + 0x80]
lea rdx, [rbp - 0x80]
mov rcx, r13
call fcn.04002d70
test eax, eax
je 0x4003cbe
mov edi, ebx
jmp 0x4003d3f
test r12b, 2
je 0x4003cdf
lea r8, [rbp + 0x80]
lea rdx, [rbp - 0x68]
mov rcx, r13
call fcn.04002d70
test eax, eax
je 0x4003cdf
mov edi, ebx
jmp 0x4003d3f
test r12b, 4
je 0x4003d00
lea r8, [rbp + 0x80]
lea rdx, [rbp - 0x50]
mov rcx, r13
call fcn.04002d70
test eax, eax
je 0x4003d00
mov edi, ebx
jmp 0x4003d3f
test r12b, 8
je 0x4003d21
lea r8, [rbp + 0x80]
lea rdx, [rbp - 0x38]
mov rcx, r13
call fcn.04002d70
test eax, eax
je 0x4003d21
mov edi, ebx
jmp 0x4003d3f
test r12b, 0x10
je 0x4003d3f
lea r8, [rbp + 0x80]
lea rdx, [rbp - 0x20]
mov rcx, r13
call fcn.04002d70
test eax, eax
cmovne edi, ebx
lea rdx, [rbp - 0x80]
mov ecx, 6
call qword [sym.imp.ole32.dll_FreePropVariantArray]
mov rcx, qword [rsp + 0x78]
mov rax, qword [rcx]
call qword [rax + 0x10]
test edi, edi
je 0x4003d7c
mov rcx, qword [rbp + 0x2e8]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rsp + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov eax, ebx
jmp 0x4004347
test r12d, 0xff00
je 0x4004077
mov rcx, qword [rbp + 0x2e8]
mov rax, qword [rcx]
lea r9, [rsp + 0x70]
mov r8d, 0x10
lea rdx, [0x04009e18]
call qword [rax + 0x20]
test eax, eax
jne 0x4004077
mov edi, r15d
mov esi, r15d
mov dword [rbp + 0x10], ebx
mov dword [rbp + 0x18], 0xe
mov dword [rbp + 0x20], ebx
mov dword [rbp + 0x28], 0xf
mov dword [rbp + 0x30], ebx
mov dword [rbp + 0x38], 2
mov dword [rbp + 0x40], ebx
mov dword [rbp + 0x48], 0xc
mov dword [rbp + 0x50], ebx
mov dword [rbp + 0x58], 0xd
mov dword [rbp + 0x60], ebx
mov dword [rbp + 0x68], ebx
mov rcx, qword [rsp + 0x70]
mov rax, qword [rcx]
lea r9, [rbp - 0x80]
lea r8, [rbp + 0x10]
mov edx, 6
call qword [rax + 0x18]
test eax, eax
jne 0x4004055
cmp word [rbp - 8], 2
jne 0x4003e64
movzx eax, word [rbp]
cmp ax, r14w
je 0x4003e64
movzx r14d, ax
call qword [sym.imp.KERNEL32.dll_GetACP]
cmp r14d, eax
je 0x4003e64
mov esi, r14d
mov r8d, r14d
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x80]
call qword [sym.imp.maxutil.dll_bool___cdecl_MaxSDK::Util::VariantConvertToUTF16_struct_tagPROPVARIANT____ptr64__struct_tagPROPVARIANT_const____ptr64__unsigned_int_]
mov r8d, r14d
lea rdx, [rbp - 0x68]
lea rcx, [rbp - 0x68]
call qword [sym.imp.maxutil.dll_bool___cdecl_MaxSDK::Util::VariantConvertToUTF16_struct_tagPROPVARIANT____ptr64__struct_tagPROPVARIANT_const____ptr64__unsigned_int_]
mov r8d, r14d
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x50]
call qword [sym.imp.maxutil.dll_bool___cdecl_MaxSDK::Util::VariantConvertToUTF16_struct_tagPROPVARIANT____ptr64__struct_tagPROPVARIANT_const____ptr64__unsigned_int_]
bt r12d, 8
jae 0x4003e89
lea r8, [rbp + 0x80]
lea rdx, [rbp - 0x80]
mov rcx, r13
call fcn.04002d70
test eax, eax
je 0x4003e89
mov edi, ebx
jmp 0x4004055
bt r12d, 9
jae 0x4003eae
lea r8, [rbp + 0x80]
lea rdx, [rbp - 0x68]
mov rcx, r13
call fcn.04002d70
test eax, eax
je 0x4003eae
mov edi, ebx
jmp 0x4004055
bt r12d, 0xa
jae 0x4003ed3
lea r8, [rbp + 0x80]
lea rdx, [rbp - 0x50]
mov rcx, r13
call fcn.04002d70
test eax, eax
je 0x4003ed3
mov edi, ebx
jmp 0x4004055
mov eax, 0x100c
cmp word [rbp - 0x38], ax
jne 0x4004055
lea rcx, [rbp - 0x20]
call qword [sym.imp.maxutil.dll_bool___cdecl_MaxSDK::Util::VariantIsStringVector_struct_tagPROPVARIANT_const____ptr64_]
test al, al
je 0x4004055
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x48], r15
mov r8d, esi
lea rdx, [rsp + 0x38]
lea rcx, [rbp - 0x20]
call qword [sym.imp.maxutil.dll_unsigned_long_long_unsigned___int64____cdecl_MaxSDK::Util::VariantToStringVector_class_WStr__struct_tagPROPVARIANT_const____ptr64__class_std::vector_class_WStr__class_std::allocator_class_WStr______ptr64__unsigned_int_]
mov r14d, r15d
mov r13d, r15d
mov r9d, dword [rbp - 0x30]
test r9d, r9d
je 0x4004008
mov r8, qword [rbp - 0x28]
nop dword [rax]
mov edx, r15d
cmp r13d, 6
jne 0x4003f44
bt r12d, 0xb
jae 0x4003f74
mov edx, ebx
jmp 0x4003f74
cmp r13d, 8
jne 0x4003f55
bt r12d, 0xd
jae 0x4003f74
mov edx, ebx
jmp 0x4003f74
cmp r13d, 0xa
jne 0x4003f66
bt r12d, 0xe
jae 0x4003f74
mov edx, ebx
jmp 0x4003f74
cmp r13d, 0xc
jne 0x4003f74
bt r12d, 0xc
cmovb edx, ebx
mov esi, r15d
lea eax, [r13 + 1]
lea rax, [rax + rax*2]
lea rcx, [rax*8]
mov qword [rsp + 0x68], rcx
movsxd rax, edx
mov qword [rbp + 0x2e0], rax
cmp dword [r8 + rcx + 8], r15d
jle 0x4003ffb
mov r12, qword [rbp + 0x2d0]
test edi, edi
jne 0x4003fe6
test rax, rax
je 0x4003fe6
movsxd rcx, r14d
mov rax, qword [rsp + 0x38]
lea rcx, [rax + rcx*8]
call qword [sym.imp.maxutil.dll_public:_wchar_t_const____ptr64___cdecl_WStr::data_void_const___ptr64]
mov rdx, rax
lea r8, [rbp + 0x80]
mov rcx, r12
call fcn.04002e20
test eax, eax
cmovne edi, ebx
mov r8, qword [rbp - 0x28]
mov rax, qword [rbp + 0x2e0]
mov rcx, qword [rsp + 0x68]
inc r14d
inc esi
cmp esi, dword [r8 + rcx + 8]
jl 0x4003fa4
mov r9d, dword [rbp - 0x30]
mov r12, qword [rsp + 0x30]
add r13d, 2
cmp r13d, r9d
jb 0x4003f30
mov rsi, qword [rsp + 0x38]
test rsi, rsi
je 0x400404e
mov r14, qword [rsp + 0x40]
cmp rsi, r14
je 0x4004037
nop dword [rax]
mov rcx, rsi
call qword [sym.imp.maxutil.dll_public:_void___cdecl_WStr::destructor_void____ptr64]
add rsi, 8
cmp rsi, r14
jne 0x4004020
mov rsi, qword [rsp + 0x38]
mov rcx, rsi
call sub.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x48], r15
mov r13, qword [rbp + 0x2d0]
lea rdx, [rbp - 0x80]
mov ecx, 6
call qword [sym.imp.ole32.dll_FreePropVariantArray]
mov rcx, qword [rsp + 0x70]
mov rax, qword [rcx]
call qword [rax + 0x10]
test edi, edi
jne 0x4003d5d
test r12d, 0xff0000
je 0x400432d
mov rcx, qword [rbp + 0x2e8]
mov rax, qword [rcx]
lea r9, [rsp + 0x60]
mov r8d, 0x10
lea rdx, [0x04009e28]
call qword [rax + 0x20]
test eax, eax
jne 0x400432d
mov esi, r15d
mov rcx, qword [rsp + 0x60]
mov rax, qword [rcx]
lea rdx, [rsp + 0x58]
call qword [rax + 0x58]
test eax, eax
jne 0x4004319
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
xor r9d, r9d
lea r8, [rsp + 0x38]
mov edx, ebx
call qword [rax + 0x18]
test eax, eax
jne 0x4004111
nop
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x40040f7
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov qword [rsp + 0x38], r15
inc esi
mov rcx, qword [rsp + 0x58]
mov r10, qword [rcx]
xor r9d, r9d
lea r8, [rsp + 0x38]
mov edx, ebx
call qword [r10 + 0x18]
test eax, eax
je 0x40040e0
lea eax, [rsi + 1]
mov dword [rbp + 0x2e0], eax
movsxd rdi, eax
mov eax, 0x10
mul rdi
mov r14, 0xffffffffffffffff
cmovo rax, r14
mov rcx, rax
call sub.MSVCR110.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov qword [rsp + 0x30], rax
mov eax, 0x18
mul rdi
cmovo rax, r14
mov rcx, rax
call sub.MSVCR110.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov r14, rax
lea r8, [rdi + rdi*2]
shl r8, 3
xor edx, edx
mov rcx, rax
call sub.MSVCR110.dll_memset
shl rdi, 4
mov r8, rdi
xor edx, edx
mov rdi, qword [rsp + 0x30]
mov rcx, rdi
call sub.MSVCR110.dll_memset
movsxd r12, esi
mov rcx, r12
add rcx, rcx
mov dword [rdi + rcx*8], ebx
mov dword [rdi + rcx*8 + 8], ebx
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
call qword [rax + 0x28]
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
xor r9d, r9d
lea r8, [rsp + 0x38]
mov edx, ebx
call qword [rax + 0x18]
test eax, eax
jne 0x40041fe
cmp word [rsp + 0x44], 0
je 0x40041e0
cmp qword [rsp + 0x38], 0
je 0x40041ce
mov dword [rdi], r15d
mov rax, qword [rsp + 0x38]
mov qword [rdi + 8], rax
jmp 0x40041d7
mov dword [rdi], ebx
mov eax, dword [rsp + 0x40]
mov dword [rdi + 8], eax
mov qword [rsp + 0x38], r15
add rdi, 0x10
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
xor r9d, r9d
lea r8, [rsp + 0x38]
mov edx, ebx
call qword [rax + 0x18]
test eax, eax
je 0x40041b0
mov rdi, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rsp + 0x60]
mov rax, qword [rcx]
mov r9, r14
mov r8, rdi
lea edx, [rsi + 1]
call qword [rax + 0x18]
test eax, eax
jne 0x40042d7
xor dl, dl
mov dword [rbp + 0x2d0], edx
lea rax, [r12 + r12*2]
lea r8, [rax*8]
mov qword [rsp + 0x68], r8
lea rdi, [r14 + r8]
cmp word [rdi], 2
jne 0x4004276
mov eax, 0x4b0
cmp word [rdi + 8], ax
je 0x4004276
call qword [sym.imp.KERNEL32.dll_GetACP]
movzx ecx, word [rdi + 8]
mov edx, dword [rbp + 0x2d0]
movzx edx, dl
cmp ecx, eax
cmovne edx, ebx
mov dword [rbp + 0x2d0], edx
mov r8, qword [rsp + 0x68]
mov edi, r15d
test esi, esi
jle 0x40042d2
nop dword [rax]
test dl, dl
je 0x400429e
movsxd rax, edi
lea rcx, [rax + rax*2]
lea rcx, [r14 + rcx*8]
movzx r8d, word [r14 + r8 + 8]
mov rdx, rcx
call qword [sym.imp.maxutil.dll_bool___cdecl_MaxSDK::Util::VariantConvertToUTF16_struct_tagPROPVARIANT____ptr64__struct_tagPROPVARIANT_const____ptr64__unsigned_int_]
movsxd rax, edi
lea rcx, [rax + rax*2]
lea rdx, [r14 + rcx*8]
lea r8, [rbp + 0x80]
mov rcx, r13
call fcn.04002d70
test eax, eax
jne 0x40042cf
inc edi
cmp edi, esi
mov edx, dword [rbp + 0x2d0]
mov r8, qword [rsp + 0x68]
jl 0x4004280
jmp 0x40042d2
mov r15d, ebx
mov rdi, qword [rsp + 0x30]
test esi, esi
jle 0x40042f8
nop dword [rax + rax]
cmp dword [rdi], 0
jne 0x40042ef
mov rcx, qword [rdi + 8]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
add rdi, 0x10
dec r12
jne 0x40042e0
mov rdx, r14
mov ecx, dword [rbp + 0x2e0]
call qword [sym.imp.ole32.dll_FreePropVariantArray]
mov rcx, qword [rsp + 0x30]
call sub.MSVCR110.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, r14
call sub.MSVCR110.dll_void___cdecl_operator_delete___void____ptr64_
mov rcx, qword [rsp + 0x60]
mov rax, qword [rcx]
call qword [rax + 0x10]
test r15d, r15d
jne 0x4003d5d
mov rcx, qword [rbp + 0x2e8]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rsp + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x10]
xor eax, eax
mov rbx, qword [rsp + 0x3d8]
add rsp, 0x390
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret