Function at 0x505590
Capabilities:
Link many functions at runtime
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5240ed
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x53120c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
push 0x531e28
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
call fcn.00504cf0
push 0x2001f
push str.SOFTWAREVAIO_CorporationVAIO_Control_Center
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.005054e0
mov esi, dword [ebp - 0x18]
test eax, eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, dword [ebp - 0x28]
jne 0x505696
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0
lea eax, [ebp - 0x1c]
push eax
push 0
push str.InstalledDir
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x505691
mov eax, dword [ebp - 0x1c]
cmp eax, 1
je 0x50563f
cmp eax, 2
jne 0x505691
mov eax, dword [ebp - 0x14]
shr eax, 1
mov dword [ebp - 0x14], eax
test esi, esi
je 0x505678
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x505650
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push 1
push 0
push str.InstalledDir
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test edi, edi
je 0x5057a0
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov dword [ebp - 0x28], edi
jmp 0x5057a0
mov eax, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x10], 0
test ebx, ebx
je 0x505704
cmp dword [ebx], 0
je 0x5056f7
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x5056c0
mov dword [ebp - 0x14], eax
jmp 0x5057a7
push str.RegCreateKeyTransactedW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x5056fd
push 0
push dword [ebx]
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push 0
push 0xf023f
push 0
push 0
push 0
push str.SOFTWAREVAIO_CorporationVAIO_Control_Center
push reloc.OLEAUT32.dll_SysReAllocString
call eax
jmp 0x505725
cmp dword [ebx + 4], 0
jne 0x505704
mov eax, 1
jmp 0x505725
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push 0
push 0xf023f
push 0
push 0
push 0
push str.SOFTWAREVAIO_CorporationVAIO_Control_Center
push reloc.OLEAUT32.dll_SysReAllocString
call eax
mov dword [ebp - 0x14], 0
test eax, eax
jne 0x5057a7
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x50573d
push edi
call ebx
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0x200
mov dword [ebp - 0x14], 0
test eax, eax
jne 0x5057a7
test esi, esi
je 0x50578a
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x505760
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push 1
push 0
push str.InstalledDir
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x505799
push eax
call ebx
xor edi, edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x20]
xor ebx, ebx
mov ecx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x10], ebx
test eax, eax
je 0x505814
cmp dword [eax], ebx
je 0x505808
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x50598b
push str.RegOpenKeyTransactedW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x5057fe
mov ecx, dword [ebp - 0x20]
push ebx
push dword [ecx]
lea ecx, [ebp - 0x10]
push ecx
push 0x2001f
push ebx
push str.SOFTWAREVAIO_CorporationVAIO_Control_CenterSettingsVESPerform
push reloc.OLEAUT32.dll_SysReAllocString
call eax
jmp 0x50582b
mov ebx, dword [ebp - 0x10]
mov eax, 1
jmp 0x50582e
cmp dword [eax + 4], ebx
jne 0x505814
mov eax, 1
jmp 0x50582e
lea eax, [ebp - 0x10]
push eax
push 0x2001f
push 0
push str.SOFTWAREVAIO_CorporationVAIO_Control_CenterSettingsVESPerform
push reloc.OLEAUT32.dll_SysReAllocString
call ecx
mov ebx, dword [ebp - 0x10]
test eax, eax
jne 0x50598b
test edi, edi
je 0x505844
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x24], 0
mov edi, ebx
mov dword [ebp - 0x28], edi
test eax, eax
jne 0x50598b
mov eax, dword [ebp - 0x14]
add eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
push 0
lea eax, [ebp - 0x14]
push eax
push 0
push str.Information_Sound
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x50598b
mov eax, dword [ebp - 0x14]
cmp eax, 1
je 0x505891
cmp eax, 2
jne 0x50598b
push str.pi.wav
lea ecx, [ebp - 0x18]
call fcn.00504e60
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x5058d8
mov ecx, esi
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5058b0
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push 1
push 0
push str.Information_Sound
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test ebx, ebx
je 0x5058e8
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov dword [ebp - 0x28], edi
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x24], 0
mov eax, dword [reloc.OLEAUT32.dll_SysReAllocString]
lea ecx, [ebp - 0x34]
push 0x5310c0
mov dword [ebp - 0x38], eax
call fcn.00504cf0
push 0x5310c4
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.00504cf0
push 0x5310c8
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.00504cf0
mov eax, dword [ebp - 0x38]
mov byte [ebp - 4], 4
mov dword [ebp - 0x14], 0
test ebx, ebx
je 0x505ab3
cmp dword [ebx], 0
je 0x505aa6
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x505aed
push str.RegOpenKeyTransactedW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x505aac
push 0
push dword [ebx]
lea ecx, [ebp - 0x14]
push ecx
push 0x2001f
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call eax
jmp 0x505ac9
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x10], 0
test ebx, ebx
je 0x5059f5
cmp dword [ebx], 0
je 0x5059e8
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x5058f2
push str.RegCreateKeyTransactedW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x5059ee
push 0
push dword [ebx]
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push 0
push 0xf023f
push 0
push 0
push 0
push str.SOFTWAREVAIO_CorporationVAIO_Control_CenterSettingsVESPerform
push reloc.OLEAUT32.dll_SysReAllocString
call eax
jmp 0x505a1b
cmp dword [ebx + 4], 0
jne 0x5059f5
mov eax, 1
jmp 0x505a1b
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push 0
push 0xf023f
push 0
push 0
push 0
push str.SOFTWAREVAIO_CorporationVAIO_Control_CenterSettingsVESPerform
push reloc.OLEAUT32.dll_SysReAllocString
call eax
test eax, eax
jne 0x5058f2
test edi, edi
je 0x505a2e
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0x200
test eax, eax
jne 0x5058f2
push str.pi.wav
lea ecx, [ebp - 0x18]
call fcn.00504e60
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x505a8a
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x505a60
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push 1
push 0
push str.Information_Sound
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x5058eb
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov dword [ebp - 0x28], edi
jmp 0x5058eb
cmp dword [ebx + 4], 0
jne 0x505ab3
mov eax, 1
jmp 0x505ac9
lea ecx, [ebp - 0x14]
push ecx
push 0x2001f
push 0
push dword [ebp - 0x34]
push eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
call eax
test eax, eax
jne 0x505aed
test edi, edi
je 0x505ad8
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0
test eax, eax
je 0x505b95
mov dword [ebp - 0x14], 0
test ebx, ebx
je 0x505b50
cmp dword [ebx], 0
je 0x505b43
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x505bfc
push str.RegCreateKeyTransactedW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x505b49
push 0
push dword [ebx]
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x14]
push ecx
push 0
push 0xf023f
push 0
push 0
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call eax
jmp 0x505b71
cmp dword [ebx + 4], 0
jne 0x505b50
mov eax, 1
jmp 0x505b71
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0xf023f
push 0
push 0
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x505bfc
test edi, edi
je 0x505b84
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0x200
test eax, eax
jne 0x505bfc
push 0x525a80
push dword [ebp - 0x30]
call fcn.005129c1
add esp, 8
test eax, eax
je 0x505bfc
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x505be0
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x505bb5
mov ebx, dword [ebp - 0x2c]
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push ebx
push 1
push 0
push dword [ebp - 0x30]
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x505be3
mov ebx, dword [ebp - 0x2c]
test edi, edi
je 0x505bf3
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0
jmp 0x505bff
mov ebx, dword [ebp - 0x2c]
lea edx, [ebx - 0x10]
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x505c1d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x30]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x505c37
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x34]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x505c51
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x505c6a
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
je 0x505c75
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret