Function at 0x487030
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x10
mov edx, dword [esp + 0x20]
push ebx
push ebp
push esi
cmp word [edx], 0
push edi
mov edi, ecx
mov dword [esp + 0x10], edi
je 0x487055
mov eax, dword [edi + 0x1c]
mov byte [esp + 0x30], 1
cmp word [eax], 0
je 0x48705a
mov byte [esp + 0x30], 0
mov dword [edi + 0x1c], edx
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x487060
mov eax, dword [esp + 0x2c]
sub edx, ecx
mov esi, dword [esp + 0x28]
mov ebp, esi
mov dword [edi + 0x24], eax
mov eax, dword [esp + 0x34]
mov dword [edi + 0x28], eax
mov eax, dword [esp + 0x24]
sar edx, 1
mov dword [edi + 4], eax
mov eax, dword [edi]
mov dword [edi + 0x20], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x34], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], 0
mov dword [edi], 0
xor eax, eax
mov edx, str.ahk_
mov ecx, ebp
mov dword [esp + 0x2c], eax
call fcn.00481b70
mov ebx, eax
test ebx, ebx
je 0x4871b1
nop dword [eax]
cmp ebx, esi
jbe 0x4870e2
movzx ecx, word [ebx - 2]
cmp ecx, 0x20
je 0x4870e2
cmp ecx, 9
jne 0x487155
push 2
lea esi, [ebx + 8]
push 0x4dc794
push esi
call fcn.0049f042
add esp, 0xc
test eax, eax
je 0x4871a2
push 3
push 0x4dc79c
push esi
call fcn.0049f042
add esp, 0xc
test eax, eax
je 0x487195
push 5
push str.group
push esi
call fcn.0049f042
add esp, 0xc
test eax, eax
je 0x487188
push 3
push 0x4d502c
push esi
call fcn.0049f042
add esp, 0xc
test eax, eax
je 0x48717b
push 5
push str.class
push esi
call fcn.0049f042
add esp, 0xc
test eax, eax
je 0x48716e
mov esi, dword [esp + 0x28]
lea ecx, [ebx + 8]
mov edx, str.ahk_
call fcn.00481b70
mov ebx, eax
test ebx, ebx
jne 0x4870d0
jmp 0x4871b1
add esi, 0xa
mov dword [esp + 0x2c], 8
jmp 0x4871ad
add esi, 6
mov dword [esp + 0x2c], 0x20
jmp 0x4871ad
add esi, 0xa
mov dword [esp + 0x2c], 0x10
jmp 0x4871ad
add esi, 6
mov dword [esp + 0x2c], 4
jmp 0x4871ad
add esi, 4
mov dword [esp + 0x2c], 2
mov dword [esp + 0x18], esi
mov edx, dword [esp + 0x34]
mov eax, edx
sub eax, 2
je 0x48739e
sub eax, 2
je 0x48738e
nop dword [eax]
movzx eax, word [ebp]
cmp eax, 0x20
je 0x4871de
cmp eax, 9
jne 0x4871e3
add ebp, 2
jmp 0x4871d0
cmp ebx, ebp
jne 0x4871fa
cmp edx, 1
je 0x4873d3
mov edi, 0x4ceea8
jmp 0x48729d
test ebx, ebx
je 0x48729b
mov esi, dword [esp + 0x24]
test esi, esi
jne 0x487265
push esi
push ebx
call fcn.0049ca51
mov ecx, dword [edi + 0xc]
sub eax, ebp
sar eax, 1
add esp, 8
inc eax
cmp eax, ecx
jbe 0x487265
cmp ecx, 0x400
jae 0x487234
mov dword [edi + 0xc], 0x400
mov ecx, 0x400
cmp ecx, eax
jae 0x487241
add ecx, ecx
cmp ecx, eax
jb 0x487238
mov dword [edi + 0xc], ecx
push dword [edi + 8]
call fcn.0049efc2
mov eax, dword [edi + 0xc]
add esp, 4
add eax, eax
push eax
call fcn.0049efdd
add esp, 4
mov dword [edi + 8], eax
test eax, eax
je 0x4873ec
mov eax, dword [edi + 8]
mov ecx, ebx
sub ecx, ebp
sar ecx, 1
dec ecx
lea edi, [eax + esi*2]
mov dword [esp + 0x14], ecx
lea esi, [ecx + ecx]
push esi
push ebp
push edi
call fcn.0049cb00
mov edx, dword [esp + 0x20]
xor eax, eax
mov word [esi + edi], ax
add esp, 0xc
mov eax, dword [esp + 0x24]
inc eax
add eax, edx
mov dword [esp + 0x24], eax
jmp 0x4872a1
mov edi, ebp
mov edx, dword [esp + 0x14]
mov ebp, dword [esp + 0x34]
lea eax, [ebp - 1]
cmp eax, 0x1f
ja case.0x4872b8.2
movzx eax, byte [eax + 0x4874f0]
jmp dword [eax*4 + 0x4874dc]
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x10], edi
test ebx, ebx
je 0x4872d6
mov edi, edx
mov dword [ecx + 0x18], edi
mov edi, ecx
jmp 0x4873d1
lea edx, [edi + 2]
nop dword [eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x4872e0
sub edi, edx
sar edi, 1
mov dword [ecx + 0x18], edi
mov edi, ecx
jmp 0x4873d1
cmp word [edi], 0
je 0x487327
mov esi, dword [0x4e9f6c]
test esi, esi
je 0x487327
nop dword [eax]
push edi
push dword [esi + 4]
call fcn.0049eec1
add esp, 8
test eax, eax
je 0x48733e
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x487310
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x34], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x14
mov edi, dword [esp + 0x10]
mov dword [edi + 0x34], esi
test esi, esi
je 0x487332
jmp 0x4873d1
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
mov dword [ecx + 0x38], edi
cmp dword [eax + 8], 4
je 0x487378
push 0x5c
push edi
call fcn.0049ca51
add esp, 8
test eax, eax
jne 0x487378
mov edi, dword [esp + 0x10]
mov al, 1
mov byte [edi + 0x3c], al
jmp 0x4873d1
mov edi, dword [esp + 0x10]
xor al, al
mov byte [edi + 0x3c], al
jmp 0x4873d1
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x14], edi
mov edi, ecx
jmp 0x4873d1
mov ecx, ebp
call fcn.00481fa0
mov ebp, dword [esp + 0x34]
mov dword [edi + 0x30], eax
jmp 0x4873d1
mov ecx, ebp
call fcn.00481fa0
mov esi, eax
cmp esi, 0xffff
je 0x4873ba
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4873ff
test byte [edi], 2
je 0x4873c4
cmp esi, dword [edi + 0x2c]
jne 0x4873ff
mov ebp, dword [esp + 0x34]
mov dword [edi + 0x2c], esi
jmp 0x4873d1
mov edi, dword [esp + 0x10]
or dword [edi], ebp
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x34], eax
test eax, eax
je 0x487412
mov esi, dword [esp + 0x28]
jmp 0x4870b1
mov dword [edi + 0xc], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x14
mov dword [edi + 0x2c], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x14
mov eax, dword [edi]
cmp eax, dword [esp + 0x1c]
jne 0x487425
cmp byte [esp + 0x30], 0
je 0x4874cd
mov ecx, dword [edi + 0x64]
lea esi, [edi + 0x64]
test ecx, ecx
je 0x4874cd
test eax, eax
je 0x4874cd
mov ebx, esi
test al, 1
jne 0x48744d
mov eax, dword [edi + 0x1c]
cmp word [eax], 0
je 0x487467
lea ebx, [edi + 0x64]
push 0x7fff
lea ebp, [edi + 0x6c]
push ebp
push ecx
call dword [sym.imp.USER32.dll_GetWindowTextW]
test eax, eax
jne 0x487467
mov word [ebp], ax
mov esi, ebx
test byte [edi], 4
mov ebp, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
je 0x48747a
lea eax, [edi + 0x68]
push eax
push dword [esi]
call ebp
test byte [edi], 0x20
mov ebx, esi
je 0x4874b4
lea eax, [esp + 0x28]
push eax
push dword [esi]
call ebp
test eax, eax
je 0x4874b4
movzx eax, byte [edi + 0x3c]
lea edx, [edi + 0x1026c]
push eax
push ecx
mov ecx, dword [esp + 0x30]
call fcn.0042903a
add esp, 8
test eax, eax
jne 0x4874b4
mov word [edi + 0x1026c], ax
lea ebx, [edi + 0x64]
test byte [edi], 8
je 0x4874cd
push 0x101
lea eax, [edi + 0x1006a]
push eax
push dword [ebx]
call dword [sym.imp.USER32.dll_GetClassNameW]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret 0x14