Function at 0x140046360
Capabilities:
Delete registry value

Disassembly:
push rbx
push rsi
push rdi
push r13
push r15
sub rsp, 0x4d0
mov rax, qword [0x1400840b0]
xor rax, rsp
mov qword [rsp + 0x4b0], rax
xor eax, eax
xor esi, esi
mov rdi, rcx
mov rbx, rdx
lea rcx, [rsp + 0x91]
mov r8d, 0x103
xor edx, edx
lea r13d, [rsi + 1]
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov byte [rsp + 0x90], al
call fcn.14004a070
lea r8d, [rsi + 2]
xor r9d, r9d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupOpenInfFileA]
cmp rax, 0xffffffffffffffff
mov r15, rax
jne 0x1400463ee
mov eax, esi
jmp 0x1400466e3
lea r9, [rsp + 0x70]
lea r8, str.AddReg
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
test eax, eax
je 0x1400466d7
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x4c0], r14
call qword [sym.imp.SETUPAPI.dll_SetupGetFieldCount]
mov r14d, r13d
cmp eax, r13d
mov dword [rsp + 0x48], eax
jl 0x1400466cf
mov qword [rsp + 0x510], rbp
mov qword [rsp + 0x4c8], r12
nop
nop
nop
nop
lea rcx, [rsp + 0x1a1]
xor edx, edx
mov r8d, 0x30b
mov byte [rsp + 0x1a0], 0
call fcn.14004a070
lea r8, [rsp + 0x90]
lea rcx, [rsp + 0x70]
mov r9d, 0x104
mov edx, r14d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldA]
lea rdx, [rsp + 0x90]
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupGetLineCountA]
test eax, eax
mov edi, eax
je 0x1400466bf
lea r9, [rsp + 0x58]
lea rdx, [rsp + 0x90]
xor r8d, r8d
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
test eax, eax
je 0x1400466b0
lea rdx, [rsp + 0x90]
lea rcx, str.Removing_registy_entrys_in__s:
call fcn.14003e300
cmp edi, 1
jl 0x1400466b0
mov r12, rdi
nop
nop
mov edi, 1
lea rbx, [rsp + 0x1a0]
nop
lea rcx, [rsp + 0x58]
mov r9d, 0x104
mov r8, rbx
mov edx, edi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldA]
add edi, 1
add rbx, 0x104
cmp edi, 3
jle 0x140046500
lea rax, [rsp + 0x50]
lea rdx, [rsp + 0x2a4]
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140046693
mov rcx, qword [rsp + 0x50]
lea rdx, [rsp + 0x3a8]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
mov ebp, eax
je 0x140046650
cmp eax, 2
je 0x140046684
cmp eax, 3
je 0x140046684
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rcx
mov r9d, 0x400
mov ecx, 0x1100
mov r8d, eax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov rdx, qword [rsp + 0x40]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
sub rcx, 1
nop
movzx eax, byte [rdx + rcx - 1]
cmp al, 0xa
je 0x1400465dd
cmp al, 0xd
jne 0x1400465e3
sub rcx, 1
jmp 0x1400465d0
mov byte [rcx + rdx], 0
mov rsi, qword [rsp + 0x40]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
lea rbx, [rcx - 1]
call fcn.140056200
test rax, rax
mov rdi, rax
je 0x14004661a
lea r8, [rbx + 1]
mov rdx, rsi
mov rcx, rax
call fcn.14004a400
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.ntdevDeleteRegValue
lea rcx, str._s:_Error_0x_x_____s.
mov r8d, eax
mov r9, rdi
call fcn.14003e3d0
mov rcx, rdi
call fcn.14004ad40
xor esi, esi
jmp 0x140046684
lea rcx, str.Registry_Delete:
call fcn.14003e300
lea rdx, [rsp + 0x2a4]
lea rcx, str._____KEY___s
call fcn.14003e300
lea rdx, [rsp + 0x3a8]
lea rcx, str.___VALUE___s
call fcn.14003e300
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebp, ebp
je 0x140046696
mov r13d, esi
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x58]
call qword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
sub r12, 1
jne 0x1400464f0
add r14d, 1
cmp r14d, dword [rsp + 0x48]
jle 0x140046450
mov r12, qword [rsp + 0x4c8]
mov rbp, qword [rsp + 0x510]
mov r14, qword [rsp + 0x4c0]
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
mov eax, r13d
mov rcx, qword [rsp + 0x4b0]
xor rcx, rsp
call fcn.140048c00
add rsp, 0x4d0
pop r15
pop r13
pop rdi
pop rsi
pop rbx
ret