Function at 0x140018ea0
Capabilities:
Encrypt data using rc4 via systemfunction032
Encrypt data using rc4 via systemfunction033
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x20], r9
push rbp
push rsi
push r13
push r14
push r15
lea rbp, [rsp - 0x280]
sub rsp, 0x380
lea rax, [rbp + 0x68]
mov dword [rbp - 0x64], 0x2800
mov qword [rbp - 0x28], rax
mov r15, r8
xor eax, eax
mov dword [rbp - 0x30], 0x10
mov r14d, eax
mov dword [rsp + 0x68], eax
mov qword [rbp - 0x18], rax
lea r8, str.SecretsNL_KMCurrVal
mov qword [rbp - 0x58], rax
mov rsi, r9
mov qword [rbp - 0x50], rax
mov r13, rcx
lea rax, [rbp - 0x38]
mov dword [rbp - 0x2c], 0x10
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x20019
mov dword [rbp - 0x20], 0x10
mov dword [rbp - 0x1c], 0x10
call fcn.140020890
test eax, eax
je 0x1400199c7
mov rdx, qword [rbp - 0x38]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
xor r8d, r8d
lea rax, [rsp + 0x70]
mov qword [rsp + 0x3b0], rbx
mov rcx, r13
mov qword [rsp + 0x20], rax
call fcn.140020fd0
mov ebx, eax
cmp dword [r13], r14d
jne 0x140018f73
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x140018f73
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
je 0x1400199c0
mov qword [rsp + 0x3b8], rdi
mov rdi, qword [rsp + 0x70]
mov qword [rsp + 0x3c0], r12
test rsi, rsi
je 0x140018fec
mov edx, dword [rsp + 0x68]
xor r9d, r9d
mov r8, rsi
mov rcx, rdi
call fcn.140019ca0
test eax, eax
je 0x1400190bd
mov r12d, dword [rdi + 0x3c]
mov ecx, 0x40
mov edx, r12d
mov dword [rsp + 0x68], r12d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x1400190c8
lea rdx, [rdi + 0x4c]
mov r8d, r12d
mov rcx, rax
mov r14d, 1
call fcn.140033fa0
jmp 0x1400190c8
mov rax, qword [rbp + 0x2d0]
test rax, rax
je 0x1400190bd
mov ecx, dword [rsp + 0x68]
lea r8, [rbp - 0x58]
mov qword [rbp - 0x18], rax
lea rdx, [rbp - 0x20]
mov eax, dword [rdi]
sub rcx, rax
mov dword [rbp + 0x14], eax
add rcx, rdi
mov dword [rbp + 0x10], eax
mov qword [rbp + 0x18], rcx
lea rcx, [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_SystemFunction005]
cmp eax, 0xc0000023
jne 0x1400190bd
mov edx, dword [rbp - 0x58]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp - 0x50], rax
test rax, rax
je 0x1400190bd
mov eax, dword [rbp - 0x58]
lea r8, [rbp - 0x58]
lea rdx, [rbp - 0x20]
mov dword [rbp - 0x54], eax
lea rcx, [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_SystemFunction005]
test eax, eax
js 0x1400190a6
mov r12d, dword [rbp - 0x58]
mov ecx, 0x40
mov edx, r12d
mov dword [rsp + 0x68], r12d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x1400190b1
mov rdx, qword [rbp - 0x50]
mov r8d, r12d
mov rcx, rax
mov r14d, 1
call fcn.140033fa0
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400190c8
mov eax, dword [rbp - 0x78]
mov rbx, qword [rbp - 0x38]
mov dword [rsp + 0x68], eax
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400190c8
mov eax, dword [rbp - 0x78]
mov rbx, qword [rbp - 0x38]
mov dword [rsp + 0x68], eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r14d, r14d
je 0x140019993
mov r12, qword [rbp + 0x2d8]
test r12, r12
je 0x1400190f7
mov rax, qword [r12]
neg rax
sbb ecx, ecx
and ecx, 0x20006
jmp 0x1400190f9
xor ecx, ecx
or ecx, 0x20019
lea rax, [rbp - 0x70]
mov qword [rsp + 0x28], rax
lea r8, str.Cache
mov dword [rsp + 0x20], ecx
mov rdx, r15
mov rcx, r13
mov r14, rbx
call fcn.140020890
test eax, eax
je 0x14001998a
cmp qword [rbp + 0x2c8], 0
je 0x140019210
mov ecx, dword [r13]
test ecx, ecx
je 0x1400191b0
cmp ecx, 1
jne 0x140019210
mov rdx, qword [rbp - 0x70]
lea r8, str.NL_IterationCount
mov rcx, r13
call fcn.140020ba0
xor esi, esi
test rax, rax
setne sil
test rax, rax
je 0x1400191ee
mov r8d, dword [rax + 8]
xor esi, esi
mov edi, r8d
btr edi, 0x1f
cmp dword [rbp - 0x78], edi
setae sil
jb 0x1400191ab
lea rdx, [rax + 0xc]
test r8d, r8d
js 0x14001919e
mov rax, qword [r13 + 8]
movsxd rdx, dword [rdx]
mov rax, qword [rax + 0x10]
add rax, 4
add rdx, rax
mov r8d, edi
lea rcx, [rsp + 0x7c]
call fcn.140033fa0
mov dword [rbp - 0x78], edi
jmp 0x1400191ee
mov rcx, qword [rbp - 0x70]
lea rax, [rbp - 0x78]
mov qword [rsp + 0x28], rax
lea rdx, str.NL_IterationCount
lea rax, [rsp + 0x7c]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor esi, esi
test eax, eax
sete sil
test eax, eax
je 0x1400191ee
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x140019210
mov eax, dword [rsp + 0x7c]
cmp eax, 0x2800
jbe 0x14001920a
mov edx, eax
and edx, 0xfffffc00
mov dword [rbp - 0x64], edx
jmp 0x140019210
shl eax, 0xa
mov dword [rbp - 0x64], eax
mov ecx, dword [r13]
mov edx, 0x6b6e
test ecx, ecx
je 0x14001925b
cmp ecx, 1
jne 0x14001996d
mov rcx, qword [rbp - 0x70]
test rcx, rcx
jne 0x140019237
mov rax, qword [r13 + 8]
mov rcx, qword [rax + 0x18]
xor esi, esi
cmp word [rcx + 4], dx
mov edi, esi
sete dil
jne 0x1400192b7
mov eax, dword [rcx + 0x28]
mov dword [rbp - 0x5c], eax
mov eax, dword [rcx + 0x40]
shr eax, 1
mov dword [rbp - 0x80], eax
mov eax, dword [rcx + 0x44]
mov dword [rbp - 0x68], eax
jmp 0x1400192b7
mov rcx, qword [rbp - 0x70]
lea rax, [rbp - 0x68]
xor esi, esi
xor r9d, r9d
mov qword [rsp + 0x58], rsi
xor r8d, r8d
mov qword [rsp + 0x50], rsi
xor edx, edx
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x5c]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
mov edi, esi
sete dil
test eax, eax
je 0x1400192b7
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
je 0x14001996d
mov eax, dword [rbp - 0x80]
mov ecx, 0x40
inc eax
mov dword [rbp - 0x80], eax
lea edx, [rax + 1]
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x60], rax
mov rdi, rax
test rax, rax
je 0x14001996d
mov edx, dword [rbp - 0x68]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x140019964
cmp dword [rbp - 0x5c], 0
mov dword [rsp + 0x7c], esi
jbe 0x14001995b
mov ecx, esi
mov qword [rsp + 0x70], rbx
mov r10d, 0x6b76
nop
mov eax, dword [rbp - 0x80]
mov r14d, esi
mov edx, dword [r13]
mov dword [rbp - 0x7c], eax
mov eax, dword [rbp - 0x68]
mov dword [rsp + 0x78], eax
test edx, edx
je 0x140019629
cmp edx, 1
jne 0x14001993e
mov rax, qword [rbp - 0x70]
test rax, rax
jne 0x140019356
mov rax, qword [r13 + 8]
mov rax, qword [rax + 0x18]
mov edx, 0x6b6e
cmp word [rax + 4], dx
jne 0x14001993e
mov edx, dword [rax + 0x28]
test edx, edx
je 0x14001993e
cmp ecx, edx
jae 0x14001993e
movsxd r9, dword [rax + 0x2c]
cmp r9d, 0xffffffff
je 0x14001993e
mov rax, qword [r13 + 8]
mov edx, ecx
mov rcx, r9
add rcx, qword [rax + 0x10]
movsxd rbx, dword [rcx + rdx*4 + 4]
add rbx, qword [rax + 0x10]
cmp word [rbx + 4], r10w
jne 0x14001993e
movzx eax, word [rbx + 6]
test ax, ax
je 0x140019621
test byte [rbx + 0x14], 1
mov edi, eax
mov edx, eax
je 0x1400193d3
lea rcx, [rbx + 0x18]
inc edi
call fcn.1400071b0
mov rsi, rax
test rax, rax
je 0x14001942d
jmp 0x1400193ff
shr edi, 1
add rdx, 2
mov ecx, 0x40
inc edi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x14001942d
movzx r8d, word [rbx + 6]
lea rdx, [rbx + 0x18]
mov rcx, rax
call fcn.140033fa0
xor r14d, r14d
cmp dword [rbp - 0x7c], edi
setae r14b
jb 0x140019424
mov rcx, qword [rsp + 0x60]
mov rdx, rsi
mov r8d, edi
add r8, r8
call fcn.140033fa0
lea eax, [rdi - 1]
mov dword [rbp - 0x7c], eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r14d, r14d
je 0x140019477
mov edi, dword [rbx + 8]
xor r14d, r14d
mov eax, dword [rbx + 0x10]
btr edi, 0x1f
cmp dword [rsp + 0x78], edi
mov dword [rbp - 0x60], eax
setae r14b
jb 0x140019473
cmp dword [rbx + 8], 0
lea rdx, [rbx + 0xc]
jl 0x140019468
mov rax, qword [r13 + 8]
movsxd rdx, dword [rdx]
mov rax, qword [rax + 0x10]
add rax, 4
add rdx, rax
mov r8d, edi
mov rcx, r15
call fcn.140033fa0
mov dword [rsp + 0x78], edi
mov rdi, qword [rsp + 0x60]
test r14d, r14d
je 0x140019938
mov r8d, 0xa
lea rdx, str.NL_Control
mov rcx, rdi
call fcn.140045ca8
test eax, eax
je 0x14001992b
mov r8d, 0x11
lea rdx, str.NL_IterationCount
mov rcx, rdi
call fcn.140045ca8
test eax, eax
je 0x140019938
test byte [r15 + 0x30], 1
je 0x140019938
lea rcx, [r15 + 0x20]
test rcx, rcx
je 0x140019547
lea rdx, [rbp + 0x50]
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x140019547
lea rdx, [rbp + 0x58]
lea rcx, [rbp + 0x50]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x140019547
lea rax, [rbp + 0x80]
mov dword [rsp + 0x28], 0xff
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x58]
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_GetDateFormatW]
test eax, eax
je 0x140019547
lea rax, [rbp + 0x80]
mov dword [rsp + 0x28], 0xff
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x58]
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_GetTimeFormatW]
mov esi, dword [rsp + 0x78]
lea rdi, [r15 + 0x40]
mov r14, qword [rsp + 0x70]
add esi, 0xffffffa0
cmp qword [rbp + 0x2c8], 0
je 0x14001970e
mov dword [rsp + 0x30], 0
lea rdx, [r15 + 0x60]
mov r9, r14
mov qword [rsp + 0x28], rdi
mov r8d, esi
call fcn.14000a870
test eax, eax
je 0x140019611
movzx eax, word [r15]
lea r9, [r15 + 0xa8]
mov r8, qword [r12 + 0x30]
mov word [rbp - 0x46], ax
mov word [rbp - 0x48], ax
mov qword [rbp - 0x40], r9
test r8, r8
je 0x1400195d2
mov edx, dword [r15 + 0x84]
test edx, edx
je 0x1400195d2
mov r9d, dword [r12 + 0x38]
mov ecx, esi
sub ecx, edx
add rcx, 0x60
add rcx, r15
call fcn.1400199e0
mov r9, qword [rbp - 0x40]
movzx eax, word [rbp - 0x48]
mov rcx, qword [r12]
test rcx, rcx
je 0x140019611
movzx r8d, ax
mov rdx, r9
shr r8, 1
call fcn.140045ca8
test eax, eax
jne 0x140019611
cmp dword [r12 + 0x18], eax
je 0x140019674
mov r9d, dword [rbp - 0x64]
lea rdx, [r12 + 8]
lea r8, [rbp - 0x48]
lea rcx, [r15 + 0x60]
call fcn.14000a9b0
not eax
test eax, eax
js 0x140019687
mov rdi, qword [rsp + 0x60]
mov r10d, 0x6b76
jmp 0x140019943
mov dword [rbp - 0x7c], esi
jmp 0x14001993e
lea rax, [rsp + 0x78]
mov edx, ecx
mov rcx, qword [rbp - 0x70]
lea r9, [rbp - 0x7c]
mov qword [rsp + 0x38], rax
mov r8, rdi
lea rax, [rbp - 0x60]
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
sete r14b
test eax, eax
je 0x14001947c
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14001947c
cmp dword [r12 + 0x2c], 0
je 0x140019611
movups xmm0, xmmword [r12 + 0x1c]
movups xmmword [r15 + 0x60], xmm0
lea rax, [r15 + 0x50]
mov dword [rsp + 0x30], 0x10
mov qword [rsp + 0x28], rax
lea r9, [r15 + 0x60]
mov r8d, 0x10
mov dword [rsp + 0x20], esi
mov rdx, r14
mov ecx, 0x8004
call fcn.140009ff0
test eax, eax
je 0x140019611
mov dword [rsp + 0x30], 1
lea rdx, [r15 + 0x60]
mov r9, r14
mov qword [rsp + 0x28], rdi
mov r8d, esi
call fcn.14000a870
mov rdi, qword [rsp + 0x60]
test eax, eax
je 0x140019703
mov eax, dword [rsp + 0x78]
mov r8, rdi
mov rdx, qword [rbp - 0x70]
mov rcx, r13
mov dword [rsp + 0x30], eax
mov eax, dword [rbp - 0x60]
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], eax
call fcn.140020d30
mov r10d, 0x6b76
jmp 0x140019943
mov rax, qword [rbp - 0x28]
mov r9, rdi
mov r8d, dword [rsp + 0x68]
mov rdx, r14
mov dword [rsp + 0x30], 0x10
mov ecx, 0x8003
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x10
call fcn.140009ff0
test eax, eax
je 0x14001991e
lea rdi, [r15 + 0x60]
mov dword [rbp + 0x44], esi
lea rdx, [rbp - 0x30]
mov qword [rbp + 0x48], rdi
lea rcx, [rbp + 0x40]
mov dword [rbp + 0x40], esi
call qword [sym.imp.ADVAPI32.dll_SystemFunction033]
test eax, eax
js 0x140019611
movzx eax, word [r15]
lea rdx, [r15 + 0xa8]
mov word [rbp - 0x46], ax
mov word [rbp - 0x48], ax
mov qword [rbp - 0x40], rdx
test r12, r12
je 0x140019611
mov rcx, qword [r12]
test rcx, rcx
je 0x140019611
mov r8d, eax
shr r8, 1
call fcn.140045ca8
test eax, eax
jne 0x140019611
cmp dword [r12 + 0x18], eax
je 0x14001982d
mov r8b, 1
lea rdx, [rbp - 0x48]
lea rcx, [rbp + 0x20]
call qword [sym.imp.ntdll.dll_RtlDowncaseUnicodeString]
test eax, eax
js 0x14001983e
movzx eax, word [rbp + 0x20]
mov ecx, 0x40
add ax, 0x10
movzx edx, ax
mov word [rbp - 0xe], dx
mov word [rbp - 0x10], dx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp - 8], rax
test rax, rax
je 0x140019821
movups xmm0, xmmword [r12 + 8]
movups xmmword [rax], xmm0
mov rcx, qword [rbp - 8]
movzx r8d, word [rbp + 0x20]
add rcx, 0x10
mov rdx, qword [rbp + 0x28]
call fcn.140033fa0
mov rdx, rdi
lea rcx, [rbp - 0x10]
call qword [sym.imp.ADVAPI32.dll_SystemFunction007]
mov rcx, qword [rbp - 8]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rcx, [rbp + 0x20]
call qword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
jmp 0x14001983e
cmp dword [r12 + 0x2c], 0
je 0x14001983e
movups xmm0, xmmword [r12 + 0x1c]
movups xmmword [rdi], xmm0
mov r8b, 1
lea rdx, [rbp - 0x48]
lea rcx, [rbp + 0x30]
call qword [sym.imp.ntdll.dll_RtlDowncaseUnicodeString]
mov ebx, eax
test eax, eax
js 0x140019611
movzx ecx, word [rbp + 0x30]
add cx, 0x10
movzx edx, cx
mov ecx, 0x40
mov word [rbp + 2], dx
mov word [rbp], dx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp + 8], rax
test rax, rax
je 0x1400198b8
movups xmm0, xmmword [r12 + 8]
movups xmmword [rax], xmm0
mov rcx, qword [rbp + 8]
movzx r8d, word [rbp + 0x30]
add rcx, 0x10
mov rdx, qword [rbp + 0x38]
call fcn.140033fa0
mov rdx, rdi
lea rcx, [rbp]
call qword [sym.imp.ADVAPI32.dll_SystemFunction007]
mov rcx, qword [rbp + 8]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rcx, [rbp + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
test ebx, ebx
js 0x140019611
mov rdx, qword [rbp - 0x28]
lea rax, [r15 + 0x50]
mov dword [rsp + 0x30], 0x10
mov r9, rdi
mov qword [rsp + 0x28], rax
mov r8d, 0x10
mov ecx, 0x8003
mov dword [rsp + 0x20], esi
call fcn.140009ff0
test eax, eax
je 0x140019611
lea rdx, [rbp - 0x30]
lea rcx, [rbp + 0x40]
call qword [sym.imp.ADVAPI32.dll_SystemFunction032]
mov rdi, qword [rsp + 0x60]
test eax, eax
js 0x140019703
jmp 0x1400196e0
mov rdi, qword [rsp + 0x60]
mov r10d, 0x6b76
jmp 0x140019943
mov r14, qword [rsp + 0x70]
mov r10d, 0x6b76
jmp 0x140019943
mov r10d, 0x6b76
mov r14, qword [rsp + 0x70]
mov ecx, dword [rsp + 0x7c]
mov esi, 0
inc ecx
mov dword [rsp + 0x7c], ecx
cmp ecx, dword [rbp - 0x5c]
jb 0x140019320
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [r13], 0
jne 0x14001998a
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x14001998a
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r12, qword [rsp + 0x3c0]
mov eax, 1
mov rdi, qword [rsp + 0x3b8]
mov rbx, qword [rsp + 0x3b0]
add rsp, 0x380
pop r15
pop r14
pop r13
pop rsi
pop rbp
ret
mov eax, 1
jmp 0x1400199a8
mov eax, 1
add rsp, 0x380
pop r15
pop r14
pop r13
pop rsi
pop rbp
ret