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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x40]
sub rsp, 0x140
lea rax, [rbp - 0x78]
mov r15, r8
mov qword [rsp + 0x28], rax
lea r8, str.SAMDomainsAccount
xor r13d, r13d
mov dword [rsp + 0x20], 0x20019
mov rdi, rdx
mov rsi, rcx
mov r14d, r13d
call fcn.140020890
test eax, eax
je 0x1400176f9
mov rdx, qword [rbp - 0x78]
lea rax, [rsp + 0x64]
mov qword [rsp + 0x28], rax
lea r8, [0x140069310]
lea rax, [rsp + 0x70]
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140020fd0
mov ebx, eax
cmp dword [rsi], r13d
jne 0x1400176c2
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x1400176c2
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
je 0x1400176f9
mov ecx, dword [rsp + 0x64]
lea rdx, [rsp + 0x70]
mov rbx, qword [rsp + 0x70]
add rcx, 0xffffffffffffffe8
add rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
test eax, eax
je 0x1400176f0
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rax, [rbp - 0x68]
mov rdx, rdi
mov qword [rsp + 0x28], rax
lea r8, str.SAMDomainsAccount
mov rcx, rsi
mov dword [rsp + 0x20], 0x20019
call fcn.140020890
test eax, eax
je 0x140017bdf
mov rdx, qword [rbp - 0x68]
lea rax, [rbp + 0x28]
mov qword [rbp - 0x48], rax
xor r8d, r8d
lea rax, [rbp - 0x60]
mov dword [rbp - 0x50], 0x10
mov qword [rbp - 0x38], rax
mov rcx, rsi
lea rax, [rsp + 0x70]
mov dword [rbp - 0x4c], 0x10
mov qword [rsp + 0x28], rax
mov edi, r13d
mov dword [rsp + 0x20], 0x20019
mov dword [rbp - 0x40], 0x10
mov dword [rbp - 0x3c], 0x10
call fcn.140020890
test eax, eax
je 0x140017bbe
mov rdx, qword [rsp + 0x70]
lea rax, [rbp - 0x80]
mov qword [rsp + 0x28], r13
lea r8, [0x140069390]
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140020fd0
mov ebx, eax
cmp dword [rsi], r13d
jne 0x1400177bc
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x1400177bc
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
je 0x140017bbe
mov rbx, qword [rbp - 0x80]
movzx ecx, word [rbx]
sub ecx, 2
je 0x1400177d9
cmp ecx, 1
jne 0x1400178c4
mov ecx, dword [rbx + 0x68]
sub ecx, 1
je 0x14001783b
cmp ecx, 1
jne 0x1400178c4
mov r9d, dword [rbx + 0x74]
lea rax, [rbp - 0x78]
mov qword [rsp + 0x28], rax
lea r8, [rbx + 0x88]
lea rax, [rbp - 0x80]
mov rcx, r15
lea rdx, [rbx + 0x78]
mov qword [rsp + 0x20], rax
call fcn.14000aac0
test eax, eax
je 0x1400178c4
cmp dword [rbp - 0x78], 0x10
mov rcx, qword [rbp - 0x80]
sete dil
jne 0x140017830
movups xmm0, xmmword [rcx]
movups xmmword [rbp - 0x60], xmm0
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400178c4
lea rcx, [rbp - 0x30]
call qword [sym.imp.cryptdll.dll_MD5Init]
lea rdx, [rbx + 0x70]
mov r8d, 0x10
lea rcx, [rbp - 0x30]
call qword [sym.imp.cryptdll.dll_MD5Update]
mov r8d, 0x2f
lea rdx, str.______qwertyUIOPAzxcvbnmQQQQQQQQQQQQ____
lea rcx, [rbp - 0x30]
call qword [sym.imp.cryptdll.dll_MD5Update]
mov r8d, 0x10
lea rcx, [rbp - 0x30]
mov rdx, r15
call qword [sym.imp.cryptdll.dll_MD5Update]
mov r8d, reloc.WLDAP32.dll_Ordinal_41
lea rdx, str.0123456789012345678901234567890123456789
lea rcx, [rbp - 0x30]
call qword [sym.imp.cryptdll.dll_MD5Update]
lea rcx, [rbp - 0x30]
call qword [sym.imp.cryptdll.dll_MD5Final]
movups xmm0, xmmword [rbx + 0x80]
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x40]
movups xmmword [rbp - 0x60], xmm0
call qword [sym.imp.ADVAPI32.dll_SystemFunction033]
mov edi, eax
not edi
shr edi, 0x1f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x140017bbe
mov rdx, qword [rbp - 0x68]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
lea r8, str.Users
mov rcx, rsi
mov dword [rsp + 0x20], 0x20019
call fcn.140020890
test eax, eax
je 0x140017bbe
mov ecx, dword [rsi]
test ecx, ecx
je 0x140017946
cmp ecx, 1
jne 0x14001799f
mov rcx, qword [rsp + 0x78]
test rcx, rcx
jne 0x140017923
mov rax, qword [rsi + 8]
mov rcx, qword [rax + 0x18]
mov edx, 0x6b6e
cmp word [rcx + 4], dx
sete r14b
jne 0x14001799f
mov eax, dword [rcx + 0x18]
mov dword [rsp + 0x68], eax
mov eax, dword [rcx + 0x38]
shr eax, 1
mov dword [rbp + 0x88], eax
jmp 0x14001799f
mov rcx, qword [rsp + 0x78]
lea rax, [rbp + 0x88]
mov qword [rsp + 0x58], r13
xor r9d, r9d
mov qword [rsp + 0x50], r13
xor r8d, r8d
mov qword [rsp + 0x48], r13
xor edx, edx
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
sete r14b
test eax, eax
je 0x14001799f
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r14d, r14d
je 0x140017ba2
mov eax, dword [rbp + 0x88]
mov ecx, 0x40
inc eax
mov dword [rbp + 0x88], eax
lea edx, [rax + 1]
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x140017ba2
mov qword [rsp + 0x170], r12
mov r12d, r13d
cmp dword [rsp + 0x68], r13d
jbe 0x140017b91
nop dword [rax]
mov eax, dword [rbp + 0x88]
mov r9, r15
mov rdx, qword [rsp + 0x78]
mov r8d, r12d
mov dword [rsp + 0x64], eax
mov rcx, rsi
lea rax, [rsp + 0x64]
mov qword [rsp + 0x20], rax
call fcn.140020e30
test eax, eax
je 0x140017b83
lea rdx, str.Names
mov rcx, r15
call fcn.140035f94
test eax, eax
je 0x140017b83
lea r8, [rsp + 0x60]
mov rcx, r15
lea rdx, [0x14006927c]
call fcn.140007150
cmp eax, 0xffffffff
je 0x140017b83
mov rdx, qword [rsp + 0x78]
lea rax, [rbp - 0x70]
mov qword [rsp + 0x28], rax
mov r8, r15
mov rcx, rsi
mov dword [rsp + 0x20], 0x20019
call fcn.140020890
and r14d, eax
je 0x140017b83
mov rdx, qword [rbp - 0x70]
lea rax, [rbp - 0x80]
mov qword [rsp + 0x28], r13
lea r8, [0x140069310]
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140020fd0
and r14d, eax
je 0x140017b58
mov rdi, qword [rbp - 0x80]
lea r8, [rbp - 0x60]
mov r9d, dword [rsp + 0x60]
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r13d
lea rcx, [rdi + 0x9c]
lea rdx, [rdi + 0xcc]
call fcn.140017c00
mov r9d, dword [rsp + 0x60]
lea rcx, [rdi + 0xa8]
lea r8, [rbp - 0x60]
mov dword [rsp + 0x28], r13d
lea rdx, [rdi + 0xcc]
mov dword [rsp + 0x20], 1
call fcn.140017c00
mov r9d, dword [rsp + 0x60]
lea rcx, [rdi + 0xc0]
lea r8, [rbp - 0x60]
mov dword [rsp + 0x28], 1
lea rdx, [rdi + 0xcc]
mov dword [rsp + 0x20], r13d
call fcn.140017c00
mov r9d, dword [rsp + 0x60]
lea rcx, [rdi + 0xb4]
lea r8, [rbp - 0x60]
mov dword [rsp + 0x28], 1
lea rdx, [rdi + 0xcc]
mov dword [rsp + 0x20], 1
call fcn.140017c00
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdx, qword [rbp - 0x70]
lea r8, [rbp - 0x60]
mov rcx, rsi
call fcn.140017e40
cmp dword [rsi], r13d
jne 0x140017b83
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x140017b83
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
inc r12d
cmp r12d, dword [rsp + 0x68]
jb 0x1400179f0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r12, qword [rsp + 0x170]
cmp dword [rsi], r13d
jne 0x140017bbe
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x140017bbe
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [rsi]
test eax, eax
je 0x140017bc9
cmp eax, 1
jmp 0x140017bdf
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x140017bdf
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r11, [rsp + 0x140]
mov eax, r14d
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop rdi
pop rbp
ret