Function at 0x14002e340
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x88
mov rax, qword [rcx + 0xb8]
mov rbx, rcx
cmp rax, qword [rcx + 0xc0]
jae 0x14002e385
movzx r8d, byte [rax]
inc rax
mov qword [rcx + 0xb8], rax
jmp 0x14002e3aa
cmp dword [rcx + 0x30], 0
je 0x14002e3a7
call fcn.140023860
mov rax, qword [rbx + 0xb8]
movzx r8d, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002e3aa
xor r8b, r8b
mov ecx, gethostbyname
mov byte [rsp + 0xd0], r8b
mov rdx, rbx
lea r13, [rcx + rbx]
movzx ecx, r8b
mov dword [rsp + 0x38], ecx
mov qword [rsp + 0x78], r13
cmp rax, qword [rbx + 0xc0]
jae 0x14002e3e3
movzx esi, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002e40b
cmp dword [r13], 0
je 0x14002e408
mov rcx, rbx
call fcn.140023860
mov rax, qword [rbx + 0xb8]
movzx esi, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002e40b
xor sil, sil
mov byte [rsp + 0xf0], sil
cmp rax, qword [rbx + 0xc0]
jae 0x14002e42b
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002e452
cmp dword [r13], 0
je 0x14002e450
mov rcx, rbx
call fcn.140023860
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002e452
xor cl, cl
movzx ebp, cl
mov rcx, rbx
mov dword [rsp + 0x40], ebp
call fcn.140023a60
mov rcx, rbx
mov dword [rsp + 0x54], eax
call fcn.140023a60
mov rcx, qword [rbx + 0xb8]
mov dword [rsp + 0x50], eax
cmp rcx, qword [rbx + 0xc0]
jae 0x14002e490
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xb8], rcx
jmp 0x14002e4b7
cmp dword [r13], 0
je 0x14002e4b5
mov rcx, rbx
call fcn.140023860
mov rax, qword [rbx + 0xb8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002e4b7
xor dl, dl
mov rcx, rbx
movzx edi, dl
call fcn.140023a60
mov rcx, rbx
call fcn.140023a60
mov rcx, rbx
call fcn.140023a60
mov rcx, rbx
mov dword [rsp + 0x30], eax
call fcn.140023a60
mov dword [rsp + 0x44], eax
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x14002e501
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002e528
cmp dword [r13], 0
je 0x14002e526
mov rcx, rbx
call fcn.140023860
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002e528
xor cl, cl
movzx r8d, cl
mov dword [rsp + 0x5c], r8d
cmp rax, qword [rbx + 0xc0]
jae 0x14002e549
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002e575
cmp dword [r13], 0
je 0x14002e573
mov rcx, rbx
call fcn.140023860
mov rax, qword [rbx + 0xb8]
mov r8d, dword [rsp + 0x5c]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002e575
xor cl, cl
xor r14d, r14d
movzx eax, cl
cmp ebp, 8
mov qword [rsp + 0x70], r14
lea edx, [rbp - 8]
mov dword [rsp + 0xf8], r14d
cmovb edx, ebp
mov dword [rsp + 0x58], r14d
shr eax, 5
lea r15d, [r14 + 1]
and eax, r15d
mov ecx, r15d
sub ecx, eax
mov r12d, r14d
mov dword [rsp + 0x60], ecx
mov ebp, r14d
test sil, sil
je 0x14002e5d6
mov ecx, edi
sub ecx, 8
je 0x14002e5d1
sub ecx, 7
je 0x14002e624
sub ecx, r15d
je 0x14002e624
sub ecx, 8
je 0x14002e5f5
cmp ecx, 8
jne 0x14002e5fe
jmp 0x14002e5f5
mov edi, r15d
jmp 0x14002e5f8
mov ecx, r8d
sub ecx, 8
je 0x14002e630
sub ecx, 7
je 0x14002e624
sub ecx, r15d
je 0x14002e616
sub ecx, 8
je 0x14002e5f2
cmp ecx, 8
jne 0x14002e5fe
mov edi, r8d
shr edi, 3
mov esi, edi
test edi, edi
jne 0x14002e636
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_format
jmp 0x14002ed7f
cmp edx, 3
jne 0x14002e624
mov edi, 2
mov esi, edi
jmp 0x14002e636
mov edi, 3
mov ebp, r15d
mov esi, edi
jmp 0x14002e636
mov edi, r15d
mov esi, r15d
mov rax, qword [rsp + 0xd8]
mov r9d, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x44]
mov dword [rax], r9d
mov rax, qword [rsp + 0xe0]
mov dword [rax], r8d
mov rax, qword [rsp + 0xe8]
test rax, rax
je 0x14002e665
mov dword [rax], edi
test r9d, r9d
js 0x14002ed6c
test r8d, r8d
js 0x14002ed6c
je 0x14002e693
mov eax, 0x7fffffff
mov ecx, r14d
cdq
idiv r8d
cmp r9d, eax
setle cl
test ecx, ecx
je 0x14002ed6c
mov ecx, r8d
imul ecx, r9d
test ecx, ecx
js 0x14002ed6c
xor edx, edx
mov eax, 0x7fffffff
div edi
cmp ecx, eax
jg 0x14002ed6c
test r8d, r8d
je 0x14002e6d2
mov eax, 0x7fffffff
mov ecx, r14d
cdq
idiv r8d
cmp r9d, eax
setle cl
test ecx, ecx
je 0x14002ed57
mov eax, r8d
imul eax, edi
imul eax, r9d
movsxd rcx, eax
call fcn.1400a9790
mov qword [rsp + 0x48], rax
mov r8, rax
test rax, rax
je 0x14002ed57
cmp qword [rbx + 0x10], r12
je 0x14002e72d
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
mov edx, dword [rsp + 0x38]
cmp ecx, edx
jge 0x14002e72d
mov rax, qword [rbx + 0xc0]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xb8], rax
call qword [rbx + 0x18]
mov r8, qword [rsp + 0x48]
jmp 0x14002e73c
movzx eax, byte [rsp + 0xd0]
add qword [rbx + 0xb8], rax
cmp byte [rsp + 0xf0], r12b
jne 0x14002e82b
mov edx, dword [rsp + 0x40]
mov dword [rsp + 0xd0], ebp
cmp edx, 8
jae 0x14002ea11
mov dword [rsp + 0xd0], ebp
test ebp, ebp
jne 0x14002ea11
mov r13d, dword [rsp + 0x44]
mov dword [rsp + 0xd0], ebp
test r13d, r13d
jle 0x14002e818
mov r15d, edi
mov dword [rsp + 0xd0], ebp
imul r15d, dword [rsp + 0x30]
mov r14d, r13d
mov ebp, edi
cmp dword [rsp + 0x60], r12d
je 0x14002e7e8
mov eax, r15d
neg eax
movsxd r12, eax
lea eax, [r13 - 1]
imul eax, edi
imul eax, dword [rsp + 0x30]
movsxd rsi, eax
add rsi, r8
nop dword [rax + rax]
mov r8d, r15d
mov rdx, rsi
mov rcx, rbx
call fcn.1400238d0
add rsi, r12
sub r14, 1
jne 0x14002e7c0
mov edx, dword [rsp + 0x30]
mov edi, r13d
imul edi, edx
mov esi, ebp
jmp 0x14002ecef
movsxd r12, r15d
mov rsi, r8
nop
mov r8d, r15d
mov rdx, rsi
mov rcx, rbx
call fcn.1400238d0
add rsi, r12
sub r14, 1
jne 0x14002e7f0
mov edx, dword [rsp + 0x30]
mov edi, r13d
imul edi, edx
mov esi, ebp
jmp 0x14002ecef
mov edx, dword [rsp + 0x30]
mov ebp, edi
mov edi, r13d
mov esi, ebp
imul edi, edx
jmp 0x14002ecef
movsxd rdx, dword [rsp + 0x54]
test edx, edx
jns 0x14002e844
mov rax, qword [rbx + 0xc0]
mov qword [rbx + 0xb8], rax
jmp 0x14002e87a
cmp qword [rbx + 0x10], r12
je 0x14002e873
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, edx
jge 0x14002e873
mov rax, qword [rbx + 0xc0]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xb8], rax
call qword [rbx + 0x18]
jmp 0x14002e87a
add qword [rbx + 0xb8], rdx
mov r8d, dword [rsp + 0x50]
test r8d, r8d
js 0x14002ed4d
xor edx, edx
mov eax, 0x7fffffff
div edi
mov ecx, r14d
cmp r8d, eax
setle cl
imul esi, r8d
test ecx, ecx
je 0x14002ed4d
movsxd rcx, esi
call fcn.1400a9790
mov qword [rsp + 0x70], rax
test rax, rax
je 0x14002ed4d
mov dword [rsp + 0xd0], ebp
test ebp, ebp
mov ebp, edi
je 0x14002e9d3
mov ecx, dword [rsp + 0x50]
mov rsi, rax
test ecx, ecx
jle 0x14002e969
mov eax, edi
mov r13d, ecx
mov qword [rsp + 0x68], rax
mov rcx, rbx
call fcn.140023a60
movzx r8d, ax
mov eax, r8d
shr eax, 0xa
and eax, 0x1f
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r8d
shr eax, 5
and r8d, 0x1f
and eax, 0x1f
mov byte [rsi], dl
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
imul ecx, r8d, 0xff
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x84210843
mov byte [rsi + 1], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsi + 2], dl
add rsi, rdi
sub r13, r15
jne 0x14002e8e6
mov r13, qword [rsp + 0x78]
mov edx, dword [rsp + 0x40]
mov edi, dword [rsp + 0x44]
mov eax, dword [rsp + 0x30]
imul edi, eax
mov esi, ebp
mov dword [rsp + 0x54], edi
test edi, edi
je 0x14002ec5e
mov rax, qword [rsp + 0x48]
lea rcx, [rsp + 0xf8]
sub rax, rcx
mov ecx, edi
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x38], rax
cmp edx, 8
jb 0x14002ea64
test r12d, r12d
jne 0x14002ea54
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x14002ea18
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002ea3e
mov r8d, esi
mov rdx, rax
mov rcx, rbx
call fcn.1400238d0
test eax, eax
jne 0x14002e969
mov rcx, qword [rsp + 0x48]
call fcn.1400a9798
mov rcx, qword [rsp + 0x70]
call fcn.1400a9798
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_palette
jmp 0x14002ed7f
mov ebp, edi
jmp 0x14002e96d
cmp dword [r13], r14d
je 0x14002ea3c
mov rcx, rbx
call fcn.140023860
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002ea3e
xor cl, cl
movzx eax, cl
mov r12d, eax
and r12d, 0x7f
inc r12d
shr eax, 7
mov dword [rsp + 0x58], eax
jmp 0x14002ea64
cmp dword [rsp + 0x58], r14d
je 0x14002ea64
test r15d, r15d
je 0x14002ec01
cmp byte [rsp + 0xf0], r14b
je 0x14002eb01
cmp dword [rsp + 0x5c], 8
jne 0x14002eac9
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x14002ea9b
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
movzx eax, cl
jmp 0x14002ead1
cmp dword [r13], r14d
je 0x14002eac2
mov rcx, rbx
call fcn.140023860
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
movzx eax, cl
jmp 0x14002ead1
xor cl, cl
movzx eax, cl
jmp 0x14002ead1
mov rcx, rbx
call fcn.140023a60
cmp eax, dword [rsp + 0x50]
cmovge eax, r14d
test ebp, ebp
je 0x14002ebf4
imul eax, ebp
lea rcx, [rsp + 0xf8]
mov r8, rsi
movsxd rdx, eax
add rdx, qword [rsp + 0x70]
call fcn.1400a4bc0
jmp 0x14002ebf4
cmp dword [rsp + 0xd0], r14d
je 0x14002eb94
mov rcx, rbx
call fcn.140023a60
movzx r8d, ax
mov eax, r8d
shr eax, 0xa
and eax, 0x1f
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r8d
shr eax, 5
and r8d, 0x1f
and eax, 0x1f
mov byte [rsp + 0xf8], dl
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
imul ecx, r8d, 0xff
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x84210843
mov byte [rsp + 0xf9], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsp + 0xfa], dl
jmp 0x14002ebf4
mov rdi, r14
test ebp, ebp
je 0x14002ebf4
nop dword [rax + rax]
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x14002ebbf
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002ebe5
cmp dword [r13], r14d
je 0x14002ebe3
mov rcx, rbx
call fcn.140023860
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14002ebe5
xor cl, cl
mov byte [rsp + rdi + 0xf8], cl
inc rdi
cmp rdi, rsi
jl 0x14002eba0
mov rax, qword [rsp + 0x38]
mov r15d, r14d
mov rcx, qword [rsp + 0x68]
mov rdi, r14
test ebp, ebp
je 0x14002ec35
lea rcx, [rsp + 0xf8]
mov r8, rsi
add rcx, rax
lea rdx, [rsp + 0xf8]
call fcn.1400a4bc0
inc rdi
cmp rdi, rsi
jl 0x14002ec23
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x68]
movsxd rdx, ebp
dec r12d
add rax, rdx
mov edx, dword [rsp + 0x40]
sub rcx, 1
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x68], rcx
jne 0x14002e9a2
mov edi, dword [rsp + 0x54]
mov eax, dword [rsp + 0x30]
mov r13d, dword [rsp + 0x44]
cmp dword [rsp + 0x60], r14d
je 0x14002ecd9
test r13d, r13d
jle 0x14002ecd9
mov r15, qword [rsp + 0x48]
lea r10d, [r13 - 1]
imul r10d, ebp
mov r11d, ebp
imul r11d, eax
mov ebx, r14d
imul r10d, eax
nop word [rax + rax]
mov r8d, r11d
test r11d, r11d
jle 0x14002ecca
movsxd rax, ebx
movsxd r9, r10d
sub r9, rax
lea rdx, [rax + r15]
nop word [rax + rax]
movzx eax, byte [r9 + rdx]
dec r8d
movzx ecx, byte [rdx]
mov byte [rdx], al
mov byte [r9 + rdx], cl
lea rdx, [rdx + 1]
test r8d, r8d
jg 0x14002ecb0
add ebx, r11d
sub r10d, r11d
add r14d, 2
cmp r14d, r13d
jl 0x14002ec90
mov rax, qword [rsp + 0x70]
test rax, rax
je 0x14002eceb
mov rcx, rax
call fcn.1400a9798
mov edx, dword [rsp + 0x30]
mov rax, qword [rsp + 0x48]
cmp ebp, 3
jb 0x14002ed2e
cmp dword [rsp + 0xd0], 0
jne 0x14002ed2e
mov r8, rax
test edi, edi
je 0x14002ed2e
mov r9d, edi
nop dword [rax]
movzx ecx, byte [r8]
movzx eax, byte [r8 + 2]
mov byte [r8], al
mov byte [r8 + 2], cl
add r8, rsi
sub r9, 1
jne 0x14002ed10
mov rax, qword [rsp + 0x48]
cmp ebp, 4
je 0x14002ed8a
mov r9d, edx
mov dword [rsp + 0x20], r13d
mov edx, ebp
mov r8d, 4
mov rcx, rax
call fcn.140023b20
jmp 0x14002ed8a
mov rcx, qword [rsp + 0x48]
call fcn.1400a9798
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofmem
jmp 0x14002ed7f
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.too_large
mov edx, 0x18
mov qword [rdx + rcx], rax
xor eax, eax
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret