Function at 0x180005850
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x40
mov rax, qword [rcx + 0x10]
mov rsi, rdx
mov rbx, rcx
mov edx, 0x12c
mov ecx, 0x40
call qword [rax + 0x20]
mov r10d, 4
lea r8, [rsi + 0x10]
mov rbp, rax
mov r9, rax
lea r14, [rax + 0x10]
lea r11d, [r10 + 0x2c]
nop dword [rax]
movzx edx, byte [r8]
lea r9, [r9 + 2]
shr dl, 4
lea r8, [r8 + 1]
cmp dl, 9
mov ecx, 0x57
mov eax, 0x57
cmovbe ecx, r11d
add cl, dl
mov byte [r9 - 2], cl
movzx ecx, byte [r8 - 1]
and cl, 0xf
cmp cl, 9
cmovbe eax, r11d
add al, cl
mov byte [r9 - 1], al
sub r10, 1
jne 0x1800058a0
mov byte [rbp + 8], r10b
lea r9d, [r10 + 0x20]
mov rdx, qword [rsi + 0x18]
mov r8, r14
movzx ecx, byte [rdx]
lea r8, [r8 + 2]
shr cl, 4
lea rdx, [rdx + 1]
cmp cl, 9
mov eax, 0x57
cmovbe eax, r11d
add al, cl
mov byte [r8 - 2], al
mov eax, 0x57
movzx ecx, byte [rdx - 1]
and cl, 0xf
cmp cl, 9
cmovbe eax, r11d
add al, cl
mov byte [r8 - 1], al
sub r9, 1
jne 0x1800058f0
mov byte [r14 + 0x40], r9b
mov rax, qword [rbx + 0x20]
mov dword [rax], 0x30fd119a
mov dword [rax + 4], 0xad91fb9f
mov dword [rax + 8], 0x11211134
mov dword [rax + 0xc], 0x1187fa43
mov dword [rax + 0x10], 0xc5cc11fc
mov dword [rax + 0x14], 0xbb9f42b0
mov dword [rax + 0x18], 0x30112111
mov dword [rax + 0x1c], 0x22cc938e
mov dword [rax + 0x20], 0x11fc11b0
mov dword [rax + 0x24], 0x2111bb22
mov dword [rax + 0x28], 0x11fcbb24
mov dword [rax + 0x2c], 0x339133ad
mov dword [rax + 0x30], 0x211130cc
mov dword [rax + 0x34], 0xbb22119a
mov dword [rax + 0x38], 0x24112111
mov dword [rax + 0x3c], 0x11fc1130
mov dword [rax + 0x40], 0x28939ffd
mov dword [rax + 0x44], 0x2111bb22
mov dword [rax + 0x48], 0x11302411
mov dword [rax + 0x4c], 0x9ffb11fc
mov dword [rax + 0x50], 0x11c534fb
mov dword [rax + 0x54], 0x30241121
mov dword [rax + 0x58], 0x9111fc11
mov dword [rax + 0x5c], 0x798e30c5
mov dword [rax + 0x60], 0x112111b0
mov dword [rax + 0x64], 0xfc113024
mov dword [rax + 0x68], 0xb3793311
mov dword [rax + 0x6c], 0x1121119f
mov dword [rax + 0x70], 0x4f113024
mov word [rax + 0x74], 0xff4f
mov rdx, qword [rbx + 0x10]
mov rcx, qword [rsi + 0x20]
call fcn.1800053b0
mov r11, qword [rbx + 0x20]
mov rdi, rax
mov r8, r11
cmp byte [r11], 0xff
je 0x180005a39
movzx ecx, byte [r8]
call fcn.1800047e0
mov byte [r8], al
inc r8
cmp byte [r8], 0xff
jne 0x180005a24
mov byte [r8], 0
mov rdx, r11
mov rax, qword [rsi + 0x28]
mov r10, qword [rbx + 0x10]
mov r9, qword [rbx + 0xd0]
mov r8d, dword [rbx + 0xd8]
mov rcx, qword [rbx + 0x38]
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rax
call qword [r10 + 0x4b8]
test rdi, rdi
je 0x180005a84
mov rax, qword [rbx + 0x10]
mov rcx, rdi
call qword [rax + 0x38]
mov rax, qword [rbx + 0x10]
mov rcx, qword [rbx + 0x38]
call qword [rax + 0x148]
movsxd r14, eax
mov rcx, rbp
mov rax, qword [rbx + 0x38]
mov byte [r14 + rax], 0xa
mov rax, qword [rbx + 0x38]
mov byte [r14 + rax + 1], 0
mov rax, qword [rbx + 0x10]
call qword [rax + 0x38]
mov rax, qword [rbx + 0x10]
mov edx, 0x40
mov ecx, edx
call qword [rax + 0x20]
mov rcx, qword [rsi + 0x18]
xor edx, edx
mov rdi, rax
xor r8d, r8d
or rax, 0xffffffffffffffff
div qword [rcx + 0x18]
mov edx, dword [rsi + 0xc]
mov rsi, qword [rbx + 8]
mov rcx, qword [rbx + 0xd8]
mov qword [rdi + 0x18], rax
mov qword [rdi], r8
mov qword [rdi + 8], rcx
mov dword [rdi + 0x10], edx
mov qword [rdi + 0x20], r8
mov byte [rdi + 0x28], 1
mov qword [rdi + 0x30], rsi
mov rdx, qword [rsi + 0x38]
cmp byte [rdx], r8b
jne 0x180005b14
lea r8, [0x180028b00]
mov rcx, rsi
call fcn.18002b0c0
movsd xmm1, qword [0x180060fe8]
mov rcx, rsi
call fcn.18002b630
mov qword [rdi + 0x38], rax
mov rcx, qword [rbx + 0x88]
cmp rcx, qword [rbx + 0x80]
jae 0x180005b4a
mov rax, qword [rbx + 0x90]
mov qword [rax + rcx*8], rdi
inc qword [rbx + 0x88]
lea rdx, [r14 + 1]
mov rcx, rbx
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
jmp 0x180006880