Function at 0x40f300
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c6cdd
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x4fa0a8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x7c], esi
mov eax, dword [ebp + 8]
lea edi, [esi + 0x38]
push dword [edi]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x90], edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x40f373
push eax
push ecx
mov eax, esp
push 0
push SysReAllocString
push 0
push ecx
mov dword [eax], 0
mov ecx, esi
mov eax, esp
mov dword [eax], 0
push dword [ebp - 0x6c]
call fcn.0040c2a0
cmp dword [ebp + 0xc], 0
je 0x40f4be
mov eax, dword [ebp - 0x6c]
test eax, eax
jne 0x40f397
push eax
mov ecx, edi
call fcn.004104b0
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x40f4be
mov esi, dword [sym.imp.USER32.dll_GetWindowRect]
lea ecx, [ebp - 0x30]
xorps xmm0, xmm0
push ecx
push eax
movups xmmword [ebp - 0x30], xmm0
movups xmmword [ebp - 0x20], xmm0
movups xmmword [ebp - 0x40], xmm0
call esi
lea eax, [ebp - 0x20]
push eax
push dword [edi]
call esi
mov eax, dword [ebp - 0x24]
add eax, dword [ebp - 0x2c]
cdq
sub eax, edx
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x30]
sar eax, 1
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp - 0x20]
push 2
push dword [ebp - 0x6c]
lea eax, [eax + edx]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x14]
cdq
sub eax, edx
sar ecx, 1
sar eax, 1
mov dword [ebp - 0x84], eax
lea eax, [edi + esi]
cdq
sub eax, edx
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x70]
sar eax, 1
sub ecx, eax
add esi, ecx
mov ecx, dword [ebp - 0x80]
sub ecx, eax
mov dword [ebp - 0x20], esi
mov eax, edx
add edi, ecx
sub eax, dword [ebp - 0x84]
sub edx, dword [ebp - 0x84]
add dword [ebp - 0x1c], eax
add dword [ebp - 0x14], edx
mov dword [ebp - 0x18], edi
call dword [sym.imp.USER32.dll_MonitorFromWindow]
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x68], 0x28
push ecx
push eax
call dword [sym.imp.USER32.dll_GetMonitorInfoW]
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x18]
cmp esi, ecx
jge 0x40f467
sub ecx, esi
add esi, ecx
add eax, ecx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x14]
cmp edx, edi
jge 0x40f480
sub edi, edx
add edx, edi
add ecx, edi
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x14], ecx
mov edi, dword [ebp - 0x38]
cmp eax, edi
jle 0x40f493
sub edi, eax
add esi, edi
add eax, edi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], eax
mov edi, dword [ebp - 0x34]
cmp ecx, edi
jle 0x40f4a6
sub edi, ecx
add edx, edi
add ecx, edi
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x14], ecx
mov edi, dword [ebp - 0x90]
sub ecx, edx
push 1
push ecx
sub eax, esi
push eax
push edx
push esi
push dword [edi]
call dword [sym.imp.USER32.dll_MoveWindow]
push dword [ebp + 0x10]
push dword [edi]
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword fs:[0x2c]
mov esi, dword [edi]
mov dword [ebp - 0x70], esi
mov edi, dword [eax]
mov eax, dword [0x50f870]
cmp eax, dword [edi + 4]
jg 0x40faa5
mov eax, dword [0x50f87c]
cmp eax, dword [edi + 4]
jg 0x40fb03
push 0x18
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0
call fcn.0049a537
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x78], eax
mov dword [ebp - 4], 2
mov ecx, dword [0x50f890]
test ecx, ecx
je 0x40f56c
mov eax, dword [0x50f88c]
add eax, ecx
mov ecx, dword [0x50f888]
mov dword [ebp - 0x84], eax
dec ecx
push 0
lea edx, [eax - 1]
mov eax, edx
and edx, 3
shr eax, 2
and ecx, eax
mov eax, dword [0x50f884]
mov eax, dword [eax + ecx*4]
push dword [eax + edx*4]
call dword [sym.imp.USER32.dll_EnableWindow]
mov ecx, dword [0x50f890]
mov edx, dword [0x50f88c]
mov edi, dword [0x50f888]
lea eax, [edx + ecx]
test al, 3
jne 0x40f5a1
lea eax, [ecx + 4]
shr eax, 2
cmp edi, eax
ja 0x40f5a1
push ecx
call fcn.0040ff10
mov ecx, dword [0x50f890]
mov edx, dword [0x50f88c]
mov edi, dword [0x50f888]
lea eax, [edi*4 - 1]
and edx, eax
lea eax, [edi - 1]
mov dword [0x50f88c], edx
add edx, ecx
mov ecx, edx
mov dword [ebp - 0x84], edx
shr ecx, 2
and ecx, eax
mov eax, dword [0x50f884]
lea edi, [ecx*4]
cmp dword [edi + eax], 0
jne 0x40f5f2
push 0x10
call fcn.0049a537
mov ecx, dword [0x50f884]
add esp, 4
mov edx, dword [ebp - 0x84]
mov dword [edi + ecx], eax
mov eax, dword [0x50f884]
mov eax, dword [edi + eax]
and edx, 3
mov dword [eax + edx*4], esi
inc dword [0x50f890]
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x40f6e5
push 0xffffffffffffffec
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov esi, eax
lea ecx, [ebp - 0x78]
lea eax, [ebp - 0x6c]
push eax
call fcn.0040fcb0
mov dword [eax], esi
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x8c]
push eax
call fcn.00410420
mov ecx, dword [ebp - 0x84]
cmp byte [ecx + 0xd], 0
jne 0x40f65e
mov eax, dword [ebp - 0x6c]
cmp eax, dword [ecx + 0x10]
jb 0x40f65e
cmp ecx, dword [0x50f874]
je 0x40f65e
lea eax, [ebp - 0x6c]
push eax
call fcn.0040fe10
inc dword [eax]
jmp 0x40f66d
lea eax, [ebp - 0x6c]
push eax
call fcn.0040fe10
mov dword [eax], 1
mov eax, dword [ebp - 0x78]
mov esi, dword [eax]
cmp esi, eax
je 0x40f6e5
mov edi, dword [ebp - 0x70]
nop dword [eax]
test byte [esi + 0x14], 8
je 0x40f699
push 3
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push edi
call dword [sym.imp.USER32.dll_SetWindowPos]
push 0
push dword [esi + 0x10]
call dword [sym.imp.USER32.dll_EnableWindow]
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
je 0x40f6ca
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x40f6c6
cmp esi, dword [eax + 8]
jne 0x40f6c6
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x40f6b6
mov esi, eax
jmp 0x40f6e0
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x40f6e0
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x40f6d4
cmp esi, dword [ebp - 0x78]
jne 0x40f680
mov eax, dword [ebp - 0x7c]
xorps xmm0, xmm0
movups xmmword [ebp - 0xac], xmm0
mov dword [ebp - 0x94], 0
movq qword [ebp - 0x9c], xmm0
cmp byte [eax + 0xe8], 0
jne 0x40f88b
push 0
push 0
push 0
lea eax, [ebp - 0xac]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x40f88b
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, eax
mov dword [ebp - 0x84], edi
call fcn.00404d00
mov ecx, eax
test ecx, ecx
je 0x40fb6a
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x80], esi
mov byte [ebp - 4], 3
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x400
or ecx, eax
jge 0x40f77e
push 0x400
lea ecx, [ebp - 0x80]
call fcn.00404890
mov esi, dword [ebp - 0x80]
push 0x400
push esi
push edi
call dword [sym.imp.USER32.dll_GetWindowTextW]
push dword [esi - 8]
push esi
call fcn.004a42a5
add esp, 8
test eax, eax
js 0x40fb60
cmp eax, dword [esi - 8]
jg 0x40fb60
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x78]
call fcn.00403f10
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0xd], 0
jne 0x40f7ea
cmp edi, dword [eax + 0x10]
jb 0x40f7ea
cmp eax, dword [ebp - 0x78]
je 0x40f7ea
mov edi, dword [ebp - 0x70]
push edi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push 9
push edi
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [ebp - 0x70]
cmp dword [ebp - 0xac], eax
jne 0x40f824
mov eax, dword [ebp - 0xa8]
cmp eax, 0x10
je 0x40f8a8
cmp eax, 2
je 0x40f8a8
cmp eax, 0x112
jne 0x40f824
cmp dword [ebp - 0xa4], 0xf060
je 0x40f8a8
mov edi, dword [ebp - 0x7c]
cmp byte [edi + 0xe8], 0
jne 0x40f8b2
mov eax, dword [edi]
lea ecx, [ebp - 0xac]
push ecx
mov ecx, edi
mov eax, dword [eax + 0x58]
call eax
test eax, eax
jne 0x40f862
lea eax, [ebp - 0xac]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0xac]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40f87e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [edi + 0xe8], 0
je 0x40f711
mov ecx, dword [0x50f890]
sub ecx, 1
mov dword [0x50f890], ecx
jne 0x40f8d0
mov dword [0x50f88c], 0
jmp 0x40f8fe
mov eax, dword [ebp - 0x7c]
mov byte [eax + 0xe8], 1
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40f88b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40f88b
mov eax, dword [0x50f88c]
add eax, ecx
mov ecx, dword [0x50f888]
dec ecx
push 1
lea edx, [eax - 1]
mov eax, edx
and edx, 3
shr eax, 2
and ecx, eax
mov eax, dword [0x50f884]
mov eax, dword [eax + ecx*4]
push dword [eax + edx*4]
call dword [sym.imp.USER32.dll_EnableWindow]
mov eax, dword [ebp - 0x78]
mov edi, dword [0x50f874]
mov esi, dword [eax]
cmp esi, eax
je 0x40f985
lea eax, [esi + 0x10]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00410420
mov ecx, dword [ebp - 0x14]
cmp byte [ecx + 0xd], 0
jne 0x40f944
mov eax, dword [esi + 0x10]
lea edx, [esi + 0x10]
cmp eax, dword [ecx + 0x10]
jb 0x40f944
cmp ecx, edi
je 0x40f944
push edx
call fcn.0040fe10
dec dword [eax]
mov edi, dword [0x50f874]
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
je 0x40f96a
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x40f966
cmp esi, dword [eax + 8]
jne 0x40f966
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x40f956
mov esi, eax
jmp 0x40f980
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x40f980
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x40f974
cmp esi, dword [ebp - 0x78]
jne 0x40f911
mov esi, dword [edi]
mov dword [ebp - 0x70], esi
cmp esi, edi
je 0x40f9f9
nop
cmp dword [esi + 0x14], 0
jg 0x40f9ea
lea edi, [esi + 0x10]
push edi
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x78]
call fcn.00403f10
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0xd], 0
jne 0x40f9c4
mov ecx, dword [eax + 0x10]
cmp dword [edi], ecx
jb 0x40f9c4
cmp eax, dword [ebp - 0x78]
je 0x40f9c4
push 1
push ecx
call dword [sym.imp.USER32.dll_EnableWindow]
lea ecx, [ebp - 0x70]
call fcn.00403400
push esi
mov ecx, 0x50f874
call fcn.00410120
push 0x18
push eax
call fcn.0049a567
mov edi, dword [0x50f874]
add esp, 8
jmp 0x40f9f2
lea ecx, [ebp - 0x70]
call fcn.00403400
mov esi, dword [ebp - 0x70]
cmp esi, edi
jne 0x40f990
cmp dword [ebp - 0xa8], 0x12
jne 0x40fa0c
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
jmp 0x40fa26
lea eax, [ebp - 0xac]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0xac]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
mov esi, dword [ebp - 0x90]
push dword [esi]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40fa40
push dword [esi]
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [ebp - 0x7c]
mov edi, dword [eax + 0xe4]
mov eax, dword [ebp - 0x78]
mov esi, dword [eax + 4]
cmp byte [esi + 0xd], 0
jne 0x40fa7b
push dword [esi + 8]
lea eax, [ebp - 0x78]
push eax
mov ecx, eax
call fcn.004103e0
mov eax, esi
mov esi, dword [esi]
push 0x18
push eax
call fcn.0049a567
add esp, 8
cmp byte [esi + 0xd], 0
je 0x40fa55
mov eax, dword [ebp - 0x78]
push 0x18
push eax
call fcn.0049a567
add esp, 8
mov eax, edi
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.0049a9dd
mov esp, ebp
pop ebp
ret 0xc
push 0x50f870
call fcn.0049a907
add esp, 4
cmp dword [0x50f870], 0xffffffff
jne 0x40f4e7
push 0x18
mov dword [ebp - 4], 0
call fcn.0049a537
push 0x4d0870
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [0x50f874], eax
call fcn.0049a7bf
push 0x50f870
mov dword [ebp - 4], 0xffffffff
call fcn.0049a8bd
add esp, 0xc
jmp 0x40f4e7
push 0x50f87c
call fcn.0049a907
add esp, 4
cmp dword [0x50f87c], 0xffffffff
jne 0x40f4f8
push 8
mov dword [ebp - 4], 1
call fcn.0049a537
push 0x4d0860
mov dword [eax + 4], 0
mov dword [0x50f880], eax
mov dword [eax], 0x50f880
call fcn.0049a7bf
push 0x50f87c
mov dword [ebp - 4], 0xffffffff
call fcn.0049a8bd
add esp, 0xc
jmp 0x40f4f8
push 0x80070057
call fcn.00404ae0
push 0x80004005
call fcn.00404ae0
int3