Function at 0x40ea60
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4828e4
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x4ae364]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x34], 0
mov ecx, 0x4b1e48
mov eax, dword [0x4b1e48]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x2c], esi
push dword [ebp + 8]
mov dword [ebp - 4], 0
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov ecx, 1
sub ecx, dword [esi - 4]
lea edi, [eax + 1]
mov eax, dword [esi - 8]
sub eax, edi
or eax, ecx
jge 0x40ead7
push edi
lea ecx, [ebp - 0x2c]
call fcn.0040fa50
mov esi, dword [ebp - 0x2c]
push edi
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ecx, eax
cmp ecx, 0xffffffff
jne 0x40eb05
test esi, esi
jne 0x40eaf1
xor ecx, ecx
jmp 0x40eb0d
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40eaf6
sub ecx, edx
sar ecx, 1
test ecx, ecx
js 0x40eca7
cmp ecx, dword [esi - 8]
jg 0x40eca7
mov dword [esi - 0xc], ecx
xor eax, eax
push 1
mov word [esi + ecx*2], ax
lea ecx, [ebp - 0xec]
push 3
call fcn.0040eeb0
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40eb33
mov eax, dword [ebp + 0xc]
sub ecx, edx
sar ecx, 1
mov dword [ebp - 0x3c], 0x48a7b4
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 2
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push 1
push eax
lea eax, [ebp - 0xdc]
push eax
push ecx
push esi
call fcn.00432ad0
add esp, 0x14
mov dword [ebp - 0x3c], vtable.typesafe_format::impl::Streamable_wchar_t_.0
mov ecx, dword [ebp - 0x98]
xor eax, eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 0x34], 4
test cl, 2
jne 0x40ebc9
mov eax, dword [ebp - 0xb4]
mov edx, dword [eax]
test edx, edx
je 0x40ebc9
cmp edx, dword [ebp - 0x9c]
mov eax, dword [ebp - 0xc4]
cmovb edx, dword [ebp - 0x9c]
mov ecx, dword [eax]
sub edx, ecx
sar edx, 1
push edx
jmp 0x40ebf3
test cl, 4
jne 0x40ebfc
mov eax, dword [ebp - 0xb8]
mov edx, dword [eax]
test edx, edx
je 0x40ebfc
mov eax, dword [ebp - 0xc8]
mov ecx, dword [eax]
mov eax, dword [ebp - 0xa8]
mov eax, dword [eax]
add eax, eax
sub eax, ecx
add eax, edx
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x28]
call fcn.00408780
lea ecx, [ebp - 0xec]
mov dword [ebp - 4], 0
call fcn.00405e70
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x40ec59
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ec4f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ecb1
push edx
push ecx
call fcn.0044c1f2
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
add esi, 0xfffffff0
mov dword [ebp - 0x14], 7
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40ec8c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044c213
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.0040bdb0
call fcn.00466d4c
int3