Function at 0x180058a40
Capabilities:
Set registry value

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x21a0
call fcn.1800cd460
sub rsp, rax
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov rax, qword [0x1801c3938]
xor rax, rsp
mov qword [rsp + 0x2190], rax
mov r15, r8
mov qword [rsp + 0x50], r8
mov r14, rdx
mov qword [rsp + 0x48], rdx
mov r12, rcx
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x68], r9
xor esi, esi
mov word [rsp + 0x30], si
lea rdx, [rsp + 0x190]
call fcn.180058890
test eax, eax
js 0x180058ebb
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x190]
call fcn.180058690
test eax, eax
jne 0x180058ae0
mov eax, 0x80020009
jmp 0x180058ebb
mov rcx, qword [r12]
movzx eax, word [rcx]
cmp eax, 9
jl 0x180058b07
cmp eax, 0xa
jle 0x180058afb
cmp eax, 0xd
je 0x180058afb
cmp eax, 0x20
jne 0x180058b07
call qword [sym.imp.USER32.dll_CharNextW]
mov qword [r12], rax
jmp 0x180058ae0
lea rdx, [rsp + 0x190]
mov rcx, r12
call fcn.180058890
test eax, eax
js 0x180058ebb
movzx eax, word [rsp + 0x30]
cmp eax, 8
je 0x180058e60
cmp eax, 0x11
je 0x180058cbf
cmp eax, 0x13
je 0x180058c6a
cmp eax, 0x4008
jne 0x180058ea7
lea rcx, [rsp + 0x190]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 2
mov qword [rsp + 0x80], rsi
movsxd rcx, eax
test eax, eax
je 0x180058b9f
xor edx, edx
or rax, 0xffffffffffffffff
div rcx
cmp rax, 2
jb 0x180058b95
lea rdx, [rcx + rcx]
cmp rdx, 0x100
jbe 0x180058b9f
lea rcx, [rsp + 0x80]
call fcn.18005fe20
jmp 0x180058baf
mov ecx, 0x80070216
call fcn.180040c70
lea rax, [rsp + 0x88]
mov qword [rsp + 0x80], rax
jmp 0x180058bc2
mov rbx, qword [rsp + 0x80]
test rbx, rbx
je 0x180058c3d
lea rdi, [rsp + 0x190]
cmp word [rsp + 0x190], 0
je 0x180058c20
mov rcx, rdi
call qword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [rdi]
cmp cx, 0x5c
jne 0x180058c0f
cmp word [rax], 0x30
jne 0x180058c0f
mov word [rbx], si
add rbx, 2
mov rcx, rax
call qword [sym.imp.USER32.dll_CharNextW]
mov rdi, rax
jmp 0x180058c1a
mov word [rbx], cx
add rbx, 2
add rdi, 2
cmp word [rdi], 0
jne 0x180058be2
mov dword [rbx], 0
mov r8, qword [rsp + 0x80]
mov rdx, r15
mov rcx, r14
call fcn.180057dd0
mov ebx, eax
jmp 0x180058c42
mov ebx, SafeArrayDestroy
lea rax, [rsp + 0x88]
cmp qword [rsp + 0x80], rax
je 0x180058e9a
lea rcx, [rsp + 0x80]
call fcn.18005f2f0
jmp 0x180058e9a
mov qword [rsp + 0x48], rsi
lea r9, [rsp + 0x30]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x190]
call qword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov r11d, dword [rsp + 0x30]
mov dword [rsp + 0x38], r11d
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rdx, r15
mov rcx, qword [r14]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
jmp 0x180058e9a
lea rcx, [rsp + 0x190]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
mov dword [rsp + 0x38], eax
test al, 1
jne 0x180058d92
cdq
sub eax, edx
sar eax, 1
movsxd r13, eax
mov dword [rsp + 0x30], r13d
mov qword [rsp + 0x80], rsi
mov rcx, r13
test eax, eax
jne 0x180058cfc
mov rcx, rsi
jmp 0x180058d15
xor edx, edx
or rax, 0xffffffffffffffff
div rcx
cmp rax, 1
jae 0x180058d15
mov ecx, 0x80070216
call fcn.180040c70
cmp rcx, 0x100
jbe 0x180058d30
mov rdx, rcx
lea rcx, [rsp + 0x80]
call fcn.18005fe20
jmp 0x180058d40
lea rax, [rsp + 0x88]
mov qword [rsp + 0x80], rax
jmp 0x180058d66
mov rcx, qword [rsp + 0x80]
test rcx, rcx
jne 0x180058d9c
lea rax, [rsp + 0x88]
cmp qword [rsp + 0x80], rax
je 0x180058d92
lea rcx, [rsp + 0x80]
call fcn.18005f2f0
mov eax, 0x80004005
jmp 0x180058ebb
movsxd r8, r13d
xor edx, edx
call fcn.1800c7520
mov r14d, esi
mov r15, rsi
movsxd rax, ebx
test ebx, ebx
jle 0x180058e0f
mov r13, rax
nop word [rax + rax]
mov eax, r14d
cdq
sub eax, edx
sar eax, 1
movsxd rdi, eax
mov rbx, qword [rsp + 0x80]
movzx ecx, word [rsp + r15*2 + 0x190]
call fcn.180058790
movzx r11d, al
mov ecx, r14d
and ecx, 1
shl ecx, 2
mov eax, 4
sub eax, ecx
movzx ecx, al
shl r11b, cl
or byte [rdi + rbx], r11b
inc r14d
inc r15
cmp r15, r13
jl 0x180058dc0
mov r13d, dword [rsp + 0x30]
mov dword [rsp + 0x28], r13d
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x20], rax
mov r9d, 3
xor r8d, r8d
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
mov rcx, qword [rcx]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
lea rax, [rsp + 0x88]
cmp qword [rsp + 0x80], rax
je 0x180058e9a
lea rcx, [rsp + 0x80]
call fcn.18005f2f0
jmp 0x180058e9a
lea rcx, [rsp + 0x190]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [rax + rax + 2]
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x190]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
mov rdx, r15
mov rcx, qword [r14]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test ebx, ebx
je 0x180058ea7
mov ecx, ebx
call fcn.180057aa0
jmp 0x180058ebb
mov rdx, qword [rsp + 0x68]
mov rcx, r12
call fcn.180058890
test eax, eax
cmovs esi, eax
mov eax, esi
mov rcx, qword [rsp + 0x2190]
xor rcx, rsp
call fcn.1800be9b0
add rsp, 0x21a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret