Function at 0x14005b7e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
mov esi, r9d
mov r11, rdx
mov r12, rcx
mov rdi, qword [rsp + 0xd0]
xor ebx, ebx
cmp r9b, 1
sete bl
cmp r9b, 0xd
sete cl
or cl, bl
mov eax, r9d
and al, 0xfb
mov byte [rsp + 0x3e], al
add ebx, ebx
lea eax, [rsi - 3]
xor r15d, r15d
cmp al, 0xfe
mov eax, 0xfffffe76
cmovae eax, r15d
mov dword [rsp + 0x5c], eax
lea rax, [rdx + 3]
mov qword [rsp + 0x60], rax
mov r10d, 0x3f
lea r13, [0x140202ae0]
xor cl, 1
mov byte [rsp + 0x3f], cl
test r12, r12
je 0x14005c134
mov r14, r12
jmp 0x14005b894
mov ecx, dword [r14]
movzx edx, cx
cmp edx, 0xff01
mov edx, ecx
cmove edx, r10d
movzx r9d, dx
shr r9d, 3
movzx r9d, byte [r8 + r9]
and edx, 7
bt r9d, edx
jae 0x14005b8b0
mov r14, r12
test r12, r12
je 0x14005c134
mov r12, qword [r14 + 0x18]
movzx eax, sil
cmp sil, 1
je 0x14005b860
cmp eax, 0xd
je 0x14005b860
cmp byte [r14 + 0x14], 0
jne 0x14005b860
jmp 0x14005b888
movzx edx, r15w
rol cx, 8
mov word [r11 + rdx], cx
lea r9d, [r15 + 4]
mov ecx, dword [r14]
xor ebp, ebp
movzx edx, r9w
cmp rcx, 0x33
ja case.default.0x14005b8dc
movsxd rcx, dword [r13 + rcx*4]
add rcx, r13
jmp rcx
cmp sil, 0xd
je 0x14005b8ed
cmp eax, 1
jne case.0x14005b8dc.1
mov dword [rsp + 0x2c], ebx
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x48], r11
lea r8, [r11 + rdx]
mov rbx, qword [r14 + 8]
test rbx, rbx
je 0x14005c02e
mov bp, 2
mov qword [rsp + 0x50], r9
mov qword [rsp + 0x30], rdx
jmp 0x14005b92f
mov ebp, r15d
mov rbx, r13
test r13, r13
je 0x14005c033
mov r13, qword [rbx + 0x110]
movzx eax, byte [rbx]
lea r15d, [rbp + 1]
movzx ecx, bp
mov byte [r8 + rcx], al
cmp byte [rbx], 0
jne 0x14005b920
mov rcx, qword [rbx + 8]
mov rdi, r8
call fcn.14015ad20
movzx edx, r15w
movzx r8d, ax
mov ecx, eax
mov r15, rax
rol cx, 8
mov word [rdi + rdx], cx
lea eax, [rbp + 3]
movzx ecx, ax
add rcx, rdi
mov rdx, qword [rbx + 8]
call fcn.14016e4a0
mov r8, rdi
mov rdx, qword [rsp + 0x30]
mov r9, qword [rsp + 0x50]
mov rdi, qword [rsp + 0xd0]
add r15d, ebp
add r15d, 3
jmp 0x14005b920
cmp ecx, 0xff01
jne case.0x14005b8dc.1
mov r10, r9
mov r13, rdx
lea rcx, [r11 + rdx]
mov r9, qword [r14 + 8]
mov dx, 1
test r9, r9
je 0x14005b9fb
cmp byte [r9], 0
je 0x14005b9fb
cmp byte [r9 + 1], 0
je 0x14005b9fb
mov edx, dword [r9 + 0x10]
mov dword [rcx + 9], edx
mov rdx, qword [r9 + 8]
mov qword [rcx + 1], rdx
mov dx, recv
cmp sil, 1
je 0x14005b9fb
cmp eax, 0xd
je 0x14005b9fb
mov eax, dword [r9 + 0x1c]
mov dword [rcx + 0x15], eax
mov rax, qword [r9 + 0x14]
mov qword [rcx + 0xd], rax
mov dx, 0x19
movzx eax, dx
lea edx, [rax - 1]
mov byte [rcx], dl
mov r9, r10
lea r15d, [r10 + rax]
jmp 0x14005be49
mov r15, r9
mov r13, rdx
lea rax, [r11 + rdx]
mov rdx, qword [r14 + 8]
mov cx, 2
test rdx, rdx
je 0x14005ba4e
nop word cs:[rax + rax]
movzx r10d, cx
movzx r9d, word [rdx]
rol r9w, 8
mov word [rax + r10], r9w
add ecx, 2
mov rdx, qword [rdx + 8]
test rdx, rdx
jne 0x14005ba30
lea edx, [rcx - 2]
rol dx, 8
mov word [rax], dx
mov r9, r15
add r15d, ecx
jmp 0x14005be49
mov r15, r9
mov r13, rdx
lea rax, [r11 + rdx]
mov rcx, qword [r14 + 8]
test rcx, rcx
je 0x14005be39
mov r10w, 1
nop
movzx r9d, byte [rcx]
lea edx, [r10 + 1]
movzx r10d, r10w
mov byte [rax + r10], r9b
mov rcx, qword [rcx + 8]
mov r10d, edx
test rcx, rcx
jne 0x14005ba80
jmp 0x14005be3d
mov qword [rsp + 0x30], rdx
mov r13, qword [r14 + 8]
mov rdx, qword [r13]
cmp word [rdx + 8], 0
je 0x14005be53
add rdx, 8
jmp 0x14005be5e
mov qword [rsp + 0x50], r9
mov dword [rsp + 0x2c], ebx
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x48], r11
mov qword [rsp + 0x30], rdx
lea r13, [r11 + rdx]
mov rbx, qword [r14 + 8]
mov bp, 2
test rbx, rbx
je 0x14005bb29
nop dword [rax + rax]
mov rcx, qword [rbx]
mov rdi, qword [rbx + 8]
call fcn.14015ad20
mov r15, rax
lea eax, [rbp + 1]
movzx ecx, bp
mov byte [r13 + rcx], r15b
movzx ecx, ax
add rcx, r13
mov rdx, qword [rbx]
movzx r8d, r15w
call fcn.14016e4a0
add ebp, r15d
inc ebp
mov rbx, rdi
test rdi, rdi
jne 0x14005baf0
lea eax, [rbp - 2]
rol ax, 8
mov word [r13], ax
mov r9, qword [rsp + 0x50]
lea r15d, [r9 + rbp]
xor ebp, ebp
mov rdi, qword [rsp + 0xd0]
mov r8, qword [rsp + 0x40]
mov r11, qword [rsp + 0x48]
mov ebx, dword [rsp + 0x2c]
mov rdx, qword [rsp + 0x30]
jmp 0x14005c0f0
mov r15d, r9d
mov ebp, dword [rsp + 0x5c]
jmp 0x14005c0f0
mov dword [rsp + 0x2c], ebx
mov r13, r11
mov qword [rsp + 0x40], r8
mov rbx, rdi
mov rdi, qword [r14 + 8]
test rdi, rdi
sete al
xor ebp, ebp
or al, byte [rsp + 0x3f]
mov r15d, 0
jne 0x14005bbba
lea rcx, [rdx + r13]
mov qword [rsp + 0x30], rdx
mov rdx, qword [rdi + 0x18]
movzx r8d, word [rdi + 0x20]
mov r15, r9
call fcn.14016e4a0
mov rdx, qword [rsp + 0x30]
mov r9, r15
movzx r15d, word [rdi + 0x20]
add r15d, r9d
mov rdi, rbx
mov r8, qword [rsp + 0x40]
mov r11, r13
mov ebx, dword [rsp + 0x2c]
jmp 0x14005c0f0
lea r10, [r11 + rdx]
mov r13, qword [r14 + 8]
cmp sil, 1
je 0x14005bf5c
mov ebp, 0xfffffe76
mov r15d, r9d
cmp eax, 2
jne 0x14005c0f0
mov ebp, 0xfffffec0
test r13, r13
je case.0x14005b8dc.1
xor eax, eax
test byte [r13 + 0x7c], 2
jne 0x14005c0dc
mov r13, qword [r13 + 0x80]
inc eax
test r13, r13
jne 0x14005bc00
mov r15d, r9d
jmp 0x14005c0f0
lea rax, [r11 + rdx]
mov rcx, qword [r14 + 8]
cmp sil, 1
jne 0x14005bd3a
mov r15, rdx
mov rdx, qword [rcx]
mov rdx, qword [rdx]
movzx edx, byte [rdx]
lea r10, [rax + 1]
mov byte [rax], 0
cmp byte [rcx + 0xeb1b], 4
jbe 0x14005c057
mov r13, r9
jmp 0x14005c076
mov ebp, 0xfffffe76
mov r15d, r9d
cmp sil, 1
jne 0x14005c0f0
mov r10, rdx
lea rax, [r11 + rdx]
mov edx, dword [r14 + 0x10]
mov cx, 1
test dl, 1
je 0x14005bc89
mov byte [rax + 1], 0
mov cx, 2
test dl, 2
je 0x14005bc98
movzx edx, cx
lea ecx, [rdx + 1]
mov byte [rax + rdx], 1
movzx ecx, cx
lea edx, [rcx - 1]
mov byte [rax], dl
lea r15d, [r9 + rcx]
xor ebp, ebp
mov rdx, r10
jmp 0x14005c0f0
mov qword [rsp + 0x40], r8
mov r13, r11
mov dword [rsp + 0x2c], ebx
mov rdi, qword [r14 + 8]
movzx eax, word [rdi + 0xecf4]
rol ax, 8
mov word [r11 + rdx], ax
lea rcx, [r11 + rdx]
add rcx, 2
mov qword [rsp + 0x30], rdx
lea rdx, [rdi + 0xecf6]
movzx r8d, word [rdi + 0xecf4]
mov rbx, r9
call fcn.14016e4a0
mov rdx, qword [rsp + 0x30]
mov r9, rbx
add r15w, word [rdi + 0xecf4]
mov rdi, qword [rsp + 0xd0]
mov ebx, dword [rsp + 0x2c]
mov r11, r13
mov r8, qword [rsp + 0x40]
add r15d, 6
jmp 0x14005c0f0
lea r10, [r11 + rdx]
mov rax, qword [r14 + 8]
cmp sil, 6
jne 0x14005bd6b
movzx eax, word [rax]
mov r15w, 2
jmp 0x14005be2c
mov ebp, 0xfffffe76
mov r15d, r9d
cmp byte [rsp + 0x3e], 2
jne 0x14005c0f0
mov r10, rdx
movzx edx, byte [rcx + 0xe990]
mov byte [rax], dl
mov rdx, r10
movzx ecx, byte [rcx + 0xe991]
mov byte [rax + 1], cl
jmp 0x14005c0e4
mov qword [rsp + 0x48], r11
mov qword [rsp + 0x40], r8
mov dword [rsp + 0x2c], ebx
mov r15d, ebx
mov r13, rax
mov qword [rsp + 0x50], r9
mov qword [rsp + 0x30], rdx
nop dword [rax]
test r13, r13
je 0x14005be10
mov rbx, r13
mov r13, qword [r13 + 0xc8]
cmp sil, 1
je 0x14005bdae
cmp qword [rbx + 0x28], 0
je 0x14005bd90
jmp 0x14005bdb1
mov rbx, rax
movzx eax, r15w
movzx ecx, word [rbx]
rol cx, 8
mov word [r10 + rax], cx
lea eax, [r15 + 2]
movzx eax, ax
movzx ecx, word [rbx + 0x30]
rol cx, 8
mov word [r10 + rax], cx
lea eax, [r15 + 4]
movzx r15d, ax
lea rcx, [r15 + r10]
mov rdx, qword [rbx + 0x28]
mov r8d, dword [rbx + 0x30]
mov rdi, r10
call fcn.14016e4a0
mov r10, rdi
mov rdx, qword [rsp + 0x30]
mov r9, qword [rsp + 0x50]
mov rdi, qword [rsp + 0xd0]
add r15w, word [rbx + 0x30]
mov rax, r13
jmp 0x14005bd90
cmp sil, 1
jne 0x14005c0b9
lea eax, [r15 - 2]
mov r8, qword [rsp + 0x40]
mov r11, qword [rsp + 0x48]
mov ebx, dword [rsp + 0x2c]
rol ax, 8
mov word [r10], ax
jmp 0x14005c0c7
mov dx, 1
mov ecx, edx
dec cl
mov byte [rax], cl
mov r9, r15
add r15d, edx
xor ebp, ebp
mov rdx, r13
jmp 0x14005c0f0
mov rdx, qword [rdx]
mov eax, 0x194
add rdx, rax
mov qword [rsp + 0x50], r9
mov dword [rsp + 0x2c], ebx
mov rbp, r8
mov qword [rsp + 0x48], r11
mov rax, qword [rsp + 0x30]
lea rcx, [r11 + rax]
movzx eax, word [r13 + 8]
test ax, ax
je 0x14005be9c
lea rbx, [r13 + 8]
rol ax, 8
mov word [rcx], ax
add rcx, 2
lea rdx, [r13 + 0xa]
movzx r8d, word [r13 + 8]
jmp 0x14005bebb
lea rbx, [rdx + 2]
movzx eax, word [rdx + 2]
rol ax, 8
mov word [rcx], ax
add rcx, 2
movzx r8d, word [rdx + 2]
add rdx, 0x130
call fcn.14016e4a0
movzx eax, word [rbx]
test al, 1
mov r8, rbp
jne 0x14005bf3b
mov rcx, qword [r13]
mov word [rcx + 0xecf2], 0
test rax, rax
je 0x14005bf3b
mov rdx, qword [rsp + 0x60]
mov r9, qword [rsp + 0x30]
add rdx, r9
xor ebx, ebx
xor r9d, r9d
jmp 0x14005bef9
add r9, 2
cmp r9, rax
jae 0x14005bf3b
cmp byte [rdx + r9 - 1], 8
jne 0x14005bef0
movzx r10d, byte [rdx + r9]
cmp r10d, 6
ja 0x14005bf24
bts ebx, r10d
mov word [rcx + 0xecf2], bx
cmp byte [rdx + r9 - 1], 8
jne 0x14005bef0
movzx r10d, byte [rdx + r9]
lea r11d, [r10 - 9]
cmp r11b, 2
ja 0x14005bef0
bts ebx, r10d
mov word [rcx + 0xecf2], bx
jmp 0x14005bef0
add r15d, eax
add r15d, 6
xor ebp, ebp
mov r11, qword [rsp + 0x48]
mov ebx, dword [rsp + 0x2c]
mov r9, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x30]
jmp 0x14005c0f0
test r13, r13
je 0x14005c0cc
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x50], r9
mov dword [rsp + 0x2c], ebx
mov qword [rsp + 0x48], r11
mov qword [rsp + 0x40], r8
mov ax, 2
mov rbx, r13
nop word cs:[rax + rax]
movzx ecx, ax
movzx edx, word [rbx]
rol dx, 8
mov word [r10 + rcx], dx
add eax, 2
movzx r15d, ax
lea rcx, [r15 + r10]
mov rdx, qword [rbx + 8]
movzx r8d, word [rbx]
mov rbp, r10
call fcn.14016e4a0
mov r10, rbp
add r15w, word [rbx]
movzx eax, r15w
mov ecx, dword [rbx + 0x10]
bswap ecx
mov dword [rbp + rax], ecx
lea eax, [r15 + 4]
mov rbx, qword [rbx + 0x80]
test rbx, rbx
jne 0x14005bf90
add r15d, 2
rol r15w, 8
mov word [r10], r15w
mov r15w, 2
mov r8, qword [rsp + 0x40]
mov ebx, dword [rsp + 0x2c]
nop dword [rax]
add r15w, word [r13 + 0x18]
inc r15d
mov r13, qword [r13 + 0x80]
test r13, r13
jne 0x14005c000
add r15d, eax
mov r9, qword [rsp + 0x50]
mov eax, r9d
mov r11, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x30]
jmp 0x14005c0eb
mov r15w, 2
lea eax, [r15 - 2]
rol ax, 8
mov word [r8], ax
add r15d, r9d
xor ebp, ebp
mov r8, qword [rsp + 0x40]
mov r11, qword [rsp + 0x48]
mov ebx, dword [rsp + 0x2c]
jmp 0x14005c0f0
mov r13, r9
test byte [rcx + 0xeafb], 0x20
jne 0x14005c076
mov byte [rax], 2
mov byte [rax + 1], dl
lea r10, [rax + 3]
mov byte [rax + 2], 4
mov r9b, 2
jmp 0x14005c079
xor r9d, r9d
test byte [rcx + 0xeb09], 8
je 0x14005c0a7
cmp byte [rcx + 0xeb1b], 3
ja 0x14005c0a7
test byte [rcx + 0xeafb], 8
jne 0x14005c0a7
add r9b, 2
mov byte [rax], r9b
mov byte [r10], dl
mov byte [r10 + 1], 3
movzx r9d, byte [rax]
mov rdx, r15
movzx r15d, r9b
inc r15d
mov r9, r13
mov eax, r9d
jmp 0x14005c0eb
mov r8, qword [rsp + 0x40]
mov r11, qword [rsp + 0x48]
mov ebx, dword [rsp + 0x2c]
add r15d, r9d
jmp 0x14005c0f0
mov word [r10], 0
mov r15w, 4
mov eax, r9d
jmp 0x14005c0eb
rol ax, 8
mov word [r10], ax
mov ax, 2
mov r15d, r9d
add r15d, eax
xor ebp, ebp
mov eax, r15d
sub eax, r9d
rol ax, 8
mov word [r11 + rdx - 2], ax
movzx eax, word [r14]
cmp eax, 0xff01
mov r10d, 0x3f
cmove eax, r10d
mov ecx, eax
and cl, 7
mov dl, 1
shl dl, cl
shr eax, 3
or byte [r8 + rax], dl
test ebp, ebp
lea r13, [0x140202ae0]
je 0x14005b850
jmp 0x14005c136
xor ebp, ebp
add word [rdi], r15w
mov eax, ebp
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret