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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x587fd4
mov eax, dword fs:[0]
push eax
sub esp, 0x8c0
mov eax, dword [0x5f44b0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x8cc], ecx
mov word [ebp - 0x64c], 0
push 0x206
push 0
lea eax, [ebp - 0x64a]
push eax
call fcn.0049e690
add esp, 0xc
mov word [ebp - 0x8ac], 0
push 0x206
push 0
lea ecx, [ebp - 0x8aa]
push ecx
call fcn.0049e690
add esp, 0xc
push 0x593f28
lea ecx, [ebp - 0x440]
call fcn.00401600
mov dword [ebp - 4], 0
push 0x593f2c
lea ecx, [ebp - 0x8c8]
call fcn.00401600
mov byte [ebp - 4], 1
push 0x593f30
lea ecx, [ebp - 0x668]
call fcn.00401600
mov byte [ebp - 4], 2
push 0x593f34
lea ecx, [ebp - 0x6a0]
call fcn.00401600
mov byte [ebp - 4], 3
mov dword [ebp - 0x10], 0
push 0
push 0x2b
lea edx, [ebp - 0x64c]
push edx
push 0
mov ecx, dword [ebp - 0x8cc]
call fcn.00415ac0
push 0x593f38
lea eax, [ebp - 0x64c]
push eax
call fcn.0049eb28
add esp, 8
push 0x593f3c
lea ecx, [ebp - 0x64c]
push ecx
call fcn.0049eb28
add esp, 8
push 0x593f60
lea edx, [ebp - 0x64c]
push edx
call fcn.0049eb28
add esp, 8
push 0x593f64
lea eax, [ebp - 0x64c]
push eax
call fcn.0049eb28
add esp, 8
push 0x593f80
lea ecx, [ebp - 0x64c]
push ecx
call fcn.0049eb28
add esp, 8
lea edx, [ebp - 0x64c]
push edx
push 0x104
lea eax, [ebp - 0x8ac]
push eax
push 0x593f8c
push 0x593f90
push 0x593fa8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x8ac]
push ecx
call fcn.0049e752
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x415241
lea edx, [ebp - 0x8ac]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x415241
lea eax, [ebp - 0x8ac]
push eax
lea ecx, [ebp - 0x440]
call fcn.004036d0
lea ecx, [ebp - 0x8ac]
push ecx
mov ecx, dword [ebp - 0x8cc]
add ecx, 0xc
call fcn.004036d0
mov edx, dword [ebp - 0x8cc]
mov byte [edx + 3], 1
mov eax, dword [ebp - 0x8cc]
movzx ecx, byte [eax + 4]
test ecx, ecx
jne 0x415241
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x6a0]
call fcn.00401640
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x668]
call fcn.00401640
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x8c8]
call fcn.00401640
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x440]
call fcn.00401640
jmp 0x4156b4
mov word [ebp - 0x21c], 0
push 0x206
push 0
lea edx, [ebp - 0x21a]
push edx
call fcn.0049e690
add esp, 0xc
mov word [ebp - 0x424], 0
push 0x206
push 0
lea eax, [ebp - 0x422]
push eax
call fcn.0049e690
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
mov edx, dword [ebp - 0x8cc]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x21c]
push ecx
call fcn.0049e752
add esp, 4
test eax, eax
jne 0x4152c2
push 0x104
lea edx, [ebp - 0x21c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
lea eax, [ebp - 0x21c]
push eax
call fcn.00407130
add esp, 8
mov word [eax + 2], 0
push 0x593fb8
lea ecx, [ebp - 0x21c]
push ecx
push 0x593fe0
lea edx, [ebp - 0x424]
push edx
call fcn.0049e5b6
add esp, 0x10
lea eax, [ebp - 0x424]
push eax
push 0x104
lea ecx, [ebp - 0x8ac]
push ecx
push 0x593fec
push 0x593ff0
push 0x594008
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [ebp - 0x8ac]
push edx
call fcn.0049e752
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x4153d5
lea eax, [ebp - 0x8ac]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4153d5
lea ecx, [ebp - 0x8ac]
push ecx
lea ecx, [ebp - 0x8c8]
call fcn.004036d0
lea edx, [ebp - 0x8ac]
push edx
mov ecx, dword [ebp - 0x8cc]
add ecx, 0xc
call fcn.004036d0
mov eax, dword [ebp - 0x8cc]
mov byte [eax + 3], 1
mov ecx, dword [ebp - 0x8cc]
movzx edx, byte [ecx + 4]
test edx, edx
jne 0x4153d5
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x6a0]
call fcn.00401640
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x668]
call fcn.00401640
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x8c8]
call fcn.00401640
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x440]
call fcn.00401640
jmp 0x4156b4
push 0x594018
mov ecx, dword [ebp - 0x8cc]
add ecx, 0xb4
call fcn.00401670
push eax
push 0x594040
lea eax, [ebp - 0x424]
push eax
call fcn.0049e5b6
add esp, 0x10
lea ecx, [ebp - 0x424]
push ecx
push 0x104
lea edx, [ebp - 0x8ac]
push edx
push 0x59404c
push 0x594050
push 0x594068
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x8ac]
push eax
call fcn.0049e752
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x4154dc
lea ecx, [ebp - 0x8ac]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4154dc
lea edx, [ebp - 0x8ac]
push edx
lea ecx, [ebp - 0x668]
call fcn.004036d0
lea eax, [ebp - 0x8ac]
push eax
mov ecx, dword [ebp - 0x8cc]
add ecx, 0xc
call fcn.004036d0
mov ecx, dword [ebp - 0x8cc]
mov byte [ecx + 3], 1
mov edx, dword [ebp - 0x8cc]
movzx eax, byte [edx + 4]
test eax, eax
jne 0x4154dc
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x6a0]
call fcn.00401640
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x668]
call fcn.00401640
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x8c8]
call fcn.00401640
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x440]
call fcn.00401640
jmp 0x4156b4
push 0x594078
push 0x59407c
push 0x594094
lea ecx, [ebp - 0x684]
push ecx
mov ecx, dword [ebp - 0x8cc]
call fcn.00417680
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x684]
call fcn.00401670
push eax
call fcn.0049e752
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x4155ce
lea ecx, [ebp - 0x684]
call fcn.00401670
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4155ce
lea edx, [ebp - 0x684]
push edx
lea ecx, [ebp - 0x6a0]
call fcn.004036b0
lea eax, [ebp - 0x684]
push eax
mov ecx, dword [ebp - 0x8cc]
add ecx, 0xc
call fcn.004036b0
mov ecx, dword [ebp - 0x8cc]
mov byte [ecx + 3], 1
mov edx, dword [ebp - 0x8cc]
movzx eax, byte [edx + 4]
test eax, eax
jne 0x4155ce
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x684]
call fcn.00401640
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x6a0]
call fcn.00401640
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x668]
call fcn.00401640
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x8c8]
call fcn.00401640
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x440]
call fcn.00401640
jmp 0x4156b4
mov ecx, dword [ebp - 0x8cc]
movzx edx, byte [ecx + 4]
test edx, edx
je 0x415666
mov eax, dword [ebp - 0x8cc]
movzx ecx, byte [eax + 3]
test ecx, ecx
je 0x415666
lea edx, [ebp - 0x8c8]
push edx
lea eax, [ebp - 0x440]
push eax
call fcn.004199f0
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x415615
mov edx, dword [ebp - 0x8cc]
mov byte [edx + 5], 1
lea eax, [ebp - 0x668]
push eax
lea ecx, [ebp - 0x440]
push ecx
call fcn.004199f0
add esp, 8
movzx edx, al
test edx, edx
je 0x41563c
mov eax, dword [ebp - 0x8cc]
mov byte [eax + 5], 1
lea ecx, [ebp - 0x6a0]
push ecx
lea edx, [ebp - 0x440]
push edx
call fcn.004199f0
add esp, 8
movzx eax, al
test eax, eax
je 0x415666
push 1
lea ecx, [ebp - 0x440]
call fcn.00419930
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x684]
call fcn.00401640
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x6a0]
call fcn.00401640
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x668]
call fcn.00401640
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x8c8]
call fcn.00401640
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x440]
call fcn.00401640
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0049e381
mov esp, ebp
pop ebp
ret