Function at 0x404f70
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41a3c1
mov eax, dword fs:[0]
push eax
sub esp, 0x7ec
mov eax, dword [0x42465c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov edi, edx
mov edx, dword [section..data]
mov esi, ecx
mov dword [ebp - 0x7f4], eax
mov eax, dword [edx + 0xc]
mov ecx, section..data
mov dword [ebp - 0x7f8], edi
mov dword [ebp - 0x7ec], ebx
call eax
add eax, 0x10
mov dword [ebp - 0x7e4], eax
mov dword [ebp - 4], 0
mov ecx, dword [edi]
mov edi, dword [ebx]
lea eax, [ecx - 0x10]
sub edi, 0x10
cmp eax, edi
je 0x405035
cmp dword [edi + 0xc], 0
jl 0x405025
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x405025
call fcn.00401df0
mov dword [ebp - 0x7e8], eax
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405018
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [ebp - 0x7e8]
add ecx, 0x10
mov dword [ebx], ecx
jmp 0x405035
push ecx
push ebx
mov ebx, dword [ecx - 0xc]
call fcn.00401cd0
mov ebx, dword [ebp - 0x7ec]
mov edx, dword [esi + 0xc]
mov ecx, dword [edx - 0xc]
lea eax, [esi + 0xc]
test ecx, ecx
jne 0x405136
lea eax, [ebp - 0x7f0]
lea edi, [esi + 8]
push eax
call fcn.00405330
add esi, 4
lea ecx, [ebp - 0x7e8]
push esi
push ecx
mov ebx, eax
mov byte [ebp - 4], 1
call fcn.00401990
add esp, 0xc
lea edi, [ebp - 0x7e4]
mov byte [ebp - 4], 2
call fcn.00401770
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x7e8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4050a3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x7f0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4050c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x7ec]
mov esi, dword [ebp - 0x7e4]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405143
mov ecx, dword [ebp - 0x7f8]
mov eax, dword [ecx]
mov edx, dword [ebp - 0x7f4]
mov ecx, dword [edx]
push esi
push 0x3e8
lea edx, [ebp - 0x7e0]
push edx
push eax
mov eax, dword [0x4268b4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edi, eax
lea eax, [ebp - 0x7e0]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405116
lea ecx, [ebp - 0x7e0]
sub eax, edx
push ecx
sar eax, 1
push ebx
mov ebx, eax
call fcn.00401cd0
jmp 0x405148
lea edi, [ebp - 0x7e4]
call fcn.00401770
jmp 0x4050cf
mov ecx, dword [ebx]
mov edi, dword [ecx - 0xc]
lea eax, [esi - 0x10]
or ecx, 0xffffffff
lea edx, [eax + 0xc]
mov dword [ebp - 4], ecx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405167
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004088c3
mov esp, ebp
pop ebp
ret 8