Function at 0x6d383340
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x428
mov ebx, edx
mov r12, rcx
lea r13, [rsp + 0x20]
test ebx, ebx
je 0x6d383670
test rcx, rcx
je 0x6d383670
mov esi, ebx
shr esi, 0xa
and esi, 7
je 0x6d383648
mov r8d, 0x400
mov rdx, r13
sub ebx, 0x400
call fcn.6d3ad8d0
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d37d550
test ebx, ebx
je 0x6d383670
cmp esi, 1
je 0x6d383648
cmp esi, 2
je 0x6d3834c1
cmp esi, 3
je 0x6d383491
cmp esi, 4
je 0x6d383461
cmp esi, 5
je 0x6d383431
cmp esi, 6
je 0x6d383401
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
sub ebx, 0x400
call fcn.6d3ad8d0
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d37d550
test ebx, ebx
je 0x6d383670
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
sub ebx, 0x400
call fcn.6d3ad8d0
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d37d550
test ebx, ebx
je 0x6d383670
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
sub ebx, 0x400
call fcn.6d3ad8d0
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d37d550
test ebx, ebx
je 0x6d383670
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
sub ebx, 0x400
call fcn.6d3ad8d0
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d37d550
test ebx, ebx
je 0x6d383670
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
sub ebx, 0x400
call fcn.6d3ad8d0
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d37d550
test ebx, ebx
je 0x6d383670
sub ebx, 0x400
jmp 0x6d383622
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d3ad8d0
lea esi, [rbx - 0x400]
mov rdx, r13
mov rcx, r12
mov r8d, 0x400
call fcn.6d37d550
test esi, esi
je 0x6d383670
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d3ad8d0
lea esi, [rbx - 0x800]
mov rdx, r13
mov rcx, r12
mov r8d, 0x400
call fcn.6d37d550
test esi, esi
je 0x6d383670
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d3ad8d0
lea esi, [rbx - 0xc00]
mov rdx, r13
mov rcx, r12
mov r8d, 0x400
call fcn.6d37d550
test esi, esi
je 0x6d383670
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d3ad8d0
lea esi, [rbx - 0x1000]
mov rdx, r13
mov rcx, r12
mov r8d, 0x400
call fcn.6d37d550
test esi, esi
je 0x6d383670
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d3ad8d0
lea esi, [rbx - 0x1400]
mov rdx, r13
mov rcx, r12
mov r8d, 0x400
call fcn.6d37d550
test esi, esi
je 0x6d383670
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d3ad8d0
lea esi, [rbx - 0x1800]
mov rdx, r13
mov rcx, r12
mov r8d, 0x400
call fcn.6d37d550
test esi, esi
je 0x6d383670
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d3ad8d0
lea esi, [rbx - 0x1c00]
mov rdx, r13
mov rcx, r12
mov r8d, 0x400
call fcn.6d37d550
test esi, esi
je 0x6d383670
sub ebx, 0x2000
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d3ad8d0
mov r8d, 0x400
mov rdx, r13
mov rcx, r12
call fcn.6d37d550
test ebx, ebx
je 0x6d383670
cmp ebx, 0x3ff
ja 0x6d3834d0
mov r8, rbx
mov rdx, r13
mov rcx, r12
call fcn.6d3ad8d0
mov r8, rbx
mov rdx, r13
mov rcx, r12
call fcn.6d37d550
mov eax, dword [r12 + 0x168]
test byte [r12 + 0x23b], 0x20
je 0x6d383730
and eax, 0x300
mov r8d, 4
mov rdx, r13
mov rcx, r12
mov dword [r12 + 0x494], 0x81
cmp eax, 0x300
je 0x6d383751
call fcn.6d3ad8d0
movzx ecx, byte [rsp + 0x20]
movzx r8d, byte [rsp + 0x21]
movzx r9d, byte [rsp + 0x23]
movzx r10d, byte [rsp + 0x22]
shl ecx, 0x18
shl r8d, 0x10
add r8d, ecx
shl r10d, 8
add r9d, r8d
add r10d, r9d
cmp r10d, dword [r12 + 0x26c]
je 0x6d383756
test byte [r12 + 0x23b], 0x20
mov r11d, dword [r12 + 0x168]
jne 0x6d383770
shr r11d, 0xa
and r11d, 1
lea rdx, str.CRC_error
mov rcx, r12
test r11b, r11b
je 0x6d38377e
call fcn.6d37e2f0
mov eax, 1
add rsp, 0x428
pop rbx
pop rsi
pop r12
pop r13
ret
mov r8d, 4
mov rdx, r13
mov rcx, r12
mov dword [r12 + 0x494], 0x81
test ah, 8
je 0x6d3836af
call fcn.6d3ad8d0
xor eax, eax
add rsp, 0x428
pop rbx
pop rsi
pop r12
pop r13
ret
shr r11d, 9
xor r11d, 1
and r11d, 1
jmp 0x6d383704
call fcn.6d37e1b0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop