Function at 0x140127620
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov word [rsp + 0x10], dx
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xc0
mov rax, qword [rcx]
movzx r14d, dx
xor edx, edx
mov qword [rsp + 0x98], rax
mov rdi, rcx
mov dword [rsp + 0x60], edx
movzx ecx, byte [rcx + 0x39]
mov r12d, 1
mov r13, qword [rax]
movzx esi, dx
mov qword [rsp + 0xa0], r13
movzx r15d, dx
mov qword [rsp + 0x88], rdx
mov dword [rsp + 0x118], ecx
cmp ecx, r12d
ja 0x140127689
mov r9d, r12d
jmp 0x14012769b
cmp ecx, 2
mov eax, 5
mov r9d, 0xa
cmove r9d, eax
mov rax, qword [rdi + 0x10]
mov dword [rsp + 0x50], r9d
test rax, rax
je 0x1401276b7
test r14w, r14w
je 0x1401276b7
mov ebx, dword [rax]
mov dword [rsp + 0x70], ebx
jmp 0x1401276bd
mov ebx, edx
mov dword [rsp + 0x70], edx
lea eax, [rcx + 4]
mov qword [rsp + 0xb8], rbp
imul eax, r9d
lea ecx, [rbx + rax*8]
add ecx, ecx
movsxd rcx, ecx
test r13, r13
je 0x1401276fc
cmp byte [r13 + 0x51], dl
jne 0x14012771c
cmp byte [r13 + 0x152], dl
je 0x1401276fc
movzx eax, word [r13 + 0x150]
cmp rcx, rax
jbe 0x140127726
inc dword [r13 + 0x160]
call fcn.1400f1360
mov qword [rsp + 0x40], rax
mov rbp, rax
test rax, rax
jne 0x140127717
test r13, r13
je 0x140127717
mov byte [r13 + 0x51], r12b
test rbp, rbp
jne 0x140127774
mov eax, 7
jmp 0x1401280f5
mov rbp, qword [r13 + 0x168]
mov qword [rsp + 0x40], rbp
test rbp, rbp
jne 0x140127740
inc dword [r13 + 0x164]
jmp 0x1401276fc
mov rax, qword [rbp]
mov qword [r13 + 0x168], rax
mov eax, dword [r13 + 0x154]
inc eax
mov dword [r13 + 0x154], eax
inc dword [r13 + 0x15c]
cmp eax, dword [r13 + 0x158]
jle 0x140127779
mov dword [r13 + 0x158], eax
jmp 0x140127779
mov r9d, dword [rsp + 0x50]
mov eax, r9d
lea rdx, [rbp + 0x18]
shl rax, 5
xorps xmm0, xmm0
lea r11, [rax + rbp]
mov qword [rsp + 0x48], rbp
movups xmmword [r11], xmm0
mov r10, rbp
mov qword [rsp + 0x80], r11
lea rcx, [rax + r11]
lea eax, [r9 + r9]
movsxd r9, dword [rsp + 0x118]
mov r8, r9
shl r8, 3
movups xmmword [r11 + 0x10], xmm0
nop dword [rax + rax]
mov qword [rdx], rcx
lea rdx, [rdx + 0x20]
add rcx, r8
dec eax
test eax, eax
jg 0x1401277c0
test ebx, ebx
je 0x1401277fc
movsxd r8, ebx
xor edx, edx
add r8, r8
mov qword [rsp + 0x88], rcx
call fcn.14020dff0
mov r11, qword [rsp + 0x80]
mov r10, rbp
mov r9d, dword [rsp + 0x118]
mov rax, qword [rsp + 0x98]
mov ecx, 0x30
mov eax, dword [rax + 0x1d8]
cmp eax, ecx
cmovb ecx, eax
mov word [r11 + 0x10], cx
mov ecx, r12d
test ebx, ebx
je 0x140127832
test r9b, r9b
movzx eax, bl
mov edx, 0xffffffff
cmovne eax, edx
mov byte [r11 + 0x16], al
xor ebx, ebx
mov dword [rsp + 0x64], ebx
mov r8d, ebx
test r9b, r9b
je 0x140127e98
mov r14d, ebx
mov qword [rsp + 0x68], rbx
nop dword [rax]
mov dword [rsp + 0x110], ebx
mov edx, ebx
test ecx, ecx
jle 0x140127d5d
lea rbx, [r11 + 0x10]
mov eax, ecx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x90], rax
nop dword [rax]
nop dword [rax + rax]
mov r13, qword [rdi + 0x20]
test r13, r13
je 0x140127d2b
nop dword [rax]
mov rbp, qword [rbx - 0x10]
lea r12, [rbx - 0x10]
movzx r11d, byte [rbx + 6]
mov rax, rbp
not rax
mov qword [rsp + 0x78], 0
test qword [r13], rax
jne 0x140127ddc
mov r9, qword [r13 + 8]
test r9, rbp
jne 0x140127ddc
movsx edi, word [r13 + 0x12]
lea r14, [0x140000000]
movzx r10d, word [rbx]
mov ecx, edi
movzx r8d, word [r13 + 0x14]
add r8w, r10w
movsx edx, r8w
cmp di, r8w
jl 0x14012790e
lea eax, [rdx + 0x31]
cmp ecx, eax
jg 0x14012793a
lea eax, [rdx + 0x1f]
cmp ecx, eax
jle 0x1401278fb
inc di
jmp 0x14012793a
sub ecx, edx
movsxd rax, ecx
movzx eax, byte [rax + r14 + 0x24d4e0]
add di, ax
jmp 0x14012793a
lea eax, [rdi + 0x31]
cmp edx, eax
jle 0x14012791b
movzx edi, r8w
jmp 0x14012793a
lea eax, [rdi + 0x1f]
cmp edx, eax
jle 0x140127928
lea edi, [r8 + 1]
jmp 0x14012793a
sub edx, ecx
movsxd rax, edx
movzx edi, byte [rax + r14 + 0x24d4e0]
add di, r8w
movsx r8d, word [rbx + 4]
movsx ecx, di
mov edx, r8d
cmp di, r8w
jl 0x140127973
lea eax, [r8 + 0x31]
cmp ecx, eax
jg 0x14012799f
lea eax, [r8 + 0x1f]
cmp ecx, eax
jle 0x140127960
inc di
jmp 0x14012799f
sub ecx, edx
movsxd rax, ecx
movzx eax, byte [rax + r14 + 0x24d4e0]
add di, ax
jmp 0x14012799f
lea eax, [rcx + 0x31]
cmp edx, eax
jle 0x140127980
movzx edi, r8w
jmp 0x14012799f
lea eax, [rcx + 0x1f]
cmp edx, eax
jle 0x14012798d
lea edi, [r8 + 1]
jmp 0x14012799f
sub edx, ecx
movsxd rax, edx
movzx edi, byte [rax + r14 + 0x24d4e0]
add di, r8w
movzx r14d, word [r13 + 0x16]
or rbp, r9
add r14w, r10w
test r11b, r11b
jns 0x140127b43
mov rbx, qword [rsp + 0x100]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
mov r8, r12
mov eax, dword [rsp + 0x64]
mov rcx, rbx
mov qword [rsp + 0x28], r13
movzx r9d, word [rbx + 0x32]
mov rdx, qword [rbx + 0x10]
mov word [rsp + 0x20], ax
call fcn.140126e60
mov r10, qword [rsp + 0x78]
movzx r11d, al
test al, al
jns 0x140127b4f
movzx ecx, di
mov r8, qword [rsp + 0x48]
xor edx, edx
mov eax, dword [rsp + 0x110]
mov rbx, r8
test eax, eax
jle 0x140127a3e
mov r8, qword [rsp + 0x40]
cmp qword [rbx], rbp
jne 0x140127a2f
movzx eax, byte [rbx + 0x16]
xor al, r11b
jge 0x140127cc9
mov eax, dword [rsp + 0x110]
inc edx
add rbx, 0x20
cmp edx, eax
jl 0x140127a11
mov r8, qword [rsp + 0x48]
mov r9d, dword [rsp + 0x50]
mov edx, dword [rsp + 0x110]
cmp edx, r9d
jl 0x140127a64
cmp cx, si
jg 0x140127dd2
jne 0x140127a64
cmp di, r15w
jge 0x140127dd2
mov rbp, qword [rsp + 0x40]
cmp edx, r9d
mov eax, edx
cmovge eax, dword [rsp + 0x60]
movsxd rbx, eax
lea eax, [rdx + 1]
shl rbx, 5
add rbx, r8
cmp edx, r9d
cmovge eax, edx
mov dword [rsp + 0x110], eax
mov rax, qword [r13 + 8]
or rax, qword [r12]
mov rdx, qword [rsp + 0x58]
mov word [rbx + 0x10], r14w
mov r14, qword [rsp + 0x68]
mov word [rbx + 0x12], cx
mov r8, r14
mov rcx, qword [rbx + 0x18]
mov qword [rbx], rax
mov qword [rbx + 8], r10
mov word [rbx + 0x14], di
mov byte [rbx + 0x16], r11b
mov rdx, qword [rdx + 8]
call fcn.14020d920
mov rax, qword [rbx + 0x18]
mov r12d, 1
mov r9d, dword [rsp + 0x50]
mov edx, dword [rsp + 0x110]
mov r10, qword [rsp + 0x48]
mov qword [r14 + rax], r13
cmp edx, r9d
jl 0x140127d09
movzx esi, word [r10 + 0x12]
mov edx, r12d
movzx r15d, word [r10 + 0x10]
mov dword [rsp + 0x60], 0
cmp r9d, r12d
jbe 0x140127b37
lea rax, [r10 + 0x34]
nop dword [rax]
movzx ecx, word [rax - 2]
cmp cx, si
jg 0x140127b21
jne 0x140127b2c
cmp word [rax], r15w
jle 0x140127b2c
movzx r15d, word [rax]
movzx esi, cx
mov dword [rsp + 0x60], edx
inc edx
add rax, 0x20
cmp edx, r9d
jl 0x140127b10
mov edx, dword [rsp + 0x110]
jmp 0x140127d09
mov r10, qword [rbx - 8]
mov rbx, qword [rsp + 0x100]
mov r8d, dword [rsp + 0x70]
movsx edx, r11b
cmp edx, r8d
jge 0x1401279f9
mov rcx, qword [rsp + 0x88]
movsx rax, r11b
lea r9, [rcx + rax*2]
movzx ecx, word [rcx + rax*2]
test cx, cx
jne 0x140127c4b
mov eax, r8d
mov ecx, 0x28
sub eax, edx
imul eax, eax, 0x64
cdq
idiv r8d
cdqe
cmp rax, 8
jae 0x140127bb2
cmp rax, 2
jae 0x140127ba3
lea r8d, [rcx - 0x5a]
jmp 0x140127c09
add cx, 0xfff6
add rax, rax
cmp rax, 8
jb 0x140127ba3
jmp 0x140127bed
cmp rax, 0xff
jbe 0x140127bd0
nop word [rax + rax]
add cx, 0x28
shr rax, 4
cmp rax, 0xff
ja 0x140127bc0
cmp rax, 0xf
jbe 0x140127bed
nop word [rax + rax]
add cx, 0xa
shr rax, 1
cmp rax, 0xf
ja 0x140127be0
and eax, 7
lea rdx, [0x140000000]
movzx r8d, word [rdx + rax*2 + 0x2fd410]
sub r8w, 0x3c
add r8w, cx
movsx rax, word [rsp + 0x108]
cmp eax, 0xa
jle 0x140127c2e
mov rcx, rax
call fcn.1400f10b0
movzx ecx, word [rsp + 0x108]
sub cx, 0x21
add ax, cx
add r8w, ax
mov ecx, 0x400
movzx eax, word [rbx + 0x32]
and ax, cx
lea ecx, [r8 + 0x10]
cmove cx, r8w
mov word [r9], cx
movsx edx, di
movsx r8d, cx
cmp di, cx
jl 0x140127c90
lea eax, [r8 + 0x31]
cmp edx, eax
jg 0x1401279f9
lea eax, [r8 + 0x1f]
cmp edx, eax
jle 0x140127c73
lea ecx, [rdi + 1]
jmp 0x1401279fc
sub edx, r8d
lea rcx, [0x140000000]
movsxd rax, edx
movzx ecx, byte [rax + rcx + 0x24d4e0]
add cx, di
jmp 0x1401279fc
lea eax, [rdx + 0x31]
cmp r8d, eax
jg 0x1401279fc
lea eax, [rdx + 0x1f]
cmp r8d, eax
jle 0x140127cac
inc cx
jmp 0x1401279fc
sub r8d, edx
lea rdx, [0x140000000]
movsxd rax, r8d
movzx eax, byte [rax + rdx + 0x24d4e0]
add cx, ax
jmp 0x1401279fc
mov rbp, r8
mov qword [rsp + 0x40], r8
cmp word [rbx + 0x12], cx
jl 0x140127cf2
mov qword [rsp + 0x40], r8
jne 0x140127a8d
mov qword [rsp + 0x40], r8
cmp word [rbx + 0x10], r14w
jg 0x140127a8d
mov edx, dword [rsp + 0x110]
mov r10, qword [rsp + 0x48]
mov r12d, 1
mov r14, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x58]
mov r13, qword [r13 + 0x40]
test r13, r13
jne 0x140127890
mov rdi, qword [rsp + 0x100]
mov rax, qword [rsp + 0x90]
add rbx, 0x20
sub rax, 1
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x90], rax
jne 0x140127880
mov r8d, dword [rsp + 0x64]
xor ebx, ebx
mov r11, qword [rsp + 0x80]
mov r9d, dword [rsp + 0x118]
mov rax, r10
mov qword [rsp + 0x48], r11
inc r8d
mov qword [rsp + 0x80], rax
add r14, 8
mov dword [rsp + 0x64], r8d
mov qword [rsp + 0x68], r14
mov r10, r11
mov r11, rax
mov ecx, edx
cmp r8d, r9d
jl 0x140127850
test edx, edx
jne 0x140127e87
mov rcx, qword [rsp + 0x98]
lea rdx, str.no_query_solution
call fcn.1400d9350
mov rcx, qword [rsp + 0xa0]
test rcx, rcx
je 0x140127e1e
cmp qword [rcx + 0x328], 0
je 0x140127dec
mov rdx, rbp
call fcn.1400ae450
mov eax, r12d
jmp 0x1401280f5
mov rbp, qword [rsp + 0x40]
jmp 0x140127cf9
mov rbp, qword [rsp + 0x40]
mov r12d, 1
jmp 0x140127d0e
cmp rbp, qword [rcx + 0x170]
jb 0x140127e1e
cmp rbp, qword [rcx + 0x178]
jae 0x140127e1e
mov rax, qword [rcx + 0x168]
mov qword [rbp], rax
mov eax, r12d
dec dword [rcx + 0x154]
mov qword [rcx + 0x168], rbp
jmp 0x1401280f5
cmp dword [0x1402fd010], 0
je 0x140127e76
mov rcx, qword [0x140303640]
test rcx, rcx
je 0x140127e39
call qword [0x1402fd098]
mov rcx, rbp
call qword [0x1402fd050]
dec qword [0x140303428]
movsxd rcx, eax
sub qword [0x1403033e0], rcx
mov rcx, rbp
call qword [0x1402fd040]
mov rcx, qword [0x140303640]
test rcx, rcx
je 0x140127e7f
call qword [0x1402fd0a8]
mov eax, r12d
jmp 0x1401280f5
mov rcx, rbp
call qword [0x1402fd040]
mov eax, r12d
jmp 0x1401280f5
movzx r14d, word [rsp + 0x108]
mov r13, qword [rsp + 0xa0]
movsxd rdx, ecx
mov rbx, r11
cmp rdx, 1
jle 0x140127ed0
lea rcx, [r11 + 0x32]
dec rdx
nop dword [rax + rax]
movzx eax, word [rcx]
cmp word [rbx + 0x12], ax
jle 0x140127ec3
movsxd rbx, r12d
shl rbx, 5
add rbx, r11
inc r12d
add rcx, 0x20
sub rdx, 1
jne 0x140127eb0
mov r10d, dword [rsp + 0x118]
xor r15d, r15d
test r10b, r10b
je 0x140127f21
mov r8d, r15d
lea rdx, [rdi + 0x36c]
mov r9d, r10d
nop dword [rax]
mov rax, qword [rbx + 0x18]
lea rdx, [rdx + 0x58]
lea r8, [r8 + 8]
mov rcx, qword [r8 + rax - 8]
mov qword [rdx - 0x3c], rcx
movzx eax, byte [rcx + 0x10]
imul rcx, rax, 0x78
mov byte [rdx - 0x58], al
mov rax, qword [rdi + 8]
mov ecx, dword [rcx + rax + 0x50]
mov dword [rdx - 0x80], ecx
sub r9, 1
jne 0x140127ef0
movzx eax, word [rdi + 0x32]
mov ecx, 0x600
and ax, cx
mov esi, 0x200
mov ecx, 0x400
cmp ax, cx
jne 0x140127f99
cmp byte [rdi + 0x38], 0
jne 0x140127f99
test r14w, r14w
je 0x140127f99
mov rax, qword [rbx + 0x18]
lea edx, [r10 - 1]
movzx ecx, r10b
lea r8, [rsp + 0x100]
mov qword [rsp + 0x30], r8
mov r9d, esi
mov r8, rbx
mov rax, qword [rax + rcx*8 - 8]
mov rcx, rdi
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], dx
mov rdx, qword [rdi + 0x18]
call fcn.140126e60
mov r10d, dword [rsp + 0x118]
movsx ecx, al
mov rax, qword [rdi + 0x18]
cmp ecx, dword [rax]
jne 0x140127f99
mov byte [rdi + 0x38], 2
mov rdx, qword [rdi + 0x10]
test rdx, rdx
je 0x140128044
movzx r8d, word [rdi + 0x32]
movzx ecx, byte [rbx + 0x16]
test si, r8w
je 0x140127fc2
movsx eax, cl
cmp eax, dword [rdx]
jne 0x140127fd5
mov byte [rdi + 0x38], 2
jmp 0x140127fd5
mov eax, ecx
test cl, cl
cmovs eax, r15d
mov byte [rdi + 0x34], al
mov rax, qword [rbx + 8]
mov qword [rdi + 0x28], rax
bt r8w, 0xb
jae 0x140128044
movsx eax, byte [rdi + 0x34]
cmp eax, dword [rdx]
jne 0x140128044
test r10b, r10b
je 0x140128044
mov rax, qword [rbx + 0x18]
lea r8, [rsp + 0x100]
movzx ecx, r10b
xor r9d, r9d
mov qword [rsp + 0x30], r8
dec r10w
mov r8, rbx
mov qword [rsp + 0x100], r15
mov rax, qword [rax + rcx*8 - 8]
mov rcx, rdi
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], r10w
call fcn.140126e60
movsx ecx, al
mov rax, qword [rdi + 0x10]
cmp ecx, dword [rax]
jne 0x140128044
mov rax, qword [rsp + 0x100]
mov qword [rdi + 0x28], rax
mov byte [rdi + 0x35], 1
movzx eax, word [rbx + 0x10]
mov word [rdi + 0x30], ax
test r13, r13
je 0x140128098
cmp qword [r13 + 0x328], 0
je 0x14012806b
mov rdx, rbp
mov rcx, r13
call fcn.1400ae450
jmp 0x1401280f3
cmp rbp, qword [r13 + 0x170]
jb 0x140128098
cmp rbp, qword [r13 + 0x178]
jae 0x140128098
mov rax, qword [r13 + 0x168]
mov qword [rbp], rax
dec dword [r13 + 0x154]
mov qword [r13 + 0x168], rbp
jmp 0x1401280f3
cmp dword [0x1402fd010], 0
je 0x1401280ea
mov rcx, qword [0x140303640]
test rcx, rcx
je 0x1401280b3
call qword [0x1402fd098]
mov rcx, rbp
call qword [0x1402fd050]
dec qword [0x140303428]
movsxd rcx, eax
sub qword [0x1403033e0], rcx
mov rcx, rbp
call qword [0x1402fd040]
mov rcx, qword [0x140303640]
test rcx, rcx
je 0x1401280f3
call qword [0x1402fd0a8]
jmp 0x1401280f3
mov rcx, rbp
call qword [0x1402fd040]
xor eax, eax
mov rbp, qword [rsp + 0xb8]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret