Function at 0x40bac0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x456968
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x4710b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov eax, dword [0x472138]
mov edx, dword [eax + 0xc]
mov ecx, 0x472138
call edx
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 1
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push 5
push eax
call dword [sym.imp.USER32.dll_GetWindow]
mov ebx, eax
test ebx, ebx
je 0x40bbf2
lea eax, [ebp - 0x18]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edi, dword [ebp - 0x18]
call fcn.0040b9e0
push ebx
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov edx, dword [0x472138]
mov edi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x472138
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
inc edi
mov byte [ebp - 4], 2
js 0x40bc4f
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x40bb7c
mov eax, edi
lea ecx, [ebp - 0x10]
call fcn.0040c3d0
mov esi, dword [ebp - 0x10]
cmp edi, dword [esi - 8]
jg 0x40bc4f
push edi
push esi
xor ecx, ecx
mov dword [esi - 0xc], edi
push ebx
mov word [esi + edi*2], cx
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov eax, dword [ebp + 8]
test eax, eax
je 0x40bbbf
cmp dword [esi - 0xc], 0
jl 0x40bbbf
push eax
push esi
call fcn.0043e342
add esp, 8
test eax, eax
je 0x40bbbf
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x40bc59
push 2
push ebx
call dword [sym.imp.USER32.dll_GetWindow]
add esi, 0xfffffff0
mov ebx, eax
mov byte [ebp - 4], 1
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x40bbea
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
test ebx, ebx
jne 0x40bb21
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bc15
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bc3b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.0040b7c0
add esi, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bc79
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bc9c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bcc2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret