Function at 0x1400408f0
Capabilities:
Delete registry key

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
sub rsp, 0xb8
mov qword [rsp + 0xa0], 0xfffffffffffffffe
mov rdi, rdx
mov rbx, rcx
cmp qword [rcx + 8], 0
jne 0x140040925
xor al, al
jmp 0x140040c68
mov sil, 1
mov dword [rsp + 0xf0], esi
lea rax, vtable.RegistryKey.0
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x38]
call fcn.14002e130
nop
mov rax, qword [rbx + 8]
mov qword [rsp + 0x30], rax
xor ebp, ebp
mov qword [rsp + 0x28], rbp
mov rdx, rdi
lea rcx, [rsp + 0x38]
mov rax, qword [rsp + 0x38]
call qword [rax + reloc.WS2_32.dll_htonl]
mov r11, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x58]
sub r11, rbx
sar r11, 1
cmp r11, 1
je 0x1400409aa
lea edx, [rbp + 0x5c]
lea rcx, [rsp + 0x38]
call fcn.14002e3d0
test al, al
jne 0x1400409a5
lea rdx, [0x1400d26a4]
lea rcx, [rsp + 0x38]
call fcn.14002e5d0
mov rbx, qword [rsp + 0x58]
jmp 0x1400409aa
mov rbx, qword [rsp + 0x58]
cmp rbx, qword [rsp + 0x60]
jbe 0x1400409b6
call fcn.1400796a8
mov rax, qword [rsp + 0x40]
test rax, rax
jne 0x1400409ca
call fcn.1400796a8
mov r11, rbp
jmp 0x1400409cd
mov r11, qword [rax]
cmp rbx, qword [r11 + 0x20]
jb 0x1400409d8
call fcn.1400796a8
mov rdi, qword [rsp + 0x30]
lea r8, [rsp + 0x28]
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
je 0x140040a04
lea r8, [rsp + 0x28]
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
nop
mov qword [rsp + 0xf8], rbp
lea r8, [rsp + 0xf8]
xor edx, edx
lea rcx, [rsp + 0x20]
call fcn.140040e80
test al, al
je 0x140040bdb
mov rbp, qword [rsp + 0xf8]
test rbp, rbp
je 0x140040bd9
mov rdx, rbp
lea rcx, [rsp + 0x70]
call fcn.1400412e0
nop
mov rcx, qword [rsp + 0x90]
mov r9, qword [rsp + 0x88]
sub rcx, r9
movabs rdi, 0x4924924924924925
mov rax, rdi
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
jne 0x140040a87
call fcn.1400796a8
mov r9, qword [rsp + 0x88]
xor r8d, r8d
mov rdx, r9
lea rcx, [rsp + 0x20]
call fcn.140040e80
xor r8d, r8d
mov qword [rsp + 0xf8], r8
test rbp, rbp
je 0x140040b6f
xor esi, esi
nop dword [rax]
mov rcx, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x88]
sub rcx, rbx
mov rax, rdi
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp r8, rdx
jb 0x140040ae9
call fcn.1400796a8
mov rbx, qword [rsp + 0x88]
mov rdi, qword [rsi + rbx + 0x20]
cmp rdi, qword [rsi + rbx + 0x28]
jbe 0x140040afa
call fcn.1400796a8
mov r11, qword [rsi + rbx + 8]
test r11, r11
jne 0x140040b10
call fcn.1400796a8
xor ebx, ebx
mov r11, rbx
jmp 0x140040b15
mov r11, qword [r11]
xor ebx, ebx
cmp rdi, qword [r11 + 0x20]
jb 0x140040b20
call fcn.1400796a8
mov rdx, rdi
lea rcx, [rsp + 0x20]
call fcn.1400408f0
mov ecx, dword [rsp + 0xf0]
movzx ecx, cl
test al, al
cmove ecx, ebx
mov dword [rsp + 0xf0], ecx
mov r8, qword [rsp + 0xf8]
inc r8
mov qword [rsp + 0xf8], r8
add rsi, 0x38
cmp r8, rbp
movabs rdi, 0x4924924924924925
jb 0x140040ab0
mov esi, ecx
mov rbx, qword [rsp + 0x88]
test rbx, rbx
je 0x140040bb3
mov rdi, qword [rsp + 0x90]
cmp rbx, rdi
je 0x140040bab
nop dword [rax]
mov rax, qword [rbx]
xor edx, edx
mov rcx, rbx
call qword [rax]
add rbx, 0x38
cmp rbx, rdi
jne 0x140040b90
mov rbx, qword [rsp + 0x88]
mov rcx, rbx
call fcn.140078e60
xor ebp, ebp
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x90], rbp
mov qword [rsp + 0x98], rbp
mov rcx, qword [rsp + 0x70]
call fcn.140078e60
jmp 0x140040bde
xor ebp, ebp
xor sil, sil
mov rcx, qword [rsp + 0xe0]
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x140040c06
mov rdx, qword [rsp + 0xe8]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
sete al
test al, al
jne 0x140040c09
xor sil, sil
lea rax, vtable.RegistryKey.0
mov qword [rsp + 0x20], rax
mov rcx, qword [rsp + 0x28]
test rcx, rcx
je 0x140040c31
cmp rcx, qword [rsp + 0x30]
je 0x140040c2c
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x28], rbp
lea rax, vtable.StringStorage.0
mov qword [rsp + 0x38], rax
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140040c4c
call fcn.140078e60
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x68], rbp
mov rcx, qword [rsp + 0x40]
call fcn.140078e60
mov al, sil
add rsp, 0xb8
pop rdi
pop rsi
pop rbp
pop rbx
ret