Function at 0x401ec0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x4cff04]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [ebp - 0x240], ebx
cmp dword [ebx + 0xc], 3
jne 0x401efa
lea eax, [ebx + 0x14]
mov ecx, 0x4debc4
push eax
push dword [ebx + 0x10]
push dword [edi + 4]
call fcn.0040fd70
mov eax, dword [ebx + 0xc]
cmp eax, 1
je 0x401f07
cmp eax, 3
jne 0x401f25
push str.BUTTON
push dword [edi + 4]
mov ecx, 0x4debc4
call fcn.00410530
mov edx, eax
mov dword [ebp - 0x234], edx
test edx, edx
jne 0x401f39
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00420b40
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebx + 0x28]
mov eax, 1
test cl, 4
je 0x401f4d
mov eax, 4
jmp 0x401f70
test al, cl
je 0x401f58
mov eax, 3
jmp 0x401f70
test cl, 0x40
je 0x401f64
mov eax, 2
jmp 0x401f70
cmp dword [edi + 0x44], 0
mov ecx, 5
cmovne eax, ecx
push esi
push 0
lea esi, [ebx + 0x14]
mov dword [ebp - 0x230], eax
push esi
push eax
push 1
push dword [ebx + 0x10]
mov ecx, 0x4debc4
push edx
call fcn.0040fce0
movups xmm0, xmmword [esi]
lea eax, [ebp - 0x214]
mov ecx, 0x4debc4
push eax
push esi
mov esi, dword [ebp - 0x230]
push esi
push 1
push dword [ebx + 0x10]
movups xmmword [ebp - 0x214], xmm0
push dword [ebp - 0x234]
call fcn.0040feb0
push 0x100
lea eax, [ebp - 0x204]
push eax
push dword [edi + 4]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov eax, dword [ebx + 0x28]
mov ecx, eax
and ecx, 4
and eax, 1
cmp dword [edi + 0x38], 0
mov dword [ebp - 0x238], ecx
mov dword [ebp - 0x230], eax
je 0x4020af
cmp dword [edi + 0x18], 0
je 0x402033
cmp word [ebp - 0x204], 0
jne 0x402018
mov dword [ebp - 0x22c], 0xffffffff
mov dword [ebp - 0x228], 0xffffffff
jmp 0x402045
mov eax, dword [edi + 0x2c]
add eax, dword [ebp - 0x214]
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x228], 0xffffffff
jmp 0x402045
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x22c], eax
mov eax, dword [edi + 0x20]
mov dword [ebp - 0x228], eax
push dword [edi + 0x40]
lea eax, [ebp - 0x22c]
mov ecx, edi
push dword [edi + 0x3c]
push eax
call fcn.00401e60
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ebp - 0x228]
add ecx, dword [ebp - 0x230]
add edx, dword [ebp - 0x230]
cmp dword [edi + 0x38], 0
je 0x4020af
cmp dword [ebp - 0x238], 0
mov eax, 0x23
mov dword [ebp - 0x228], 3
cmove eax, dword [ebp - 0x228]
push eax
push dword [edi + 0x40]
push dword [edi + 0x3c]
push edx
push ecx
push 0
push dword [edi + 0x38]
push 0
push 0
push dword [ebx + 0x10]
call dword [sym.imp.USER32.dll_DrawStateW]
cmp word [ebp - 0x204], 0
je 0x402209
lea ecx, [ebp - 0x204]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4020c6
sub ecx, edx
lea eax, [ebp - 0x23c]
push eax
sar ecx, 1
lea eax, [ebp - 0x204]
push ecx
push eax
push dword [ebx + 0x10]
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
cmp dword [edi + 0x18], 0
je 0x40214d
cmp dword [edi + 0x38], 0
je 0x40213e
mov eax, dword [ebp - 0x20c]
mov ebx, dword [edi + 0x30]
sub eax, ebx
mov ecx, dword [edi + 0x3c]
sub eax, ecx
mov edx, dword [edi + 0x2c]
sub eax, edx
sub eax, dword [ebp - 0x23c]
sub eax, dword [ebp - 0x214]
test eax, eax
jle 0x40212e
lea eax, [ebx + ecx]
add eax, edx
mov dword [ebp - 0x22c], eax
or eax, 0xffffffff
jmp 0x402159
lea eax, [edx + 2]
add eax, ecx
mov dword [ebp - 0x22c], eax
or eax, 0xffffffff
jmp 0x402159
mov dword [ebp - 0x22c], 0xffffffff
or eax, 0xffffffff
jmp 0x402159
mov eax, dword [edi + 0x24]
mov dword [ebp - 0x22c], eax
mov eax, dword [edi + 0x28]
push dword [ebp - 0x238]
xor ebx, ebx
mov dword [ebp - 0x228], eax
push dword [ebp - 0x23c]
cmp eax, 0xffffffff
mov ecx, edi
lea eax, [ebp - 0x22c]
setne bl
push eax
dec ebx
call fcn.00401e60
mov ecx, dword [ebp - 0x22c]
mov eax, dword [ebp - 0x230]
add ecx, eax
mov edx, dword [ebp - 0x228]
add eax, ebx
add edx, eax
mov dword [ebp - 0x224], ecx
cmp dword [edi + 0x38], 0
je 0x4021af
lea eax, [ecx + 6]
mov dword [ebp - 0x224], eax
mov eax, dword [ebp - 0x20c]
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp - 0x208]
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x224]
push eax
push 0
push 0
lea eax, [ebp - 0x204]
mov dword [ebp - 0x220], edx
push 0xffffffffffffffff
push eax
call fcn.00402920
mov ebx, dword [ebp - 0x240]
add esp, 4
mov ecx, 0x4debc4
push eax
push esi
mov esi, dword [ebp - 0x234]
push 1
push dword [ebx + 0x10]
push esi
call fcn.0040fda0
jmp 0x40220f
mov esi, dword [ebp - 0x234]
test byte [ebx + 0x28], 0x10
je 0x402225
lea eax, [ebp - 0x214]
push eax
push dword [ebx + 0x10]
call dword [sym.imp.USER32.dll_DrawFocusRect]
push esi
mov ecx, 0x4debc4
call fcn.0040fcb0
mov ecx, dword [ebp - 4]
mov eax, 4
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.00420b40
mov esp, ebp
pop ebp
ret 4