Function at 0x5099e2
Capabilities:
Get graphical window text

Disassembly:
push 0xffffffffffffffff
push 0x57f856
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x98
mov eax, dword [0x663014]
push ebx
push ebp
push esi
mov esi, ecx
mov dword [esp + 0xc], eax
lea ecx, [esp + 0xc]
xor ebp, ebp
push ecx
mov ecx, esi
mov dword [esp + 0xb0], ebp
call fcn.0056c321
mov edx, dword [esi + 0x40]
mov ecx, dword [esi + 0x64]
push edx
call fcn.004fcea0
cmp eax, 0xffffffff
je 0x509b19
mov eax, dword [esp + 0xc]
push eax
call fcn.005570d6
fcomp qword [0x634d20]
add esp, 4
fnstsw ax
test ah, 0x40
jne 0x509b19
lea ecx, [esp + 0x14]
push 1
push ecx
lea ecx, [esp + 0x14]
call fcn.00566474
mov eax, dword [eax]
push 0x6595e4
push eax
call fcn.00557334
add esp, 8
lea ecx, [esp + 0x14]
test eax, eax
sete bl
call fcn.00569def
test bl, bl
je 0x509a77
mov edx, dword [esp + 0xc]
push 1
lea ecx, [esp + 0x10]
mov eax, dword [edx - 8]
dec eax
push eax
call fcn.005660c7
lea eax, [esp + 0x10]
push 1
push eax
lea ecx, [esp + 0x14]
call fcn.005664f0
mov eax, dword [eax]
push 0x6595f0
push eax
call fcn.00557334
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
call fcn.00569def
test bl, bl
je 0x509b19
lea ecx, [esp + 0x18]
push 2
push ecx
lea ecx, [esp + 0x14]
call fcn.005664f0
mov eax, dword [eax]
push 0x6595ec
push eax
call fcn.00557334
add esp, 8
lea ecx, [esp + 0x18]
test eax, eax
sete bl
call fcn.00569def
test bl, bl
jne 0x509b19
push 1
push ebp
lea ecx, [esp + 0x14]
call fcn.005660c7
lea edx, [esp + 0x10]
push 1
push edx
lea ecx, [esp + 0x14]
call fcn.005664f0
mov eax, dword [eax]
push 0x6595f0
push eax
call fcn.00557334
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
call fcn.00569def
test bl, bl
jne 0x509aa9
cmp dword [0x680940], ebp
je 0x509b3a
lea ecx, [esp + 0xc]
mov dword [esp + 0xac], 0xffffffff
call fcn.00569def
jmp 0x509c7c
mov eax, dword [0x663014]
push edi
mov edi, 1
mov dword [esp + 0x40], eax
mov dword [0x680940], edi
cmp esi, ebp
mov byte [esp + 0xb0], 1
jne 0x509b61
mov dword [esp + 0x20], ebp
jmp 0x509b68
mov ecx, dword [esi + 0x1c]
mov dword [esp + 0x20], ecx
mov ecx, esi
call fcn.0056e5d7
mov edx, dword [esi + 0x3c]
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x40]
push ecx
lea ecx, [esp + 0x44]
mov dword [esp + 0x2c], 0xffffff96
mov dword [esp + 0x38], 5
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
call fcn.00569f28
mov eax, dword [esi + 0x48]
cmp eax, 0xd
mov dword [esp + 0x64], eax
jne 0x509bc3
mov edx, dword [esi + 0x64]
mov eax, dword [edx + 0x3c8]
cmp eax, edi
je 0x509bbd
cmp eax, 2
jne 0x509bc3
mov dword [esp + 0x14], edi
jmp 0x509bc7
mov dword [esp + 0x14], ebp
mov eax, dword [esi + 0x64]
cmp eax, ebp
jne 0x509bd4
mov dword [esp + 0x18], ebp
jmp 0x509bdb
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x20]
mov ebx, dword [esi + 0x1c]
cmp eax, ebp
jne 0x509bec
push ebx
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.0056b956
mov edi, eax
cmp edi, ebp
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
je 0x509c13
mov ecx, esi
call fcn.0056e5d7
mov edx, dword [edi + 0x1c]
lea ecx, [esp + 0x20]
push ecx
push eax
push 0x4e
push edx
call ebp
mov edi, dword [sym.imp.USER32.dll_IsWindow]
push ebx
call edi
test eax, eax
je 0x509c2d
push 0
push 0
push 0x10
push ebx
call dword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [esp + 0x14]
mov dword [0x680940], 0
test eax, eax
je 0x509c56
mov esi, dword [esp + 0x18]
push esi
call edi
test eax, eax
je 0x509c56
push 1
push 0xd
push 0x100
push esi
call ebp
lea ecx, [esp + 0x40]
mov byte [esp + 0xb0], 0
call fcn.00569def
lea ecx, [esp + 0x10]
mov dword [esp + 0xb0], 0xffffffff
call fcn.00569def
pop edi
mov ecx, dword [esp + 0xa4]
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xa4
ret