Function at 0x487000
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 0x487025
mov eax, dword [edi + 0x1c]
mov byte [esp + 0x30], 1
cmp word [eax], 0
je 0x48702a
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 0x487030
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, 0x4dc808
mov ecx, ebp
mov dword [esp + 0x2c], eax
call fcn.00481b60
mov ebx, eax
test ebx, ebx
je 0x487181
nop dword [eax]
cmp ebx, esi
jbe 0x4870b2
movzx ecx, word [ebx - 2]
cmp ecx, 0x20
je 0x4870b2
cmp ecx, 9
jne 0x487125
push 2
lea esi, [ebx + 8]
push 0x4dc814
push esi
call fcn.0049f012
add esp, 0xc
test eax, eax
je 0x487172
push 3
push 0x4dc81c
push esi
call fcn.0049f012
add esp, 0xc
test eax, eax
je 0x487165
push 5
push 0x4db258
push esi
call fcn.0049f012
add esp, 0xc
test eax, eax
je 0x487158
push 3
push 0x4d5094
push esi
call fcn.0049f012
add esp, 0xc
test eax, eax
je 0x48714b
push 5
push 0x4d8314
push esi
call fcn.0049f012
add esp, 0xc
test eax, eax
je 0x48713e
mov esi, dword [esp + 0x28]
lea ecx, [ebx + 8]
mov edx, 0x4dc808
call fcn.00481b60
mov ebx, eax
test ebx, ebx
jne 0x4870a0
jmp 0x487181
add esi, 0xa
mov dword [esp + 0x2c], 8
jmp 0x48717d
add esi, 6
mov dword [esp + 0x2c], 0x20
jmp 0x48717d
add esi, 0xa
mov dword [esp + 0x2c], 0x10
jmp 0x48717d
add esi, 6
mov dword [esp + 0x2c], 4
jmp 0x48717d
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 0x48736e
sub eax, 2
je 0x48735e
nop dword [eax]
movzx eax, word [ebp]
cmp eax, 0x20
je 0x4871ae
cmp eax, 9
jne 0x4871b3
add ebp, 2
jmp 0x4871a0
cmp ebx, ebp
jne 0x4871ca
cmp edx, 1
je 0x4873a3
mov edi, 0x4ceea8
jmp 0x48726d
test ebx, ebx
je 0x48726b
mov esi, dword [esp + 0x24]
test esi, esi
jne 0x487235
push esi
push ebx
call fcn.0049ca21
mov ecx, dword [edi + 0xc]
sub eax, ebp
sar eax, 1
add esp, 8
inc eax
cmp eax, ecx
jbe 0x487235
cmp ecx, 0x400
jae 0x487204
mov dword [edi + 0xc], 0x400
mov ecx, 0x400
cmp ecx, eax
jae 0x487211
add ecx, ecx
cmp ecx, eax
jb 0x487208
mov dword [edi + 0xc], ecx
push dword [edi + 8]
call fcn.0049ef92
mov eax, dword [edi + 0xc]
add esp, 4
add eax, eax
push eax
call fcn.0049efad
add esp, 4
mov dword [edi + 8], eax
test eax, eax
je 0x4873bc
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.0049cad0
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 0x487271
mov edi, ebp
mov edx, dword [esp + 0x14]
mov ebp, dword [esp + 0x34]
lea eax, [ebp - 1]
cmp eax, 0x1f
ja case.0x487288.2
movzx eax, byte [eax + 0x4874c0]
jmp dword [eax*4 + 0x4874ac]
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x10], edi
test ebx, ebx
je 0x4872a6
mov edi, edx
mov dword [ecx + 0x18], edi
mov edi, ecx
jmp 0x4873a1
lea edx, [edi + 2]
nop dword [eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x4872b0
sub edi, edx
sar edi, 1
mov dword [ecx + 0x18], edi
mov edi, ecx
jmp 0x4873a1
cmp word [edi], 0
je 0x4872f7
mov esi, dword [0x4e9f6c]
test esi, esi
je 0x4872f7
nop dword [eax]
push edi
push dword [esi + 4]
call fcn.0049ee91
add esp, 8
test eax, eax
je 0x48730e
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x4872e0
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 0x487302
jmp 0x4873a1
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
mov dword [ecx + 0x38], edi
cmp dword [eax + 8], 4
je 0x487348
push 0x5c
push edi
call fcn.0049ca21
add esp, 8
test eax, eax
jne 0x487348
mov edi, dword [esp + 0x10]
mov al, 1
mov byte [edi + 0x3c], al
jmp 0x4873a1
mov edi, dword [esp + 0x10]
xor al, al
mov byte [edi + 0x3c], al
jmp 0x4873a1
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x14], edi
mov edi, ecx
jmp 0x4873a1
mov ecx, ebp
call fcn.00481f90
mov ebp, dword [esp + 0x34]
mov dword [edi + 0x30], eax
jmp 0x4873a1
mov ecx, ebp
call fcn.00481f90
mov esi, eax
cmp esi, 0xffff
je 0x48738a
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4873cf
test byte [edi], 2
je 0x487394
cmp esi, dword [edi + 0x2c]
jne 0x4873cf
mov ebp, dword [esp + 0x34]
mov dword [edi + 0x2c], esi
jmp 0x4873a1
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 0x4873e2
mov esi, dword [esp + 0x28]
jmp 0x487081
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 0x4873f5
cmp byte [esp + 0x30], 0
je 0x48749d
mov ecx, dword [edi + 0x64]
lea esi, [edi + 0x64]
test ecx, ecx
je 0x48749d
test eax, eax
je 0x48749d
mov ebx, esi
test al, 1
jne 0x48741d
mov eax, dword [edi + 0x1c]
cmp word [eax], 0
je 0x487437
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 0x487437
mov word [ebp], ax
mov esi, ebx
test byte [edi], 4
mov ebp, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
je 0x48744a
lea eax, [edi + 0x68]
push eax
push dword [esi]
call ebp
test byte [edi], 0x20
mov ebx, esi
je 0x487484
lea eax, [esp + 0x28]
push eax
push dword [esi]
call ebp
test eax, eax
je 0x487484
movzx eax, byte [edi + 0x3c]
lea edx, [edi + 0x1026c]
push eax
push ecx
mov ecx, dword [esp + 0x30]
call fcn.004290da
add esp, 8
test eax, eax
jne 0x487484
mov word [edi + 0x1026c], ax
lea ebx, [edi + 0x64]
test byte [edi], 8
je 0x48749d
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