Function at 0x14009d6fc
Capabilities:
Encrypt data using rc4 via systemfunction033

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, 0xc0
mov eax, dword [rcx]
xor ebx, ebx
and dword [rbp - 0x69], ebx
mov r14, rcx
and dword [rbp - 0x65], ebx
lea rcx, [rbp + 0xf]
and qword [rbp - 0x61], rbx
mov r15, r8
mov qword [rbp - 0x51], rcx
lea r9d, [rbx + 0x10]
mov dword [rbp - 0x59], r9d
lea rdi, [rdx + rax]
mov dword [rbp - 0x55], r9d
test eax, eax
je 0x14009d84d
mov r8d, dword [r14 + 4]
test r8d, r8d
je 0x14009d84d
movzx edx, word [rdi + 2]
mov esi, dword [rbp + 0x7f]
mov ecx, edx
sub ecx, 1
je 0x14009d866
cmp ecx, 1
je 0x14009d782
lea rcx, str.ERROR_kuhl_m_lsadump_getHash___Unknow_SAM_HASH_revision___hu__n
call fcn.14000bf2c
jmp 0x14009d83e
cmp dword [rdi + 4], r9d
jb 0x14009d83e
lea rax, [rbp + 0x57]
mov rcx, r15
mov qword [rsp + 0x28], rax
lea r9d, [r8 - 0x18]
lea rax, [rbp + 0x5f]
lea r8, [rdi + 0x18]
mov qword [rsp + 0x20], rax
lea rdx, [rdi + 8]
call fcn.140004b54
test eax, eax
je 0x14009d83e
mov eax, dword [rbp + 0x57]
mov ecx, 0x40
mov edx, eax
mov dword [rbp - 0x65], eax
mov dword [rbp - 0x69], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp - 0x61], rax
test rax, rax
je 0x14009d7ee
mov r8d, dword [rbp + 0x57]
mov rcx, rax
mov rdx, qword [rbp + 0x5f]
call sub.msvcrt.dll_memcpy
mov ebx, 1
mov rcx, qword [rbp + 0x5f]
call qword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
je 0x14009d83e
mov r8d, dword [rbp + 0x6f]
lea rcx, str.ntlm
mov edx, dword [rbp - 0x69]
lea rax, str.NTLM
test esi, esi
mov dword [rsp + 0x20], esi
lea r9, str.LM
cmovne rax, rcx
lea rcx, str.lm
cmovne r9, rcx
cmp dword [rbp + 0x77], 0
mov rcx, qword [rbp - 0x61]
cmovne r9, rax
call fcn.1400b2fa0
mov rcx, qword [rbp - 0x61]
test rcx, rcx
je 0x14009d84d
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, ebx
mov rbx, qword [rsp + 0x100]
add rsp, 0xc0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
cmp r8d, 6
jb 0x14009d83e
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, esi
lea rcx, str.NTPASSWORDHISTORY
neg eax
lea rdx, str.LMPASSWORD
lea rax, str.NTPASSWORD
sbb r8d, r8d
and r8d, 7
add r8d, 0xb
test esi, esi
cmovne rax, rcx
lea rcx, str.LMPASSWORDHISTORY
cmovne rdx, rcx
cmp dword [rbp + 0x77], ebx
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 [r14 + 4]
mov ecx, 0x40
add eax, 0xfffffffc
mov edx, eax
mov dword [rbp - 0x65], eax
mov dword [rbp - 0x69], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp - 0x61], rax
test rax, rax
je 0x14009d83e
mov r8d, dword [rbp - 0x69]
lea rdx, [rdi + 4]
mov rcx, rax
call sub.msvcrt.dll_memcpy
lea rdx, [rbp - 0x59]
lea rcx, [rbp - 0x69]
call qword [sym.imp.ADVAPI32.dll_SystemFunction033]
mov ebx, eax
not ebx
shr ebx, 0x1f
test ebx, ebx
jne 0x14009d7fc
lea rcx, str.ERROR_kuhl_m_lsadump_getHash___RtlDecryptData2_n
call fcn.14000bf2c
jmp 0x14009d83e