Function at 0x51cba8
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x38], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
push edi
cmp dword [ebx + 0x24], esi
jne 0x51cc66
cmp dword [ebx + 0xb4], esi
je 0x51cc66
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x170]
mov eax, dword [eax]
mov dword [esp + 0x3c], eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x170]
mov eax, dword [eax + 4]
push 2
mov dword [esp + 0x44], eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
lea edx, [esp + 0x38]
push edx
push eax
call dword [ecx + 0x138]
mov eax, dword [ebx + 0xb4]
mov dword [esp + 0xc], eax
lea edi, [ebx + 0x20]
cmp dword [0x6c7080], esi
jne 0x51cc34
mov dword [0x6c7080], esi
push dword [esp + 0xc]
lea eax, [edi + 0x20]
push eax
push 0x6c7050
call fcn.00418e7f
add esp, 0xc
movzx eax, ax
push eax
xor eax, eax
push eax
push esi
push 0x82000000
push esi
lea eax, [esp + 0x48]
push eax
push dword [esp + 0x24]
push edi
call fcn.00468ce1
push dword [ebx + 0x24]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x51cea0
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x170]
mov eax, dword [eax]
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x170]
mov eax, dword [eax + 4]
push 2
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
lea edx, [esp + 0x28]
push edx
push eax
call dword [ecx + 0x138]
mov eax, dword [ebx + 0xc]
lea edx, [esp + 0x10]
push edx
push 0x63ec60
push esi
mov dword [esp + 0x1c], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x104]
test eax, eax
js 0x51cd98
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x170]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
cmp eax, esi
jne 0x51ce40
mov eax, dword [ebx + 0xc]
lea edx, [esp + 0xc]
push edx
mov dword [esp + 0x10], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x158]
test eax, eax
js 0x51cd86
lea edx, [esp + 0x14]
push edx
xor eax, eax
mov dword [esp + 0x18], esi
push 4
lea edi, [esp + 0x20]
stosd dword es:[edi], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push str.test
push eax
call dword [ecx + 0xc]
xor eax, eax
mov dword [esp + 0x1c], esi
push 1
lea edi, [esp + 0x24]
stosd dword es:[edi], eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
lea edx, [esp + 0x20]
push edx
push eax
call dword [ecx + 0x138]
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x170]
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x18]
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, dword [esp + 0x20]
add ecx, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], ecx
jmp 0x51cd8a
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0xc]
cmp ecx, esi
je 0x51cd9c
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
push esi
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0x2c]
push ecx
push eax
push dword [esp + 0x34]
push esi
push dword [ebx + 0x24]
call dword [sym.imp.USER32.dll_SetWindowPos]
push 5
push dword [ebx + 0x24]
call dword [sym.imp.USER32.dll_ShowWindow]
lea edi, [ebx + 0x20]
mov esi, edi
call fcn.004d4708
push eax
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea esi, [eax + 1]
xor ecx, ecx
push 2
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004013b3
pop ecx
mov dword [esp + 0xc], eax
test eax, eax
je 0x51ce89
push esi
push eax
mov esi, edi
call fcn.004d4708
push eax
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ebx, dword [ebx + 0xbc]
mov eax, dword [esp + 0xc]
mov ecx, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x51ce69
test dx, dx
je 0x51ce3c
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x51ce69
add eax, 4
add ecx, 4
test dx, dx
jne 0x51ce1a
xor eax, eax
jmp 0x51ce6e
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push 2
lea edx, [esp + 0x38]
push edx
push eax
call dword [ecx + 0x138]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], ecx
jmp 0x51cd9c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x51ce7f
push ebx
call fcn.004d4708
push eax
call dword [sym.imp.USER32.dll_SetWindowTextW]
push dword [esp + 0xc]
call fcn.00404e46
pop ecx
push 1
mov eax, edi
call fcn.004d473b
mov eax, dword [esp + 0x10]
test eax, eax
je 0x51cea0
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [esp + 0x44]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00403fc1
mov esp, ebp
pop ebp
ret 4