Function at 0x140012d60
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x108
movsxd rdi, dword [0x14016aab0]
mov r11, rdx
movsxd rbx, dword [0x14016aa8c]
mov r10, rdi
mov r15, qword [0x14016aa68]
movzx r14d, word [rsp + 0x180]
movzx esi, byte [0x14016aa40]
mov dl, byte [r8 + rbx*2]
mov r8d, 1
mov rax, qword [r15 + 0xc8f8]
movzx ebp, word [0x14016aa58]
lea ecx, [r14 + 4]
xor rax, rdi
mov byte [rsp + 0x158], dl
mov qword [rsp + 0xa8], rax
lea eax, [r14 + r14*2]
mov eax, dword [r9 + rax*4]
movzx r9d, si
sub eax, ebx
add sil, r8b
cdqe
sub ebx, r8d
mov qword [rsp + 0xa0], rax
or r9w, bp
movsxd rax, dword [0x14016aa88]
mov r12b, al
mov qword [rsp + 0x68], rax
mov dword [0x14016aa8c], ebx
mov eax, 0xffff
add bp, ax
mov byte [0x14016aa40], sil
mov word [0x14016aa58], bp
dec ebx
mov rax, qword [r15 + 0x338]
mov r15, qword [rsp + 0x188]
mov qword [rsp + 0x78], rax
mov rax, qword [0x14016aa50]
mov word [rsp + 0x50], r9w
mov r13, qword [rax + 0x95d8]
movabs rax, 0x842108421084211
mul r13
mov rax, r13
sub rax, rdx
shr rax, 1
add rax, rdx
mov rdx, qword [0x14016aaa8]
shr rax, 0xa
sub rdx, r8
imul rax, rax, 0x7c0
movzx r10d, dx
mov qword [rsp + 0xc0], rdx
sub r13, rax
mov rax, qword [rsp + 0x168]
movsxd rax, dword [rax + 0x7574]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x150]
mov rax, qword [rax + 0x7370]
xor rax, rdi
mov qword [0x14016aaa8], rdx
mov qword [rsp + 0x60], rax
sub edi, r8d
mov eax, dword [0x14016aa84]
mov r8d, 0x114e
add eax, 0xffffe1ac
movsxd rdx, ebx
cdqe
or r10w, r8w
mov qword [rsp + 0xb0], rax
mov rax, qword [0x14016aa78]
mov dword [0x14016aab0], edi
mov dword [0x14016aa8c], ebx
movzx r8d, byte [rdx + r11]
mov eax, dword [rax + rcx*4]
mov qword [rsp + 0x80], rdx
cdq
idiv r8d
mov word [rsp + 0x180], r10w
movsxd rcx, eax
mov rax, qword [0x14016aa48]
mov qword [rsp + 0xc8], rcx
mov ecx, dword [r15 + 0x12e8]
mov r11d, 1
mov r8, qword [rsp + 0x170]
cmp dword [r15 + rax*4], ecx
jge 0x140013090
sub r12b, r11b
movzx edx, r14w
movzx eax, r12b
movsxd rcx, dword [r8 + rax*4]
mov rax, qword [rsp + 0x70]
cmp qword [rax + rdx*8], rcx
jbe 0x140013090
mov rcx, qword [rsp + 0x160]
movsxd rax, edi
sub edi, r11d
movzx ecx, word [rcx + rax*2]
cmp cx, word [0x14016aa70]
mov dword [0x14016aab0], edi
jb 0x140013090
mov rax, qword [rsp + 0x68]
lea rax, [rax + rdx*2]
movzx ecx, byte [rdx + rax]
cmp r9w, cx
jae 0x140013090
mov rcx, qword [rsp + 0x80]
movabs rax, 0x559585797069a491
mov rdx, qword [rsp + 0x190]
movzx r8d, r14w
mul qword [rdx + rcx*8]
lea ecx, [r8*2 + 4]
movzx eax, r9w
shr rdx, 0xc
xor rdx, rax
mov rax, qword [rsp + 0xa0]
sub rdx, 0x92
mov qword [rax + rcx*8], rdx
add dword [0x14016aa8c], r11d
mov eax, dword [0x14016aab0]
lea ecx, [rax + 1]
lea ecx, [rax + rcx*2]
mov rax, qword [0x14016aa68]
movsxd rdx, ecx
and qword [rax + rdx*8], 0xed
xor edx, edx
movzx eax, r10w
mov eax, dword [r15 + rax*8]
add eax, r8d
movsxd r8, dword [0x14016aa8c]
cdqe
xor rax, 0xee2
sub rax, qword [0x14016aa48]
mov qword [0x14016aa48], rax
lea eax, [r8 + r8*2]
movsxd rcx, eax
mov eax, 0x1dc0
div qword [rcx*8 + 0x22dce70]
xor edx, edx
movzx ecx, r12b
div r8
movsxd rax, dword [0x14016aa74]
mov r8, qword [rsp + 0x170]
or rdx, rax
mov rax, qword [0x14016aa50]
add rcx, rcx
mov qword [rax + rcx*8 + 8], rdx
mov edi, dword [0x14016aab0]
mov ebx, dword [0x14016aa8c]
movzx ebp, word [0x14016aa58]
mov sil, byte [0x14016aa40]
movsxd rax, ebx
movsxd rcx, dword [r13 + rax*4]
mov dword [rsp + 0x54], ecx
cmp ecx, 0xb5d
jge 0x1400134d3
xor edx, edx
mov qword [rsp + 0x88], rcx
mov eax, 0x846
lea rsi, [rcx + rcx*2]
div qword [rsp + 0xa8]
movzx eax, r9w
mov qword [rsp + 0xd8], rax
movzx eax, r9w
mov qword [rsp + 0xf0], rax
mov rax, qword [rsp + 0x60]
shl rax, 4
mov qword [rsp + 0xb8], rax
mov rax, qword [rsp + 0x178]
add rax, rcx
shl rsi, 3
mov qword [rsp + 0x98], rax
lea rax, [rcx + 5]
lea rax, [r8 + rax*4]
mov qword [rsp + 0xd0], rdx
mov qword [rsp + 0x90], rax
lea rdx, [rcx*8 + 0x22dce70]
mov rax, qword [rsp + 0x168]
sub rax, r8
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0xe8], rax
mov rax, r15
movzx r15d, word [rsp + 0x180]
sub rax, r8
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0xe0], rax
lea eax, [rdi + 0x22]
add r12b, 0xff
movsxd rcx, eax
mov rax, qword [rsp + 0xb0]
movzx ebp, r12b
movzx r9d, word [rax + rcx*2]
mov eax, ebx
mov rcx, qword [0x14016aa68]
shl eax, 2
movsxd r8, eax
mov rax, qword [0x14016aa30]
movzx r10d, word [rdx + rcx - 0x22dce70]
mov rdx, qword [0x14016aa48]
mov rcx, qword [rsi + rcx]
movzx r11d, word [rax + r8*8]
mov rax, qword [rsp + 0x68]
movzx r8d, r12b
movzx eax, byte [rax + 0x532]
or r10w, ax
mov word [rsp + 0x28], r10w
mov word [rsp + 0x20], r11w
call fcn.1400117bc
mov r9, qword [rsp + 0x58]
movsxd rcx, eax
mov rax, qword [0x14016aa30]
mov qword [r9 + rax - 0x22dce70], rcx
mov eax, 0xd5a
mov r8d, dword [0x14016aa8c]
cdq
mov rcx, qword [0x14016aa48]
movsxd rdi, dword [0x14016aa84]
idiv r8d
movsxd rsi, eax
mov rax, qword [rsp + 0xa0]
mov rdx, qword [rax + rcx*8]
mov eax, dword [r9 + r13 - 0x22dce70]
add eax, 0x72e
movsxd r9, eax
mov rax, qword [rsp + 0x78]
movzx ebx, byte [rax + 0x983]
lea eax, [r8 + r8]
imul ebx, ecx
inc rcx
mov qword [0x14016aa48], rcx
mov rcx, qword [rsp + 0x168]
movsxd r8, eax
movzx eax, r15w
xor rax, qword [rsp + 0xa8]
movsxd r11, dword [rcx + 0x25c]
movsxd r10, dword [rcx + r8*4]
mov rcx, qword [rsp + 0x60]
xor r10, qword [rsp + 0x88]
mov r8, qword [rsp + 0xd0]
mov qword [rsp + 0x48], rcx
mov rcx, rsi
mov qword [rsp + 0x40], r10
mov qword [rsp + 0x38], r11
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rdi
call fcn.14000175c
mov rdx, qword [rsp + 0x78]
mov r8, qword [rsp + 0xd8]
movzx ebx, r15w
mov byte [rbx + rdx], al
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [0x14016aab4]
imul rcx, qword [rax + r8*8 + 0x18]
movzx r8d, byte [rdx + 0x7c4]
mov eax, 0xc50b447
mul r8d
mov eax, r8d
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 0xb
imul eax, eax, 0xf44
sub r8d, eax
mov rax, qword [rsp + 0xe0]
movsxd rdx, r8d
movzx r8d, byte [rbp + rbp*2 + 0x353]
mov rbp, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x88]
movzx r9d, word [rax + rbp - 0x14]
mov rax, qword [rsp + 0xe8]
movzx eax, word [rax + rbp + 0xc]
or ax, word [0x14016aa90]
mov word [rsp + 0x28], ax
mov word [rsp + 0x20], r9w
mov r9, rsi
call fcn.1400117bc
mov r8, qword [rsp + 0x150]
xor edx, edx
mov rcx, qword [rsp + 0x58]
mov r9d, 1
mov word [0x14016aa5c], ax
add r15w, r9w
mov rax, qword [rsp + 0x160]
mov rcx, qword [rcx]
xor rcx, qword [rsp + 0x60]
movzx eax, word [rax + rbx*2 + 0x10]
sub rcx, rax
movzx eax, r14w
add r14w, r9w
mov qword [rax*8 + 0x22dce70], rcx
mov rcx, qword [rsp + 0xf0]
mov rax, qword [rsp + 0x190]
mov rax, qword [rax + 0xe0c8]
add qword [rcx*8 + 0x22dce70], rax
movsxd rax, dword [0x14016aab4]
movsxd r10, dword [rbp]
mov ebp, dword [rsp + 0x54]
movsxd rbx, dword [0x14016aa74]
movsxd r9, dword [0x14016aa8c]
movzx ecx, r14w
add rcx, rcx
div qword [r8 + rcx*8]
mov rcx, qword [0x14016aa50]
mov rdi, rax
mov rax, qword [rsp + 0x98]
movzx r8d, byte [rax]
mov rax, qword [rsp + 0xb8]
mov r11d, dword [rax + rcx]
mov rax, qword [rsp + 0x70]
or r10, qword [rax + 0x3350]
mov rax, qword [rsp + 0x68]
movzx ecx, byte [rax + 0xe00]
mov eax, ebp
imul ecx, ebp
imul eax, ebp
movsxd rdx, ecx
mov rcx, rdi
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x40], r10
cdqe
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0x1ce4
mov dword [rsp + 0x28], r11d
movzx edx, r15w
mov qword [rsp + 0x20], rbx
call fcn.14000175c
mov rdx, qword [rsp + 0x58]
mov r11d, 1
add qword [rsp + 0x90], 4
add rsi, r11
add qword [rsp + 0x98], r11
add ebp, r11d
movsxd rcx, eax
mov rax, qword [0x14016aa68]
mov qword [rsp + 0x88], rsi
mov rsi, qword [rsp + 0x80]
add rsi, 0x18
mov dword [rsp + 0x54], ebp
mov qword [rdx + rax - 0x22dce58], rcx
add rdx, 8
mov edi, dword [0x14016aab0]
mov ebx, dword [0x14016aa8c]
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x58], rdx
cmp ebp, 0xb5d
jl 0x14001315a
movzx ebp, word [0x14016aa58]
mov sil, byte [0x14016aa40]
mov word [rsp + 0x180], r15w
movzx r10d, word [rsp + 0x180]
mov r15, qword [rsp + 0x188]
movsxd rcx, dword [0x14016aa74]
xor edx, edx
mov r8, qword [rsp + 0x150]
movzx eax, r10w
mov rax, qword [r8 + rax*8]
div rcx
mov rcx, qword [rsp + 0x160]
mov dword [0x14016aa74], edx
movzx eax, r14w
movsxd rdx, dword [r15 + rax*4]
add rdx, qword [r8 + 0x17ee0]
movsxd rax, ebx
add ebx, r11d
movzx r8d, word [rcx + rax*2]
movzx eax, word [0x14016aa5c]
imul eax, dword [0x14016aa88]
mov dword [0x14016aa8c], ebx
movzx r9d, word [rcx + 0x5fba]
mov rcx, qword [rsp + 0x168]
mov rbx, qword [rsp + 0x78]
movsxd r11, eax
mov rax, qword [rsp + 0x178]
movzx eax, byte [rax + 0x158d]
sub edi, eax
movzx eax, bp
inc rax
movzx ebp, r14w
lea rax, [rax + rax*2]
movsxd r10, dword [rcx + rax*4]
movzx eax, byte [rbx + 0x128d]
mov qword [rsp + 0x48], rax
movzx ecx, sil
mov qword [rsp + 0x40], rcx
mov ecx, ebp
mov qword [rsp + 0x38], 0x1280
mov qword [rsp + 0x30], r10
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], r11
call fcn.14000175c
mov r9, qword [rsp + 0x170]
mov esi, 1
mov r10, qword [rsp + 0xc8]
mov byte [rbp + 0x335], al
movzx eax, word [rsp + 0x180]
add ax, si
movzx r11d, ax
mov qword [rsp + 0x150], r11
xor dword [r9 + r11*4], 0xf3f
mov eax, dword [0x14016aa8c]
lea ecx, [rax + rax*2]
mov rax, qword [rsp + 0xc0]
movsxd r8, ecx
movzx ecx, byte [r10 + 0x107c]
mov eax, dword [rax + r8*4]
and eax, ecx
movzx ecx, word [rsp + 0x50]
and eax, dword [r15 + 0xbf88]
cdq
idiv dword [r13 + r8*4]
mov dword [r13 + r8*4], eax
mov eax, 0x1e5a
cdq
movzx r8d, r12b
idiv dword [r9 + 0xbf74]
xor edx, edx
mov qword [rsp + 0xb8], r8
mov dword [r9 + 0xbf74], eax
movzx eax, r14w
div ecx
xor byte [r8 + rbx], al
movsxd r12, dword [0x14016aa90]
mov rax, qword [0x14016aa50]
mov rcx, r12
mov dword [rsp + 0x180], r12d
cmp r12, qword [rax + r11*8 + 0x38]
jb 0x14001381c
mov rax, qword [rsp + 0xb0]
lea rdi, [r12 + r10]
mov r8, qword [rsp + 0x178]
lea r13, [r13 + r12*4]
mov rbx, qword [rsp + 0x60]
mov r9, r8
sub r9, r10
mov qword [rsp + 0x188], r11
lea rax, [rax + r12*2]
mov qword [rsp + 0xc0], r9
mov qword [rsp + 0x168], rax
mov rax, qword [0x14016aa38]
xor edx, edx
div rcx
mov rcx, qword [rsp + 0x68]
add r14w, si
movzx esi, r14w
xor al, byte [rcx + rbp]
mov byte [r9 + rdi + 2], al
lea ecx, [rsi + 0xb]
mov rax, qword [rsp + 0x70]
movzx edx, byte [rdi]
movzx ebp, r14w
movzx r8d, byte [r8 + rbp]
add r8, qword [rax + rcx*8]
mov rax, qword [rsp + 0x160]
mov rcx, qword [rsp + 0x150]
movzx r9d, word [rax + rcx*2]
lea rax, [rbx + rbx*2]
mov rcx, qword [rsp + 0xa0]
movzx ecx, word [rcx + rax*8]
movzx eax, word [r13]
mov word [rsp + 0x28], ax
mov word [rsp + 0x20], cx
mov rcx, qword [rsp + 0xa8]
call fcn.1400117bc
mov r10b, byte [rsp + 0x158]
lea ecx, [rsi*2 + 0x17]
mov dword [0x14016aa8c], eax
add r10b, 0xff
mov rax, qword [rsp + 0x78]
mov byte [rsp + 0x158], r10b
movzx r9d, byte [rcx + rax]
movzx eax, r10b
cmp r9d, eax
jae 0x1400137bf
mov r11, qword [rsp + 0x168]
lea eax, [rsi + rsi*2]
mov r8d, dword [r15 + rax*4]
mov ebp, 1
mov qword [rsp + 0x170], rax
mov rax, qword [rsp + 0xb0]
mov r12, qword [rsp + 0x170]
lea rsi, [rax + r9*2]
mov rax, qword [0x14016aa30]
add r10b, 0xff
movzx ecx, word [rsi]
add r9d, ebp
lea rsi, [rsi + 2]
mov edx, dword [rax + rbx*8]
sub edx, ecx
movzx eax, r10b
sub edx, r8d
movzx r8d, word [r11]
add r8d, edx
mov dword [r15 + r12*4], r8d
cmp r9d, eax
jl 0x14001377a
mov r12d, dword [rsp + 0x180]
mov byte [rsp + 0x158], r10b
movzx ebp, r14w
mov rax, qword [0x14016aa50]
mov esi, 1
mov rdx, qword [rsp + 0x188]
add r12d, esi
add qword [rsp + 0x168], 2
add rdi, rsi
mov r8, qword [rsp + 0x178]
add r13, 4
mov r9, qword [rsp + 0xc0]
movsxd rcx, r12d
mov dword [rsp + 0x180], r12d
cmp rcx, qword [rax + rdx*8 + 0x38]
jae 0x14001369c
mov r10, qword [rsp + 0xc8]
mov r8, qword [rsp + 0xb8]
movzx ecx, r14w
lea rax, [r10 + rcx*2]
movzx eax, byte [rcx + rax]
or eax, dword [r15 + r8*4 + 0xa0]
add rsp, 0x108
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret