Function at 0x487520
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x218
push ebx
mov ebx, ecx
mov ecx, dword [esp + 0x22c]
push ebp
push esi
push edi
cmp word [ecx], 0
lea edx, [ebx + 0x100c]
mov dword [esp + 0x24], edx
je 0x487552
mov eax, dword [edx]
cmp word [eax], 0
jne 0x487552
mov byte [esp + 0x17], 1
jmp 0x48755b
mov byte [esp + 0x17], 0
mov dword [esp + 0x24], edx
mov dword [edx], ecx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x487560
mov eax, dword [esp + 0x234]
sub ecx, edx
mov esi, dword [esp + 0x230]
xor edi, edi
mov dword [ebx + 0x1014], eax
mov edx, str.ahk_
mov eax, dword [esp + 0x23c]
sar ecx, 1
mov dword [ebx + 0x1018], eax
mov eax, dword [esp + 0x22c]
mov dword [ebx + 0x1010], ecx
mov ecx, esi
mov dword [ebx + 4], eax
mov eax, dword [ebx]
mov dword [esp + 0x1c], eax
mov dword [ebx], 0
mov dword [esp + 0x18], edi
call fcn.004819f0
mov ebp, eax
mov dword [esp + 0x20], ebp
test ebp, ebp
je 0x4878e8
nop dword [eax]
cmp ebp, esi
jbe 0x4875e6
movzx eax, word [ebp - 2]
cmp eax, 0x20
je 0x4875e6
cmp eax, 9
jne 0x4878be
push 2
lea esi, [ebp + 8]
push 0x4dc824
push esi
call fcn.0049f9c2
add esp, 0xc
test eax, eax
jne 0x48763b
or dword [ebx], 2
lea ecx, [ebp + 0xc]
call fcn.00481e40
mov dword [ebx + 0x101c], eax
cmp eax, 0xffff
je 0x487850
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x487850
mov dword [ebx + 0x101c], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret 0x14
push 3
push 0x4dc82c
push esi
call fcn.0049f9c2
add esp, 0xc
test eax, eax
jne 0x487665
or dword [ebx], 4
lea ecx, [ebp + 0xe]
call fcn.00481e40
mov dword [ebx + 0x1020], eax
jmp 0x487850
push 5
push str.group
push esi
call fcn.0049f9c2
add esp, 0xc
test eax, eax
jne 0x48775b
or dword [ebx], 0x10
lea eax, [ebp + 0x12]
movzx ecx, word [eax]
cmp ecx, 0x20
je 0x487690
cmp ecx, 9
jne 0x487695
add eax, 2
jmp 0x487683
push 0xfd
push eax
lea eax, [esp + 0x30]
push eax
call fcn.004aad14
mov bp, word [esp + 0x34]
lea edi, [esp + 0x34]
xor eax, eax
add esp, 0xc
mov word [esp + 0x222], ax
test bp, bp
je 0x48772b
movzx esi, bp
mov eax, 0x4d4680
mov edx, 0x20
nop dword [eax]
cmp si, dx
je 0x4876f3
movzx ecx, word [eax + 2]
add eax, 2
mov edx, ecx
test cx, cx
jne 0x4876d0
movzx eax, word [edi + 2]
add edi, 2
mov esi, eax
test ax, ax
jne 0x4876c3
jmp 0x487701
test edi, edi
je 0x487701
xor eax, eax
mov word [edi], ax
mov bp, word [esp + 0x28]
test bp, bp
je 0x48772b
mov esi, dword [0x4e9efc]
test esi, esi
je 0x48772b
lea eax, [esp + 0x28]
push eax
push dword [esi + 4]
call fcn.0049f841
add esp, 8
test eax, eax
je 0x487744
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x487710
mov dword [ebx + 0x1024], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret 0x14
mov dword [ebx + 0x1024], esi
test esi, esi
je 0x487735
mov ebp, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
jmp 0x487850
push 3
push 0x4d5048
push esi
call fcn.0049f9c2
add esp, 0xc
test eax, eax
jne 0x48777e
or dword [ebx], 0x20
mov eax, 0x1028
mov ecx, 0xe
jmp 0x4877a3
push 5
push str.class
push esi
call fcn.0049f9c2
add esp, 0xc
test eax, eax
jne 0x4878b7
or dword [ebx], 8
mov eax, 0x808
mov ecx, 0x12
lea esi, [eax + ebx]
lea eax, [ecx + ebp]
nop dword [eax]
movzx ecx, word [eax]
cmp ecx, 0x20
je 0x4877bd
cmp ecx, 9
jne 0x4877c2
add eax, 2
jmp 0x4877b0
push 0x3ff
push eax
push esi
call fcn.004aad14
add esp, 0xc
xor eax, eax
mov edx, str.ahk_
mov word [esi + 0x7fe], ax
mov ecx, esi
call fcn.004819f0
test eax, eax
je 0x487822
nop word [eax + eax]
cmp eax, esi
je 0x48781d
movzx ecx, word [eax - 2]
cmp ecx, 0x20
je 0x487815
cmp ecx, 9
je 0x487815
lea ecx, [eax + 8]
mov edx, str.ahk_
call fcn.004819f0
test eax, eax
jne 0x4877f0
jmp 0x487822
xor ecx, ecx
mov word [eax - 2], cx
jmp 0x487822
xor ecx, ecx
mov word [eax], cx
lea ecx, [ebx + 0x1028]
cmp esi, ecx
jne 0x487850
mov eax, dword [ebx + 4]
cmp dword [eax + 8], 4
je 0x487848
push 0x5c
push ecx
call fcn.0049d3cf
add esp, 8
test eax, eax
jne 0x487848
mov al, 1
jmp 0x48784a
xor al, al
mov byte [ebx + 0x1828], al
test edi, edi
jne 0x4878ae
mov edx, dword [esp + 0x230]
mov ecx, edx
call fcn.004138d0
cmp ebp, eax
jbe 0x4878ae
or dword [ebx], 1
lea edi, [ebx + 8]
mov esi, ebp
mov eax, 0x400
sub esi, edx
sar esi, 1
cmp esi, 0x400
cmova esi, eax
dec esi
push esi
push edx
push edi
call fcn.004aad14
add esp, 0xc
lea ecx, [edi + 2]
xor eax, eax
mov word [edi + esi*2], ax
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x487895
sub edi, ecx
sar edi, 1
mov dword [ebx + 0x1008], edi
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x230]
jmp 0x4878bf
mov esi, dword [esp + 0x230]
dec edi
mov eax, 8
inc edi
mov edx, str.ahk_
mov dword [esp + 0x18], edi
lea ecx, [eax + ebp]
call fcn.004819f0
mov ebp, eax
mov dword [esp + 0x20], eax
test ebp, ebp
jne 0x4875d0
test edi, edi
jne 0x487927
push 0x3ff
push dword [esp + 0x234]
lea esi, [ebx + 8]
mov dword [ebx], 1
push esi
call fcn.004aad14
add esp, 0xc
lea ecx, [esi + 2]
xor eax, eax
mov word [esi + 0x7fe], ax
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x487912
sub esi, ecx
sar esi, 1
mov dword [ebx + 0x1008], esi
mov eax, dword [ebx]
cmp eax, dword [esp + 0x1c]
jne 0x48793a
cmp byte [esp + 0x17], 0
je 0x4879ed
mov ecx, dword [ebx + 0x1850]
test ecx, ecx
je 0x4879ed
test eax, eax
je 0x4879ed
test al, 1
jne 0x487960
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
cmp word [eax], 0
je 0x48797a
push 0x7fff
lea esi, [ebx + 0x1858]
push esi
push ecx
call dword [sym.imp.USER32.dll_GetWindowTextW]
test eax, eax
jne 0x48797a
mov word [esi], ax
test byte [ebx], 4
mov esi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
je 0x487994
lea eax, [ebx + 0x1854]
push eax
push dword [ebx + 0x1850]
call esi
test byte [ebx], 0x20
je 0x4879d0
lea eax, [esp + 0x1c]
push eax
push dword [ebx + 0x1850]
call esi
test eax, eax
je 0x4879d0
movzx eax, byte [ebx + 0x1828]
lea edx, [ebx + 0x11a58]
push eax
push ecx
mov ecx, dword [esp + 0x24]
call fcn.004290cb
add esp, 8
test eax, eax
jne 0x4879d0
mov word [ebx + 0x11a58], ax
test byte [ebx], 8
je 0x4879ed
push 0x101
lea eax, [ebx + 0x11856]
push eax
push dword [ebx + 0x1850]
call dword [sym.imp.USER32.dll_GetClassNameW]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x218
ret 0x14