Function at 0x4be453
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x20
push esi
mov esi, ecx
push 0
push 0
mov eax, dword [esi + 0x24]
push 0x1042
push eax
mov dword [esp + 0x18], esi
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
mov dword [esp + 0x20], eax
jl 0x4be76a
mov eax, dword [0x4d9540]
push ebx
mov dword [esp + 8], eax
push ebp
mov edx, dword [eax - 0xc]
lea ebx, [eax - 0xc]
cmp edx, 1
push edi
mov ecx, 0x400
jg 0x4be49a
cmp dword [eax - 4], ecx
jge 0x4be4f6
mov ebp, dword [eax - 8]
cmp ebp, ecx
jle 0x4be4a3
mov ecx, ebp
push ecx
lea ecx, [esp + 0x14]
call fcn.004012f0
test eax, eax
je 0x4be4f6
mov edi, dword [esp + 0x10]
lea ecx, [ebp + ebp + 2]
mov edx, ecx
lea esi, [ebx + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
mov dword [eax - 8], ebp
mov eax, dword [0x4d9544]
cmp ebx, eax
je 0x4be4ee
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4be4ee
push ebx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov ecx, dword [esi + 0x80]
push 0x400
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowTextW]
lea ecx, [esp + 0x10]
call fcn.00401380
mov edx, dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push edx
call edi
mov ecx, dword [esp + 0x10]
mov dword [ecx - 8], eax
mov edx, dword [esp + 0x10]
mov word [edx + eax*2], 0
mov eax, 0x4d9a34
test eax, eax
je 0x4be6e2
push eax
call edi
mov ebx, eax
test ebx, ebx
je 0x4be6e2
mov ecx, 0x4d960c
test ecx, ecx
jne 0x4be559
mov dword [esp + 0x18], ecx
jmp 0x4be564
push 0x4d960c
call edi
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x10]
xor edi, edi
mov edx, dword [esi - 8]
lea ebp, [esi + edx*2]
cmp esi, ebp
jae 0x4be6de
push 0x4d9a34
push esi
call fcn.004c546f
add esp, 8
test eax, eax
je 0x4be5a0
lea esi, [eax + ebx*2]
push 0x4d9a34
push esi
inc edi
call fcn.004c546f
add esp, 8
test eax, eax
jne 0x4be58a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp esi, ebp
jb 0x4be578
test edi, edi
jle 0x4be6de
lea ecx, [esp + 0x10]
call fcn.00401380
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
sub ebp, ebx
imul ebp, edi
mov eax, dword [esi - 8]
mov dword [esp + 0x1c], eax
add ebp, eax
mov eax, dword [esi - 4]
mov dword [esp + 0x24], ebp
cmp eax, ebp
jl 0x4be5e7
cmp dword [esi - 0xc], 1
jle 0x4be625
lea edi, [esi - 0xc]
push ebp
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], edi
call fcn.004012f0
test eax, eax
je 0x4be6de
mov ecx, dword [edi + 4]
mov edi, dword [esp + 0x10]
shl ecx, 1
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00401350
mov esi, dword [esp + 0x10]
mov edx, dword [esi - 8]
lea eax, [esi + edx*2]
cmp esi, eax
mov dword [esp + 0x28], eax
jae 0x4be6db
push 0x4d9a34
push esi
call fcn.004c546f
mov edi, eax
add esp, 8
test edi, edi
je 0x4be6c0
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov ecx, edi
sub ecx, eax
mov eax, dword [esp + 0x1c]
sar ecx, 1
sub eax, ecx
lea esi, [edx + edx]
sub eax, ebx
lea ecx, [edi + ebx*2]
lea ebp, [eax + eax]
lea eax, [esi + edi]
push ebp
push ecx
push eax
mov dword [esp + 0x2c], eax
call fcn.004c5570
mov ecx, esi
mov esi, 0x4d960c
mov edx, ecx
mov eax, dword [esp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
sub eax, ebx
and ecx, 3
push 0x4d9a34
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x30]
push esi
mov word [esi + ebp], 0
mov ebp, dword [esp + 0x30]
add ebp, eax
mov dword [esp + 0x30], ebp
call fcn.004c546f
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4be64b
mov ebp, dword [esp + 0x24]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
mov eax, dword [esp + 0x28]
cmp esi, eax
jb 0x4be637
mov esi, dword [esp + 0x10]
mov dword [esi - 8], ebp
mov esi, dword [esp + 0x14]
push 0x4d960c
push 0x4de46c
lea ecx, [esp + 0x18]
call fcn.0040fcd0
push 0x4de47c
push 0x4da084
lea ecx, [esp + 0x18]
call fcn.0040fcd0
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x2c]
push 0
push 0
push 0
push 0
mov ebx, 1
push ecx
push ebx
push 2
push edi
lea ecx, [esi + 0x24]
call fcn.00427660
push edi
mov ecx, esi
mov dword [esi + 0x78], ebx
mov dword [esi + 0x68], ebx
call fcn.004bde40
mov eax, dword [esp + 0x10]
mov ecx, dword [0x4d9544]
pop edi
pop ebp
lea edx, [eax - 0xc]
pop ebx
cmp edx, ecx
je 0x4be76a
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4be76a
mov eax, dword [esp + 4]
add eax, 0xfffffff4
push eax
call fcn.004c5432
add esp, 4
xor eax, eax
pop esi
add esp, 0x20
ret 0x10