Function at 0x18005cb08
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
mov rbp, rsp
sub rsp, 0x80
xor edi, edi
mov rbx, r9
mov r12d, edx
mov rsi, rcx
test r8, r8
je 0x18005cb8f
xor r9d, r9d
xor r10d, r10d
mov dword [rbp + 0x30], r9d
cmp dword [r8 + 0x18], edi
jbe 0x18005cd31
mov r11, qword [rsi + 4]
lea rcx, [r10 + r8 + 0x1c]
cmp r11, qword [rcx]
jne 0x18005cb60
mov r11, qword [rsi + 0xc]
cmp r11, qword [rcx + 8]
jne 0x18005cb60
xor eax, eax
jmp 0x18005cb65
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x18005cb83
inc r9d
mov dword [rbp + 0x30], r9d
mov eax, dword [rcx + 0x14]
lea r10d, [r10 + rax + 0x18]
cmp r9d, dword [r8 + 0x18]
jb 0x18005cb44
jmp 0x18005cd31
mov eax, dword [rcx + 0x14]
lea rbx, [rcx + 0x18]
mov dword [rbp - 0x40], eax
jmp 0x18005cb9f
test rbx, rbx
je 0x18005cd31
mov dword [rbp - 0x40], reloc.WLDAP32.dll_Ordinal_16
test rbx, rbx
je 0x18005cd31
lea rcx, [rbp - 0x28]
mov r9d, Ordinal_26
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x18005cd31
mov rcx, qword [rbp - 0x28]
lea rax, [rbp - 0x38]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x800c
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x18005cd25
mov r8d, dword [rbp - 0x40]
mov rcx, qword [rbp - 0x38]
xor r9d, r9d
mov rdx, rbx
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
and dword [rbp + 0x30], edi
mov rcx, qword [rbp - 0x38]
xor r9d, r9d
lea rdx, [rsi + 0x1c]
lea r8d, [r9 + 0x20]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
mov r11d, dword [rbp + 0x30]
inc r11d
mov dword [rbp + 0x30], r11d
cmp r11d, 0x3e8
jb 0x18005cc0a
mov rcx, qword [rbp - 0x38]
and dword [rsp + 0x20], edi
mov ebx, 2
lea r9, [rbp - 0x40]
lea r8, [rbp - 0x20]
mov edx, ebx
mov dword [rbp - 0x40], Ordinal_36
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x18005cd1b
and qword [rsp + 0x30], rdi
mov rcx, qword [rbp - 0x28]
lea rax, [rbp - 0x30]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], edi
lea r9d, [rbx + 0x1e]
lea r8, [rbp - 0x20]
mov edx, 0x6610
call fcn.18000300c
test eax, eax
je 0x18005cd07
mov rcx, qword [rbp - 0x30]
lea r8, [rbp + 0x30]
lea edx, [rbx + 2]
xor r9d, r9d
mov dword [rbp + 0x30], ebx
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x18005cce7
lea eax, [r12 - 0x3c]
lea rcx, [rbp - 0x40]
xor r9d, r9d
mov qword [rsp + 0x28], rcx
mov rcx, qword [rbp - 0x30]
mov dword [rbp - 0x40], eax
lea rax, [rsi + 0x3c]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov edi, eax
test eax, eax
jne 0x18005ccfb
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_lsadump_sec_aes256___CryptDecrypt__0x_08x__n
jmp 0x18005ccf4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_lsadump_sec_aes256___CryptSetKeyParam__0x_08x__n
mov edx, eax
call fcn.180008f6c
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x18005cd1b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kuhl_m_lsadump_sec_aes256___kull_m_crypto_hkey__0x_08x__n
mov edx, eax
call fcn.180008f6c
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rbp - 0x28]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x80]
mov eax, edi
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret