Function at 0x486e70
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 0x486e95
mov eax, dword [edi + 0x1c]
mov byte [esp + 0x30], 1
cmp word [eax], 0
je 0x486e9a
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 0x486ea0
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, 0x4db788
mov ecx, ebp
mov dword [esp + 0x2c], eax
call fcn.00481a00
mov ebx, eax
test ebx, ebx
je 0x486ff1
nop dword [eax]
cmp ebx, esi
jbe 0x486f22
movzx ecx, word [ebx - 2]
cmp ecx, 0x20
je 0x486f22
cmp ecx, 9
jne 0x486f95
push 2
lea esi, [ebx + 8]
push 0x4db794
push esi
call fcn.0049ee82
add esp, 0xc
test eax, eax
je 0x486fe2
push 3
push 0x4db79c
push esi
call fcn.0049ee82
add esp, 0xc
test eax, eax
je 0x486fd5
push 5
push 0x4da1c0
push esi
call fcn.0049ee82
add esp, 0xc
test eax, eax
je 0x486fc8
push 3
push 0x4d402c
push esi
call fcn.0049ee82
add esp, 0xc
test eax, eax
je 0x486fbb
push 5
push 0x4d727c
push esi
call fcn.0049ee82
add esp, 0xc
test eax, eax
je 0x486fae
mov esi, dword [esp + 0x28]
lea ecx, [ebx + 8]
mov edx, 0x4db788
call fcn.00481a00
mov ebx, eax
test ebx, ebx
jne 0x486f10
jmp 0x486ff1
add esi, 0xa
mov dword [esp + 0x2c], 8
jmp 0x486fed
add esi, 6
mov dword [esp + 0x2c], 0x20
jmp 0x486fed
add esi, 0xa
mov dword [esp + 0x2c], 0x10
jmp 0x486fed
add esi, 6
mov dword [esp + 0x2c], 4
jmp 0x486fed
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 0x4871de
sub eax, 2
je 0x4871ce
nop dword [eax]
movzx eax, word [ebp]
cmp eax, 0x20
je 0x48701e
cmp eax, 9
jne 0x487023
add ebp, 2
jmp 0x487010
cmp ebx, ebp
jne 0x48703a
cmp edx, 1
je 0x487213
mov edi, 0x4cdea8
jmp 0x4870dd
test ebx, ebx
je 0x4870db
mov esi, dword [esp + 0x24]
test esi, esi
jne 0x4870a5
push esi
push ebx
call fcn.0049c891
mov ecx, dword [edi + 0xc]
sub eax, ebp
sar eax, 1
add esp, 8
inc eax
cmp eax, ecx
jbe 0x4870a5
cmp ecx, 0x400
jae 0x487074
mov dword [edi + 0xc], 0x400
mov ecx, 0x400
cmp ecx, eax
jae 0x487081
add ecx, ecx
cmp ecx, eax
jb 0x487078
mov dword [edi + 0xc], ecx
push dword [edi + 8]
call fcn.0049ee02
mov eax, dword [edi + 0xc]
add esp, 4
add eax, eax
push eax
call fcn.0049ee1d
add esp, 4
mov dword [edi + 8], eax
test eax, eax
je 0x48722c
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.0049c940
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 0x4870e1
mov edi, ebp
mov edx, dword [esp + 0x14]
mov ebp, dword [esp + 0x34]
lea eax, [ebp - 1]
cmp eax, 0x1f
ja case.0x4870f8.2
movzx eax, byte [eax + 0x487330]
jmp dword [eax*4 + 0x48731c]
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x10], edi
test ebx, ebx
je 0x487116
mov edi, edx
mov dword [ecx + 0x18], edi
mov edi, ecx
jmp 0x487211
lea edx, [edi + 2]
nop dword [eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x487120
sub edi, edx
sar edi, 1
mov dword [ecx + 0x18], edi
mov edi, ecx
jmp 0x487211
cmp word [edi], 0
je 0x487167
mov esi, dword [0x4e8f6c]
test esi, esi
je 0x487167
nop dword [eax]
push edi
push dword [esi + 4]
call fcn.0049ed01
add esp, 8
test eax, eax
je 0x48717e
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x487150
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 0x487172
jmp 0x487211
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
mov dword [ecx + 0x38], edi
cmp dword [eax + 8], 4
je 0x4871b8
push 0x5c
push edi
call fcn.0049c891
add esp, 8
test eax, eax
jne 0x4871b8
mov edi, dword [esp + 0x10]
mov al, 1
mov byte [edi + 0x3c], al
jmp 0x487211
mov edi, dword [esp + 0x10]
xor al, al
mov byte [edi + 0x3c], al
jmp 0x487211
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x14], edi
mov edi, ecx
jmp 0x487211
mov ecx, ebp
call fcn.00481e30
mov ebp, dword [esp + 0x34]
mov dword [edi + 0x30], eax
jmp 0x487211
mov ecx, ebp
call fcn.00481e30
mov esi, eax
cmp esi, 0xffff
je 0x4871fa
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x48723f
test byte [edi], 2
je 0x487204
cmp esi, dword [edi + 0x2c]
jne 0x48723f
mov ebp, dword [esp + 0x34]
mov dword [edi + 0x2c], esi
jmp 0x487211
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 0x487252
mov esi, dword [esp + 0x28]
jmp 0x486ef1
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 0x487265
cmp byte [esp + 0x30], 0
je 0x48730d
mov ecx, dword [edi + 0x64]
lea esi, [edi + 0x64]
test ecx, ecx
je 0x48730d
test eax, eax
je 0x48730d
mov ebx, esi
test al, 1
jne 0x48728d
mov eax, dword [edi + 0x1c]
cmp word [eax], 0
je 0x4872a7
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 0x4872a7
mov word [ebp], ax
mov esi, ebx
test byte [edi], 4
mov ebp, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
je 0x4872ba
lea eax, [edi + 0x68]
push eax
push dword [esi]
call ebp
test byte [edi], 0x20
mov ebx, esi
je 0x4872f4
lea eax, [esp + 0x28]
push eax
push dword [esi]
call ebp
test eax, eax
je 0x4872f4
movzx eax, byte [edi + 0x3c]
lea edx, [edi + 0x1026c]
push eax
push ecx
mov ecx, dword [esp + 0x30]
call fcn.0042905a
add esp, 8
test eax, eax
jne 0x4872f4
mov word [edi + 0x1026c], ax
lea ebx, [edi + 0x64]
test byte [edi], 8
je 0x48730d
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