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

Disassembly:
push 0xffffffffffffffff
push 0x48299c
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x49b470]
xor eax, esp
mov dword [esp + 0x258], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x49b470]
xor eax, esp
push eax
lea eax, [esp + 0x270]
mov dword fs:[0], eax
xor ebx, ebx
mov eax, 0xf
mov esi, ecx
mov dword [esp + 0x58], eax
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
mov dword [esp + 0x278], ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
push 0x48b928
lea eax, [esp + 0x60]
push eax
mov byte [esp + 0x280], 1
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.setup.ini
lea ecx, [esp + 0x60]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x168]
push eax
push esi
call fcn.00406520
mov dword [esp + 0x18], ebx
cmp eax, ebx
je 0x407725
push str.setup.ini
lea ecx, [esi + 0x58cc]
mov byte [esp + 0x27c], 2
lea edi, [esi + 0x5b61]
call fcn.004040f0
push eax
push str._s_s
push edi
call fcn.0045f116
add esp, 0x10
push ebx
push 0x80
push 3
push ebx
push 1
push DirectSoundCreate
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
mov dword [esp + 0x18], ebp
cmp ebp, 0xffffffff
jne 0x40762c
lea eax, [esp + 0x164]
xor ebp, ebp
mov edx, edi
mov ecx, eax
mov dword [esp + 0x18], ebp
sub edx, ecx
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x407620
jmp 0x40763d
cmp ebp, ebx
je 0x40763d
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
mov dword [esp + 0x18], ebp
push edi
push 0x1000
push 0xe51460
push 0x48b990
push str.SubKey
push 0x48b99c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov eax, 0xe51460
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407665
sub eax, edx
push eax
push 0xe51460
lea ecx, [esp + 0x48]
call fcn.00402b90
mov eax, dword [esp + 0x44]
mov esi, 0x10
cmp dword [esp + 0x58], esi
jae 0x407690
lea eax, [esp + 0x44]
mov ecx, 0x48b990
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4076b5
cmp dl, bl
je 0x4076b1
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4076b5
add eax, 2
add ecx, 2
cmp dl, bl
jne 0x407695
xor eax, eax
jmp 0x4076ba
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40770a
mov edi, 0x48b9a0
call fcn.004010a0
cmp ebp, ebx
je 0x4076d3
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x3c], esi
jb 0x4076e6
mov edx, dword [esp + 0x28]
push edx
call fcn.0045f755
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
cmp dword [esp + 0x58], esi
jb 0x40792c
mov eax, dword [esp + 0x44]
push eax
jmp 0x407924
push 0xf
push str.SoftwareLiLiM_
lea ecx, [esp + 0x2c]
call fcn.00402b90
push ebx
lea ecx, [esp + 0x44]
push ecx
jmp 0x40787c
push str.setup.ini
lea ecx, [esi + 0x58cc]
mov byte [esp + 0x27c], 3
lea edi, [esi + 0x5b61]
call fcn.004040f0
push eax
push str._s_s
push edi
call fcn.0045f116
add esp, 0x10
push ebx
push 0x80
push 3
push ebx
push 1
push DirectSoundCreate
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
mov dword [esp + 0x18], ebp
cmp ebp, 0xffffffff
jne 0x407788
mov edi, 0x48b9e0
call fcn.004010a0
mov esi, 0x10
jmp 0x4076d3
cmp ebp, ebx
je 0x407799
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
mov dword [esp + 0x18], ebp
push edi
push 0x1000
push 0xe51460
push 0x48b990
push str.SubKey
push 0x48b99c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov eax, 0xe51460
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4077c1
sub eax, edx
push eax
push 0xe51460
lea ecx, [esp + 0x48]
call fcn.00402b90
mov eax, dword [esp + 0x44]
mov esi, 0x10
cmp dword [esp + 0x58], esi
jae 0x4077ec
lea eax, [esp + 0x44]
mov ecx, 0x48b990
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x407811
cmp dl, bl
je 0x40780d
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x407811
add eax, 2
add ecx, 2
cmp dl, bl
jne 0x4077f1
xor eax, eax
jmp 0x407816
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x407866
mov edi, 0x48b9a0
call fcn.004010a0
cmp ebp, ebx
je 0x40782f
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x3c], esi
jb 0x407842
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0045f755
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
cmp dword [esp + 0x58], esi
jb 0x40792c
mov edx, dword [esp + 0x44]
push edx
jmp 0x407924
push 0xf
push str.SoftwareLiLiM_
lea ecx, [esp + 0x2c]
call fcn.00402b90
push ebx
lea eax, [esp + 0x44]
push eax
or eax, 0xffffffff
lea esi, [esp + 0x2c]
call fcn.004089b0
cmp ebp, ebx
je 0x407893
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x28]
mov esi, 0x10
cmp dword [esp + 0x3c], esi
jae 0x4078a6
lea eax, [esp + 0x28]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x20]
push edx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push eax
push reloc.DSOUND.dll_DirectSoundCreate
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4078eb
mov ecx, dword [esp + 0x1c]
push 4
lea eax, [esp + 0x1c]
push eax
push 4
push ebx
push str.Disk
push ecx
mov dword [esp + 0x30], 1
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x3c], esi
jb 0x407909
mov eax, dword [esp + 0x28]
push eax
call fcn.0045f755
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
cmp dword [esp + 0x58], esi
jb 0x40792c
mov ecx, dword [esp + 0x44]
push ecx
call fcn.0045f755
add esp, 4
mov ecx, dword [esp + 0x270]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, esp
call fcn.0045f0aa
add esp, 0x268
ret