Function at 0x405e8f
Capabilities:
Get graphical window text
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c4
push ebx
push esi
push edi
xor edi, edi
push edx
push ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
call dword [sym.imp.USER32.dll_GetDlgItem]
test byte [ebp + 0x11], 1
mov esi, eax
mov dword [ebp - 4], esi
je 0x405ec4
and byte [ebp + 0x11], 0xfe
mov dword [ebp - 0x20], 1
cmp dword [ebp + 8], edi
jne 0x405ede
lea eax, [ebp - 0x44]
push 0x420540
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x44]
mov dword [ebp + 8], eax
mov ebx, 0x200
lea eax, [ebp - 0x2c4]
push ebx
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea edx, [ebp - 0x2c4]
lea ecx, [ebp - 0x4c4]
call fcn.0040617d
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowRect]
push esi
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 8], eax
mov eax, dword [0x420758]
cmp eax, edi
jne 0x405f2c
push edi
push edi
push 0x31
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
push eax
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_SelectObject]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x4c4]
push eax
call edi
push eax
lea eax, [ebp - 0x4c4]
push eax
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
push 0xffffffffffffffec
push esi
mov esi, dword [sym.imp.USER32.dll_GetWindowLongA]
call esi
test eax, 0x400000
je 0x405f89
push 1
pop eax
cmp dword [ebp + 0x10], eax
jne 0x405f80
mov dword [ebp + 0x10], 3
jmp 0x405f89
cmp dword [ebp + 0x10], 3
jne 0x405f89
mov dword [ebp + 0x10], eax
lea eax, [ebp - 0xc4]
push 0x80
push eax
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_GetClassNameA]
lea eax, [ebp - 0xc4]
push str.Button
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x405fc8
push 0xfffffffffffffff0
mov dword [ebp - 0x1c], 1
push dword [ebp - 4]
call esi
and eax, 0xf
mov dword [ebp - 0x30], eax
mov esi, dword [ebp - 0x10]
push 0x4205cc
sub esi, dword [ebp - 0x18]
lea eax, [ebp - 0x2c4]
push ebx
push eax
push dword [ebp + 8]
sub esi, dword [ebp - 0x3c]
push dword [ebp + 0xc]
push 0x4206d4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp byte [ebp - 0x2c4], 0
je 0x40600a
lea eax, [ebp - 0x2c4]
push eax
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SetWindowTextA]
jmp 0x40601b
lea eax, [ebp - 0x2c4]
push ebx
push eax
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_GetWindowTextA]
cmp dword [ebp + 0x10], 0
je 0x406153
lea eax, [ebp - 0x2c4]
push eax
call edi
test eax, eax
je 0x406153
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x10]
sub eax, dword [ebp - 0x14]
sub ebx, dword [ebp - 0x18]
test esi, esi
mov dword [ebp + 8], eax
jge 0x40604b
xor esi, esi
lea edx, [ebp - 0x2c4]
lea ecx, [ebp - 0x4c4]
call fcn.0040617d
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x4c4]
push eax
call edi
push eax
lea eax, [ebp - 0x4c4]
push eax
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
xor edi, edi
cmp dword [ebp - 0x1c], edi
je 0x4060c7
mov eax, dword [ebp - 0x30]
cmp eax, 2
je 0x4060bc
cmp eax, 3
je 0x4060bc
cmp eax, 4
je 0x4060b8
cmp eax, 9
je 0x4060b8
cmp esi, 0x14
jle 0x4060a0
push 0x14
pop esi
cmp esi, 8
jge 0x4060a8
push 8
pop esi
mov eax, dword [ebp - 0x28]
lea ecx, [eax + esi]
cmp ecx, ebx
jge 0x4060bf
sub ebx, eax
mov esi, ebx
jmp 0x4060bf
push 0x14
jmp 0x4060be
push 0x1c
pop esi
cmp dword [ebp - 0x20], edi
je 0x4060c7
add esi, 0xc
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_GetWindowRect]
lea eax, [ebp - 0x18]
push 2
push eax
push dword [ebp - 0x34]
push edi
call dword [sym.imp.USER32.dll_MapWindowPoints]
cmp dword [ebp + 0x10], 1
jne 0x4060f9
mov eax, dword [ebp - 0x28]
push 6
push dword [ebp + 8]
add eax, esi
push eax
push edi
push edi
jmp 0x406116
cmp dword [ebp + 0x10], 3
jne 0x406119
mov eax, dword [ebp - 0x28]
push 4
push dword [ebp + 8]
lea ecx, [eax + esi]
push ecx
mov ecx, dword [ebp - 0x10]
push dword [ebp - 0x14]
sub ecx, eax
sub ecx, esi
push ecx
push edi
jmp 0x40614a
cmp dword [ebp + 0x10], 2
jne 0x406153
mov eax, dword [ebp - 0x28]
push 4
push dword [ebp + 8]
lea ecx, [eax + esi]
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x18]
push ecx
push dword [ebp - 0x14]
cdq
sub eax, edx
mov esi, eax
mov eax, ecx
cdq
sub eax, edx
sar esi, 1
sar eax, 1
sub esi, eax
add esi, dword [ebp - 0x18]
push esi
push 0
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SetWindowPos]
push dword [ebp - 0x2c]
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_ReleaseDC]
xor eax, eax
cmp byte [ebp - 0x4c4], al
pop edi
pop esi
pop ebx
setne al
leave
ret 0xc