Function at 0x40f330
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x188
mov eax, dword [0x42072c]
push ebx
push ebp
mov ecx, 1
xor ebp, ebp
dec eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x54], ebp
je 0x40f355
dec eax
je 0x40f355
dec eax
jne 0x40f35c
mov ebx, 0xbfb8bf
jmp 0x40f360
mov ebx, dword [esp + 0x50]
push esi
push edi
mov edi, dword [esp + 0x19c]
mov dword [esp + 0x48], ecx
lea ecx, [esp + 0x3c]
mov dword [esp + 0x4c], ebp
mov eax, dword [edi]
push ecx
mov dword [esp + 0x40], eax
call fcn.0040d0b0
mov eax, dword [edi]
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov edx, dword [edi]
lea ecx, [esp + 0x60]
push 0x100
push ecx
push edx
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov esi, dword [sym.imp.USER32.dll_FillRect]
test eax, eax
jne 0x40f3ed
lea eax, [esp + 0x20]
mov dword [esp + 0x28], ebp
push eax
push str.yiyuyan
mov dword [esp + 0x40], 2
call fcn.0040f310
mov ecx, dword [esp + 0x4c]
add esp, 4
push eax
push str.yiyuyan
push ecx
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov eax, dword [esp + 0x24]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x14], eax
jmp 0x40f4ce
mov edx, dword [edi]
push ebp
push ebp
push 0x31
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
push eax
mov eax, dword [esp + 0x48]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
lea ecx, [esp + 0x20]
lea edx, [esp + 0x60]
push ecx
push edx
mov dword [esp + 0x64], eax
call fcn.0040f310
mov ecx, dword [esp + 0x4c]
add esp, 4
push eax
lea eax, [esp + 0x68]
push eax
push ecx
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
push 0xfffffffffffffff0
mov eax, dword [esp + 0x28]
cdq
sub eax, edx
mov edx, dword [edi]
sar eax, 1
push edx
mov dword [esp + 0x1c], eax
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov ecx, eax
and ecx, 0x100
je 0x40f454
test ah, 2
je 0x40f461
test ah, 2
je 0x40f45d
cmp ecx, ebp
je 0x40f472
cmp ecx, ebp
jne 0x40f489
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
add eax, 0xa
mov dword [esp + 0x2c], eax
jmp 0x40f49e
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
lea eax, [edx - 0xa]
mov dword [esp + 0x34], eax
sub eax, ecx
mov dword [esp + 0x2c], eax
jmp 0x40f4a2
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x2c], eax
add ecx, eax
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x24]
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x2c]
push ecx
push edx
push eax
mov dword [esp + 0x3c], ebp
call esi
mov eax, dword [esp + 0x24]
cdq
sub eax, edx
sar eax, 1
add eax, 2
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x18]
mov edx, dword [edi + 0x14]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x44]
lea eax, [esp + 0x2c]
push edx
push eax
push ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x38], ebp
call esi
mov eax, dword [edi + 0x14]
lea ecx, [esp + 0x2c]
mov edx, dword [esp + 0x1c]
push eax
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x48]
push ecx
push edx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x40], 2
call esi
mov dword [esp + 0x2c], ebp
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x44]
lea ecx, [eax - 2]
mov eax, dword [edi + 0x14]
mov dword [esp + 0x30], ecx
lea ecx, [esp + 0x2c]
push eax
push ecx
push edx
call esi
mov dword [esp + 0x30], ebp
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x44]
lea ecx, [eax - 2]
mov eax, dword [edi + 0x14]
mov dword [esp + 0x2c], ecx
lea ecx, [esp + 0x2c]
push eax
push ecx
push edx
call esi
push ebx
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov esi, eax
lea eax, [esp + 0x10]
mov ecx, dword [esp + 0x44]
push esi
push eax
push ecx
call dword [sym.imp.USER32.dll_FrameRect]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebp
push ebp
mov edx, dword [esp + 0x4c]
push edx
call dword [sym.imp.GDI32.dll_GetPixel]
mov esi, dword [sym.imp.GDI32.dll_SetPixel]
mov dword [edi + 0xc], eax
mov ecx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x18]
push eax
push ebp
push ecx
call esi
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x14]
push edx
inc eax
push eax
mov ecx, dword [esp + 0x4c]
push ebp
push ecx
call esi
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x44]
add eax, 2
push edx
push eax
push ebp
push ecx
call esi
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x44]
push edx
push eax
push 1
push ecx
call esi
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x44]
push edx
push eax
push 2
push ecx
call esi
push ebx
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x48]
inc edx
push edx
push 2
push eax
call esi
push ebx
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x48]
add ecx, 2
push ecx
push 1
push edx
call esi
mov eax, dword [edi + 0xc]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x48]
dec edx
push ecx
push edx
push eax
call esi
mov ecx, dword [edi + 0xc]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x48]
add eax, 0xfffffffe
push edx
push eax
push ecx
call esi
mov edx, dword [edi + 0xc]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x48]
add ecx, 0xfffffffd
push eax
push ecx
push edx
call esi
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
inc ecx
push eax
push ecx
mov eax, dword [esp + 0x4c]
dec edx
push edx
push eax
call esi
mov ecx, dword [edi + 0xc]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
add edx, 2
push ecx
mov ecx, dword [esp + 0x48]
dec eax
push edx
push eax
push ecx
call esi
push ebx
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x48]
inc edx
add eax, 0xfffffffd
push edx
push eax
push ecx
call esi
push ebx
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x48]
add edx, 2
add eax, 0xfffffffe
push edx
push eax
push ecx
call esi
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x44]
dec eax
push edx
push eax
push ebp
push ecx
call esi
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x44]
add eax, 0xfffffffe
push edx
push eax
push ebp
push ecx
call esi
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x44]
add eax, 0xfffffffd
push edx
push eax
push ebp
push ecx
call esi
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x44]
dec eax
push edx
push eax
push 1
push ecx
call esi
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x44]
dec eax
push edx
push eax
push 2
push ecx
call esi
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x44]
add edx, 0xfffffffd
push ebx
push edx
push 1
push eax
call esi
push ebx
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x48]
add ecx, 0xfffffffe
push ecx
push 2
push edx
call esi
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
dec ecx
push eax
mov eax, dword [esp + 0x48]
dec edx
push ecx
push edx
push eax
call esi
mov ecx, dword [edi + 0xc]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
add edx, 0xfffffffe
push ecx
mov ecx, dword [esp + 0x48]
dec eax
push edx
push eax
push ecx
call esi
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
add eax, 0xfffffffd
push edx
mov edx, dword [esp + 0x48]
dec ecx
push eax
push ecx
push edx
call esi
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
dec ecx
push eax
mov eax, dword [esp + 0x48]
add edx, 0xfffffffe
push ecx
push edx
push eax
call esi
mov ecx, dword [edi + 0xc]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
dec edx
push ecx
mov ecx, dword [esp + 0x48]
add eax, 0xfffffffd
push edx
push eax
push ecx
call esi
push ebx
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x48]
add edx, 0xfffffffe
add eax, 0xfffffffd
push edx
push eax
push ecx
call esi
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x44]
add edx, 0xfffffffd
push ebx
add eax, 0xfffffffe
push edx
push eax
push ecx
call esi
mov ebx, 1
mov dword [esp + 0x14], ebp
cmp dword [esp + 0x28], ebx
jne 0x40f90d
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x160]
push edx
push eax
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
lea ecx, [esp + 0x60]
push ecx
call fcn.0040f310
mov edx, dword [edi]
add esp, 4
push 0xfffffffffffffff0
push edx
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov ecx, eax
and ecx, 0x100
je 0x40f880
test ah, 2
jne 0x40f889
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
mov ebx, 8
add eax, 0xa
add edx, 9
cmp eax, ebx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x10], edx
jle 0x40f8db
mov eax, dword [esp + 0x24]
mov ecx, dword [edi + 0xc]
cdq
sub eax, edx
mov edx, dword [esp + 0x44]
sar eax, 1
push ecx
push eax
push ebx
push edx
call esi
inc ebx
mov eax, dword [esp + 0x20]
add eax, 0xa
cmp ebx, eax
jl 0x40f85c
jmp 0x40f8db
test ah, 2
je 0x40f93c
cmp ecx, ebp
jne 0x40f944
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
sub eax, 0xa
mov dword [esp + 0x28], 2
mov dword [esp + 0x18], eax
sub eax, ecx
add ecx, eax
mov dword [esp + 0x58], eax
cmp eax, ecx
mov ebx, eax
jge 0x40f8db
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x24]
push edx
cdq
sub eax, edx
sar eax, 1
push eax
mov eax, dword [esp + 0x4c]
push ebx
push eax
call esi
inc ebx
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x58]
add edx, ecx
cmp ebx, edx
jl 0x40f8b6
mov eax, dword [edi + 0x10]
mov ecx, dword [esp + 0x44]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea edx, [esp + 0x10]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x44]
or al, 0x20
push eax
push edx
lea eax, [esp + 0x68]
push 0xffffffffffffffff
push eax
push ecx
call dword [sym.imp.USER32.dll_DrawTextA]
mov ebx, 1
mov eax, dword [esp + 0x5c]
pop edi
cmp eax, ebp
pop esi
je 0x40f923
mov edx, dword [esp + 0x3c]
push eax
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
lea eax, [esp + 0x34]
mov dword [esp + 0x40], ebx
push eax
call fcn.0040d180
pop ebp
pop ebx
add esp, 0x188
ret 4
cmp ecx, ebp
je 0x40f83d
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
sub eax, ecx
mov dword [esp + 0x28], ebx
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
sub ebx, 5
lea ecx, [ebx + ecx + 0xa]
cmp ebx, ecx
jge 0x40f8db
lea edx, [ebx + 0xa]
mov dword [esp + 0x58], edx
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x28]
cdq
sub eax, edx
sar eax, 1
push eax
push ebx
push ecx
call esi
inc ebx
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x58]
add eax, edx
cmp ebx, eax
jl 0x40f96f
jmp 0x40f8db