Function at 0x403710
Capabilities:
Delete registry key
Delete registry value
Query or enumerate registry value

Disassembly:
mov r11, rsp
sub rsp, 0x318
mov rax, qword [0x00445f40]
xor rax, rsp
mov qword [rsp + 0x2f0], rax
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x20], rsi
mov qword [r11 - 8], rdi
mov rdi, rcx
lea r8, [rsp + 0x30]
lea rdx, str.SystemCurrentControlSetServicesClass_
mov rcx, 0xffffffff80000002
mov qword [r11 - 0x18], r13
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
cmp dword [0x004479d0], 0
jne 0x403794
test eax, eax
jne 0x403e0e
lea rdx, str.MEDIA
mov rcx, rdi
call fcn.00419c30
test rax, rax
je 0x4040c6
mov rcx, qword [rsp + 0x30]
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x4040c6
test eax, eax
jne 0x403e0e
mov byte [rsp + 0x50], al
xor eax, eax
xor r13d, r13d
mov qword [rsp + 0x51], rax
mov qword [rsp + 0x59], rax
mov qword [rsp + 0x61], rax
mov qword [rsp + 0x69], rax
mov qword [rsp + 0x71], rax
mov qword [rsp + 0x79], rax
mov qword [rsp + 0x81], rax
mov dword [rsp + 0x89], eax
mov word [rsp + 0x8d], ax
mov byte [rsp + 0x8f], al
lea rax, str.0000
mov rdi, r13
mov qword [rsp + 0xb0], rax
lea rax, str.0001
mov qword [rsp + 0xb8], rax
lea rax, str.0002
mov qword [rsp + 0xc0], rax
lea rax, str.0003
mov qword [rsp + 0xc8], rax
lea rax, str.0004
mov qword [rsp + 0xd0], rax
lea rax, str.0005
mov qword [rsp + 0xd8], rax
lea rax, str.0006
mov qword [rsp + 0xe0], rax
lea rax, str.0007
mov qword [rsp + 0xe8], rax
lea rax, str.0008
mov qword [rsp + 0xf0], rax
lea rax, str.0009
mov qword [rsp + 0xf8], rax
lea rax, str.0010
mov qword [rsp + 0x100], rax
lea rax, str.0011
mov qword [rsp + 0x108], rax
lea rax, str.0012
mov qword [rsp + 0x110], rax
lea rax, str.0013
mov qword [rsp + 0x118], rax
lea rax, str.0014
mov qword [rsp + 0x120], rax
lea rax, str.0015
mov qword [rsp + 0x128], rax
lea rax, str.0016
mov qword [rsp + 0x130], rax
lea rax, str.0017
mov qword [rsp + 0x138], rax
lea rax, str.0018
mov qword [rsp + 0x140], rax
lea rax, str.0019
mov qword [rsp + 0x148], rax
lea rax, str.0020
mov qword [rsp + 0x150], rax
lea rax, str.0021
mov qword [rsp + 0x158], rax
lea rax, str.0022
mov qword [rsp + 0x160], rax
lea rax, str.0023
mov qword [rsp + 0x168], rax
lea rax, str.0024
mov qword [rsp + 0x170], rax
lea rax, str.0025
mov qword [rsp + 0x178], rax
lea rax, str.0026
mov qword [rsp + 0x180], rax
lea rax, str.0027
mov qword [rsp + 0x188], rax
lea rax, str.0028
mov qword [rsp + 0x190], rax
lea rax, str.0029
mov qword [rsp + 0x198], rax
lea rax, str.0030
mov qword [rsp + 0x1a0], rax
lea rax, str.0031
mov qword [rsp + 0x1a8], rax
nop
nop
nop
lea rdx, str.SystemCurrentControlSetServicesClassMEDIA_
lea rcx, [rsp + 0x1f0]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
mov rbx, qword [rsp + rdi*8 + 0xb0]
lea rcx, [rsp + 0x1f0]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_lstrcatA]
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x1f0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x403dfb
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x38]
lea rdx, str.MatchingDeviceId
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov esi, r13d
mov dword [rsp + 0x38], 0x40
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403db3
mov rdx, qword [0x004479e0]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
je 0x403a86
mov rax, qword [0x004479e0]
cmp dword [rax - 0x10], r13d
jne 0x403dae
mov rdx, qword [0x004479e8]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a18]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447aa0]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a90]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a38]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447ac8]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447ac0]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a28]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a00]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a88]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a68]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a80]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447ad0]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a08]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a98]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447ab8]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a20]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447ad8]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x004479f8]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447ab0]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a10]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a60]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a58]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a50]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a30]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447aa8]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447ae0]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a48]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a40]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a78]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x00447a70]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
jne 0x403dae
mov rdx, qword [0x004479f0]
lea rcx, [rsp + 0x50]
call fcn.00419c30
test rax, rax
je 0x403db3
mov esi, 1
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x403dfb
lea rdx, str.MEDIA_
lea rcx, [rsp + 0x1b0]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea rcx, [rsp + 0x1b0]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_lstrcatA]
mov rcx, qword [rsp + 0x30]
lea rdx, [rsp + 0x1b0]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
add rdi, 1
cmp rdi, 0x20
jl 0x4039d0
jmp 0x4040c6
lea r8, [rsp + 0x30]
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionDrivers32
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4040d1
cmp dword [0x004479d0], eax
je 0x4040c6
xor r13d, r13d
mov qword [rsp + 0x330], rbp
mov qword [rsp + 0x308], r12
mov ebp, r13d
mov r12d, r13d
lea ebx, [rax + 9]
test r12d, r12d
je 0x403e69
test ebp, ebp
je 0x403e69
test r13d, r13d
jne 0x4040b6
xor eax, eax
lea rdx, str.midi
lea rcx, [rsp + 0xb0]
mov byte [rsp + 0x50], 0
mov dword [rsp + 0x38], 0x40
mov qword [rsp + 0x51], rax
mov qword [rsp + 0x59], rax
mov qword [rsp + 0x61], rax
mov qword [rsp + 0x69], rax
mov qword [rsp + 0x71], rax
mov qword [rsp + 0x79], rax
mov qword [rsp + 0x81], rax
mov dword [rsp + 0x89], eax
mov word [rsp + 0x8d], ax
mov byte [rsp + 0x8f], al
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
test ebx, ebx
jle 0x403ef8
lea rdx, [rsp + 0x90]
mov r8d, 0xa
mov ecx, ebx
call fcn.0041a410
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
lea rdx, [rsp + 0xb0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403f5c
test r12d, r12d
jne 0x403f5c
lea rsi, [rsp + 0x50]
lea rdi, str.wdmaud.drv
mov ecx, VariantTimeToDosDateTime
repe cmpsb byte [rsi], byte [rdi]
jne 0x403f5c
mov rcx, qword [rsp + 0x30]
lea rdx, [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov r12d, 1
lea rdx, str.mixer
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
test ebx, ebx
jle 0x403fa0
lea rdx, [rsp + 0x90]
mov r8d, 0xa
mov ecx, ebx
call fcn.0041a410
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
lea rdx, [rsp + 0xb0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404004
test r13d, r13d
jne 0x404004
lea rsi, [rsp + 0x50]
lea rdi, str.wdmaud.drv
mov ecx, VariantTimeToDosDateTime
repe cmpsb byte [rsi], byte [rdi]
jne 0x404004
mov rcx, qword [rsp + 0x30]
lea rdx, [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov r13d, 1
lea rdx, str.wave
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
test ebx, ebx
jle 0x404048
lea rdx, [rsp + 0x90]
mov r8d, 0xa
mov ecx, ebx
call fcn.0041a410
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
lea rdx, [rsp + 0xb0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4040aa
test ebp, ebp
jne 0x4040aa
lea rsi, [rsp + 0x50]
lea rdi, str.wdmaud.drv
mov ecx, VariantTimeToDosDateTime
repe cmpsb byte [rsi], byte [rdi]
jne 0x4040aa
mov rcx, qword [rsp + 0x30]
lea rdx, [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ebp, 1
test ebx, ebx
je 0x4040b6
sub ebx, 1
jmp 0x403e57
mov rbp, qword [rsp + 0x330]
mov r12, qword [rsp + 0x308]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r13, qword [rsp + 0x300]
mov rdi, qword [rsp + 0x310]
mov rsi, qword [rsp + 0x338]
mov rbx, qword [rsp + 0x328]
mov rcx, qword [rsp + 0x2f0]
xor rcx, rsp
call fcn.004196e0
add rsp, 0x318
ret