Function at 0x14009c038
Capabilities:
Encrypt data using rc4 via systemfunction032

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], r9
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x120
lea rax, [r11 - 0x38]
mov dword [rsp + 0xb8], Ordinal_26
mov dword [rsp + 0xbc], Ordinal_26
mov qword [r11 - 0x88], rax
lea rax, [r11 - 0x94]
mov rbx, r8
mov qword [rsp + 0x30], rax
lea rax, [r11 - 0xb0]
lea r8, str.SecretsNL_KMCurrVal
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x170]
mov esi, 0x2800
mov rbp, r9
mov r15, rcx
mov dword [rsp + 0x88], esi
mov qword [rsp + 0x20], rax
call fcn.14009cd50
test eax, eax
je 0x14009c5e5
mov rdi, qword [rsp + 0x178]
test rdi, rdi
je 0x14009c0e7
mov rax, qword [rdi]
neg rax
sbb ecx, ecx
and ecx, 0x20006
jmp 0x14009c0e9
xor ecx, ecx
or ecx, 0x20019
lea rax, [rsp + 0x80]
lea r8, str.Cache
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
xor r9d, r9d
mov rcx, r15
mov rdx, rbx
call fcn.14000cf64
test eax, eax
je 0x14009c5d7
test rbp, rbp
je 0x14009c1b7
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000a838
mov rdx, qword [rsp + 0x80]
lea r11, [rsp + 0xd8]
mov qword [rsp + 0x30], r11
lea rax, [rsp + 0x70]
lea r8, str.NL_IterationCount
mov qword [rsp + 0x28], rax
and qword [rsp + 0x20], 0
xor r9d, r9d
mov rcx, r15
call fcn.14000d4ec
test eax, eax
je 0x14009c1ab
mov edx, dword [rsp + 0x70]
mov ecx, edx
mov eax, edx
and ecx, 0xfffffc00
shl eax, 0xa
cmp edx, esi
cmova eax, ecx
lea rcx, str._NL_IterationCount_is__u___u_real_iteration_s__n
mov r8d, eax
mov esi, eax
mov dword [rsp + 0x88], eax
call fcn.14000a838
cmp dword [rsp + 0x70], 0
jne 0x14009c1b7
lea rcx, str._DCC1_mode___n
jmp 0x14009c1b2
lea rcx, str._Iteration_is_set_to_default__10240__n
call fcn.14000a838
and qword [rsp + 0x60], 0
and qword [rsp + 0x58], 0
mov rdx, qword [rsp + 0x80]
lea rax, [rsp + 0x8c]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x78]
mov rcx, r15
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x40], rax
and qword [rsp + 0x38], 0
and qword [rsp + 0x30], 0
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
call fcn.14000d1f8
test eax, eax
je 0x14009c5c7
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 r12, rax
test rax, rax
je 0x14009c5c7
mov edx, dword [rsp + 0x8c]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x14009c5be
xor ecx, ecx
mov dword [rsp + 0x70], ecx
cmp dword [rsp + 0x90], ecx
jbe 0x14009c5b5
mov eax, dword [rsp + 0x78]
mov rdx, qword [rsp + 0x80]
mov r8d, ecx
mov dword [rsp + 0xb0], eax
mov eax, dword [rsp + 0x8c]
mov r9, r12
mov dword [rsp + 0x74], eax
lea rax, [rsp + 0x74]
mov rcx, r15
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x94]
mov qword [rsp + 0x30], rax
and qword [rsp + 0x28], 0
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x20], rax
call fcn.14000d860
test eax, eax
je 0x14009c597
lea rdx, str.NL_Control
mov r8d, 0xa
mov rcx, r12
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14009c597
lea rdx, str.NL_IterationCount
mov r8d, 0x11
mov rcx, r12
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14009c597
test byte [rbx + 0x30], 1
je 0x14009c597
lea rcx, str._n__s__
mov rdx, r12
call fcn.14000a838
lea rcx, [rbx + 0x20]
call fcn.140011404
mov edx, dword [rbx + 0x10]
lea rcx, str.__nRID_______:__08x___u__n
mov r8d, edx
call fcn.14000a838
mov r11d, dword [rsp + 0x74]
lea r14d, [r11 - 0x60]
test rbp, rbp
je 0x14009c633
and dword [rsp + 0x30], 0
mov r9, qword [rsp + 0x98]
lea r13, [rbx + 0x40]
lea rdx, [rbx + 0x60]
mov r8d, r14d
mov ecx, 0x660e
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], 0x10
call fcn.140004624
test eax, eax
je 0x14009c58f
mov dl, 0x32
mov rcx, rbx
call fcn.14009c880
movzx r11d, word [rbx]
mov r8, qword [rdi + 0x30]
lea rax, [rbx + 0xa8]
mov word [rsp + 0xa2], r11w
mov word [rsp + 0xa0], r11w
mov qword [rsp + 0xa8], rax
test r8, r8
je 0x14009c3f6
mov edx, dword [rbx + 0x84]
test edx, edx
je 0x14009c3f6
mov r9d, dword [rdi + 0x38]
mov eax, r14d
sub eax, edx
lea rcx, [rax + rbx + 0x60]
call fcn.14009c93c
mov rax, qword [rsp + 0xa8]
mov r11w, word [rsp + 0xa0]
mov rcx, qword [rdi]
test rcx, rcx
je 0x14009c58f
movzx r8d, r11w
mov rdx, rax
shr r8, 1
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x14009c58f
lea rcx, str.__User_cache_replace_mode__2___n
call fcn.14000a838
cmp dword [rdi + 0x18], 0
je 0x14009c478
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x100]
mov r8b, 1
call sub.ntdll.dll_RtlDowncaseUnicodeString
mov r11d, eax
test eax, eax
js 0x14009c46e
lea rax, [rsp + 0x100]
lea rdx, [rdi + 8]
lea rcx, [rbx + 0x60]
mov r9d, r11d
mov r8d, esi
mov qword [rsp + 0x20], rax
call fcn.140004b98
mov r11d, eax
xor eax, eax
test r11d, r11d
setns al
jmp 0x14009c48c
cmp dword [rdi + 0x2c], 0
je 0x14009c48a
movdqu xmm0, xmmword [rdi + 0x1c]
movdqu xmmword [rbx + 0x60], xmm0
jmp 0x14009c494
xor eax, eax
test eax, eax
je 0x14009c624
lea rcx, str.__MsCacheV2_:
call fcn.14000a838
xor r8d, r8d
lea rcx, [rbx + 0x60]
lea edx, [r8 + 0x10]
call fcn.1400112ac
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000a838
mov rdx, qword [rsp + 0x98]
mov eax, 0x10
mov dword [rsp + 0x30], eax
lea rsi, [rbx + 0x50]
lea r9, [rbx + 0x60]
mov r8d, eax
mov ecx, 0x8004
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], r14d
call fcn.140003e18
test eax, eax
je 0x14009c58f
lea rcx, str.__Checksum__:
call fcn.14000a838
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 0x10]
call fcn.1400112ac
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000a838
mov r9, qword [rsp + 0x98]
mov dword [rsp + 0x30], 1
lea rdx, [rbx + 0x60]
mov r8d, r14d
mov ecx, 0x660e
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], 0x10
call fcn.140004624
test eax, eax
je 0x14009c58f
mov eax, dword [rsp + 0x74]
mov rdx, qword [rsp + 0x80]
xor r9d, r9d
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x94]
mov r8, r12
mov rcx, r15
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], eax
call fcn.14000d5e8
test eax, eax
je 0x14009c60b
lea rcx, str.__OK__n
call fcn.14000a838
mov rbp, qword [rsp + 0x168]
mov ecx, dword [rsp + 0x70]
mov esi, dword [rsp + 0x88]
inc ecx
mov dword [rsp + 0x70], ecx
cmp ecx, dword [rsp + 0x90]
jb 0x14009c274
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdx, qword [rsp + 0x80]
mov rcx, r15
call fcn.14000daa8
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0x120]
mov eax, 1
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
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.14000a838
jmp 0x14009c58f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache______0x_08x__n
jmp 0x14009c618
mov rax, qword [rsp + 0xc0]
mov r8d, dword [rsp + 0xb4]
mov rdx, qword [rsp + 0x98]
mov dword [rsp + 0x30], 0x10
mov qword [rsp + 0x28], rax
lea r9, [rbx + 0x40]
mov ecx, 0x8003
mov dword [rsp + 0x20], 0x10
call fcn.140003e18
test eax, eax
je 0x14009c870
lea rsi, [rbx + 0x60]
lea rdx, [rsp + 0xb8]
lea rcx, [rsp + 0xc8]
mov dword [rsp + 0xcc], r14d
mov dword [rsp + 0xc8], r14d
mov qword [rsp + 0xd0], rsi
call sub.ADVAPI32.dll_SystemFunction032
test eax, eax
js 0x14009c85d
mov dl, 0x31
mov rcx, rbx
call fcn.14009c880
movzx r11d, word [rbx]
lea rdx, [rbx + 0xa8]
mov word [rsp + 0xa2], r11w
mov word [rsp + 0xa0], r11w
mov qword [rsp + 0xa8], rdx
test rdi, rdi
je 0x14009c597
mov rcx, qword [rdi]
test rcx, rcx
je 0x14009c597
movzx r8d, r11w
shr r8, 1
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x14009c597
lea rcx, str.__User_cache_replace_mode__1___n
call fcn.14000a838
cmp dword [rdi + 0x18], 0
je 0x14009c757
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0xe0]
mov r8b, 1
call sub.ntdll.dll_RtlDowncaseUnicodeString
test eax, eax
js 0x14009c766
lea rcx, [rsp + 0xe0]
lea rdx, [rdi + 8]
mov r9d, eax
mov qword [rsp + 0x20], rcx
mov rcx, rsi
xor r8d, r8d
call fcn.140004b98
jmp 0x14009c766
cmp dword [rdi + 0x2c], 0
je 0x14009c766
movdqu xmm0, xmmword [rdi + 0x1c]
movdqu xmmword [rsi], xmm0
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0xf0]
mov r8b, 1
call sub.ntdll.dll_RtlDowncaseUnicodeString
test eax, eax
js 0x14009c597
lea rcx, [rsp + 0xf0]
lea rdx, [rdi + 8]
mov r9d, eax
mov qword [rsp + 0x20], rcx
mov rcx, rsi
xor r8d, r8d
call fcn.140004b98
test eax, eax
js 0x14009c597
lea rcx, str.__MsCacheV1_:
call fcn.14000a838
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 0x10]
call fcn.1400112ac
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000a838
mov rdx, qword [rsp + 0xc0]
mov dword [rsp + 0x30], 0x10
lea rbp, [rbx + 0x50]
mov r9, rsi
mov r8d, 0x10
mov ecx, 0x8003
mov qword [rsp + 0x28], rbp
mov dword [rsp + 0x20], r14d
call fcn.140003e18
test eax, eax
je 0x14009c58f
lea rcx, str.__Checksum__:
call fcn.14000a838
xor r8d, r8d
mov rcx, rbp
lea edx, [r8 + 0x10]
call fcn.1400112ac
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000a838
lea rdx, [rsp + 0xb8]
lea rcx, [rsp + 0xc8]
call sub.ADVAPI32.dll_SystemFunction032
test eax, eax
jns 0x14009c54d
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptDecryptRC4_:_0x_08x_n
jmp 0x14009c618
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptDecryptRC4_:_0x_08x_n
mov edx, eax
call fcn.14000a838
jmp 0x14009c597
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___kull_m_crypto_hmac__0x_08x__n
jmp 0x14009c864