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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84c
mov eax, dword [0x552a7c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x840], ecx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x81c], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x820], ecx
cmp dword [ebp - 0x820], 0
jne 0x476fcb
xor eax, eax
jmp 0x477264
xor edx, edx
mov word [ebp - 0x808], dx
push 0x7fe
push 0
lea eax, [ebp - 0x806]
push eax
call fcn.004f7580
add esp, 0xc
lea ecx, [ebp - 0x818]
push ecx
call fcn.0044d6f0
add esp, 4
push 0x535598
lea ecx, [ebp - 0x818]
call fcn.0041d180
lea ecx, [ebp - 0x818]
call fcn.0041d2b0
push eax
push 0x400
lea edx, [ebp - 0x808]
push edx
push 0
push 0x5355ac
mov ecx, dword [ebp - 0x820]
call fcn.0041d2b0
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0
jbe 0x47707f
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x47707f
lea ecx, [ebp - 0x818]
call fcn.0041d2b0
push eax
push 0
push 0x5355b8
mov ecx, dword [ebp - 0x820]
call fcn.0041d2b0
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push ecx
mov ecx, esp
mov edx, dword [ebp - 0x820]
push edx
call fcn.0041d0a0
push 0
lea eax, [ebp - 0x814]
push eax
mov ecx, dword [ebp - 0x840]
call fcn.00478800
cmp dword [ebp - 0x81c], 1
jne 0x4770c1
lea ecx, [ebp - 0x814]
call fcn.00443d10
add eax, 0x38
mov dword [ebp - 0x844], eax
jmp 0x4770d7
lea ecx, [ebp - 0x814]
call fcn.00443d10
add eax, 0xb0
mov dword [ebp - 0x844], eax
mov ecx, dword [ebp - 0x844]
mov dword [ebp - 0x82c], ecx
push 1
lea ecx, [ebp - 0x814]
call fcn.00443d10
mov edx, dword [eax + 0x50]
push edx
lea ecx, [ebp - 0x814]
call fcn.00443d10
mov eax, dword [eax + 0x4c]
push eax
push ecx
mov ecx, esp
mov edx, dword [ebp - 0x82c]
push edx
call fcn.0041d0a0
lea ecx, [ebp - 0x814]
call fcn.00443d10
add eax, 0x34
push ecx
mov ecx, esp
push eax
call fcn.0041d0a0
call fcn.004c40c0
add esp, 0x14
mov eax, dword [ebp - 0x81c]
mov dword [ebp - 0x848], eax
cmp dword [ebp - 0x848], 1
je 0x477151
cmp dword [ebp - 0x848], 2
je 0x477172
jmp 0x477191
push 0
push 0
push 0
mov ecx, dword [ebp - 0x810]
push ecx
mov edx, dword [ebp - 0x814]
push edx
mov ecx, dword [ebp - 0x840]
call fcn.00478990
jmp 0x477191
push 0
push 0
push 0
mov eax, dword [ebp - 0x810]
push eax
mov ecx, dword [ebp - 0x814]
push ecx
mov ecx, dword [ebp - 0x840]
call fcn.00478bb0
mov edx, dword [ebp - 0x820]
mov dword [ebp - 0x838], edx
mov eax, dword [ebp - 0x838]
mov dword [ebp - 0x834], eax
cmp dword [ebp - 0x834], 0
je 0x4771c7
push 1
mov ecx, dword [ebp - 0x834]
call fcn.00443510
mov dword [ebp - 0x84c], eax
jmp 0x4771d1
mov dword [ebp - 0x84c], 0
mov ecx, dword [ebp - 0x840]
cmp dword [ecx + 0x1b0], 0
jne 0x4771fd
mov edx, dword [ebp - 0x840]
mov dword [edx + 0x1b0], 1
mov ecx, dword [ebp - 0x840]
call fcn.00477ce0
jmp 0x47723e
mov eax, dword [ebp - 0x840]
mov ecx, dword [eax + 0x188]
sub ecx, 1
mov edx, dword [ebp - 0x840]
mov dword [edx + 0x188], ecx
mov eax, dword [ebp - 0x840]
mov ecx, dword [eax + 0x190]
add ecx, 1
mov edx, dword [ebp - 0x840]
mov dword [edx + 0x190], ecx
mov ecx, dword [ebp - 0x840]
call fcn.0047b000
mov ecx, dword [ebp - 0x840]
call fcn.0047aa40
mov dword [ebp - 0x83c], 0
lea ecx, [ebp - 0x818]
call fcn.0041d100
mov eax, dword [ebp - 0x83c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f7567
mov esp, ebp
pop ebp
ret 0x10