Function at 0x406f20
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5145f0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x56a698]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call fcn.0040c7ac
xor esi, esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x20], esi
call fcn.0040a05e
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x406f71
push 0x80004005
call fcn.00401e50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], esi
call fcn.0040a05e
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x406f9d
push 0x80004005
call fcn.00401e50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov eax, dword [edi + 0x1a8]
push eax
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.00414e57
mov eax, dword [esi - 8]
mov ebx, dword [edi + 0x1a4]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x100
or eax, ecx
jge 0x406fe8
push 0x100
lea ecx, [ebp - 0x14]
call fcn.00401db0
mov esi, dword [ebp - 0x14]
mov ecx, 0x100
cmp dword [esi - 8], ecx
jge 0x406ffc
push 0x80070057
call fcn.00401e50
push ebx
push ecx
push esi
mov dword [esi - 0xc], ecx
xor edx, edx
push 0x522f50
mov word [esi + 0x200], dx
mov eax, dword [edi + 0x19c]
push str.IDT_OK
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x406ff2
cmp eax, dword [esi - 8]
jg 0x406ff2
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
push 1
mov ecx, edi
call fcn.00414d41
mov ecx, eax
call fcn.00414e57
mov eax, dword [esi - 8]
mov ebx, dword [edi + 0x1a4]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x100
or eax, ecx
jge 0x40707c
push 0x100
lea ecx, [ebp - 0x14]
call fcn.00401db0
mov esi, dword [ebp - 0x14]
mov ecx, 0x100
cmp dword [esi - 8], ecx
jge 0x407090
push 0x80070057
call fcn.00401e50
push ebx
push ecx
push esi
mov dword [esi - 0xc], ecx
xor edx, edx
push 0x522f50
mov word [esi + 0x200], dx
mov eax, dword [edi + 0x19c]
push 0x5246fc
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x406ff2
cmp eax, dword [esi - 8]
jg 0x406ff2
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
push 2
mov ecx, edi
call fcn.00414d41
mov ecx, eax
call fcn.00414e57
lea edx, [ebp - 0x18]
push edx
push 0x523db8
lea eax, [ebp - 0x1c]
lea ecx, [edi + 0x1a0]
push eax
call fcn.00406df0
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.004018d0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407136
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
jl 0x4072f3
lea ecx, [ebp - 0x10]
call fcn.004032e0
mov ecx, eax
call fcn.00403030
mov ecx, dword [edi + 0x19c]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
je 0x406f67
mov eax, dword [ebp - 0x10]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407196
test dx, dx
je 0x407192
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407196
add eax, 4
add ecx, 4
test dx, dx
jne 0x407170
xor eax, eax
jmp 0x40719b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x4071aa
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], ecx
lea edx, [ebp - 0x10]
push edx
lea ecx, [edi + 0x180]
call fcn.0040d490
mov eax, dword [esi - 8]
mov ebx, dword [edi + 0x1a4]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x100
or eax, ecx
jge 0x4071e3
push 0x100
lea ecx, [ebp - 0x14]
call fcn.00401db0
mov esi, dword [ebp - 0x14]
mov eax, 0x100
cmp dword [esi - 8], eax
jl 0x406ff2
push ebx
push eax
push esi
mov dword [esi - 0xc], eax
xor ecx, ecx
push 0x522f50
mov word [esi + 0x200], cx
mov edx, dword [ebp - 0x10]
push str.IDT_LTEXT
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x406ff2
cmp eax, dword [esi - 8]
jg 0x406ff2
push esi
xor ecx, ecx
mov dword [esi - 0xc], eax
push ecx
mov word [esi + eax*2], cx
mov edx, dword [edi + 0x12c]
push 0x143
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [ebp - 0x18]
push eax
push 0x523db8
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [edi + 0x1a0]
call fcn.00406df0
mov ecx, dword [eax]
mov ebx, dword [ebp - 0x10]
lea eax, [ecx - 0x10]
add ebx, 0xfffffff0
mov byte [ebp - 4], 3
cmp eax, ebx
je 0x4072c3
cmp dword [ebx + 0xc], 0
jl 0x4072b6
mov edx, dword [eax]
cmp edx, dword [ebx]
jne 0x4072b6
push eax
call fcn.00401860
mov dword [ebp - 0x24], eax
add esp, 4
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4072ab
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov ecx, dword [ebp - 0x24]
add ecx, 0x10
mov dword [ebp - 0x10], ecx
jmp 0x4072c3
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00401ea0
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4072e6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x18], 0
jge 0x407147
mov ecx, dword [ebp - 0x20]
mov edx, dword [edi + 0x12c]
push 0
push ecx
push 0x14e
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esi - 8]
mov ebx, dword [edi + 0x1a4]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x100
or eax, ecx
jge 0x407335
push 0x100
lea ecx, [ebp - 0x14]
call fcn.00401db0
mov esi, dword [ebp - 0x14]
mov ecx, 0x100
cmp dword [esi - 8], ecx
jge 0x407349
push 0x80070057
call fcn.00401e50
push ebx
push ecx
push esi
xor eax, eax
mov dword [esi - 0xc], ecx
push 0x522f50
mov word [esi + 0x200], ax
mov eax, dword [edi + 0x19c]
push str.IDT_TITLE
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x406ff2
cmp eax, dword [esi - 8]
jg 0x406ff2
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
push esi
lea ecx, [edi + 0x98]
call fcn.00414e57
add esi, 0xfffffff0
mov byte [ebp - 4], 0
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x4073c2
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4073e8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret