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

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r13
lea rbp, [rax - 0x5f]
sub rsp, 0x100
mov qword [rax + 8], r12
lea rdi, str.1.2.840.113556.1.4.90
mov qword [rax - 0x30], r14
mov r13, rdx
mov qword [rax - 0x38], r15
mov rsi, rcx
xor ebx, ebx
nop dword [rax]
nop word [rax + rax]
mov rdx, qword [rdi]
lea r8, [rbp - 0x69]
lea r8, [r8 + rbx*4]
xor r9d, r9d
mov rcx, rsi
call fcn.140031320
test eax, eax
je 0x1400310e4
inc ebx
add rdi, 8
cmp ebx, 8
jb 0x140030e60
test r13, r13
je 0x1400310dd
cmp qword [r13 + 0x20], 0
mov rcx, qword [r13]
mov qword [rsp + 0x38], rcx
je 0x1400310cd
xor eax, eax
mov dword [rbp + 0x77], eax
cmp dword [r13 + 0x18], eax
jbe 0x1400310cd
nop word [rax + rax]
lea rcx, [rax + rax*2]
xor edx, edx
lea rbx, [rcx*8]
mov rcx, qword [r13 + 0x20]
mov qword [rsp + 0x30], rbx
lea rax, [rbp - 0x69]
mov r8d, dword [rbx + rcx]
nop
cmp dword [rax], r8d
je 0x140030ef5
inc edx
add rax, 4
cmp edx, 8
jb 0x140030ee0
jmp 0x1400310b6
cmp qword [rbx + rcx + 0x10], 0
je 0x1400310b6
xor r15d, r15d
cmp dword [rbx + rcx + 8], r15d
jbe 0x1400310b6
nop
mov rbx, qword [rbx + rcx + 0x10]
mov edi, r15d
add rdi, rdi
mov r13, qword [rbx + rdi*8 + 8]
test r13, r13
je 0x14003109b
cmp qword [0x140079bb8], 0
lea rax, [rbp + 0xf]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x40], 0x10
mov dword [rsp + 0x44], 0x10
je 0x1400310e4
cmp dword [0x140079bb0], 0
je 0x1400310e4
cmp dword [rbx + rdi*8], 0x14
jb 0x1400310e4
lea rcx, [rbp - 0x49]
call qword [sym.imp.cryptdll.dll_MD5Init]
mov r8d, dword [0x140079bb0]
lea rcx, [rbp - 0x49]
mov rdx, qword [0x140079bb8]
call qword [sym.imp.cryptdll.dll_MD5Update]
mov r8d, 0x10
lea rcx, [rbp - 0x49]
mov rdx, r13
call qword [sym.imp.cryptdll.dll_MD5Update]
lea rcx, [rbp - 0x49]
call qword [sym.imp.cryptdll.dll_MD5Final]
mov eax, dword [rbx + rdi*8]
lea r12, [r13 + 0x10]
sub eax, 0x10
mov qword [rbp - 0x71], r12
lea rdx, [rsp + 0x40]
mov dword [rbp - 0x75], eax
lea rcx, [rbp - 0x79]
mov dword [rbp - 0x79], eax
call qword [sym.imp.ADVAPI32.dll_SystemFunction033]
test eax, eax
js 0x1400310e4
mov r14d, dword [rbx + rdi*8]
lea rdx, [rsp + 0x20]
mov ecx, 0xffffff7c
sub r14d, 0x14
call qword [sym.imp.cryptdll.dll_CDLocateCheckSum]
test eax, eax
js 0x1400310e4
mov rax, qword [rsp + 0x20]
lea rdx, [rsp + 0x28]
xor ecx, ecx
call qword [rax + 0x10]
test eax, eax
js 0x1400310e4
mov rax, qword [rsp + 0x20]
lea r8, [r13 + 0x14]
mov rcx, qword [rsp + 0x28]
mov edx, r14d
call qword [rax + Ordinal_26]
mov rax, qword [rsp + 0x20]
lea rdx, [rbp + 0x7f]
mov rcx, qword [rsp + 0x28]
mov r8, qword [rax + 0x20]
call r8
mov rdx, qword [rsp + 0x20]
lea rcx, [rsp + 0x28]
mov esi, eax
not esi
shr esi, 0x1f
call qword [rdx + Ordinal_41]
test esi, esi
je 0x1400310e4
mov eax, dword [r12]
cmp dword [rbp + 0x7f], eax
jne 0x1400310e4
mov rsi, qword [rbx + rdi*8 + 8]
mov ecx, 0x40
mov edx, r14d
mov r12d, r14d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbx + rdi*8 + 8], rax
test rax, rax
je 0x1400310e4
lea rdx, [r13 + 0x14]
mov r8d, r12d
mov rcx, rax
call fcn.1400351a0
mov dword [rbx + rdi*8], r14d
test rsi, rsi
je 0x14003109b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r13, qword [rbp + 0x6f]
inc r15d
mov rbx, qword [rsp + 0x30]
mov rcx, qword [r13 + 0x20]
cmp r15d, dword [rcx + rbx + 8]
jb 0x140030f10
mov eax, dword [rbp + 0x77]
inc eax
mov dword [rbp + 0x77], eax
cmp eax, dword [r13 + 0x18]
jb 0x140030ec0
mov rcx, qword [rsp + 0x38]
mov qword [rbp + 0x6f], rcx
mov r13, rcx
test rcx, rcx
jne 0x140030e92
mov eax, 1
jmp 0x1400310e6
xor eax, eax
mov r15, qword [rsp + 0xf0]
mov r14, qword [rsp + 0xf8]
mov r12, qword [rsp + reloc.WLDAP32.dll_Ordinal_304]
add rsp, 0x100
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret