Function at 0x402180
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417090
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x41fea0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 2
call fcn.00402b80
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4021cb
push 0x80004005
call fcn.00401670
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
or edi, 0xffffffff
mov byte [ebp - 4], 3
cmp dword [eax - 0xc], 0
jl 0x40220f
push 0x4182a0
push eax
call fcn.004072df
add esp, 8
test eax, eax
je 0x40220f
sub eax, dword [ebp + 8]
test eax, eax
jle 0x40220f
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x10]
call fcn.00401210
jmp 0x40227a
lea eax, [ebp - 0x18]
push eax
call fcn.00401940
lea ecx, [ebp + 8]
mov byte [ebp - 4], 4
push ecx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.004012c0
add esp, 0x10
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 5
call fcn.00401210
mov edx, dword [ebp - 0x14]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 4
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40225a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x18]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 3
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40227a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x10]
mov edx, 1
mov ecx, edx
sub ecx, dword [esi - 4]
mov eax, dword [esi - 8]
or eax, ecx
jge 0x4022a0
push 0
lea ecx, [ebp - 0x10]
call fcn.00402dc0
mov esi, dword [ebp - 0x10]
mov edx, 1
mov ebx, dword [ebp + 0x10]
mov ecx, edx
sub ecx, dword [ebx - 4]
mov eax, dword [ebx - 8]
or eax, ecx
jge 0x4022c1
push 0
lea ecx, [ebp + 0x10]
call fcn.00402dc0
mov ebx, dword [ebp + 0x10]
mov edx, 1
mov eax, dword [ebp + 0xc]
sub edx, dword [eax - 4]
mov ecx, dword [eax - 8]
or ecx, edx
jge 0x4022db
push 0
lea ecx, [ebp + 0xc]
call fcn.00402dc0
mov eax, dword [ebp + 0xc]
push esi
push 0xffffffffffffffff
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
add esi, 0xfffffff0
mov byte [ebp - 4], 2
mov ebx, eax
mov edx, edi
lea ecx, [esi + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402305
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 1
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402325
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402345
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0x10]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x402366
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret