Function at 0x140063780
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push rbx
push rsi
push r12
push r13
lea rbp, [rsp - 0x140]
sub rsp, 0x240
mov rax, qword [0x14049f410]
xor rax, rsp
mov qword [rbp + 0x120], rax
mov eax, dword [rcx + 0x1f8]
mov ebx, 1
mov dword [rsp + 0x48], eax
mov r12, rdx
mov eax, dword [rcx + 0x358]
mov r13, r8
mov qword [rsp + 0x50], rdx
xor edx, edx
mov dword [rsp + 0x4c], eax
lea esi, [rbx + 2]
mov eax, dword [rcx + 0x1e8]
mov qword [rsp + 0x58], r9
mov qword [rsp + 0x38], rcx
cmp eax, 0x20000003
ja 0x140063822
je 0x140063818
sub eax, 0x10000001
je 0x140063812
sub eax, 0x200000
je 0x140063841
sub eax, 0xfe00000
je 0x140063818
cmp eax, ebx
jne 0x140063837
mov dword [rsp + 0x30], 2
mov qword [rsp + 0x40], rbx
jmp 0x14006384a
mov dword [rsp + 0x30], esi
jmp 0x140063845
mov dword [rsp + 0x30], 2
jmp 0x140063845
cmp eax, 0x20200001
je 0x140063841
cmp eax, 0x30100001
je 0x140063841
cmp eax, 0x30200001
je 0x140063841
mov eax, 0xfffffffa
jmp 0x140063dc5
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x40], rdx
mov rcx, qword [rcx + 8]
mov eax, 0x38e38e39
mov qword [rsp + 0x280], rdi
mov edi, dword [r12 + 0xc]
mov qword [rsp + 0x238], r14
mov r14d, esi
mov qword [rsp + 0x230], r15
mov r15d, dword [r12 + 8]
imul r15d
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, esi
cmovg r14d, edx
cmp r14d, ebx
cmovl r14d, ebx
mov ebx, 4
test r15d, r15d
je 0x140063987
test edi, edi
je 0x140063987
mov rax, qword [rcx]
xorps xmm0, xmm0
mov edx, r15d
imul edx, edi
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
call qword [rax + 8]
test rax, rax
je 0x140063970
mov qword [rbp - 0x28], rax
mov r8, r12
xor eax, eax
mov dword [rbp - 0x30], r15d
mov qword [rsp + 0x60], rax
mov eax, dword [r12 + 8]
mov dword [rsp + 0x68], eax
mov eax, dword [r12 + 0xc]
mov dword [rbp - 0x3c], r15d
mov r15, qword [rsp + 0x38]
mov dword [rsp + 0x6c], eax
mov rcx, r15
lea rax, [rbp - 0x40]
mov dword [rbp - 0x38], edi
mov qword [rsp + 0x20], rax
lea r9, [r15 + 0x238]
mov dword [rbp - 0x40], 0x40000001
lea rdx, [r15 + 0x1e8]
call fcn.14007bbb0
test eax, eax
jne 0x140063960
mov edi, ebx
cmp r14d, 1
jbe 0x14006398c
mov dword [r15 + 0x3c8], eax
nop dword [rax]
mov r9d, r14d
lea r8, [rsp + 0x60]
lea rdx, [rbp - 0x40]
mov rcx, r15
dec edi
call fcn.140086610
test eax, eax
jne 0x140063960
test edi, edi
jne 0x140063940
jmp 0x14006398c
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x40]
call fcn.140081c90
jmp 0x14006398c
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
mov r15, qword [rsp + 0x38]
mov r12d, dword [r12 + 8]
mov eax, 0x66666667
mov r14, qword [rsp + 0x50]
mov rcx, qword [r15 + 8]
imul r12d
mov edi, dword [r14 + 0xc]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 1
cmp edx, esi
cmovg esi, edx
cmp esi, 1
cmovl esi, eax
test r12d, r12d
je 0x140063ac8
test edi, edi
je 0x140063ac8
mov rax, qword [rcx]
xorps xmm0, xmm0
mov edx, r12d
imul edx, edi
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
call qword [rax + 8]
test rax, rax
je 0x140063ab0
mov qword [rbp - 0x78], rax
lea r9, [r15 + 0x238]
mov eax, dword [r14 + 8]
lea rdx, [r15 + 0x1e8]
mov dword [rsp + 0x68], eax
mov r8, r14
mov eax, dword [r14 + 0xc]
mov rcx, r15
mov dword [rsp + 0x6c], eax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x80], r12d
mov dword [rsp + 0x74], r12d
mov dword [rsp + 0x78], edi
mov dword [rsp + 0x70], 0x40000001
mov qword [rsp + 0x60], 0
call fcn.14007bbb0
test eax, eax
jne 0x140063a91
cmp esi, 1
jbe 0x140063acd
mov dword [r15 + 0x3c8], eax
nop dword [rax]
nop word [rax + rax]
mov r9d, esi
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x70]
mov rcx, r15
dec ebx
call fcn.140086610
test eax, eax
jne 0x140063a91
test ebx, ebx
jne 0x140063a70
jmp 0x140063ac8
mov rcx, qword [r15 + 8]
lea rdx, [rsp + 0x70]
call fcn.140081c90
jmp 0x140063ac8
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
mov r12d, dword [rsp + 0x74]
mov eax, dword [r13 + 8]
xor r11d, r11d
mov rdx, qword [rbp - 0x28]
xor r9d, r9d
mov rcx, qword [r13 + 0x18]
test eax, eax
je 0x140063b3b
mov r10d, dword [r13 + 4]
lea edi, [rax - 1]
shr edi, 1
mov ebx, r10d
inc edi
test r10d, r10d
je 0x140063b1c
lea r8d, [r10 - 1]
shr r8d, 1
inc r8d
cmp byte [rcx], 0
je 0x140063b0e
movzx eax, byte [rdx]
add r11, rax
inc r9d
add rcx, 2
add rdx, 2
sub r8, 1
jne 0x140063b00
add rdx, rbx
add rcx, rbx
sub rdi, 1
jne 0x140063af1
test r9d, r9d
je 0x140063b3b
mov rax, r11
mov ecx, r9d
xor edx, edx
div rcx
mov r11, rax
mov ecx, 0xc8c80000
call fcn.140080210
mov r10d, eax
mov dword [rbp + 0x10], 0
mov ecx, 0xff
mov dword [rbp + 0x1c], 0xff
mov eax, 0xcccccccd
mov dword [rsp + 0x60], 0
mul r10d
movzx eax, r11b
shr edx, 2
add edx, 0x10000
mov dword [rsp + 0x6c], 0xff
imul edx, eax
shr edx, 0x10
cmp edx, ecx
cmovb ecx, edx
mov eax, ecx
mov dword [rbp + 0x18], ecx
shr eax, 1
mov dword [rbp + 0x14], eax
lea eax, [rcx + rcx*2]
mov dword [rsp + 0x68], ecx
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [rsp + 0x64], eax
cmp ecx, 2
jae 0x140063bd4
xor eax, eax
lea rcx, [rbp + 0x20]
nop dword [rax]
nop dword [rax + rax]
mov byte [rcx], al
lea rcx, [rcx + 1]
inc eax
cmp eax, 0xff
jbe 0x140063bc0
jmp 0x140063c55
xor r15d, r15d
xor esi, esi
xor r14d, r14d
cmp ecx, 0xff
setne r15b
add r15, 2
nop word [rax + rax]
mov r8d, dword [rbp + r14 + 0x10]
mov r10d, dword [rbp + rsi + 0x14]
cmp r8d, r10d
ja 0x140063c3d
mov ebx, dword [rsp + rsi + 0x64]
mov r11d, r10d
mov edi, dword [rsp + r14 + 0x60]
sub r11d, r8d
sub ebx, edi
xor r9d, r9d
nop dword [rax]
nop word [rax + rax]
xor edx, edx
mov ecx, r8d
mov eax, r9d
inc r8d
div r11d
add r9d, ebx
add al, dil
mov byte [rbp + rcx + 0x20], al
cmp r8d, r10d
jbe 0x140063c20
add rsi, 4
add r14, 4
sub r15, 1
jne 0x140063bf0
mov r15, qword [rsp + 0x38]
mov r14, qword [rsp + 0x50]
mov eax, dword [r14]
mov edi, dword [r14 + 4]
mov r8d, dword [rsp + 0x48]
mov ecx, dword [rsp + 0x30]
mov r10, qword [rbp - 0x28]
mov r9, qword [rbp - 0x78]
imul edi, r8d
imul eax, ecx
add rdi, rax
mov eax, dword [rsp + 0x78]
add rdi, qword [r15 + 0x200]
add rdi, qword [rsp + 0x40]
mov rdx, rdi
test eax, eax
je 0x140063cea
mov esi, eax
test r12d, r12d
je 0x140063cd9
mov ebx, ecx
mov r11d, r12d
nop word [rax + rax]
movzx eax, byte [r10]
movzx ecx, byte [rbp + rax + 0x20]
movzx eax, byte [r9]
sub ecx, eax
movzx eax, byte [rdx]
add eax, ecx
test eax, 0xffffff00
je 0x140063cc3
neg eax
sar eax, 0x1f
movzx eax, al
mov byte [r9], al
inc r10
inc r9
add rdx, rbx
sub r11, 1
jne 0x140063ca0
mov ecx, dword [rsp + 0x30]
add rdi, r8
mov rdx, rdi
sub rsi, 1
jne 0x140063c90
mov r14, qword [rsp + 0x50]
mov eax, dword [rsp + 0x4c]
lea r9, [rsp + 0x70]
mov dword [rsp + 0x28], eax
lea r8, [r15 + 0x1e8]
mov rax, qword [rsp + 0x58]
mov rdx, r14
mov rcx, r15
mov qword [rsp + 0x20], rax
call fcn.1400630c0
mov eax, dword [rbp - 0x40]
xor r14d, r14d
mov rdi, qword [r15 + 8]
mov ebx, r14d
shr eax, 0x14
and eax, 3
add eax, 1
je 0x140063d66
nop dword [rax + rax]
mov eax, ebx
lea rsi, [rbp - 0x28]
shl rax, 4
add rsi, rax
mov rdx, qword [rsi]
test rdx, rdx
je 0x140063d51
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x10]
mov qword [rsi], r14
mov eax, dword [rbp - 0x40]
inc ebx
shr eax, 0x14
and eax, 3
inc eax
cmp ebx, eax
jb 0x140063d30
mov rdi, qword [r15 + 8]
mov eax, dword [rsp + 0x70]
mov ebx, r14d
mov r15, qword [rsp + 0x230]
shr eax, 0x14
and eax, 3
add eax, 1
je 0x140063db3
mov eax, ebx
lea rsi, [rbp - 0x78]
shl rax, 4
add rsi, rax
mov rdx, qword [rsi]
test rdx, rdx
je 0x140063da1
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x10]
mov qword [rsi], r14
mov eax, dword [rsp + 0x70]
inc ebx
shr eax, 0x14
and eax, 3
inc eax
cmp ebx, eax
jb 0x140063d80
mov r14, qword [rsp + 0x238]
xor eax, eax
mov rdi, qword [rsp + 0x280]
mov rcx, qword [rbp + 0x120]
xor rcx, rsp
call fcn.1400fc4b0
add rsp, 0x240
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret