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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x37]
sub rsp, 0xe0
mov rdi, rcx
lea rax, [rbp + 0x1f]
xor esi, esi
lea r14d, [rsi + 0x10]
lea rcx, str._nSAMKey_:
mov r12, r9
mov r13, r8
mov rbx, rdx
mov qword [rbp - 0x49], r9
mov dword [rbp - 0x51], r14d
mov dword [rbp - 0x4d], r14d
mov dword [rbp - 0x61], r14d
mov dword [rbp - 0x5d], r14d
mov qword [rbp - 0x59], rax
call fcn.180008f6c
and qword [rsp + 0x28], rsi
lea rax, [rbp - 0x69]
lea r9, [0x1800b2728]
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.18000b61c
test eax, eax
je 0x18005b8a1
mov rbx, qword [rbp - 0x69]
movzx edx, word [rbx]
mov ecx, edx
sub ecx, 2
je 0x18005b7e8
dec ecx
je 0x18005b739
lea rcx, str.ERROR_kuhl_m_lsadump_getSamKey___Unknow_F_revision___hu_
jmp 0x18005b891
mov edx, dword [rbx + 0x68]
cmp edx, 2
jne 0x18005b7dc
mov edi, dword [rbx + 0x74]
lea r9d, [rdx + 0x16]
lea rcx, [rbp - 0x69]
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x18005b79a
lea rax, [rbp - 0x69]
lea r8, [rbx + 0x88]
lea rdx, [rbx + 0x78]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x7f]
mov r9d, edi
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x41]
mov rcx, r13
mov qword [rsp + 0x20], rax
call fcn.180004128
jmp 0x18005b7b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptAcquireContext__0x_08x__n
mov edx, eax
call fcn.180008f6c
xor eax, eax
test eax, eax
je 0x18005b896
cmp dword [rbp + 0x7f], r14d
mov rcx, qword [rbp - 0x41]
sete sil
test esi, esi
je 0x18005b7d1
movups xmm0, xmmword [rcx]
movdqu xmmword [r12], xmm0
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x18005b896
lea rcx, str.ERROR_kuhl_m_lsadump_getSamKey___Unknow_Struct_Key_revision___u_
jmp 0x18005b891
mov edx, dword [rbx + 0x68]
cmp edx, 1
jne 0x18005b88a
lea rcx, [rbp - 0x39]
call qword [sym.imp.cryptdll.dll_MD5Init]
lea rdx, [rbx + 0x70]
lea rcx, [rbp - 0x39]
mov r8d, r14d
call qword [sym.imp.cryptdll.dll_MD5Update]
lea rdx, str.______qwertyUIOPAzxcvbnmQQQQQQQQQQQQ____
lea rcx, [rbp - 0x39]
mov r8d, 0x2f
call qword [sym.imp.cryptdll.dll_MD5Update]
lea rcx, [rbp - 0x39]
mov r8d, r14d
mov rdx, r13
call qword [sym.imp.cryptdll.dll_MD5Update]
lea rdx, str.0123456789012345678901234567890123456789
lea rcx, [rbp - 0x39]
mov r8d, reloc.WLDAP32.dll_Ordinal_41
call qword [sym.imp.cryptdll.dll_MD5Update]
lea rcx, [rbp - 0x39]
call qword [sym.imp.cryptdll.dll_MD5Final]
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 0x51]
movups xmm5, xmmword [rbx + 0x80]
movdqu xmmword [r12], xmm5
call qword [sym.imp.ADVAPI32.dll_SystemFunction032]
test eax, eax
setns sil
test esi, esi
jne 0x18005b896
lea rcx, str.ERROR_kuhl_m_lsadump_getSamKey___RtlEncryptDecryptRC4_KO
call fcn.180008f6c
jmp 0x18005b896
lea rcx, str.ERROR_kuhl_m_lsadump_getSamKey___Unknow_Classic_Struct_Key_revision___u_
call fcn.180008f6c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x18005b8ad
lea rcx, str.ERROR_kuhl_m_lsadump_getSamKey___kull_m_registry_OpenAndQueryWithAlloc_KO
call fcn.180008f6c
test esi, esi
je 0x18005b8bf
xor r8d, r8d
mov edx, r14d
mov rcx, r12
call fcn.18000e574
lea rcx, [0x1800964e8]
call fcn.180008f6c
lea r11, [rsp + 0xe0]
mov eax, esi
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret