Function at 0x140051330
Capabilities:
Delete registry key
Delete registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
lea rbp, [rsp - 0x21d8]
mov eax, 0x22d8
call fcn.1401ea950
sub rsp, rax
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov rax, qword [0x140324030]
xor rax, rsp
mov qword [rbp + 0x21c0], rax
mov dword [rsp + 0x50], r9d
mov qword [rsp + 0x48], r8
mov rsi, rdx
mov rax, rcx
mov qword [rsp + 0x40], rcx
xor ecx, ecx
mov qword [rsp + 0x58], rcx
mov dword [rsp + 0x60], ecx
mov qword [rsp + 0x68], rcx
mov ecx, dword [rbp + 0x2220]
mov dword [rsp + 0x70], ecx
mov rcx, rax
call fcn.140051170
mov ebx, eax
test eax, eax
js 0x140051adf
cmp word [rsi], 0x7d
je 0x140051adf
mov dword [rbp - 0x68], 1
lea rdx, [0x14022a600]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
xor edi, edi
test eax, eax
sete dil
lea rdx, str.ForceRemove
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1400513e9
test edi, edi
je 0x1400514c4
mov rdx, rsi
mov rcx, qword [rsp + 0x40]
call fcn.140051170
mov ebx, eax
test eax, eax
js 0x140051adf
cmp dword [rsp + 0x50], 0
je 0x1400514c4
xor eax, eax
mov qword [rsp + 0x78], rax
mov dword [rbp - 0x80], eax
mov qword [rbp - 0x78], rax
mov rcx, rsi
movzx eax, word [rsi]
test ax, ax
je 0x140051446
cmp ax, 0x5c
je 0x14005143d
call qword [sym.imp.USER32.dll_CharNextW]
mov rcx, rax
movzx eax, word [rax]
test ax, ax
jne 0x140051424
jmp 0x140051446
test rcx, rcx
jne 0x140051ab6
lea rbx, [0x14022a770]
nop dword [rax]
mov rdx, qword [rbx]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x140051496
add rbx, 8
lea rax, str.RegOpenKeyTransactedW
cmp rbx, rax
jl 0x140051450
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x78], rax
mov dword [rbp - 0x80], 0
mov qword [rbp - 0x78], 0
mov rdx, rsi
lea rcx, [rsp + 0x78]
call fcn.140050db0
test edi, edi
je 0x1400514c4
mov rdx, rsi
mov rdi, qword [rsp + 0x40]
mov rcx, rdi
call fcn.140051170
mov ebx, eax
test eax, eax
js 0x140051adf
mov rdx, rsi
mov rcx, rdi
call fcn.140050c20
jmp 0x140051788
lea rdx, str.NoRemove
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1400514f6
xor edi, edi
mov dword [rbp - 0x68], edi
mov rdx, rsi
mov rcx, qword [rsp + 0x40]
call fcn.140051170
mov ebx, eax
test eax, eax
js 0x140051adf
jmp 0x1400514f9
mov edi, dword [rbp - 0x68]
lea rdx, [0x14022a640]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x140051605
lea rdx, [rbp + reloc.mfc110u.dll_Ordinal_448]
mov rcx, qword [rsp + 0x40]
call fcn.140051170
mov ebx, eax
test eax, eax
js 0x140051adf
mov rdx, rsi
mov rcx, qword [rsp + 0x40]
call fcn.140051170
mov ebx, eax
test eax, eax
js 0x140051adf
cmp word [rsi], 0x3d
jne 0x140051ab6
cmp dword [rsp + 0x50], 0
je 0x14005158a
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x78], rax
xor eax, eax
mov dword [rbp - 0x80], eax
mov qword [rbp - 0x78], rax
mov r9, rsi
lea r8, [rbp + reloc.mfc110u.dll_Ordinal_448]
lea rdx, [rsp + 0x78]
mov rdi, qword [rsp + 0x40]
mov rcx, rdi
call fcn.140050720
mov ebx, eax
jmp 0x14005178a
cmp dword [rbp + 0x2220], 0
jne 0x1400515f3
test edi, edi
je 0x1400515f3
mov qword [rbp - 0x60], 0
lea rax, [rbp - 0x60]
mov qword [rsp + 0x20], rax
mov r9d, 0x20006
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140051ad6
mov rdi, qword [rbp - 0x60]
lea rdx, [rbp + reloc.mfc110u.dll_Ordinal_448]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, 0xfffffffd
jne 0x140051a9d
test rdi, rdi
je 0x1400515f3
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, rsi
mov rcx, qword [rsp + 0x40]
call fcn.140050c20
jmp 0x14005139a
mov rcx, rsi
movzx eax, word [rsi]
test ax, ax
je 0x140051632
cmp ax, 0x5c
je 0x140051629
call qword [sym.imp.USER32.dll_CharNextW]
mov rcx, rax
movzx eax, word [rax]
test ax, ax
jne 0x140051610
jmp 0x140051632
test rcx, rcx
jne 0x140051ab6
cmp dword [rsp + 0x50], 0
je 0x1400517e6
mov qword [rbp - 0x68], 0
mov rbx, qword [rsp + 0x68]
lea rax, [rbp - 0x68]
test rbx, rbx
je 0x140051672
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x2001f
mov r8, rsi
mov rdx, qword [rsp + 0x48]
mov rcx, rbx
call fcn.140050ce0
jmp 0x14005168e
mov qword [rsp + 0x20], rax
mov r9d, 0x2001f
xor r8d, r8d
mov rdx, rsi
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400516bd
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400516a2
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rbp - 0x68]
mov qword [rsp + 0x58], rdi
mov dword [rsp + 0x60], 0
test eax, eax
je 0x140051755
jmp 0x1400516c2
mov rdi, qword [rsp + 0x58]
mov qword [rbp - 0x68], 0
lea rax, [rbp - 0x68]
test rbx, rbx
je 0x1400516f7
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x20019
mov r8, rsi
mov rdx, qword [rsp + 0x48]
mov rcx, rbx
call fcn.140050ce0
mov rbx, qword [rsp + 0x48]
jmp 0x140051716
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, rsi
mov rbx, qword [rsp + 0x48]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14005173d
test rdi, rdi
je 0x140051728
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rbp - 0x68]
mov qword [rsp + 0x58], rdi
mov dword [rsp + 0x60], 0
test eax, eax
je 0x140051755
mov r8, rsi
mov rdx, rbx
lea rcx, [rsp + 0x58]
call fcn.140050480
test eax, eax
jne 0x140051ad6
mov rdx, rsi
mov rdi, qword [rsp + 0x40]
mov rcx, rdi
call fcn.140051170
mov ebx, eax
test eax, eax
js 0x140051adf
cmp word [rsi], 0x3d
jne 0x140051792
mov r9, rsi
xor r8d, r8d
lea rdx, [rsp + 0x58]
mov rcx, rdi
call fcn.140050720
mov ebx, eax
test eax, eax
js 0x140051adf
cmp word [rsi], 0x7b
jne 0x1400513a4
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], 0
jne 0x1400517a0
cmp rax, 1
jne 0x1400513a4
mov dword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, rsi
mov rcx, rdi
call fcn.140051330
mov ebx, eax
test eax, eax
js 0x140051adf
mov rdx, rsi
mov rcx, rdi
jmp 0x140051395
cmp dword [rbp + 0x2220], 0
jne 0x140051876
xor ebx, ebx
mov qword [rbp - 0x60], rbx
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x140051826
lea rcx, [rbp - 0x60]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0x20019
mov r8, rsi
mov rdx, qword [rsp + 0x48]
mov rcx, rax
call fcn.140050ce0
jmp 0x140051846
lea rax, [rbp - 0x60]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, rsi
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test eax, eax
jne 0x14005187b
mov edi, ebx
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x140051863
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, eax
mov rax, qword [rbp - 0x60]
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x60], ebx
test edi, edi
je 0x140051885
jmp 0x14005187b
mov edi, 2
mov dword [rbp + 0x2220], 1
or r9, 0xffffffffffffffff
mov r8, rsi
mov edx, 0x104
lea rcx, [rbp - 0x50]
call qword [sym.imp.MSVCR110.dll_wcsncpy_s]
test eax, eax
je 0x1400518c3
cmp eax, 0xc
je 0x140051acb
cmp eax, 0x16
je 0x140051ac4
cmp eax, 0x22
je 0x140051ac4
cmp eax, 0x50
jne 0x140051abd
mov rdx, rsi
mov rcx, qword [rsp + 0x40]
call fcn.140051170
mov ebx, eax
test eax, eax
js 0x140051adf
mov rdx, rsi
mov rcx, qword [rsp + 0x40]
call fcn.140050c20
mov ebx, eax
test eax, eax
js 0x140051adf
cmp word [rsi], 0x7b
jne 0x140051959
or rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp word [rsi + rax*2], 0
jne 0x140051900
cmp rax, 1
jne 0x140051959
mov eax, dword [rbp + 0x2220]
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8, qword [rsp + 0x58]
mov rdx, rsi
mov rcx, qword [rsp + 0x40]
call fcn.140051330
mov ebx, eax
test eax, eax
jns 0x140051942
cmp dword [rbp + 0x2220], 0
je 0x140051adf
mov rdx, rsi
mov rcx, qword [rsp + 0x40]
call fcn.140051170
mov ebx, eax
test eax, eax
js 0x140051adf
mov eax, dword [rsp + 0x70]
mov dword [rbp + 0x2220], eax
cmp edi, 2
je 0x1400513a4
test edi, edi
je 0x14005197d
test eax, eax
je 0x140051ad2
jmp 0x1400513a4
test eax, eax
je 0x1400519e3
mov rdx, qword [rsp + 0x58]
call fcn.140050f40
test eax, eax
je 0x1400519e3
lea rdi, [0x14022a770]
nop word [rax + rax]
mov rdx, qword [rdi]
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1400513a4
add rdi, 8
lea rax, str.RegOpenKeyTransactedW
cmp rdi, rax
jl 0x1400519a0
mov eax, dword [rbp - 0x68]
test eax, eax
je 0x1400513a4
lea rdx, [rbp - 0x50]
lea rcx, [rsp + 0x58]
call fcn.140050db0
jmp 0x1400513a4
mov rdx, qword [rsp + 0x58]
call fcn.140050f40
mov edi, eax
xor eax, eax
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140051a08
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ecx, ecx
mov qword [rsp + 0x58], rcx
mov dword [rsp + 0x60], 0
test eax, eax
jne 0x140051ad6
mov eax, dword [rbp - 0x68]
test eax, eax
je 0x1400513a4
test edi, edi
jne 0x1400513a4
cmp byte [0x140375508], dil
jne 0x140051a6f
lea rcx, str.Advapi32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140051a5f
lea rdx, str.RegDeleteKeyExW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140375500], rax
jmp 0x140051a66
mov rax, qword [0x140375500]
mov byte [0x140375508], 1
jmp 0x140051a76
mov rax, qword [0x140375500]
lea rdx, [rbp - 0x50]
mov rcx, qword [rsp + 0x48]
test rax, rax
je 0x140051a8e
xor r9d, r9d
xor r8d, r8d
call rax
jmp 0x140051a94
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x140051ad6
jmp 0x1400513a4
mov ecx, eax
call fcn.140051160
mov ebx, eax
test rdi, rdi
je 0x140051adf
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140051adf
mov ebx, 0x80020009
jmp 0x140051adf
call qword [sym.imp.mfc110u.dll_Ordinal_2290]
int3
call qword [sym.imp.mfc110u.dll_Ordinal_2290]
int3
call qword [sym.imp.mfc110u.dll_Ordinal_2292]
int3
mov ecx, edi
jmp 0x140051ad8
mov ecx, eax
call fcn.140051160
mov ebx, eax
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x140051af2
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rbp + 0x21c0]
xor rcx, rsp
call fcn.1401e3980
add rsp, 0x22d8
pop rdi
pop rsi
pop rbx
pop rbp
ret