Function at 0x140012550
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0xb0
mov qword [rsp + 0x98], r8
mov qword [rsp + 0xa0], rdx
mov qword [rsp + 0xa8], rcx
mov eax, dword [0x1402a88c8]
xor eax, 0xbe412395
xor edx, edx
div dword [0x1402a88cc]
mov ecx, eax
mov eax, ecx
and eax, 0x65339024
or ecx, 0x65339024
add eax, ecx
mov ecx, 0xdf1ec452
xor ecx, 0xbd3e2465
xor edx, edx
div ecx
mov r8d, 0xffffffff
xor r8d, 0x59c21044
mov edx, eax
and edx, r8d
mov ecx, eax
or ecx, r8d
xor ecx, 0xffffffff
imul ecx, edx
mov edx, eax
and edx, 0x59c21044
or eax, 0x59c21044
imul eax, edx
add eax, ecx
cmp eax, 0x83e5a351
je 0x140012a38
mov rdx, qword [rsp + 0xa8]
mov r8, qword [rsp + 0xa0]
mov r9, qword [rsp + 0x98]
mov eax, dword [0x1402a88d0]
mov ecx, 0xd34f178a
xor ecx, 0xe0b5b4dd
xor eax, ecx
and eax, dword [0x1402a88d4]
mov ecx, eax
add ecx, 1
xor eax, 0xffffffff
or eax, 0xa2f35fe7
add eax, ecx
mov ecx, 0xf88aa586
xor ecx, 0xdd5e7c53
sub eax, ecx
and eax, 0x43d5e7e3
mov ecx, 0xe86a3f72
xor ecx, 0xeaf25ae4
mov dword [rsp + 0x84], ecx
xor ecx, ecx
mov r10d, ecx
sub r10, r9
mov rcx, r8
sub rcx, r10
mov qword [rsp + 0x50], rcx
mov r10, r8
add r10, 8
mov qword [rsp + 0x58], r10
mov r10, qword [r8 + 8]
mov r11, r9
xor r11, 0xffffffffffffffff
add r10, r11
add r10, 1
mov qword [rsp + 0x60], r10
mov qword [rcx + 8], r10
mov qword [rcx + 0x18], 0
mov qword [rcx + 0x20], 0
mov qword [rcx], r9
mov qword [rcx + 0x10], rdx
add r8, qword [r8 + 8]
mov qword [rsp + 0x68], r8
mov rcx, r8
sar rcx, 0xc
mov qword [rsp + 0x70], rcx
add rdx, 0x20a0
mov qword [rsp + 0x78], rdx
movabs rcx, 0xfae435da4a199e99
movabs r9, 0xfae435da4a199e8c
xor rcx, r9
sar r8, cl
mov ecx, dword [rsp + 0x84]
mov qword [rsp + 0x88], r8
and r8, 0xff
shl r8, 3
add rdx, r8
mov qword [rsp + 0x90], rdx
cmp eax, ecx
jbe 0x1400125e3
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x48], rax
jmp 0x140012712
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
mov qword [rsp + 0x40], rax
cmp rax, 0
je 0x1400127e1
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x88]
cmp qword [rax + 8], rcx
mov qword [rsp + 0x48], rax
jne 0x140012712
mov rcx, qword [rsp + 0x70]
mov rax, qword [rsp + 0x40]
mov rdx, rcx
shr rdx, 6
and rdx, 7
mov rax, qword [rax + rdx*8 + 0x10]
mov qword [rsp + 0x38], rax
and rcx, 0x3f
mov edx, 1
shl rdx, cl
mov rcx, qword [rsp + 0x38]
mov rax, rcx
xor rax, 0xffffffffffffffff
mov r8, rdx
xor r8, 0xffffffffffffffff
or rax, r8
and rcx, rdx
xor rcx, 0xffffffffffffffff
and rax, rcx
xor rax, 0xffffffffffffffff
movabs rcx, 0xe49737b6921d81c2
movabs rdx, 0xe49737b6921d81c2
xor rcx, rdx
cmp rax, rcx
je 0x1400127e1
mov rax, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rax]
movabs r8, 0xfa8cdff95e5548e5
movabs r9, 0xfa8cdff95e5548e4
xor r8, r9
and rcx, r8
or rcx, rdx
mov qword [rax], rcx
mov eax, dword [0x1402a88d8]
mov ecx, dword [0x1402a88dc]
xor ecx, 0xcf31711d
xor edx, edx
div ecx
mov ecx, 0xf1f82da9
xor ecx, 0xcffb0984
and eax, ecx
mov ecx, 0xff87c6dc
xor edx, edx
div ecx
add eax, 0xe0d70f4d
cmp eax, 0xc72bce17
jbe 0x140012a41
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0xa8]
mov r8, qword [rsp + 0x50]
mov rax, qword [rsp + 0x58]
mov r9, qword [rsp + 0x98]
mov r10d, dword [0x1402a88e0]
mov r11d, dword [0x1402a88e4]
mov esi, 0xe315ea38
xor esi, 0xf7c5fdf1
xor r11d, esi
add r10d, r11d
xor r10d, 0x5eae33c3
sub r10d, 0xafbe363a
mov esi, 0xdfb717e3
xor esi, 0x1bec5221
mov r11d, 0x510757c
xor r11d, 0xfaef8a83
xor esi, r11d
mov r11d, r10d
and r11d, esi
mov edi, 0x931cdfc0
xor edi, 0x57479a02
mov esi, r10d
xor esi, edi
add r10d, esi
sub r10d, r11d
mov dword [rsp + 0x24], r10d
mov r10d, 0xbd1b4918
xor r10d, 0x6ccdddc1
mov dword [rsp + 0x34], r10d
mov qword [rax], r9
mov rax, r8
sar rax, 0xc
mov qword [rsp + 0x28], rax
sar r8, 0x15
call fcn.1400123f9
mov r9, qword [rsp + 0x28]
mov rdx, rax
mov eax, dword [rsp + 0x24]
movabs rcx, 0xb8ca81d1edc9ce1d
movabs r8, 0xb8ca81d1edc9ce1b
xor rcx, r8
shr r9, cl
mov rcx, qword [rsp + 0x28]
mov r8, r9
and r8, 7
xor r8, 0xffffffffffffffff
and r9, 7
xor r9, 0xffffffffffffffff
movabs r10, 0x225d02270e6f5485
movabs r11, 0xdda2fdd8f190ab7a
xor r10, r11
xor r8, r10
xor r9, 0xffffffffffffffff
or r8, r9
mov r14, qword [rdx + r8*8 + 0x10]
or rcx, rcx
xor rcx, 0xffffffffffffffff
movabs r9, 0x349575ff0c9a34b0
movabs r10, 0x349575ff0c9a348f
xor r9, r10
movabs r10, 0x90ae5669fea31fdd
movabs r11, 0x90ae5669fea31fe2
xor r10, r11
or r9, r10
xor r9, 0xffffffffffffffff
or rcx, r9
xor rcx, 0xffffffffffffffff
mov ebx, 1
shl rbx, cl
mov ecx, dword [rsp + 0x34]
mov r10, r14
xor r10, 0xffffffffffffffff
mov r11, rbx
xor r11, 0xffffffffffffffff
movabs rsi, 0xdc4f45fe531b55ea
movabs r9, 0x83cb415b9b5efb5d
xor rsi, r9
movabs r9, 0xef9e3c49d16146e1
movabs rdi, 0x1061c3b62e9eb91e
xor r9, rdi
xor rsi, r9
movabs rdi, 0x5f8404a5c845aeb7
mov r9, r10
and r9, rdi
and r14, rsi
movabs r15, 0x5f8404a5c845aeb7
mov rdi, r11
and rdi, r15
and rbx, rsi
or r9, r14
or rdi, rbx
xor r9, rdi
or r10, r11
xor r10, 0xffffffffffffffff
movabs r11, 0x1ae77aace2f12ff3
movabs rdi, 0x45637e092ab48144
xor r11, rdi
or r11, rsi
and r10, r11
or r9, r10
mov qword [rdx + r8*8 + 0x10], r9
cmp eax, ecx
je 0x14001281d
invalid
mov rax, qword [rsp + 0x50]
add rsp, 0xb0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
cdq
scasb al, byte [rdi]
scasb al, byte [rdi]
jmp 0x1400125e3
scasd eax, dword [rdi]
pop rdx
jp 0x1400129f9
jmp 0x14001281d