Function at 0x140018210
Capabilities:
Delete registry key

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rdi
sub rsp, 0x4f0
mov rbx, rcx
lea rcx, [rsp + 0x70]
xor edx, edx
mov r8d, 0x104
call fcn.14007cd30
lea rcx, [rsp + 0x70]
mov rdx, rbx
sub rcx, rbx
mov qword [rsp + 0x58], rcx
nop
nop
nop
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rcx + rdx - 1], al
jne 0x140018250
mov dword [rsp + 0x518], 0x104
mov ebp, 8
mov qword [rsp + 0x4e8], rsi
nop
nop
nop
lea rcx, [rsp + 0x3d0]
xor edx, edx
mov r8d, 0x104
call fcn.14007cd30
lea rdx, str.HKEY_LOCAL_MACHINE
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x1400182ca
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018918
mov qword [rsp + 0x520], 0xffffffff80000002
jmp 0x1400183f4
lea rdx, str.HKEY_CLASSES_ROOT
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x1400182ff
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018918
mov qword [rsp + 0x520], 0xffffffff80000000
jmp 0x1400183f4
lea rdx, str.HKEY_CURRENT_USER
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x14001835c
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018918
lea rdx, [rsp + 0x528]
mov ecx, 0xf003f
call qword [sym.imp.ADVAPI32.dll_RegOpenCurrentUser]
test eax, eax
jne 0x140018918
mov rdi, qword [rsp + 0x528]
test rdi, rdi
mov qword [rsp + 0x520], rdi
je 0x140018918
jmp 0x1400183f4
lea rdx, str.HKEY_USERS
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x14001838e
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018918
mov qword [rsp + 0x520], 0xffffffff80000003
jmp 0x1400183f4
lea rdx, str.HKEY_CURRENT_CONFIG
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x1400183c0
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018918
mov qword [rsp + 0x520], 0xffffffff80000005
jmp 0x1400183f4
lea rdx, str.HKEY_DYN_DATA
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x140018918
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018918
mov qword [rsp + 0x520], 0xffffffff80000006
lea rdx, str.HKEY_LOCAL_MACHINE
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x140018420
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018492
mov rbx, 0xffffffff80000002
jmp 0x1400185bd
lea rdx, str.HKEY_CLASSES_ROOT
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x14001844c
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018492
mov rbx, 0xffffffff80000000
jmp 0x1400185bd
lea rdx, str.HKEY_CURRENT_USER
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x140018534
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018492
lea rdx, [rsp + 0x60]
mov ecx, 0xf003f
call qword [sym.imp.ADVAPI32.dll_RegOpenCurrentUser]
test eax, eax
jne 0x140018492
mov rbx, qword [rsp + 0x60]
test rbx, rbx
jne 0x1400185bd
mov eax, ebp
test eax, eax
jne 0x140018910
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x70]
repne scasb al, byte [rdi]
movzx eax, word [0x1400a59a0]
or rcx, 0xffffffffffffffff
mov word [rdi - 1], ax
xor eax, eax
lea rdi, [rsp + 0x70]
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x3d0]
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x1400184d0
lea rcx, [rsp + 0x70]
call fcn.140018210
test eax, eax
jne 0x140018a77
lea rcx, [rsp + 0x70]
xor edx, edx
mov r8d, 0x104
call fcn.14007cd30
mov rbx, qword [rsp + 0x510]
mov rcx, qword [rsp + 0x58]
mov rdx, rbx
nop
nop
nop
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rcx + rdx - 1], al
jne 0x140018520
jmp 0x140018280
lea rdx, str.HKEY_USERS
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x140018561
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018492
mov rbx, 0xffffffff80000003
jmp 0x1400185bd
lea rdx, str.HKEY_CURRENT_CONFIG
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x14001858e
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018492
mov rbx, 0xffffffff80000005
jmp 0x1400185bd
lea rdx, str.HKEY_DYN_DATA
lea rcx, [rsp + 0x70]
call fcn.14007ea64
test rax, rax
je 0x140018492
lea rcx, [rsp + 0x70]
cmp rax, rcx
jne 0x140018492
mov rbx, 0xffffffff80000006
lea rcx, [rsp + 0x2c0]
xor edx, edx
mov r8d, 0x104
call fcn.14007cd30
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x70]
lea rbp, [rsp + 0x70]
repne scasb al, byte [rdi]
not rcx
cmp byte [rcx + rbp - 2], 0x5c
jne 0x1400185f2
mov byte [rcx + rbp - 2], al
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x70]
repne scasb al, byte [rdi]
not rcx
cmp rcx, 1
jne 0x140018611
lea eax, [rcx + 3]
lea ebp, [rcx + 7]
jmp 0x140018494
lea rcx, [rsp + 0x70]
mov edx, 0x5c
call fcn.14007eac4
test rax, rax
jne 0x1400186cb
mov edx, 1
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_CLASSES_ROOT
mov ecx, 0x12
repe cmpsb byte [rsi], byte [rdi]
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_CURRENT_USER
cmove eax, edx
mov ecx, 0x12
repe cmpsb byte [rsi], byte [rdi]
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_LOCAL_MACHINE
cmove eax, edx
mov ecx, 0x13
repe cmpsb byte [rsi], byte [rdi]
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_USERS
cmove eax, edx
mov ecx, 0xb
repe cmpsb byte [rsi], byte [rdi]
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_CURRENT_CONFIG
cmove eax, edx
mov ecx, 0x14
repe cmpsb byte [rsi], byte [rdi]
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_DYN_DATA
mov ecx, 0xe
cmove eax, edx
repe cmpsb byte [rsi], byte [rdi]
je 0x1400186c1
test eax, eax
jne 0x1400186c1
mov ebp, 8
mov eax, ebp
jmp 0x140018494
mov byte [rsp + 0x2c0], 0
jmp 0x140018717
or rcx, 0xffffffffffffffff
lea rdx, [rax + 1]
xor eax, eax
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
sub rcx, 1
cmp rcx, 0x104
mov rdi, rcx
jb 0x1400186fa
mov eax, 0xb
lea ebp, [rax - 3]
jmp 0x140018494
mov r8, rcx
lea rcx, [rsp + 0x2c0]
call fcn.14007d090
mov byte [rsp + rdi + 0x2c0], 0
mov edx, 1
lea rax, [rsp + 0x50]
mov r9d, edx
lea rdx, [rsp + 0x2c0]
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x140018748
mov ebp, 8
mov eax, ebp
jmp 0x140018494
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rsp + 0x1b0]
xor edx, edx
mov r8d, 0x104
call fcn.14007cd30
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x70]
repne scasb al, byte [rdi]
not rcx
cmp byte [rcx + rbp - 2], 0x5c
jne 0x140018783
mov byte [rcx + rbp - 2], al
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x70]
repne scasb al, byte [rdi]
not rcx
cmp rcx, 1
jne 0x1400187a2
lea eax, [rcx + 3]
lea ebp, [rcx + 7]
jmp 0x140018494
lea rcx, [rsp + 0x70]
mov edx, 0x5c
call fcn.14007eac4
test rax, rax
jne 0x14001885c
mov edx, 1
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_CLASSES_ROOT
mov ecx, 0x12
repe cmpsb byte [rsi], byte [rdi]
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_CURRENT_USER
cmove eax, edx
mov ecx, 0x12
repe cmpsb byte [rsi], byte [rdi]
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_LOCAL_MACHINE
cmove eax, edx
mov ecx, 0x13
repe cmpsb byte [rsi], byte [rdi]
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_USERS
cmove eax, edx
mov ecx, 0xb
repe cmpsb byte [rsi], byte [rdi]
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_CURRENT_CONFIG
cmove eax, edx
mov ecx, 0x14
repe cmpsb byte [rsi], byte [rdi]
lea rsi, [rsp + 0x70]
lea rdi, str.HKEY_DYN_DATA
mov ecx, 0xe
cmove eax, edx
repe cmpsb byte [rsi], byte [rdi]
je 0x140018852
test eax, eax
jne 0x140018852
mov ebp, 8
mov eax, ebp
jmp 0x140018494
mov byte [rsp + 0x1b0], 0
jmp 0x1400188a8
or rcx, 0xffffffffffffffff
lea rdx, [rax + 1]
xor eax, eax
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
sub rcx, 1
cmp rcx, 0x104
mov rdi, rcx
jb 0x14001888b
mov eax, 0xb
lea ebp, [rax - 3]
jmp 0x140018494
mov r8, rcx
lea rcx, [rsp + 0x1b0]
call fcn.14007d090
mov byte [rsp + rdi + 0x1b0], 0
mov edx, 1
mov rax, qword [rsp + 0x520]
mov dword [rsp + 0x188], edx
mov dword [rsp + 0x20], edx
mov qword [rsp + 0x180], rax
lea rax, [rsp + 0x70]
lea r9, [rsp + 0x518]
mov qword [rsp + 0x190], rax
lea rax, [rsp + 0x3d0]
lea r8, [rsp + 0x180]
lea rcx, [rsp + 0x1b0]
mov ebp, 8
xor edx, edx
mov qword [rsp + 0x198], rax
mov dword [rsp + 0x18c], ebp
call fcn.140017d30
jmp 0x140018494
mov rbx, qword [rsp + 0x510]
mov rcx, rbx
call fcn.140016db0
test rax, rax
mov rsi, rax
jne 0x14001892f
mov eax, ebp
jmp 0x140018a77
lea rcx, [rsp + 0x1b0]
xor edx, edx
mov r8d, 0x104
call fcn.14007cd30
lea rcx, [rsp + 0x2c0]
xor edx, edx
mov r8d, 0x104
call fcn.14007cd30
lea r8, [rsp + 0x2c0]
lea rdx, [rsp + 0x1b0]
mov rcx, rbx
call fcn.1400171a0
test eax, eax
jne 0x140018a77
mov rcx, rbx
call fcn.140016db0
test rax, rax
mov rdi, rax
je 0x140018928
lea rcx, [rsp + 0x3d0]
xor edx, edx
mov r8d, 0x104
call fcn.14007cd30
lea rdx, [rsp + 0x3d0]
xor r8d, r8d
mov rcx, rbx
call fcn.1400171a0
test eax, eax
je 0x1400189bc
mov ebp, eax
jmp 0x140018a77
lea rax, [rsp + 0x518]
lea rdx, [rsp + 0x3d0]
mov r9d, 1
xor r8d, r8d
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140018928
mov rcx, qword [rsp + 0x518]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ecx, ecx
lea rax, [rsp + 0x510]
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], ecx
lea rdx, [rsp + 0x1b0]
mov rcx, rsi
xor r9d, r9d
xor r8d, r8d
call fcn.140016ef0
test eax, eax
jne 0x140018a60
mov rcx, qword [rsp + 0x510]
lea rdx, [rsp + 0x2c0]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
je 0x140018a67
mov rcx, qword [rsp + 0x510]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 3
jmp 0x140018a77
mov rcx, qword [rsp + 0x510]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov rsi, qword [rsp + 0x4e8]
add rsp, 0x4f0
pop rdi
pop rbp
pop rbx
ret