Function at 0x129516d0
Capabilities:
Delete registry key
Set registry value

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x4f0
mov qword [rsp + 0xc8], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x12a52ee0]
xor rax, rsp
mov qword [rsp + 0x4e0], rax
mov r12, rdx
mov r13, rcx
mov qword [rsp + 0xb0], rcx
mov qword [rsp + 0xc0], rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp qword [r13 + 0x68], 0
jne 0x12951738
mov eax, 1
jmp 0x12951daa
xor r15d, r15d
mov qword [rsp + 0x50], r15
mov rbx, r15
mov qword [rsp + 0x88], rbx
mov word [rsp + 0xe0], r15w
xor edx, edx
mov r8d, 0x3fe
lea rcx, [rsp + 0xe2]
call fcn.12959590
mov r9, qword [r12 + 8]
mov r8d, dword [r12 + 4]
lea rdx, str._.8u_s
lea rcx, [rsp + 0xe0]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rdx, [rsp + 0xe0]
mov rcx, qword [r13 + 0x68]
call qword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
mov rcx, qword [r12 + 8]
test rcx, rcx
je 0x12951d9e
lea rdx, [0x129de0a0]
call fcn.1295bec0
test rax, rax
je 0x129517d4
lea ecx, [r15 + 0x57]
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
xor ecx, ecx
call fcn.12958250
lea eax, [r15 + 0xf]
jmp 0x12951daa
mov qword [rsp + 0x40], r15
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0xe0]
mov rcx, qword [r13 + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x12951822
xor ecx, ecx
call fcn.12958250
mov eax, 2
jmp 0x12951daa
mov esi, r15d
mov dword [rsp + 0x68], r15d
nop word [rax + rax]
cmp esi, dword [r12 + 0x34]
jae 0x129519c0
mov eax, esi
lea rcx, [rax + rax*2]
mov rax, qword [r12 + 0x38]
lea r13, [rax + rcx*8]
mov qword [rsp + 0xd0], r13
lea r8, [rsp + 0x58]
mov rdx, qword [r13]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x1295188a
mov dword [rsp + 0x94], 0x10
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0x94]
call fcn.12958e1c
nop
mov rdx, qword [r13]
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
dec rcx
add ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.KeyWord
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x129518e1
mov dword [rsp + 0x74], 0x20
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0x74]
call fcn.12958e1c
lea rax, [r13 + 8]
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.Flags
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x12951930
mov dword [rsp + 0xa8], 0x30
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0xa8]
call fcn.12958e1c
mov r14d, dword [r13 + 0xc]
mov rcx, r14
call fcn.12958238
mov rdi, rax
cmp rax, rbx
je 0x1295194c
mov rcx, rbx
call fcn.12958250
mov rbx, rdi
mov qword [rsp + 0x88], rbx
mov r9d, r14d
mov r8, rdi
mov rdx, qword [r13 + 0x10]
mov rcx, qword [rsp + 0xb0]
call fcn.12951670
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], rdi
mov r9d, 3
xor r8d, r8d
lea rdx, str.Value
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x129519a9
mov rcx, rdi
call fcn.12958250
mov eax, 0x40
jmp 0x12951daa
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
inc esi
mov dword [rsp + 0x68], esi
jmp 0x12951830
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], r12
mov r9d, 4
xor r8d, r8d
lea rdx, str.Flags
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x12951a05
mov dword [rsp + 0x70], 3
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0x70]
call fcn.12958e1c
lea rax, [r12 + 4]
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.Type
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x12951a55
mov dword [rsp + 0x90], 4
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0x90]
call fcn.12958e1c
mov rdx, qword [r12 + 8]
test rdx, rdx
je 0x12951d5e
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
dec rcx
add ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.TargetName
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x12951ab6
mov dword [rsp + 0x78], 5
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0x78]
call fcn.12958e1c
mov rdx, qword [r12 + 0x10]
test rdx, rdx
je 0x12951b19
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
dec rcx
add ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.Comment
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x12951b19
mov dword [rsp + 0x98], 6
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0x98]
call fcn.12958e1c
lea rax, [r12 + 0x18]
mov dword [rsp + 0x28], 8
mov qword [rsp + 0x20], rax
mov r9d, 3
xor r8d, r8d
lea rdx, str.LastWritten
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x12951b69
mov dword [rsp + 0xa0], 7
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0xa0]
call fcn.12958e1c
lea rdi, [r12 + 0x20]
cmp dword [rdi], 0
je 0x12951c46
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rdi
mov r9d, 4
xor r8d, r8d
lea rdx, str.CredentialBlobSize
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x12951bc2
mov dword [rsp + 0x80], 8
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0x80]
call fcn.12958e1c
mov esi, dword [rdi]
mov rcx, rsi
call fcn.12958238
mov rdi, rax
cmp rax, rbx
je 0x12951bdc
mov rcx, rbx
call fcn.12958250
mov rbx, rdi
mov qword [rsp + 0x88], rbx
mov r9d, esi
mov r8, rdi
mov rdx, qword [r12 + 0x28]
mov rcx, qword [rsp + 0xb0]
call fcn.12951670
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rdi
mov r9d, 3
xor r8d, r8d
lea rdx, str.CredentialBlob
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x12951c46
mov dword [rsp + 0x9c], 9
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0x9c]
call fcn.12958e1c
lea rax, [r12 + 0x30]
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.Persist
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x12951c90
mov dword [rsp + 0x60], 0xa
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0x60]
call fcn.12958e1c
mov rdx, qword [r12 + 0x40]
test rdx, rdx
je 0x12951cf3
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
dec rcx
add ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.TargetAlias
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x12951cf3
mov dword [rsp + 0xa4], 0xb
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0xa4]
call fcn.12958e1c
mov rdx, qword [r12 + 0x48]
test rdx, rdx
je 0x12951d50
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
dec rcx
add ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.UserName
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x12951d5c
mov dword [rsp + 0x64], 0xc
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0x64]
call fcn.12958e1c
mov ecx, 0x89a
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
jmp 0x12951d85
mov dword [rsp + 0x6c], 0x10000
lea rdx, [0x12a1ae28]
lea rcx, [rsp + 0x6c]
call fcn.12958e1c
nop
mov r15d, dword [rsp + 0x58]
mov rbx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rcx, rbx
call fcn.12958250
mov eax, r15d
jmp 0x12951daa
xor ecx, ecx
call fcn.12958250
mov eax, 0x10000
mov rcx, qword [rsp + 0x4e0]
xor rcx, rsp
call fcn.12959850
lea r11, [rsp + 0x4f0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret