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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xf0
lea r13, str.1.2.840.113556.1.4.90
xor r14d, r14d
mov rdi, rdx
mov rsi, r13
mov r12, rcx
mov ebx, r14d
mov rdx, qword [rsi]
mov eax, ebx
xor r9d, r9d
lea r8, [rbp + rax*4 - 0x71]
mov rcx, r12
call fcn.18001ef98
test eax, eax
je 0x18001ee0a
inc ebx
add rsi, 8
cmp ebx, 8
jb 0x18001ebca
test rdi, rdi
je 0x18001ee03
mov rax, qword [rdi + 0x20]
mov rcx, qword [rdi]
mov qword [rsp + 0x40], rcx
test rax, rax
je 0x18001ede6
mov r8d, r14d
mov dword [rbp + 0x6f], r14d
cmp dword [rdi + 0x18], r14d
jbe 0x18001ede6
mov rsi, r14
mov r9d, dword [rsi + rax]
mov edx, r14d
lea rcx, [rbp - 0x71]
cmp dword [rcx], r9d
je 0x18001ec44
inc edx
add rcx, 4
cmp edx, 8
jb 0x18001ec2f
jmp 0x18001edcc
cmp qword [rsi + rax + 0x10], r14
je 0x18001edcc
mov r15d, r14d
cmp dword [rsi + rax + 8], r14d
jbe 0x18001edcc
mov rbx, r14
mov r12, qword [rsi + rax + 0x10]
cmp qword [r12 + rbx + 8], r14
je 0x18001edb2
cmp qword [0x18004b888], r14
mov r13, qword [r12 + rbx + 8]
lea rax, [rbp + 0xf]
mov qword [rbp - 0x79], rax
mov dword [rsp + 0x48], 0x10
mov dword [rbp - 0x7d], 0x10
je 0x18001edfc
cmp dword [0x18004b880], r14d
je 0x18001edfc
cmp dword [r12 + rbx], 0x14
jb 0x18001edfc
test r13, r13
je 0x18001edfc
lea rcx, [rbp - 0x49]
call qword [sym.imp.cryptdll.dll_MD5Init]
mov r8d, dword [0x18004b880]
mov rdx, qword [0x18004b888]
lea rcx, [rbp - 0x49]
call qword [sym.imp.cryptdll.dll_MD5Update]
lea rcx, [rbp - 0x49]
mov r8d, 0x10
mov rdx, r13
call qword [sym.imp.cryptdll.dll_MD5Update]
lea rcx, [rbp - 0x49]
call qword [sym.imp.cryptdll.dll_MD5Final]
mov r11d, dword [r12 + rbx]
lea rax, [r13 + 0x10]
sub r11d, 0x10
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x30]
mov dword [rsp + 0x34], r11d
mov dword [rsp + 0x30], r11d
mov qword [rsp + 0x38], rax
call qword [sym.imp.ADVAPI32.dll_SystemFunction032]
test eax, eax
js 0x18001edfc
mov r14d, dword [r12 + rbx]
lea rax, [r13 + 0x14]
lea r9, [rbp + 0x77]
sub r14d, 0x14
mov rdx, rax
mov ecx, 0x8000
mov r8d, r14d
mov qword [rbp + 0x7f], rax
mov dword [rsp + 0x20], 4
call fcn.18001097c
test eax, eax
je 0x18001edfc
mov ecx, dword [rbp + 0x77]
cmp ecx, dword [r13 + 0x10]
jne 0x18001edf1
mov r13, qword [r12 + rbx + 8]
mov edx, r14d
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [r12 + rbx + 8], rax
test rax, rax
je 0x18001ee16
mov rdx, qword [rbp + 0x7f]
mov r8d, r14d
mov rcx, rax
call fcn.180026930
mov dword [r12 + rbx], r14d
xor r14d, r14d
test r13, r13
je 0x18001edb2
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rax, qword [rdi + 0x20]
inc r15d
add rbx, 0x10
cmp r15d, dword [rsi + rax + 8]
jb 0x18001ec60
mov r8d, dword [rbp + 0x6f]
inc r8d
add rsi, 0x18
mov dword [rbp + 0x6f], r8d
cmp r8d, dword [rdi + 0x18]
jb 0x18001ec24
mov rcx, qword [rsp + 0x40]
mov rdi, rcx
test rcx, rcx
jmp 0x18001ebf5
mov edx, dword [r13 + 0x10]
call fcn.180004a6c
jmp 0x18001ee16
call fcn.180004a6c
jmp 0x18001ee16
mov eax, 1
jmp 0x18001ee18
mov ecx, ebx
mov rcx, qword [r13 + rcx*8]
call fcn.180004a6c
xor eax, eax
mov rbx, qword [rsp + reloc.WLDAP32.dll_Ordinal_304]
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret