Function at 0x406a6a
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x23c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x234], eax
push ebx
push ebp
mov ebp, ecx
push esi
push edi
test ebp, ebp
je 0x406cb4
cmp dword [ebp + 4], 0x3ed
jne 0x406cb4
mov ebx, dword [ebp + 0x18]
lea esi, [ebp + 0x1c]
lea edi, [esp + 0x30]
movsd dword es:[edi], dword [esi]
push 0x26
push ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
test al, 1
je 0x406cb4
mov ecx, dword [0x44b488]
mov esi, dword [0x44b48c]
mov dword [esp + 0x2c], 1
test ecx, ecx
je 0x406ad7
and dword [esp + 0x2c], 0
mov esi, ecx
test esi, esi
jne 0x406ae2
xor edi, edi
jmp 0x406c45
and dword [esp + 0x28], 0
and dword [esp + 0x24], 0
test eax, 0x100
je 0x406b1d
mov ecx, esi
call fcn.004042f4
mov edi, eax
mov dword [esp + 0x28], edi
test edi, edi
je 0x406b1d
push 0
push edi
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
mov dword [esp + 0x24], eax
test eax, eax
je 0x406b1d
push ebx
call dword [sym.imp.GDI32.dll_RealizePalette]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
je 0x406c20
push dword [edi + 4]
and dword [esp + 0x24], 0
and dword [esp + 0x18], 0
call fcn.00427ecf
pop ecx
push dword [edi + 8]
mov dword [esp + 0x1c], eax
call fcn.00427ecf
cmp dword [edi], 0xc
mov edx, eax
pop ecx
mov dword [esp + 0x1c], edx
jne 0x406b6b
movzx eax, word [edi + 4]
movzx edx, word [edi + 6]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
jmp 0x406b6f
mov eax, dword [esp + 0x18]
test byte [ebp + 0x10], 1
je 0x406ba8
cdq
push 0x14
pop ecx
idiv ecx
mov dword [esp + 0x14], ecx
mov ecx, eax
mov eax, dword [esp + 0x1c]
cdq
idiv dword [esp + 0x14]
mov dword [esp + 0x20], ecx
neg ecx
mov edx, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], edx
lea eax, [eax + ecx*2]
mov ecx, edx
mov edx, dword [esp + 0x1c]
neg ecx
lea edx, [edx + ecx*2]
cmp dword [0x44b484], 0
je 0x406be7
cmp dword [0x44a8c0], 2
je 0x406be7
push edx
push eax
push dword [esp + 0x1c]
mov eax, dword [esp + 0x48]
mov ecx, ebx
push dword [esp + 0x2c]
sub eax, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x4c]
sub eax, dword [esp + 0x44]
push eax
push dword [esp + 0x4c]
push dword [esp + 0x4c]
call fcn.00406e22
jmp 0x406c14
push edx
push eax
push dword [esp + 0x1c]
mov eax, dword [esp + 0x48]
mov edx, edi
push dword [esp + 0x2c]
sub eax, dword [esp + 0x44]
mov ecx, ebx
push eax
mov eax, dword [esp + 0x4c]
sub eax, dword [esp + 0x44]
push eax
push dword [esp + 0x4c]
push dword [esp + 0x4c]
call fcn.00406ccf
add esp, 0x20
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x406c32
push 0
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x406c41
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
test edi, edi
jne 0x406c65
push 0
push 5
call dword [sym.imp.GDI32.dll_CreateHatchBrush]
mov esi, eax
lea eax, [esp + 0x30]
push esi
push eax
push ebx
call dword [sym.imp.USER32.dll_FillRect]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [esp + 0x2c], 0
je 0x406caf
push 0x100
lea eax, [esp + 0x44]
push eax
push dword [ebp + 0x14]
call dword [sym.imp.USER32.dll_GetWindowTextW]
test eax, eax
jle 0x406caf
xor eax, eax
lea ecx, [esp + 0x40]
test edi, edi
mov edx, 0x383838
sete al
inc eax
test edi, edi
push eax
mov eax, 0x4040ff
cmovne edx, eax
push edx
push ecx
lea edx, [esp + 0x3c]
mov ecx, ebx
call fcn.00407094
add esp, 0xc
xor eax, eax
inc eax
jmp 0x406cb6
xor eax, eax
mov ecx, dword [esp + 0x244]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00422fb4
add esp, 0x23c
ret