Function at 0x4098a8
Capabilities:
Get graphical window text

Disassembly:
push ebp
push esp
pop ebp
sub esp, 0x850
push ebx
push esi
push edi
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x20], ecx
call fcn.004097c5
mov byte [ebp - 1], al
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowRect]
lea eax, [ebp - 0x50]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [ebp - 0x28]
sub ecx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x24]
sub esi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x48]
inc ecx
inc esi
push ecx
pop ebx
push esi
pop edi
sub edi, dword [ebp - 0x44]
sub ebx, eax
cmp byte [ebp - 1], 0
mov dword [ebp - 8], ebx
je 0x4099a4
cmp byte [ebp + 0x10], 0
jne 0x4099e8
imul eax, dword [ebp - 0x10]
cdq
push 0x64
pop ebx
idiv ebx
add eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x44]
imul eax, dword [ebp - 0xc]
cdq
idiv ebx
add eax, edi
mov dword [ebp - 0x18], eax
push ecx
pop eax
sub eax, dword [ebp - 0x14]
cdq
sub eax, edx
push eax
pop ebx
push esi
pop eax
sub eax, dword [ebp - 0x18]
sar ebx, 1
add ebx, dword [ebp - 0x30]
cdq
sub eax, edx
push eax
pop esi
sar esi, 1
add esi, dword [ebp - 0x2c]
test ebx, ebx
jge 0x409958
sub ebx, ebx
test esi, esi
jge 0x40995e
sub esi, esi
push 0xfffffffffffffff0
push dword [ebp + 8]
mov dword [ebp - 0x1c], 0x204
call dword [sym.imp.USER32.dll_GetWindowLongW]
test eax, 0x800
jne 0x40997e
mov dword [ebp - 0x1c], 0x206
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
push dword [ebp - 0x14]
push esi
push ebx
push 0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowPos]
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [ebp - 8]
cmp byte [ebp + 0x10], 0
mov esi, 0x400
jne 0x4099ed
push esi
lea eax, [ebp - 0x850]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextW]
push dword [ebp + 0xc]
mov ecx, dword [ebp - 0x20]
push 1
push esi
lea eax, [ebp - 0x850]
push eax
push eax
call fcn.00409680
lea eax, [ebp - 0x850]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp 0x4099ed
mov esi, 0x400
push 8
call dword [sym.imp.USER32.dll_GetSystemMetrics]
push 5
push dword [ebp + 8]
sub edi, eax
call dword [sym.imp.USER32.dll_GetWindow]
and dword [ebp + 8], 0
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], eax
jmp 0x409ae5
cmp dword [ebp + 8], 0x200
jge 0x409aed
push esi
lea eax, [ebp - 0x850]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.USER32.dll_GetWindowTextW]
cmp word [ebp - 0x850], 0
je 0x409a5f
push dword [ebp + 0xc]
mov ecx, dword [ebp - 0x20]
push 1
push esi
lea eax, [ebp - 0x850]
push eax
push eax
call fcn.00409680
lea eax, [ebp - 0x850]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.USER32.dll_SetWindowTextW]
cmp byte [ebp - 1], 0
je 0x409acf
lea eax, [ebp - 0x40]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x3c]
push 0x204
inc eax
imul eax, dword [ebp - 0xc]
cdq
push 0x64
pop ecx
idiv ecx
push eax
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x40]
inc eax
imul eax, dword [ebp - 0x10]
cdq
idiv ecx
push eax
mov eax, dword [ebp - 0x3c]
sub eax, edi
sub eax, dword [ebp - 0x2c]
imul eax, dword [ebp - 0xc]
cdq
idiv ecx
push eax
push ebx
pop eax
cdq
sub eax, edx
push eax
pop ecx
mov eax, dword [ebp - 0x40]
sar ecx, 1
sub eax, ecx
sub eax, dword [ebp - 0x30]
push 0x64
imul eax, dword [ebp - 0x10]
pop ecx
cdq
idiv ecx
push eax
push 0
push dword [ebp + 0x10]
call dword [sym.imp.USER32.dll_SetWindowPos]
push 2
push dword [ebp + 0x10]
call dword [sym.imp.USER32.dll_GetWindow]
mov dword [ebp + 0x10], eax
cmp eax, dword [ebp - 8]
je 0x409aed
inc dword [ebp + 8]
or eax, eax
jne 0x409a11
pop edi
pop esi
pop ebx
leave
ret 0xc