Function at 0x18006c894
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using rc4 via systemfunction032

Disassembly:
mov qword [rsp + 0x18], rbx
mov dword [rsp + 0x20], r9d
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xe0
mov eax, dword [rcx]
xor edi, edi
and dword [rbp - 0x79], edi
mov r15, r8
and dword [rbp - 0x75], edi
mov rsi, rcx
and qword [rbp - 0x71], rdi
lea rcx, [rbp + 0xf]
mov qword [rbp - 0x59], rcx
lea r8d, [rdi + 0x10]
mov dword [rbp - 0x61], r8d
lea rbx, [rdx + rax]
mov dword [rbp - 0x5d], r8d
test eax, eax
je 0x18006cb0e
movzx edx, word [rbx + 2]
mov r14d, dword [rbp + 0x7f]
mov ecx, edx
sub ecx, 1
je 0x18006c9d0
cmp ecx, 1
je 0x18006c90e
lea rcx, str.ERROR_kuhl_m_lsadump_getHash___Unknow_SAM_HASH_revision___hu__n
call fcn.180009ba4
jmp 0x18006caff
cmp dword [rbx + 4], r8d
jb 0x18006cb0e
mov esi, dword [rsi + 4]
lea rcx, [rbp - 0x69]
mov r9d, Ordinal_27
mov dword [rsp + 0x20], 0xf0000000
xor r8d, r8d
xor edx, edx
sub esi, r9d
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x18006c96f
lea rax, [rbp - 0x69]
mov r9d, esi
mov qword [rsp + 0x30], rax
lea r8, [rbx + 0x18]
lea rax, [rbp + 0x57]
mov rcx, r15
mov qword [rsp + 0x28], rax
lea rdx, [rbx + 8]
lea rax, [rbp + 0x5f]
mov qword [rsp + 0x20], rax
call fcn.180004c1c
jmp 0x18006c985
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptAcquireContext__0x_08x__n
call fcn.180009ba4
xor eax, eax
test eax, eax
je 0x18006caff
mov eax, dword [rbp + 0x57]
mov ecx, 0x40
mov edx, eax
mov dword [rbp - 0x75], eax
mov dword [rbp - 0x79], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp - 0x71], rax
test rax, rax
je 0x18006c9c1
mov r8d, dword [rbp + 0x57]
mov rcx, rax
mov rdx, qword [rbp + 0x5f]
call fcn.18008c4c0
mov edi, 1
mov rcx, qword [rbp + 0x5f]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x18006cab7
cmp dword [rsi + 4], 6
jb 0x18006cb0e
lea rcx, [rbp - 0x49]
call qword [sym.imp.cryptdll.dll_MD5Init]
mov r8d, 0x10
lea rcx, [rbp - 0x49]
mov rdx, r15
call qword [sym.imp.cryptdll.dll_MD5Update]
mov r8d, 4
lea rdx, [rbp + 0x6f]
lea rcx, [rbp - 0x49]
call qword [sym.imp.cryptdll.dll_MD5Update]
mov eax, r14d
lea rcx, str.NTPASSWORDHISTORY
neg eax
lea rdx, str.LMPASSWORD
lea rax, str.NTPASSWORD
sbb r8d, r8d
and r8d, 7
add r8d, 0xb
test r14d, r14d
cmovne rax, rcx
lea rcx, str.LMPASSWORDHISTORY
cmovne rdx, rcx
cmp dword [rbp + 0x77], edi
lea rcx, [rbp - 0x49]
cmovne rdx, rax
call qword [sym.imp.cryptdll.dll_MD5Update]
lea rcx, [rbp - 0x49]
call qword [sym.imp.cryptdll.dll_MD5Final]
mov eax, dword [rsi + 4]
mov ecx, 0x40
add eax, 0xfffffffc
mov edx, eax
mov dword [rbp - 0x75], eax
mov dword [rbp - 0x79], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp - 0x71], rax
test rax, rax
je 0x18006cb0e
mov r8d, dword [rbp - 0x79]
lea rdx, [rbx + 4]
mov rcx, rax
call fcn.18008c4c0
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 0x79]
call qword [sym.imp.ADVAPI32.dll_SystemFunction032]
test eax, eax
setns dil
test eax, eax
jns 0x18006cab7
lea rcx, str.ERROR_kuhl_m_lsadump_getHash___RtlEncryptDecryptRC4_n
call fcn.180009ba4
test edi, edi
je 0x18006caff
mov r8d, dword [rbp + 0x6f]
lea rcx, str.ntlm
mov edx, dword [rbp - 0x79]
lea rax, str.NTLM
test r14d, r14d
mov dword [rsp + 0x20], r14d
lea r9, str.LM
cmovne rax, rcx
lea rcx, str.lm
cmovne r9, rcx
cmp dword [rbp + 0x77], 0
mov rcx, qword [rbp - 0x71]
cmovne r9, rax
call fcn.18007d46c
mov rcx, qword [rbp - 0x71]
test rcx, rcx
je 0x18006cb0e
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbx, qword [rsp + 0x120]
mov eax, edi
add rsp, 0xe0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret