Function at 0x18007ce60
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov word [rsp + 0x10], dx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0xb0
mov rax, qword [rcx]
movzx edi, dx
xor edx, edx
mov qword [rsp + 0x90], rax
mov rbp, rcx
mov dword [rsp + 0x54], edx
movzx ecx, byte [rcx + 0x39]
mov r13d, 1
mov r8, qword [rax]
movzx esi, dx
mov qword [rsp + 0x98], r8
movzx r15d, dx
mov qword [rsp + 0x88], rdx
mov dword [rsp + 0x100], ecx
cmp ecx, r13d
ja 0x18007cec7
mov ebx, r13d
jmp 0x18007ced7
cmp ecx, 2
mov ebx, 0xa
mov eax, 5
cmove ebx, eax
mov rax, qword [rbp + 0x10]
mov dword [rsp + 0x50], ebx
test rax, rax
je 0x18007cef3
test di, di
je 0x18007cef3
mov r12d, dword [rax]
mov dword [rsp + 0x60], r12d
jmp 0x18007cefa
mov r12d, edx
mov dword [rsp + 0x60], edx
lea eax, [rcx + 4]
imul eax, ebx
lea ecx, [r12 + rax*8]
add ecx, ecx
movsxd rdx, ecx
mov rcx, r8
call fcn.180005310
mov qword [rsp + 0x58], rax
mov rdx, rax
test rax, rax
jne 0x18007cf26
lea eax, [rdx + 7]
jmp 0x18007d808
movsxd r10, dword [rsp + 0x100]
xorps xmm0, xmm0
mov eax, ebx
mov r8, r10
shl rax, 5
lea r9, [rax + rdx]
mov qword [rsp + 0xa8], r14
shl r8, 3
mov r14, rdx
movups xmmword [r9], xmm0
lea rcx, [rax + r9]
mov qword [rsp + 0x40], rdx
movups xmmword [r9 + 0x10], xmm0
lea eax, [rbx + rbx]
mov qword [rsp + 0x80], r9
add rdx, 0x18
nop
mov qword [rdx], rcx
lea rdx, [rdx + 0x20]
add rcx, r8
dec eax
test eax, eax
jg 0x18007cf70
test r12d, r12d
je 0x18007cfaa
movsxd r8, r12d
xor edx, edx
add r8, r8
mov qword [rsp + 0x88], rcx
call fcn.1800c3fd0
mov r9, qword [rsp + 0x80]
mov r10d, dword [rsp + 0x100]
mov rax, qword [rsp + 0x90]
mov ecx, 0x2e
mov edx, r13d
mov dword [rsp + 0x68], edx
mov eax, dword [rax + 0x1d8]
cmp eax, ecx
cmovb ecx, eax
mov word [r9 + 0x10], cx
test r12d, r12d
je 0x18007cfe6
test r10b, r10b
movzx eax, r12b
mov ecx, 0xffffffff
cmovne eax, ecx
mov byte [r9 + 0x16], al
xor r8d, r8d
mov r11d, 0x400
mov ecx, r8d
mov dword [rsp + 0x108], ecx
test r10b, r10b
je 0x18007d60c
nop dword [rax]
nop word [rax + rax]
mov qword [rsp + 0x48], r9
mov eax, r8d
mov dword [rsp + 0x64], eax
mov r12d, r8d
mov rdi, r9
test edx, edx
jle 0x18007d53c
nop word [rax + rax]
mov r13, qword [rbp + 0x20]
test r13, r13
je 0x18007d50e
nop dword [rax]
mov r9, qword [rdi]
movzx r11d, byte [rdi + 0x16]
mov rax, r9
not rax
mov qword [rsp + 0x70], r8
test qword [r13], rax
jne 0x18007d4f1
mov r14, qword [r13 + 8]
test r9, r14
jne 0x18007d4ec
movsx ebx, word [r13 + 0x12]
lea rbp, [0x180000000]
movzx r10d, word [rdi + 0x10]
mov ecx, ebx
movzx r8d, word [r13 + 0x14]
add r8w, r10w
movsx edx, r8w
cmp bx, r8w
jl 0x18007d0b5
lea eax, [rdx + 0x31]
cmp ebx, eax
jg 0x18007d0e0
lea eax, [rdx + 0x1f]
cmp ebx, eax
jle 0x18007d0a3
inc bx
jmp 0x18007d0e0
sub ecx, edx
movsxd rax, ecx
movzx eax, byte [rax + rbp + 0x102168]
add bx, ax
jmp 0x18007d0e0
lea eax, [rbx + 0x31]
cmp edx, eax
jle 0x18007d0c2
movzx ebx, r8w
jmp 0x18007d0e0
lea eax, [rbx + 0x1f]
cmp edx, eax
jle 0x18007d0cf
lea ebx, [r8 + 1]
jmp 0x18007d0e0
sub edx, ecx
movsxd rax, edx
movzx ebx, byte [rax + rbp + 0x102168]
add bx, r8w
movsx r8d, word [rdi + 0x14]
movsx ecx, bx
mov edx, r8d
cmp bx, r8w
jl 0x18007d118
lea eax, [r8 + 0x31]
cmp ecx, eax
jg 0x18007d143
lea eax, [r8 + 0x1f]
cmp ecx, eax
jle 0x18007d106
inc bx
jmp 0x18007d143
sub ecx, edx
movsxd rax, ecx
movzx eax, byte [rax + rbp + 0x102168]
add bx, ax
jmp 0x18007d143
lea eax, [rcx + 0x31]
cmp edx, eax
jle 0x18007d125
movzx ebx, r8w
jmp 0x18007d143
lea eax, [rcx + 0x1f]
cmp edx, eax
jle 0x18007d132
lea ebx, [r8 + 1]
jmp 0x18007d143
sub edx, ecx
movsxd rax, edx
movzx ebx, byte [rax + rbp + 0x102168]
add bx, r8w
movzx ebp, word [r13 + 0x16]
or r14, r9
add bp, r10w
test r11b, r11b
jns 0x18007d196
lea rax, [rsp + 0x70]
mov r8, rdi
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x108]
mov qword [rsp + 0x28], r13
mov word [rsp + 0x20], ax
mov rax, qword [rsp + 0xf0]
mov rcx, rax
movzx r9d, word [rax + 0x32]
mov rdx, qword [rax + 0x10]
call fcn.18007c650
mov r10, qword [rsp + 0x70]
movzx r11d, al
jmp 0x18007d19a
mov r10, qword [rdi + 8]
test r11b, r11b
js 0x18007d3a1
mov edi, dword [rsp + 0x60]
movsx ecx, r11b
cmp ecx, edi
jge 0x18007d3a1
mov rdx, qword [rsp + 0x88]
movsx rax, r11b
movzx r8d, word [rdx + rax*2]
lea r9, [rdx + rax*2]
test r8w, r8w
jne 0x18007d337
mov eax, edi
sub eax, ecx
mov ecx, 0x28
imul eax, eax, 0x64
cdq
idiv edi
cdqe
cmp rax, 8
jae 0x18007d20f
cmp rax, 2
jae 0x18007d200
lea edx, [rcx - 0x5a]
lea r8d, [rcx - 0x4a]
jmp 0x18007d26d
add cx, 0xfff6
add rax, rax
cmp rax, 8
jb 0x18007d200
jmp 0x18007d24d
cmp rax, 0xff
jbe 0x18007d230
nop word [rax + rax]
add cx, 0x28
shr rax, 4
cmp rax, 0xff
ja 0x18007d220
cmp rax, 0xf
jbe 0x18007d24d
nop word [rax + rax]
add cx, 0xa
shr rax, 1
cmp rax, 0xf
ja 0x18007d240
and eax, 7
lea rdx, [0x180000000]
movzx r8d, word [rdx + rax*2 + 0x100df0]
add r8w, cx
lea edx, [r8 - 0x3c]
sub r8w, 0x2c
movsx rdi, word [rsp + 0xf8]
cmp edi, 0xa
jg 0x18007d282
xor eax, eax
jmp 0x18007d310
mov rax, rdi
mov ecx, 0x28
cmp rdi, 8
jae 0x18007d2af
cmp rax, 2
jae 0x18007d2a0
lea eax, [rcx - 0x49]
jmp 0x18007d310
add cx, 0xfff6
add rax, rax
cmp rax, 8
jb 0x18007d2a0
jmp 0x18007d2ed
cmp rax, 0xff
jbe 0x18007d2d0
nop word [rax + rax]
add cx, 0x28
shr rax, 4
cmp rax, 0xff
ja 0x18007d2c0
cmp rax, 0xf
jbe 0x18007d2ed
nop word [rax + rax]
add cx, 0xa
shr rax, 1
cmp rax, 0xf
ja 0x18007d2e0
mov qword [rsp + 0x70], rcx
and eax, 7
lea rcx, [0x180000000]
movzx eax, word [rcx + rax*2 + 0x100df0]
mov rcx, qword [rsp + 0x70]
sub cx, 0x2b
add ax, cx
mov rcx, qword [rsp + 0xf0]
mov edi, 0x400
test word [rcx + 0x32], di
cmove r8w, dx
add r8w, ax
add r8w, word [rsp + 0xf8]
mov word [r9], r8w
movsx ecx, bx
movsx edx, r8w
cmp bx, r8w
jl 0x18007d373
lea eax, [rdx + 0x31]
cmp ecx, eax
jg 0x18007d3a1
lea eax, [rdx + 0x1f]
cmp ecx, eax
jle 0x18007d358
lea r8d, [rbx + 1]
jmp 0x18007d3a5
sub ecx, edx
movsxd rax, ecx
lea rcx, [0x180000000]
movzx r8d, byte [rax + rcx + 0x102168]
add r8w, bx
jmp 0x18007d3a5
lea eax, [rcx + 0x31]
cmp edx, eax
jg 0x18007d3a5
lea eax, [rcx + 0x1f]
cmp edx, eax
jle 0x18007d387
inc r8w
jmp 0x18007d3a5
sub edx, ecx
lea rcx, [0x180000000]
movsxd rax, edx
movzx eax, byte [rax + rcx + 0x102168]
add r8w, ax
jmp 0x18007d3a5
movzx r8d, bx
mov rdi, qword [rsp + 0x40]
xor eax, eax
mov ecx, eax
test r12d, r12d
jle 0x18007d3d0
cmp qword [rdi], r14
jne 0x18007d3c5
movzx eax, byte [rdi + 0x16]
xor al, r11b
jge 0x18007d4be
inc ecx
add rdi, 0x20
cmp ecx, r12d
jl 0x18007d3b3
mov r9d, dword [rsp + 0x50]
cmp r12d, r9d
jl 0x18007d3f0
cmp r8w, si
jg 0x18007d4e4
jne 0x18007d3f0
cmp bx, r15w
jge 0x18007d4e4
mov r14, qword [rsp + 0x40]
cmp r12d, r9d
mov eax, r12d
cmovge eax, dword [rsp + 0x54]
movsxd rdi, eax
mov eax, r12d
shl rdi, 5
add rdi, r14
inc r12d
cmp eax, r9d
cmovge r12d, eax
mov rax, qword [r13 + 8]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rdi + 0x18]
or rax, qword [rdx]
mov qword [rdi], rax
mov eax, dword [rsp + 0x108]
mov word [rdi + 0x14], bx
mov word [rdi + 0x12], r8w
mov qword [rdi + 8], r10
lea rbx, [rax*8]
mov word [rdi + 0x10], bp
mov byte [rdi + 0x16], r11b
mov r8, rbx
mov rdx, qword [rdx + 0x18]
call fcn.1800c41f0
mov rax, qword [rdi + 0x18]
xor r8d, r8d
mov r9d, dword [rsp + 0x50]
mov qword [rbx + rax], r13
cmp r12d, r9d
jl 0x18007d4b7
movzx esi, word [r14 + 0x12]
mov edx, 1
movzx r15d, word [r14 + 0x10]
mov dword [rsp + 0x54], r8d
cmp r9d, edx
jbe 0x18007d4b7
lea rax, [r14 + 0x34]
nop dword [rax]
movzx ecx, word [rax - 2]
cmp cx, si
jg 0x18007d4a1
jne 0x18007d4ac
cmp word [rax], r15w
jle 0x18007d4ac
movzx r15d, word [rax]
movzx esi, cx
mov dword [rsp + 0x54], edx
inc edx
add rax, 0x20
cmp edx, r9d
jl 0x18007d490
mov rdi, qword [rsp + 0x48]
jmp 0x18007d4f1
mov r14, qword [rsp + 0x40]
cmp word [rdi + 0x12], r8w
jl 0x18007d4da
jne 0x18007d417
cmp word [rdi + 0x10], bp
jg 0x18007d417
mov rdi, qword [rsp + 0x48]
xor r8d, r8d
jmp 0x18007d4f1
mov rdi, qword [rsp + 0x48]
xor r8d, r8d
mov r14, qword [rsp + 0x40]
mov r13, qword [r13 + 0x38]
test r13, r13
jne 0x18007d040
mov rbp, qword [rsp + 0xf0]
mov eax, dword [rsp + 0x64]
mov edx, dword [rsp + 0x68]
inc eax
add rdi, 0x20
mov dword [rsp + 0x64], eax
mov qword [rsp + 0x48], rdi
cmp eax, edx
jl 0x18007d030
mov ecx, dword [rsp + 0x108]
mov r9, qword [rsp + 0x80]
mov r10d, dword [rsp + 0x100]
mov rax, r14
mov qword [rsp + 0x40], r9
inc ecx
mov qword [rsp + 0x80], rax
mov dword [rsp + 0x108], ecx
mov edx, r12d
mov dword [rsp + 0x68], edx
mov r14, r9
mov r9, rax
cmp ecx, r10d
jl 0x18007d010
test r12d, r12d
jne 0x18007d5f8
mov rcx, qword [rsp + 0x90]
lea rdx, str.no_query_solution
call fcn.180007ef0
mov rcx, qword [rsp + 0x98]
mov rdx, qword [rsp + 0x58]
test rcx, rcx
je 0x18007d5e6
cmp qword [rcx + 0x320], 0
je 0x18007d5b3
call fcn.180004fc0
lea eax, [r12 + 1]
jmp 0x18007d800
cmp rdx, qword [rcx + 0x168]
jb 0x18007d5e6
cmp rdx, qword [rcx + 0x170]
jae 0x18007d5e6
mov rax, qword [rcx + 0x160]
mov qword [rdx], rax
mov eax, 1
dec dword [rcx + 0x14c]
mov qword [rcx + 0x160], rdx
jmp 0x18007d800
mov rcx, rdx
call fcn.180004f10
mov eax, 1
jmp 0x18007d800
movzx edi, word [rsp + 0xf8]
mov r13d, 1
mov r11d, 0x400
movsxd rdx, edx
mov rbx, r9
cmp rdx, 1
jle 0x18007d640
lea rcx, [r9 + 0x32]
dec rdx
nop
movzx eax, word [rcx]
cmp word [rbx + 0x12], ax
jle 0x18007d633
movsxd rbx, r13d
shl rbx, 5
add rbx, r9
inc r13d
add rcx, 0x20
sub rdx, 1
jne 0x18007d620
test r10b, r10b
je 0x18007d681
lea rdx, [rbp + 0x364]
mov r9d, r10d
nop
mov rax, qword [rbx + 0x18]
lea rdx, [rdx + 0x50]
lea r8, [r8 + 8]
mov rcx, qword [r8 + rax - 8]
mov qword [rdx - 0x34], rcx
movzx eax, byte [rcx + 0x10]
imul rcx, rax, 0x78
mov byte [rdx - 0x50], al
mov rax, qword [rbp + 8]
mov ecx, dword [rcx + rax + 0x50]
mov dword [rdx - 0x70], ecx
sub r9, 1
jne 0x18007d650
movzx eax, word [rbp + 0x32]
mov ecx, 0x600
and ax, cx
mov esi, 0x200
cmp ax, r11w
jne 0x18007d6f4
cmp byte [rbp + 0x38], 0
jne 0x18007d6f4
test di, di
je 0x18007d6f4
mov rax, qword [rbx + 0x18]
lea edx, [r10 - 1]
movzx ecx, r10b
lea r8, [rsp + 0xf0]
mov qword [rsp + 0x30], r8
mov r9d, esi
mov r8, rbx
mov rax, qword [rax + rcx*8 - 8]
mov rcx, rbp
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], dx
mov rdx, qword [rbp + 0x18]
call fcn.18007c650
mov r10d, dword [rsp + 0x100]
movsx ecx, al
mov rax, qword [rbp + 0x18]
cmp ecx, dword [rax]
jne 0x18007d6f4
mov byte [rbp + 0x38], 2
mov rdx, qword [rbp + 0x10]
test rdx, rdx
je 0x18007d7a0
movzx r8d, word [rbp + 0x32]
movzx ecx, byte [rbx + 0x16]
test si, r8w
je 0x18007d71f
movsx eax, cl
xor ecx, ecx
cmp eax, dword [rdx]
jne 0x18007d736
mov byte [rbp + 0x38], 2
jmp 0x18007d736
mov eax, ecx
test cl, cl
mov ecx, 0
cmovs eax, ecx
mov byte [rbp + 0x34], al
mov rax, qword [rbx + 8]
mov qword [rbp + 0x28], rax
bt r8w, 0xb
jae 0x18007d7a0
movsx eax, byte [rbp + 0x34]
cmp eax, dword [rdx]
jne 0x18007d7a0
mov rax, qword [rbx + 0x18]
lea r8, [rsp + 0xf0]
mov qword [rsp + 0x30], r8
xor r9d, r9d
mov qword [rsp + 0xf0], rcx
mov r8, rbx
movzx ecx, r10b
dec r10w
mov rax, qword [rax + rcx*8 - 8]
mov rcx, rbp
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], r10w
call fcn.18007c650
movsx ecx, al
mov rax, qword [rbp + 0x10]
cmp ecx, dword [rax]
jne 0x18007d7a0
mov rax, qword [rsp + 0xf0]
mov qword [rbp + 0x28], rax
mov byte [rbp + 0x35], 1
mov rcx, qword [rsp + 0x98]
movzx eax, word [rbx + 0x10]
mov rdx, qword [rsp + 0x58]
mov word [rbp + 0x30], ax
test rcx, rcx
je 0x18007d7f6
cmp qword [rcx + 0x320], 0
je 0x18007d7cb
call fcn.180004fc0
jmp 0x18007d7fe
cmp rdx, qword [rcx + 0x168]
jb 0x18007d7f6
cmp rdx, qword [rcx + 0x170]
jae 0x18007d7f6
mov rax, qword [rcx + 0x160]
mov qword [rdx], rax
dec dword [rcx + 0x14c]
mov qword [rcx + 0x160], rdx
jmp 0x18007d7fe
mov rcx, rdx
call fcn.180004f10
xor eax, eax
mov r14, qword [rsp + 0xa8]
add rsp, 0xb0
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret