Function at 0x407701
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x528
and dword [esp], 0
push ebx
mov ebx, dword [edi + 0x40104]
push esi
mov esi, 0x3ff
push esi
lea eax, [esp + 0x135]
push 0
push eax
mov dword [esp + 0x18], ebx
mov byte [esp + 0x13c], 0
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
lea eax, [esp + 0x134]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextA]
add ebx, 3
shl ebx, 0xc
add ebx, edi
push ebx
call sub.msvcrt.dll_strlen
test eax, eax
pop ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 4
jle 0x4079ac
mov eax, dword [esp + 0xc]
push str.title
add eax, 2
push edi
call fcn.00405a62
test eax, eax
je 0x4077a5
lea eax, [esp + 0x130]
push eax
push ebx
call sub.msvcrt.dll__strcmpi
test eax, eax
pop ecx
pop ecx
jne 0x4077a5
xor esi, esi
inc esi
mov dword [esp + 8], esi
jmp 0x4077a8
xor esi, esi
inc esi
mov eax, dword [esp + 0xc]
push str.stitle
push edi
add eax, 2
call fcn.00405a62
test eax, eax
je 0x4077db
push dword [esp + 0x10]
lea eax, [esp + 0x134]
push eax
push ebx
call sub.msvcrt.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x4077db
mov dword [esp + 8], esi
mov eax, dword [esp + 0xc]
push str.ititle
push edi
add eax, 2
call fcn.00405a62
test eax, eax
je 0x407807
push ebx
lea eax, [esp + 0x134]
call fcn.004021ea
test eax, eax
pop ecx
jl 0x407807
mov dword [esp + 8], esi
mov eax, dword [esp + 0xc]
push str.etitle
push edi
add eax, 2
call fcn.00405a62
test eax, eax
je 0x407862
lea eax, [esp + 0x130]
push eax
call sub.msvcrt.dll_strlen
cmp eax, dword [esp + 0x14]
pop ecx
jb 0x407862
push dword [esp + 0x10]
lea eax, [esp + 0x134]
push eax
call sub.msvcrt.dll_strlen
pop ecx
lea ecx, [esp + 0x134]
sub ecx, dword [esp + 0x14]
add eax, ecx
push eax
push ebx
call sub.msvcrt.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x407862
mov dword [esp + 8], esi
mov eax, dword [esp + 0xc]
push 0x413008
push edi
add eax, 2
call fcn.00405a62
test eax, eax
je 0x407898
mov eax, ebx
call fcn.00402651
push 0xfffffffffffffff4
push dword [ebp + 8]
mov dword [esp + 0x18], eax
call dword [sym.imp.USER32.dll_GetWindowLongA]
cmp dword [esp + 0x10], eax
jne 0x407898
mov dword [esp + 8], esi
mov eax, dword [esp + 0xc]
push str.class
push edi
add eax, 2
call fcn.00405a62
test eax, eax
je 0x4078ef
push 0xff
lea eax, [esp + 0x2d]
push 0
push eax
mov byte [esp + 0x34], 0
call sub.msvcrt.dll_memset
add esp, 0xc
push 0xff
lea eax, [esp + 0x2c]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetClassNameA]
lea eax, [esp + 0x28]
push eax
push ebx
call sub.msvcrt.dll__strcmpi
test eax, eax
pop ecx
pop ecx
jne 0x4078ef
mov dword [esp + 8], esi
mov eax, dword [esp + 0xc]
push str.process
push edi
add eax, 2
call fcn.00405a62
test eax, eax
je 0x4079af
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x4079af
and dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp byte [ebx], 0x2f
jne 0x407951
mov eax, dword [esp + 0xc]
shl eax, 0xc
lea eax, [eax + edi + 0x3001]
call fcn.00402651
cmp dword [esp + 0x10], eax
jne 0x4079af
mov dword [esp + 8], esi
jmp 0x4079af
call fcn.0040dc41
test eax, eax
je 0x40799e
push 0x104
lea eax, [esp + 0x2d]
push 0
push eax
mov byte [esp + 0x34], 0
call sub.msvcrt.dll_memset
add esp, 0xc
push dword [esp + 0x10]
lea esi, [esp + 0x2c]
call fcn.0040dda8
pop ecx
push ebx
mov ecx, esi
call fcn.00402395
push eax
call sub.msvcrt.dll__stricmp
xor esi, esi
pop ecx
inc esi
test eax, eax
pop ecx
jne 0x4079af
mov dword [esp + 8], esi
jmp 0x4079af
push str.Failed_to_load_the_process_library__
mov eax, edi
call fcn.004059bd
jmp 0x4079af
xor esi, esi
inc esi
mov ebx, dword [esp + 0xc]
push str.alltop
add ebx, 2
push edi
mov eax, ebx
call fcn.00405a62
test eax, eax
je 0x4079fa
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x4079fa
lea eax, [esp + 0x18]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x18]
cmp eax, esi
jle 0x4079fa
mov dword [esp + 8], esi
mov dword [esp + 0x14], 3
push str.alltopnodesktop
push edi
mov eax, ebx
call fcn.00405a62
test eax, eax
je 0x407aae
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x407aae
mov ebx, 0xff
push ebx
lea eax, [esp + 0x2d]
push 0
push eax
mov byte [esp + 0x34], 0
call sub.msvcrt.dll_memset
add esp, 0xc
push ebx
lea eax, [esp + 0x2c]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetClassNameA]
lea eax, [esp + 0x28]
push str.progman
push eax
call sub.msvcrt.dll__stricmp
test eax, eax
pop ecx
pop ecx
je 0x407aae
lea eax, [esp + 0x28]
push str.shell_traywnd
push eax
call sub.msvcrt.dll__stricmp
test eax, eax
pop ecx
pop ecx
je 0x407aae
lea eax, [esp + 0x28]
push str.button
push eax
call sub.msvcrt.dll__stricmp
test eax, eax
pop ecx
pop ecx
je 0x407aae
lea eax, [esp + 0x18]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x18]
cmp eax, esi
jle 0x407aae
mov dword [esp + 8], esi
mov dword [esp + 0x14], 3
mov ebx, dword [esp + 0xc]
push 0x413054
push edi
lea eax, [ebx + 2]
call fcn.00405a62
test eax, eax
je 0x407ad0
mov dword [esp + 8], esi
mov dword [esp + 0x14], 3
cmp dword [esp + 8], 0
je 0x407aea
mov eax, dword [esp + 0x14]
add eax, ebx
push eax
push dword [ebp + 8]
inc ebx
push ebx
mov ecx, edi
call fcn.00406ef4
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4