Function at 0x403e0e
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x854
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x14]
mov ebx, ecx
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x2c], ebx
push eax
push dword [esp + 0x874]
call fcn.004037d6
mov esi, dword [esp + 0x868]
mov byte [esp + 0x13], al
lea eax, [esp + 0x34]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowRect]
lea eax, [esp + 0x54]
push eax
push esi
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [esp + 0x3c]
sub ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x40]
inc ecx
sub edi, dword [esp + 0x38]
mov edx, ecx
mov eax, dword [esp + 0x5c]
inc edi
mov ebp, edi
mov dword [esp + 0x2c], 0x64
sub ebp, dword [esp + 0x60]
sub edx, eax
cmp byte [esp + 0x13], 0
mov dword [esp + 0x30], edx
je 0x403f37
cmp byte [esp + 0x870], 0
jne 0x403f79
imul eax, dword [esp + 0x18]
push 0x64
pop ebx
cdq
idiv ebx
mov ebx, eax
mov eax, dword [esp + 0x60]
imul eax, dword [esp + 0x14]
add ebx, dword [esp + 0x30]
sub ecx, ebx
mov dword [esp + 0x1c], ebx
cdq
idiv dword [esp + 0x2c]
add eax, ebp
mov dword [esp + 0x20], eax
mov eax, ecx
sub edi, dword [esp + 0x20]
cdq
sub eax, edx
mov ecx, eax
mov eax, edi
cdq
sub eax, edx
sar ecx, 1
add ecx, dword [esp + 0x34]
mov edi, eax
sar edi, 1
add edi, dword [esp + 0x38]
mov dword [esp + 0x24], ecx
test ecx, ecx
jns 0x403ef2
and dword [esp + 0x24], 0
test edi, edi
jns 0x403ef8
xor edi, edi
push 0xfffffffffffffff0
push esi
mov ebx, 0x204
call dword [sym.imp.USER32.dll_GetWindowLongW]
test eax, 0x800
jne 0x403f10
add ebx, 2
push ebx
push dword [esp + 0x24]
push dword [esp + 0x24]
push edi
push dword [esp + 0x34]
push 0
push esi
call dword [sym.imp.USER32.dll_SetWindowPos]
lea eax, [esp + 0x34]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [esp + 0x28]
cmp byte [esp + 0x870], 0
jne 0x403f79
push 0x400
lea eax, [esp + 0x68]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowTextW]
push dword [esp + 0x86c]
lea eax, [esp + 0x68]
mov ecx, ebx
push 1
push 0x400
push eax
push eax
call fcn.00403867
lea eax, [esp + 0x64]
push eax
push esi
call dword [sym.imp.USER32.dll_SetWindowTextW]
push 8
call dword [sym.imp.USER32.dll_GetSystemMetrics]
push 5
push esi
sub ebp, eax
call dword [sym.imp.USER32.dll_GetWindow]
mov edi, eax
xor ebx, ebx
mov dword [esp + 0x1c], edi
jmp 0x404072
cmp ebx, 0x200
jge 0x40407a
mov esi, 0x400
lea eax, [esp + 0x64]
push esi
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextW]
cmp word [esp + 0x64], 0
je 0x403fe4
push dword [esp + 0x86c]
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x68]
push 1
push esi
push eax
push eax
call fcn.00403867
lea eax, [esp + 0x64]
push eax
push edi
call dword [sym.imp.USER32.dll_SetWindowTextW]
cmp byte [esp + 0x13], 0
je 0x404060
lea eax, [esp + 0x44]
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x48]
sub eax, ecx
inc eax
sub ecx, ebp
imul eax, dword [esp + 0x14]
push 0x204
push 0x64
pop esi
sub ecx, dword [esp + 0x3c]
cdq
idiv esi
mov esi, dword [esp + 0x48]
push eax
mov eax, dword [esp + 0x54]
sub eax, esi
imul ecx, dword [esp + 0x1c]
inc eax
imul eax, dword [esp + 0x20]
cdq
idiv dword [esp + 0x34]
push eax
push 0x64
mov eax, ecx
cdq
pop ecx
idiv ecx
push eax
mov eax, dword [esp + 0x40]
cdq
sub eax, edx
sar eax, 1
sub esi, eax
sub esi, dword [esp + 0x44]
imul esi, dword [esp + 0x28]
mov eax, esi
cdq
idiv ecx
push eax
push 0
push edi
call dword [sym.imp.USER32.dll_SetWindowPos]
push 2
push edi
call dword [sym.imp.USER32.dll_GetWindow]
mov edi, eax
cmp edi, dword [esp + 0x1c]
je 0x40407a
inc ebx
test edi, edi
jne 0x403f99
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x854
ret 0xc