Function at 0x1800218d0
Capabilities:
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push rbp
push r12
push r13
push r15
lea rbp, [rsp - 0x88]
sub rsp, 0x188
mov rax, qword [0x1800680c0]
xor rax, rsp
mov qword [rbp + 0x70], rax
xor r12d, r12d
lea r9, [0x18006b480]
mov r13d, 0xffffffff
mov dword [rsp + 0x30], r12d
lea r8, str.SYSTEMCurrentControlSetServices_s
mov dword [rsp + 0x50], r12d
mov edx, 0x104
lea rcx, [rsp + 0x60]
mov r15d, r13d
call fcn.180021e70
lea rax, [rsp + 0x40]
mov r9d, 3
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x60]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x180021de2
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x54]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x1b0], rbx
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x18005e218]
mov dword [rsp + 0x54], 4
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, qword [rsp + 0x40]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x180021dda
lea rax, [rsp + 0x40]
mov r9d, 3
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetControlGroupOrderList
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x180021dda
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x54]
xor r8d, r8d
mov qword [rsp + 0x20], r12
lea rdx, str.PNP_TDI
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x180021a14
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x180021dda
mov ecx, dword [rsp + 0x34]
add rcx, 4
mov qword [rsp + 0x180], r14
call fcn.180030000
mov rcx, qword [rsp + 0x40]
mov r14, rax
test rax, rax
jne 0x180021a41
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x180021dd2
lea rax, [rsp + 0x34]
xor r8d, r8d
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x54]
lea rdx, str.PNP_TDI
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, qword [rsp + 0x40]
test eax, eax
je 0x180021a81
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, r14
call fcn.180029a20
jmp 0x180021dd2
mov qword [rsp + 0x1b8], rsi
mov qword [rsp + 0x1c0], rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [rsp + 0x34]
mov ecx, dword [rsp + 0x30]
shr esi, 2
test ecx, ecx
jne 0x180021b50
cmp esi, 1
jbe 0x180021ace
lea rdx, [r14 + 4]
lea r8d, [rsi - 1]
mov eax, dword [rdx]
cmp eax, ecx
jb 0x180021ac4
lea ecx, [rax + 1]
mov dword [rsp + 0x30], ecx
add rdx, 4
sub r8, 1
jne 0x180021ab7
lea r9, [0x18006b480]
mov edx, 0x104
lea r8, str.SYSTEMCurrentControlSetServices_s
lea rcx, [rsp + 0x60]
call fcn.180021e70
lea rax, [rsp + 0x58]
mov r9d, 3
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x60]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x180021b4c
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x30]
mov dword [rsp + 0x28], 4
lea rdx, [0x18005e218]
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [rsp + 0x30]
mov edi, 1
mov eax, edi
cmp esi, eax
jbe 0x180021b73
lea rdx, [r14 + 4]
nop
cmp dword [rdx], ecx
je 0x180021b70
inc eax
add rdx, 4
cmp eax, esi
jb 0x180021b60
jmp 0x180021b73
mov r13d, eax
lea r9, [0x18005e250]
mov edx, 0x104
lea r8, str.SYSTEMCurrentControlSetServices_s
lea rcx, [rsp + 0x60]
call fcn.180021e70
lea rax, [rsp + 0x48]
mov r9d, 3
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x60]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x180021c04
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x58]
lea rax, [rsp + 0x50]
mov dword [rsp + 0x38], 4
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x18005e218]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, qword [rsp + 0x48]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x180021c8b
lea r9, str.Tcpip
mov edx, 0x104
lea r8, str.SYSTEMCurrentControlSetServices_s
lea rcx, [rsp + 0x60]
call fcn.180021e70
lea rax, [rsp + 0x48]
mov r9d, 3
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x60]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x180021c8b
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x58]
lea rax, [rsp + 0x50]
mov dword [rsp + 0x38], 4
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x18005e218]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [rsp + 0x50]
test ecx, ecx
je 0x180021cb3
cmp esi, edi
jbe 0x180021cb3
lea rax, [r14 + 4]
nop dword [rax + rax]
cmp dword [rax], ecx
je 0x180021cb0
inc edi
add rax, 4
cmp edi, esi
jb 0x180021ca0
jmp 0x180021cb3
mov r15d, edi
mov rdi, qword [rsp + 0x1c0]
cmp r13d, 0xffffffff
je 0x180021d0b
cmp r15d, 0xffffffff
je 0x180021d4f
cmp r15d, r13d
jae 0x180021dc2
sub r13d, r15d
cmp r13d, 1
jbe 0x180021dc2
mov eax, r15d
lea r8d, [r13 - 1]
shl r8, 2
lea rcx, [r14 + rax*4]
lea rdx, [rcx + 4]
add rcx, 8
call fcn.18004bc10
mov eax, dword [rsp + 0x30]
lea ecx, [r15 + 1]
mov dword [r14 + rcx*4], eax
jmp 0x180021d4f
cmp r15d, 0xffffffff
je 0x180021d42
mov eax, r15d
lea rdx, [r14 + 4]
sub esi, r15d
lea rdx, [rdx + rax*4]
add rax, 2
lea r8d, [rsi - 1]
shl r8, 2
lea rcx, [r14 + rax*4]
call fcn.18004bc10
mov eax, dword [rsp + 0x30]
lea ecx, [r15 + 1]
mov dword [r14 + rcx*4], eax
jmp 0x180021d4a
mov eax, dword [rsp + 0x30]
mov dword [r14 + rsi*4], eax
add dword [rsp + 0x34], 4
lea rax, [rsp + 0x48]
mov r9d, 3
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetControlGroupOrderList
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x180021dc2
mov ecx, dword [rsp + 0x34]
lea rdx, str.PNP_TDI
shr ecx, 2
mov r9d, 3
dec ecx
cmp dword [rsp + 0x34], 4
cmova r12d, ecx
mov rcx, qword [rsp + 0x48]
mov dword [r14], r12d
xor r8d, r8d
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, r14
call fcn.180029a20
mov rsi, qword [rsp + 0x1b8]
mov r14, qword [rsp + 0x180]
mov rbx, qword [rsp + 0x1b0]
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.180023640
add rsp, 0x188
pop r15
pop r13
pop r12
pop rbp
ret