Function at 0x406a80
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x482a5c
mov eax, dword fs:[0]
push eax
sub esp, 0x368
mov eax, dword [0x49b470]
xor eax, esp
mov dword [esp + 0x364], eax
push ebp
push esi
push edi
mov eax, dword [0x49b470]
xor eax, esp
push eax
lea eax, [esp + 0x378]
mov dword fs:[0], eax
mov eax, 0xf
xor edi, edi
mov dword [esp + 0x58], eax
mov dword [esp + 0x54], edi
mov byte [esp + 0x44], 0
mov dword [esp + 0x380], edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], edi
mov byte [esp + 0x28], 0
push 0x48b928
lea eax, [esp + 0x168]
push eax
mov byte [esp + 0x388], 1
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.setup.ini
lea ecx, [esp + 0x168]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x164]
push edx
lea eax, [esp + 0x270]
push eax
push ebx
call fcn.00406520
mov dword [esp + 0x10], edi
cmp eax, edi
je 0x406c95
lea ecx, [ebx + 0x58cc]
push str.setup.ini
mov byte [esp + 0x384], 2
lea esi, [ebx + 0x5b61]
call fcn.004040f0
push eax
push str._s_s
push esi
call fcn.0045f116
add esp, 0x10
push edi
push 0x80
push 3
push edi
push 1
push DirectSoundCreate
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
mov dword [esp + 0x10], ebp
cmp ebp, 0xffffffff
jne 0x406ba0
lea eax, [esp + 0x26c]
xor ebp, ebp
mov edx, esi
mov ecx, eax
mov dword [esp + 0x10], ebp
sub edx, ecx
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x406b94
jmp 0x406bb1
cmp ebp, edi
je 0x406bb1
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
mov dword [esp + 0x10], ebp
push esi
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]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406be0
sub eax, edx
push eax
push 0xe51460
lea ecx, [esp + 0x48]
call fcn.00402b90
cmp dword [esp + 0x58], 0x10
mov eax, dword [esp + 0x44]
jae 0x406c07
lea eax, [esp + 0x44]
mov ecx, 0x48b990
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x406c30
test dl, dl
je 0x406c2c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x406c30
add eax, 2
add ecx, 2
test dl, dl
jne 0x406c10
xor eax, eax
jmp 0x406c35
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
jne 0x406c57
mov edi, 0x48b9a0
call fcn.004010a0
test ebp, ebp
je 0x40700c
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40700c
push 0xf
push str.SoftwareLiLiM_
lea ecx, [esp + 0x2c]
call fcn.00402b90
push edi
lea ecx, [esp + 0x44]
push ecx
or eax, 0xffffffff
lea esi, [esp + 0x2c]
call fcn.004089b0
mov byte [esp + 0x380], 1
cmp ebp, edi
je 0x406e13
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406e13
lea ecx, [ebx + 0x58cc]
push str.setup.ini
mov byte [esp + 0x384], 3
lea esi, [ebx + 0x5b61]
call fcn.004040f0
push eax
push str._s_s
push esi
call fcn.0045f116
add esp, 0x10
push edi
push 0x80
push 3
push edi
push 1
push DirectSoundCreate
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
mov dword [esp + 0x10], ebp
cmp ebp, 0xffffffff
jne 0x406cf3
mov edi, 0x48b9e0
call fcn.004010a0
jmp 0x40700c
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x406d06
push ebp
call edi
xor ebp, ebp
mov dword [esp + 0x10], ebp
push esi
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 edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406d30
sub eax, edx
push eax
push 0xe51460
lea ecx, [esp + 0x48]
call fcn.00402b90
cmp dword [esp + 0x58], 0x10
mov eax, dword [esp + 0x44]
jae 0x406d57
lea eax, [esp + 0x44]
mov ecx, 0x48b990
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x406d80
test dl, dl
je 0x406d7c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x406d80
add eax, 2
add ecx, 2
test dl, dl
jne 0x406d60
xor eax, eax
jmp 0x406d85
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x406ddf
mov edi, 0x48b9a0
call fcn.004010a0
test ebp, ebp
je 0x406d9e
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 0x10
cmp dword [esp + 0x3c], esi
jb 0x406db6
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0045f755
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], 0
mov byte [esp + 0x28], 0
cmp dword [esp + 0x58], esi
jb 0x40704c
mov edx, dword [esp + 0x44]
push edx
jmp 0x407044
push 0xf
push str.SoftwareLiLiM_
lea ecx, [esp + 0x2c]
call fcn.00402b90
push 0
lea eax, [esp + 0x44]
push eax
or eax, 0xffffffff
lea esi, [esp + 0x2c]
call fcn.004089b0
mov byte [esp + 0x380], 1
test ebp, ebp
je 0x406e11
push ebp
call edi
xor edi, edi
mov eax, dword [esp + 0x28]
mov ebp, 0x10
cmp dword [esp + 0x3c], ebp
jae 0x406e26
lea eax, [esp + 0x28]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x18]
push edx
push edi
push 0xf003f
push edi
push edi
push edi
push eax
push reloc.DSOUND.dll_DirectSoundCreate
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x406fb8
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x20]
push edx
push edi
push str.Path
push eax
mov dword [esp + 0x28], 0x105
call ebp
test eax, eax
jne 0x406ec1
lea ecx, [ebx + 0x58cc]
call fcn.004041a0
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406e88
lea edi, [esp + 0x5c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x406e96
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebx + 0x5974]
lea edx, [esp + 0x5c]
mov eax, edi
call fcn.00404400
jmp 0x406ed4
lea edi, [ebx + 0x5974]
lea eax, [ebx + 0x58cc]
mov ecx, edi
call fcn.004043c0
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x20]
push eax
push 0
push str.InstType
push ecx
mov dword [esp + 0x28], 4
call ebp
test eax, eax
jne 0x406f13
mov eax, dword [esp + 0x1c]
sub eax, 0
je 0x406f13
sub eax, 1
jne 0x406f1d
mov dword [ebx + 0x5a58], eax
jmp 0x406f1d
mov dword [ebx + 0x5a58], 1
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0
push 0x48ba18
push edx
mov dword [esp + 0x28], 0x105
call ebp
test eax, eax
jne 0x406f8d
lea eax, [esp + 0x5c]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406f50
sub eax, edx
push eax
lea eax, [esp + 0x60]
lea esi, [ebx + 0x5a1c]
push eax
mov ecx, esi
call fcn.00402b90
cmp dword [esi + 0x18], 0x10
jb 0x406f81
mov edx, dword [esi + 4]
mov ecx, edi
call fcn.00404250
jmp 0x407001
lea edx, [esi + 4]
mov ecx, edi
call fcn.00404250
jmp 0x407001
lea ecx, [ebx + 0x58cc]
call fcn.004041a0
mov ecx, eax
lea esi, [ecx + 1]
lea ecx, [ecx]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x406fa0
sub ecx, esi
push ecx
push eax
lea ecx, [ebx + 0x5a1c]
call fcn.00402b90
jmp 0x407001
lea esi, [ebx + 0x5974]
cmp dword [ebx + 0x58e4], ebp
jb 0x406fce
mov edx, dword [ebx + 0x58d0]
jmp 0x406fd4
lea edx, [ebx + 0x58d0]
mov eax, edx
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406fe0
sub eax, edi
push eax
push edx
mov ecx, esi
call fcn.00402b90
call fcn.00404430
mov dword [ebx + 0x5a58], 1
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, 0x10
cmp dword [esp + 0x3c], esi
jb 0x407024
mov edx, dword [esp + 0x28]
push edx
call fcn.0045f755
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], 0
mov byte [esp + 0x28], 0
cmp dword [esp + 0x58], esi
jb 0x40704c
mov eax, dword [esp + 0x44]
push eax
call fcn.0045f755
add esp, 4
mov ecx, dword [esp + 0x378]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x364]
xor ecx, esp
call fcn.0045f0aa
add esp, 0x374
ret