Function at 0x4051f0
Capabilities:
Get graphical window text

Disassembly:
push 0xffffffffffffffff
push 0x49cd70
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4d6720]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [esp + 0x44], ebx
je 0x40541c
mov edi, dword [esp + 0x48]
cmp edi, ebx
je 0x40541c
call fcn.00468b49
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x405249
push 0x80004005
call fcn.00401210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push edi
mov dword [esp + 0x40], ebx
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
push eax
push eax
lea ecx, [esp + 0x1c]
call fcn.004051a0
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov esi, dword [esp + 0x14]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00483313
add esp, 8
cmp eax, ebx
jl 0x405432
cmp eax, dword [esi - 8]
jg 0x405432
lea edx, [esp + 0x18]
xor ecx, ecx
push esi
mov dword [esi - 0xc], eax
push edx
mov word [esi + eax*2], cx
call fcn.00425110
add esp, 8
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x40], 1
call fcn.00401a50
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x3c], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4052e3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
push 1
push edx
push edi
call fcn.0041dcf0
add esp, 0x10
test eax, eax
je 0x4053f4
lea eax, [esp + 0x24]
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowRect]
test eax, eax
je 0x4053f4
push 0x47
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fmul qword [esp + 0x50]
call fcn.004833c0
mov ecx, dword [esp + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_ScreenToClient]
lea edx, [esp + 0x24]
lea esi, [ecx + eax*2]
mov eax, dword [esp + 0x44]
push edx
push eax
call ebp
test eax, eax
je 0x4053f4
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x2c]
push ecx
push edx
call ebp
test eax, eax
je 0x4053f4
mov eax, dword [esp + 0x4c]
sub eax, 0
je 0x4053b4
sub eax, 1
je 0x405395
sub eax, 1
jne 0x4053f4
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov eax, ecx
sub eax, esi
mov esi, dword [esp + 0x28]
push 1
sub edx, esi
push edx
sub ecx, eax
push ecx
push esi
mov dword [esp + 0x34], eax
push eax
jmp 0x4053eb
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
lea eax, [edx + esi]
mov esi, dword [esp + 0x28]
push 1
sub ecx, esi
push ecx
mov dword [esp + 0x34], eax
sub eax, edx
push eax
push esi
push edx
jmp 0x4053eb
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
add eax, ecx
cdq
sub eax, edx
mov ecx, eax
mov eax, esi
cdq
sub eax, edx
mov edx, dword [esp + 0x30]
sar eax, 1
sar ecx, 1
sub ecx, eax
lea eax, [ecx + esi]
mov esi, dword [esp + 0x28]
push 1
sub edx, esi
push edx
mov dword [esp + 0x34], eax
sub eax, ecx
push eax
push esi
mov dword [esp + 0x34], ecx
push ecx
push edi
call dword [sym.imp.USER32.dll_MoveWindow]
mov ebx, eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x3c], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40541c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
push 0x80070057
call fcn.00401210
int3