Function at 0x18002a714
Capabilities:
Encrypt data using rc4 via systemfunction032
Encrypt data using rc4 via systemfunction033

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r9
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, 0x120
lea rax, [rbp + 0x10]
mov rbx, r8
mov r12d, 0x10
mov qword [rbp - 0x40], rax
lea rax, [rbp - 0x4c]
lea r8, str.SecretsNL_KMCurrVal
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x68]
mov r14d, 0x2800
mov qword [rsp + 0x28], rax
mov rax, qword [rbp + 0x70]
mov rsi, r9
mov r13, rcx
mov dword [rbp - 0x78], r14d
mov dword [rbp - 0x48], r12d
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x44], r12d
call fcn.18002b2f0
test eax, eax
je 0x18002abe1
mov rdi, qword [rbp + 0x78]
test rdi, rdi
je 0x18002a7ac
mov rax, qword [rdi]
neg rax
sbb ecx, ecx
and ecx, 0x20006
jmp 0x18002a7ae
xor ecx, ecx
or ecx, 0x20019
lea rax, [rbp - 0x80]
lea r8, str.Cache
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
xor r9d, r9d
mov rcx, r13
mov rdx, rbx
call fcn.18000cb68
test eax, eax
je 0x18002abd7
test rsi, rsi
je 0x18002a86b
lea rcx, [0x18006a3b8]
call fcn.18000af2c
mov rdx, qword [rbp - 0x80]
lea rax, [rbp - 0x28]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x70]
lea r8, str.NL_IterationCount
mov qword [rsp + 0x28], rax
and qword [rsp + 0x20], 0
mov rcx, r13
call fcn.18000d0cc
test eax, eax
je 0x18002a85f
mov edx, dword [rsp + 0x70]
mov ecx, edx
mov eax, edx
and ecx, 0xfffffc00
shl eax, 0xa
cmp edx, r14d
cmova eax, ecx
lea rcx, str._NL_IterationCount_is__u___u_real_iteration_s__n
mov r8d, eax
mov r14d, eax
mov dword [rbp - 0x78], eax
call fcn.18000af2c
cmp dword [rsp + 0x70], 0
jne 0x18002a86b
lea rcx, str._DCC1_mode___n
jmp 0x18002a866
lea rcx, str._Iteration_is_set_to_default__10240__n
call fcn.18000af2c
mov rdx, qword [rbp - 0x80]
lea rax, [rbp - 0x74]
xor r9d, r9d
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x78]
xor r8d, r8d
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x70]
mov rcx, r13
mov qword [rsp + 0x40], rax
and qword [rsp + 0x30], 0
and qword [rsp + 0x28], 0
call fcn.18000cdf0
test eax, eax
je 0x18002abcb
mov eax, dword [rsp + 0x78]
mov ebx, 0x40
inc eax
mov ecx, ebx
lea edx, [rax + 1]
mov dword [rsp + 0x78], eax
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x18002abcb
mov edx, dword [rbp - 0x74]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x18002abc2
xor ecx, ecx
mov dword [rsp + 0x70], ecx
cmp dword [rbp - 0x70], ecx
jbe 0x18002abb9
mov eax, dword [rsp + 0x78]
mov rdx, qword [rbp - 0x80]
mov r8d, ecx
mov dword [rbp - 0x50], eax
mov eax, dword [rbp - 0x74]
mov r9, r15
mov dword [rsp + 0x74], eax
lea rax, [rsp + 0x74]
mov rcx, r13
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x6c]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
call fcn.18000d43c
test eax, eax
je 0x18002aba2
lea rdx, str.NL_Control
mov r8d, 0xa
mov rcx, r15
call fcn.18004f448
test eax, eax
je 0x18002aba2
lea rdx, str.NL_IterationCount
mov r8d, 0x11
mov rcx, r15
call fcn.18004f448
test eax, eax
je 0x18002aba2
test byte [rbx + 0x30], 1
je 0x18002aba2
lea rcx, str._n__s__
mov rdx, r15
call fcn.18000af2c
lea rcx, [rbx + 0x20]
call fcn.180010a24
mov edx, dword [rbx + 0x10]
lea rcx, str.__nRID_______:__08x___u__n
mov r8d, edx
call fcn.18000af2c
mov r12d, dword [rsp + 0x74]
add r12d, 0xffffffa0
test rsi, rsi
je 0x18002ac2c
mov r9, qword [rbp - 0x68]
and dword [rsp + 0x30], 0
lea rax, [rbx + 0x40]
lea rsi, [rbx + 0x60]
mov r8d, r12d
mov qword [rsp + 0x28], rax
mov rdx, rsi
call fcn.180003b24
test eax, eax
je 0x18002ab9e
mov dl, 0x32
mov rcx, rbx
call fcn.18002ae2c
movzx eax, word [rbx]
mov r8, qword [rdi + 0x30]
lea r9, [rbx + 0xa8]
mov word [rbp - 0x5e], ax
mov word [rbp - 0x60], ax
mov qword [rbp - 0x58], r9
test r8, r8
je 0x18002aa3e
mov edx, dword [rbx + 0x84]
test edx, edx
je 0x18002aa3e
mov r9d, dword [rdi + 0x38]
mov eax, r12d
lea rcx, [rbx + 0x60]
sub eax, edx
add rcx, rax
call fcn.18002aeec
mov r9, qword [rbp - 0x58]
movzx eax, word [rbp - 0x60]
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002ab9e
movzx r8d, ax
mov rdx, r9
shr r8, 1
call fcn.18004f448
test eax, eax
jne 0x18002ab9e
lea rcx, str.__User_cache_replace_mode__2___n
call fcn.18000af2c
cmp dword [rdi + 0x18], 0
je 0x18002aab0
lea rdx, [rbp - 0x60]
lea rcx, [rbp]
mov r8b, 1
call qword [sym.imp.ntdll.dll_RtlDowncaseUnicodeString]
mov ecx, eax
test eax, eax
js 0x18002aaa7
lea rax, [rbp]
mov r9d, ecx
lea rdx, [rdi + 8]
mov r8d, r14d
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.180004078
mov ecx, eax
xor eax, eax
test ecx, ecx
setns al
jmp 0x18002aac2
cmp dword [rdi + 0x2c], 0
je 0x18002aac0
movups xmm0, xmmword [rdi + 0x1c]
movdqu xmmword [rsi], xmm0
jmp 0x18002aaca
xor eax, eax
test eax, eax
je 0x18002ac1d
lea rcx, str.__MsCacheV2_:
call fcn.18000af2c
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 0x10]
call fcn.1800108cc
lea rcx, [0x18006a3b8]
call fcn.18000af2c
mov rdx, qword [rbp - 0x68]
mov eax, 0x10
mov dword [rsp + 0x30], eax
lea r14, [rbx + 0x50]
mov r9, rsi
mov r8d, eax
mov ecx, 0x8004
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r12d
call fcn.1800033c0
test eax, eax
je 0x18002ab9e
lea rcx, str.__Checksum__:
call fcn.18000af2c
xor r8d, r8d
mov rcx, r14
lea edx, [r8 + 0x10]
call fcn.1800108cc
lea rcx, [0x18006a3b8]
call fcn.18000af2c
mov r9, qword [rbp - 0x68]
lea rax, [rbx + 0x40]
mov r8d, r12d
mov rdx, rsi
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x28], rax
call fcn.180003b24
test eax, eax
je 0x18002ab9e
mov eax, dword [rsp + 0x74]
mov rdx, qword [rbp - 0x80]
mov r8, r15
mov dword [rsp + 0x30], eax
mov eax, dword [rbp - 0x6c]
mov rcx, r13
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], eax
call fcn.18000d1d0
test eax, eax
je 0x18002ac07
lea rcx, str.__OK__n
call fcn.18000af2c
mov rsi, qword [rbp + 0x68]
mov ecx, dword [rsp + 0x70]
mov r14d, dword [rbp - 0x78]
inc ecx
mov dword [rsp + 0x70], ecx
cmp ecx, dword [rbp - 0x70]
jb 0x18002a8fc
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdx, qword [rbp - 0x80]
mov rcx, r13
call fcn.18000d67c
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0x120]
mov eax, 1
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___kull_m_registry_RegSetValueEx__0x_08x__n
mov edx, eax
call fcn.18000af2c
jmp 0x18002ab9e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache______0x_08x__n
jmp 0x18002ac14
mov rax, qword [rbp - 0x40]
mov r8d, dword [rbp - 0x4c]
mov rdx, qword [rbp - 0x68]
mov r14d, 0x10
lea r9, [rbx + 0x40]
mov ecx, 0x8003
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
call fcn.1800033c0
test eax, eax
je 0x18002ae12
lea rsi, [rbx + 0x60]
lea rdx, [rbp - 0x48]
lea rcx, [rbp - 0x38]
mov dword [rbp - 0x34], r12d
mov dword [rbp - 0x38], r12d
mov qword [rbp - 0x30], rsi
call qword [sym.imp.ADVAPI32.dll_SystemFunction033]
test eax, eax
js 0x18002ae06
mov dl, 0x31
mov rcx, rbx
call fcn.18002ae2c
movzx eax, word [rbx]
lea rdx, [rbx + 0xa8]
mov word [rbp - 0x5e], ax
mov word [rbp - 0x60], ax
mov qword [rbp - 0x58], rdx
test rdi, rdi
je 0x18002ab9e
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002ab9e
movzx r8d, ax
shr r8, 1
call fcn.18004f448
test eax, eax
jne 0x18002ab9e
lea rcx, str.__User_cache_replace_mode__1___n
call fcn.18000af2c
cmp dword [rdi + 0x18], 0
je 0x18002ad16
lea rdx, [rbp - 0x60]
lea rcx, [rbp - 0x20]
mov r8b, 1
call qword [sym.imp.ntdll.dll_RtlDowncaseUnicodeString]
test eax, eax
js 0x18002ad24
lea rcx, [rbp - 0x20]
lea rdx, [rdi + 8]
mov r9d, eax
mov qword [rsp + 0x20], rcx
mov rcx, rsi
xor r8d, r8d
call fcn.180004078
jmp 0x18002ad24
cmp dword [rdi + 0x2c], 0
je 0x18002ad24
movups xmm0, xmmword [rdi + 0x1c]
movdqu xmmword [rsi], xmm0
lea rdx, [rbp - 0x60]
lea rcx, [rbp - 0x10]
mov r8b, 1
call qword [sym.imp.ntdll.dll_RtlDowncaseUnicodeString]
test eax, eax
js 0x18002ab9e
lea rcx, [rbp - 0x10]
lea rdx, [rdi + 8]
mov r9d, eax
mov qword [rsp + 0x20], rcx
mov rcx, rsi
xor r8d, r8d
call fcn.180004078
test eax, eax
js 0x18002ab9e
lea rcx, str.__MsCacheV1_:
call fcn.18000af2c
xor r8d, r8d
mov edx, r14d
mov rcx, rsi
call fcn.1800108cc
lea rcx, [0x18006a3b8]
call fcn.18000af2c
mov rdx, qword [rbp - 0x40]
mov dword [rsp + 0x30], 0x10
lea r14, [rbx + 0x50]
mov r9, rsi
mov ecx, 0x8003
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r12d
mov r12d, 0x10
mov r8d, r12d
call fcn.1800033c0
test eax, eax
je 0x18002ab9e
lea rcx, str.__Checksum__:
call fcn.18000af2c
xor r8d, r8d
mov edx, r12d
mov rcx, r14
call fcn.1800108cc
lea rcx, [0x18006a3b8]
call fcn.18000af2c
lea rdx, [rbp - 0x48]
lea rcx, [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_SystemFunction032]
test eax, eax
jns 0x18002ab6b
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptData2:_0x_08x_n
jmp 0x18002ac14
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptDecryptRC4_:_0x_08x_n
jmp 0x18002ac14
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___kull_m_crypto_hmac__0x_08x__n
mov edx, eax
call fcn.18000af2c
jmp 0x18002aba2