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

Disassembly:
push 0xffffffffffffffff
push 0x410722
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x214
push ebp
push esi
push edi
mov ebp, ecx
push 0xc
mov dword [esp + 0x14], ebp
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
xor edi, edi
cmp esi, edi
mov dword [esp + 0x228], edi
je 0x40c304
push str.title
mov dword [esi + 4], edi
mov dword [esi + 8], 1
call fcn.0040ed3e
cmp eax, edi
mov dword [esi], eax
jne 0x40c2fe
mov eax, str.title
test eax, eax
je 0x40c2fe
push 0x8007000e
call fcn.0040ecf2
mov dword [esp + 0xc], esi
jmp 0x40c30a
mov dword [esp + 0xc], edi
mov esi, edi
cmp esi, edi
mov dword [esp + 0x228], 0xffffffff
mov dword [esp + 0x18], esi
jne 0x40c327
push 0x8007000e
call fcn.0040ecf2
push ebx
mov dword [esp + 0x22c], 1
mov dword [esp + 0x18], edi
mov esi, dword [ebp + 8]
mov bl, 2
cmp esi, edi
mov byte [esp + 0x22c], bl
je 0x40c36e
cmp dword [esi + 4], edi
jne 0x40c369
mov ecx, dword [esi]
push ecx
call fcn.0040edb3
cmp eax, edi
mov dword [esi + 4], eax
jne 0x40c369
cmp dword [esi], edi
je 0x40c369
push 0x8007000e
call fcn.0040ecf2
mov esi, dword [esi + 4]
jmp 0x40c370
xor esi, esi
mov edx, dword [esp + 0x238]
lea eax, [esp + 0x24]
push edx
push esi
push str._s_Dialog__d
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
push 0xc
call sub.MFC42.DLL_operatornew
add esp, 0x14
mov dword [esp + 0x20], eax
cmp eax, edi
mov byte [esp + 0x22c], 3
je 0x40c3b3
lea ecx, [esp + 0x24]
push ecx
mov ecx, eax
call fcn.0040cfe0
mov ebp, eax
jmp 0x40c3b5
xor ebp, ebp
mov eax, dword [esp + 0x14]
mov byte [esp + 0x22c], bl
mov dword [esp + 0x18], ebp
cmp dword [eax + 0xc], edi
jne 0x40c484
mov ecx, dword [eax + 4]
cmp ecx, edi
je 0x40c3db
call fcn.0040ba80
mov edi, eax
mov esi, dword [esp + 0x10]
test esi, esi
je 0x40c40d
mov eax, dword [esi + 4]
test eax, eax
jne 0x40c408
mov edx, dword [esi]
push edx
call fcn.0040edb3
test eax, eax
mov dword [esi + 4], eax
jne 0x40c408
cmp dword [esi], 0
je 0x40c408
push 0x8007000e
call fcn.0040ecf2
mov esi, dword [esi + 4]
jmp 0x40c40f
xor esi, esi
test ebp, ebp
je 0x40c43f
mov eax, dword [ebp + 4]
test eax, eax
jne 0x40c43a
mov eax, dword [ebp]
push eax
call fcn.0040edb3
test eax, eax
mov dword [ebp + 4], eax
jne 0x40c43a
cmp dword [ebp], 0
je 0x40c43a
push 0x8007000e
call fcn.0040ecf2
mov eax, dword [ebp + 4]
jmp 0x40c441
xor eax, eax
push edi
lea ecx, [esp + 0x128]
push 0x100
push ecx
push 0x415ae8
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edi, [esp + 0x124]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x24]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40c4a3
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x40c568
mov eax, dword [esp + 0x234]
lea edx, [esp + 0x24]
push 0x100
push edx
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 0x14]
mov esi, dword [ecx + 4]
test esi, esi
je 0x40c4f0
mov eax, dword [esi + 4]
test eax, eax
jne 0x40c4eb
mov edx, dword [esi]
push edx
call fcn.0040edb3
test eax, eax
mov dword [esi + 4], eax
jne 0x40c4eb
cmp dword [esi], 0
je 0x40c4eb
push 0x8007000e
call fcn.0040ecf2
mov ebx, dword [esi + 4]
jmp 0x40c4f2
xor ebx, ebx
mov esi, dword [esp + 0x10]
test esi, esi
je 0x40c524
mov eax, dword [esi + 4]
test eax, eax
jne 0x40c51f
mov eax, dword [esi]
push eax
call fcn.0040edb3
test eax, eax
mov dword [esi + 4], eax
jne 0x40c51f
cmp dword [esi], 0
je 0x40c51f
push 0x8007000e
call fcn.0040ecf2
mov edi, dword [esi + 4]
jmp 0x40c526
xor edi, edi
test ebp, ebp
je 0x40c556
mov eax, dword [ebp + 4]
test eax, eax
jne 0x40c551
mov ecx, dword [ebp]
push ecx
call fcn.0040edb3
test eax, eax
mov dword [ebp + 4], eax
jne 0x40c551
cmp dword [ebp], 0
je 0x40c551
push 0x8007000e
call fcn.0040ecf2
mov eax, dword [ebp + 4]
jmp 0x40c558
xor eax, eax
lea edx, [esp + 0x24]
push ebx
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
jmp 0x40c56c
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x234]
lea eax, [esp + 0x24]
push eax
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextA]
test ebp, ebp
pop ebx
je 0x40c58b
mov ecx, ebp
call fcn.00404550
test esi, esi
mov dword [esp + 0x228], 0xffffffff
je 0x40c5b1
lea edx, [esi + 8]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x40c5b1
push 1
mov ecx, esi
call fcn.004045a0
mov ecx, dword [esp + 0x220]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x220
ret 8