Function at 0x40259e
Capabilities:
Read .ini file
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0x398
mov eax, dword [0x42197c]
push ebx
push esi
xor eax, ebp
push edi
mov dword [ebp + 0x70], eax
mov eax, dword [ebp + 0x7c]
mov esi, 0xc8
push esi
mov dword [ebp - 0x320], eax
xor edi, edi
lea eax, [ebp - 0x184]
push edi
push eax
call fcn.004058a0
push 0x64
lea eax, [ebp + 0xc]
push edi
push eax
call fcn.004058a0
push 0x64
lea eax, [ebp - 0xbc]
push edi
push eax
call fcn.004058a0
push 0x64
lea eax, [ebp - 0x58]
push edi
push eax
call fcn.004058a0
push esi
lea eax, [ebp - 0x24c]
push edi
push eax
call fcn.004058a0
add esp, 0x3c
push 0x31
mov byte [ebp - 0x314], 0
xor eax, eax
pop ecx
lea edi, [ebp - 0x313]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x318], 1
mov edi, str..gamepath.ini
mov ebx, 0x41a74c
movzx eax, word [ebp - 0x318]
push eax
lea eax, [ebp - 0x184]
push 0x41a750
push eax
call fcn.004057d8
add esp, 0xc
push edi
push 0xff
push str.root
lea eax, [ebp - 0x184]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp ax, 0xff
mov dword [ebp - 0x324], eax
je 0x40282a
push edi
push 0x64
lea eax, [ebp + 0xc]
push eax
push ebx
push 0x41a748
lea eax, [ebp - 0x184]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push edi
push 0x64
lea eax, [ebp - 0xbc]
push eax
push ebx
push str.subkey
lea eax, [ebp - 0x184]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push edi
push 0x64
lea eax, [ebp - 0x58]
push eax
push ebx
push str.after
lea eax, [ebp - 0x184]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push edi
push esi
lea eax, [ebp - 0x314]
push eax
push ebx
push str.before
lea eax, [ebp - 0x184]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push esi
lea eax, [ebp - 0x24c]
push 0
push eax
call fcn.004058a0
lea eax, [ebp - 0x314]
push ebx
push eax
call fcn.00405750
add esp, 0x14
test eax, eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x320]
je 0x402732
lea eax, [ebp - 0x314]
push eax
lea eax, [ebp - 0x24c]
push str._s_s_s
push eax
call fcn.004057d8
add esp, 0x14
jmp 0x402746
lea eax, [ebp - 0x24c]
push 0x41a8fc
push eax
call fcn.004057d8
add esp, 0x10
movzx eax, word [ebp - 0x324]
sub eax, 0
je 0x40277c
dec eax
je 0x40276a
dec eax
jne 0x402792
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp + 0xc]
push eax
push 0x80000002
jmp 0x40278c
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp + 0xc]
push eax
push 0x80000001
jmp 0x40278c
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp + 0xc]
push eax
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
lea eax, [ebp - 0x24c]
push eax
call fcn.00405630
pop ecx
inc eax
push eax
lea eax, [ebp - 0x24c]
push eax
push 1
push 0
lea eax, [ebp - 0xbc]
push eax
push dword [ebp - 0x31c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x31c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x64
lea eax, [ebp + 0xc]
push 0
push eax
call fcn.004058a0
push 0x64
lea eax, [ebp - 0xbc]
push 0
push eax
call fcn.004058a0
push 0x64
lea eax, [ebp - 0x58]
push 0
push eax
call fcn.004058a0
push esi
lea eax, [ebp - 0x24c]
push 0
push eax
call fcn.004058a0
push esi
lea eax, [ebp - 0x184]
push 0
push eax
call fcn.004058a0
add esp, 0x3c
inc dword [ebp - 0x318]
cmp word [ebp - 0x318], 0x78
jbe 0x402637
mov ecx, dword [ebp + 0x70]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040526e
add ebp, 0x74
leave
ret 4