Function at 0x180079ad0
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 r14
push r15
sub rsp, 0xa8
mov rax, qword [rcx]
mov rsi, rcx
movzx ecx, byte [rcx + 0x39]
mov r15, qword [rax]
movzx edi, dx
xor edx, edx
mov r12d, 1
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x100], ecx
cmp ecx, r12d
mov qword [rsp + 0x90], r15
mov dword [rsp + 0x48], edx
movzx ebp, dx
movzx r13d, dx
mov qword [rsp + 0x70], rdx
jg 0x180079b36
mov ebx, r12d
jmp 0x180079b46
mov ebx, 0xa
mov eax, 5
cmp ecx, 2
cmove ebx, eax
mov rax, qword [rsi + 0x10]
mov dword [rsp + 0x4c], ebx
test rax, rax
je 0x180079b62
test di, di
je 0x180079b62
mov r14d, dword [rax]
mov dword [rsp + 0x58], r14d
jmp 0x180079b69
mov r14d, edx
mov dword [rsp + 0x58], edx
lea eax, [rcx + 4]
imul eax, ebx
lea ecx, [r14 + rax*8]
add ecx, ecx
movsxd rdx, ecx
mov rcx, r15
call fcn.18002e4c0
mov rdx, rax
mov qword [rsp + 0x50], rax
test rax, rax
jne 0x180079b95
lea eax, [rdx + 7]
jmp 0x18007a48e
xor ecx, ecx
mov r10, rax
mov qword [rsp + 0x68], rax
movsxd rax, ebx
shl rax, 5
lea r9, [rax + rdx]
mov qword [rsp + 0x78], r9
mov qword [r9], rcx
mov qword [r9 + 8], rcx
mov qword [r9 + 0x10], rcx
mov qword [r9 + 0x18], rcx
lea rcx, [rax + r9]
lea eax, [rbx + rbx]
test eax, eax
jle 0x180079bf0
movsxd r8, dword [rsp + 0x100]
shl r8, 3
add rdx, 0x18
nop dword [rax]
mov qword [rdx], rcx
dec eax
add rdx, 0x20
add rcx, r8
test eax, eax
jg 0x180079be0
test r14d, r14d
je 0x180079c11
movsxd r8, r14d
xor edx, edx
mov qword [rsp + 0x70], rcx
add r8, r8
call fcn.180003c00
mov r10, qword [rsp + 0x68]
mov r9, qword [rsp + 0x78]
mov rax, qword [rsp + 0x88]
mov r11d, dword [rsp + 0x100]
mov ecx, 0x2e
mov eax, dword [rax + 0x1d8]
mov edx, r12d
cmp eax, ecx
mov dword [rsp + 0x60], edx
cmovb ecx, eax
mov word [r9 + 0x10], cx
test r14d, r14d
je 0x180079c53
or ecx, 0xffffffff
movzx eax, r14b
test r11d, r11d
cmovg eax, ecx
mov byte [r9 + 0x16], al
xor r8d, r8d
mov r14d, 0x400
mov ecx, r8d
mov dword [rsp + 0x108], ecx
test r11d, r11d
jle 0x18007a29b
nop
mov eax, r8d
mov r15d, r8d
mov rdi, r9
mov qword [rsp + 0x40], r9
mov dword [rsp + 0x5c], eax
test edx, edx
jle 0x18007a0fc
nop word [rax + rax]
mov r14, qword [rsi + 0x20]
test r14, r14
je 0x18007a0d1
nop dword [rax]
mov rsi, qword [rdi]
movzx r11d, byte [rdi + 0x16]
mov qword [rsp + 0x80], r8
mov rax, rsi
not rax
test qword [r14], rax
jne 0x18007a0b4
mov r9, qword [r14 + 8]
test r9, rsi
jne 0x18007a0b4
movzx r10d, word [rdi + 0x10]
movzx edx, word [r14 + 0x14]
mov bx, word [r14 + 0x12]
add dx, r10w
lea r12, [0x180000000]
cmp bx, dx
jl 0x180079d20
movsx ecx, dx
movsx r8d, bx
lea eax, [rcx + 0x31]
cmp r8d, eax
jg 0x180079d58
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x180079d07
inc bx
jmp 0x180079d58
movsx rcx, bx
movsx rax, dx
sub rcx, rax
movzx eax, byte [rcx + r12 + 0xe6d00]
add bx, ax
jmp 0x180079d58
movsx ecx, bx
movsx r8d, dx
lea eax, [rcx + 0x31]
cmp r8d, eax
jle 0x180079d34
mov bx, dx
jmp 0x180079d58
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x180079d41
lea ebx, [rdx + 1]
jmp 0x180079d58
movsx rax, bx
movsx rcx, dx
sub rcx, rax
movzx ebx, byte [rcx + r12 + 0xe6d00]
add bx, dx
movzx edx, word [rdi + 0x14]
cmp bx, dx
jl 0x180079d96
movsx ecx, dx
movsx r8d, bx
lea eax, [rcx + 0x31]
cmp r8d, eax
jg 0x180079dce
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x180079d7d
inc bx
jmp 0x180079dce
movsx rax, dx
movsx rcx, bx
sub rcx, rax
movzx eax, byte [rcx + r12 + 0xe6d00]
add bx, ax
jmp 0x180079dce
movsx ecx, bx
movsx r8d, dx
lea eax, [rcx + 0x31]
cmp r8d, eax
jle 0x180079daa
mov bx, dx
jmp 0x180079dce
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x180079db7
lea ebx, [rdx + 1]
jmp 0x180079dce
movsx rax, bx
movsx rcx, dx
sub rcx, rax
movzx ebx, byte [rcx + r12 + 0xe6d00]
add bx, dx
movzx r12d, word [r14 + 0x16]
or rsi, r9
add r12w, r10w
test r11b, r11b
jns 0x180079e26
lea rax, [rsp + 0x80]
mov r8, rdi
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x108]
mov qword [rsp + 0x28], r14
mov word [rsp + 0x20], ax
mov rax, qword [rsp + 0xf0]
movzx r9d, word [rax + 0x32]
mov rdx, qword [rax + 0x10]
mov rcx, rax
call fcn.180078690
mov r9, qword [rsp + 0x80]
mov r11b, al
jmp 0x180079e2a
mov r9, qword [rdi + 8]
test r11b, r11b
js 0x18007a039
mov edi, dword [rsp + 0x58]
movsx ecx, r11b
cmp ecx, edi
jge 0x18007a039
mov r10, qword [rsp + 0x70]
movsx r8, r11b
cmp word [r10 + r8*2], 0
jne 0x180079fb6
mov eax, edi
sub eax, ecx
imul eax, eax, 0x64
cdq
idiv edi
movsxd rcx, eax
mov eax, 0x28
cmp rcx, 8
jae 0x180079e8f
cmp rcx, 2
jae 0x180079e80
xor eax, eax
movzx edx, ax
jmp 0x180079ee8
add rcx, rcx
add ax, 0xfff6
cmp rcx, 8
jb 0x180079e80
jmp 0x180079ecd
cmp rcx, 0xff
jbe 0x180079eb1
nop dword [rax + rax]
shr rcx, 4
add ax, 0x28
cmp rcx, 0xff
ja 0x180079ea0
cmp rcx, 0xf
jbe 0x180079ecd
nop word [rax + rax]
shr rcx, 1
add ax, 0xa
cmp rcx, 0xf
ja 0x180079ec0
and ecx, 7
lea rdx, [0x180000000]
mov dx, word [rdx + rcx*2 + 0x10b960]
add dx, ax
sub dx, 0xa
xor eax, eax
mov di, word [rsp + 0xf8]
sub dx, 0x42
cmp di, 0xa
jle 0x180079f90
movsx rax, di
mov ecx, 0x28
cmp rax, 8
jae 0x180079f2f
cmp rax, 2
jae 0x180079f20
xor eax, eax
jmp 0x180079f8c
add rax, rax
add cx, 0xfff6
cmp rax, 8
jb 0x180079f20
jmp 0x180079f6d
cmp rax, 0xff
jbe 0x180079f50
nop word [rax + rax]
shr rax, 4
add cx, 0x28
cmp rax, 0xff
ja 0x180079f40
cmp rax, 0xf
jbe 0x180079f6d
nop word [rax + rax]
shr rax, 1
add cx, 0xa
cmp rax, 0xf
ja 0x180079f60
and eax, 7
lea r10, [0x180000000]
movzx eax, word [r10 + rax*2 + 0x10b960]
mov r10, qword [rsp + 0x70]
add ax, cx
sub ax, 0xa
cwde
sub eax, 0x21
mov rcx, qword [rsp + 0xf0]
add ax, dx
mov edx, 0x400
add ax, di
add ax, 0x10
test word [rcx + 0x32], dx
je 0x180079fb1
add ax, 0x10
mov word [r10 + r8*2], ax
mov dx, word [r10 + r8*2]
cmp bx, dx
jl 0x180079ffb
movsx ecx, dx
movsx r8d, bx
lea eax, [rcx + 0x31]
cmp r8d, eax
jg 0x18007a039
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x180079fdc
lea edx, [rbx + 1]
jmp 0x18007a03c
movsx rax, dx
movsx rcx, bx
sub rcx, rax
lea rax, [0x180000000]
movzx edx, byte [rcx + rax + 0xe6d00]
add dx, bx
jmp 0x18007a03c
movsx ecx, bx
movsx r8d, dx
lea eax, [rcx + 0x31]
cmp r8d, eax
jg 0x18007a03c
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x18007a017
inc dx
jmp 0x18007a03c
movsx rcx, dx
movsx rax, bx
sub rcx, rax
lea rax, [0x180000000]
movzx eax, byte [rcx + rax + 0xe6d00]
add ax, dx
mov dx, ax
jmp 0x18007a03c
mov dx, bx
mov r10, qword [rsp + 0x68]
xor r8d, r8d
mov rdi, r10
mov ecx, r8d
test r15d, r15d
jle 0x18007a069
nop
cmp qword [rdi], rsi
jne 0x18007a05e
movzx eax, byte [rdi + 0x16]
xor al, r11b
jns 0x18007a08a
inc ecx
add rdi, 0x20
cmp ecx, r15d
jl 0x18007a050
cmp r15d, dword [rsp + 0x4c]
jl 0x18007a179
cmp dx, bp
jg 0x18007a0a9
jne 0x18007a081
cmp bx, r13w
jge 0x18007a0a9
mov eax, dword [rsp + 0x48]
jmp 0x18007a17f
cmp ecx, r15d
jge 0x18007a069
movzx eax, word [rdi + 0x12]
cmp ax, dx
jl 0x18007a0a9
jne 0x18007a189
cmp word [rdi + 0x10], r12w
jg 0x18007a189
mov r12d, 1
mov rdi, qword [rsp + 0x40]
mov r14, qword [r14 + 0x40]
test r14, r14
jne 0x180079ca0
mov rsi, qword [rsp + 0xf0]
mov eax, dword [rsp + 0x5c]
mov edx, dword [rsp + 0x60]
inc eax
add rdi, 0x20
cmp eax, edx
mov dword [rsp + 0x5c], eax
mov qword [rsp + 0x40], rdi
jl 0x180079c90
mov ecx, dword [rsp + 0x108]
mov r9, qword [rsp + 0x78]
mov r11d, dword [rsp + 0x100]
mov rax, r10
inc ecx
mov edx, r15d
cmp ecx, r11d
mov r10, r9
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x60], edx
mov dword [rsp + 0x108], ecx
mov r9, rax
jl 0x180079c70
test r15d, r15d
jne 0x18007a285
mov rcx, qword [rsp + 0x88]
lea rdx, str.no_query_solution
call fcn.18003b940
mov r11, qword [rsp + 0x90]
test r11, r11
je 0x18007a273
cmp qword [r11 + 0x320], 0
je 0x18007a23c
mov rdx, qword [rsp + 0x50]
mov rcx, r11
call fcn.1800255d0
mov eax, r12d
jmp 0x18007a48e
mov eax, r15d
inc r15d
movsxd rdi, eax
shl rdi, 5
add rdi, r10
mov rax, qword [r14 + 8]
mov rcx, qword [rsp + 0x40]
or rax, qword [rcx]
mov word [rdi + 0x14], bx
mov qword [rdi + 8], r9
mov qword [rdi], rax
movsxd rax, dword [rsp + 0x108]
mov word [rdi + 0x10], r12w
mov word [rdi + 0x12], dx
mov byte [rdi + 0x16], r11b
mov rdx, qword [rcx + 0x18]
mov rcx, qword [rdi + 0x18]
lea rbx, [rax*8]
mov r8, rbx
call fcn.1800011c0
mov r11, qword [rdi + 0x18]
mov r10, qword [rsp + 0x68]
xor r8d, r8d
mov qword [rbx + r11], r14
mov ebx, dword [rsp + 0x4c]
cmp r15d, ebx
lea r12d, [r8 + 1]
jl 0x18007a0af
mov bp, word [r10 + 0x12]
mov r13w, word [r10 + 0x10]
mov edx, r12d
cmp ebx, edx
mov dword [rsp + 0x48], r8d
jle 0x18007a0af
lea rax, [r10 + 0x32]
nop dword [rax]
movzx ecx, word [rax]
cmp cx, bp
jg 0x18007a221
jne 0x18007a22d
cmp word [rax + 2], r13w
jle 0x18007a22d
mov r13w, word [rax + 2]
mov bp, cx
mov dword [rsp + 0x48], edx
inc edx
add rax, 0x20
cmp edx, ebx
jl 0x18007a210
jmp 0x18007a0af
mov rcx, qword [rsp + 0x50]
cmp rcx, qword [r11 + 0x168]
jb 0x18007a278
cmp rcx, qword [r11 + 0x170]
jae 0x18007a278
mov rax, qword [r11 + 0x160]
mov qword [rcx], rax
dec dword [r11 + 0x14c]
mov qword [r11 + 0x160], rcx
mov eax, r12d
jmp 0x18007a48e
mov rcx, qword [rsp + 0x50]
call sym.SQLite.Interop.dll_sqlite3_free
mov eax, r12d
jmp 0x18007a48e
mov di, word [rsp + 0xf8]
mov r15, qword [rsp + 0x90]
mov r14d, 0x400
movsxd rdx, edx
mov rbx, r9
cmp rdx, 1
jle 0x18007a2d0
lea rcx, [r9 + 0x32]
dec rdx
nop
movzx eax, word [rcx]
cmp word [rbx + 0x12], ax
jle 0x18007a2c3
movsxd rbx, r12d
shl rbx, 5
add rbx, r9
inc r12d
add rcx, 0x20
sub rdx, 1
jne 0x18007a2b0
test r11d, r11d
jle 0x18007a314
lea rdx, [rsi + 0x364]
mov r9d, r11d
nop
mov rax, qword [rbx + 0x18]
add rdx, 0x50
add r8, 8
mov rcx, qword [r8 + rax - 8]
mov qword [rdx - 0x34], rcx
movzx eax, byte [rcx + 0x10]
mov byte [rdx - 0x50], al
mov rcx, rax
mov rax, qword [rsi + 8]
imul rcx, rcx, 0x78
sub r9, 1
mov ecx, dword [rcx + rax + 0x50]
mov dword [rdx - 0x70], ecx
jne 0x18007a2e0
movzx eax, word [rsi + 0x32]
mov ebp, 0x200
test r14w, ax
je 0x18007a383
test bp, ax
jne 0x18007a383
cmp byte [rsi + 0x38], 0
jne 0x18007a383
test di, di
je 0x18007a383
mov rax, qword [rbx + 0x18]
movsxd rcx, r11d
lea edx, [r11 - 1]
mov rax, qword [rax + rcx*8 - 8]
lea r8, [rsp + 0xf0]
mov r9d, ebp
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], dx
mov rdx, qword [rsi + 0x18]
mov r8, rbx
mov rcx, rsi
call fcn.180078690
mov r11d, dword [rsp + 0x100]
movsx ecx, al
mov rax, qword [rsi + 0x18]
cmp ecx, dword [rax]
jne 0x18007a383
mov byte [rsi + 0x38], 2
mov rdx, qword [rsi + 0x10]
test rdx, rdx
je 0x18007a42b
movzx ecx, word [rsi + 0x32]
test bp, cx
je 0x18007a3a7
movsx eax, byte [rbx + 0x16]
cmp eax, dword [rdx]
jne 0x18007a3be
mov byte [rsi + 0x38], 2
jmp 0x18007a3be
movzx eax, byte [rbx + 0x16]
mov byte [rsi + 0x34], al
test al, al
jns 0x18007a3b6
mov byte [rsi + 0x34], 0
mov rax, qword [rbx + 8]
mov qword [rsi + 0x28], rax
mov eax, 0x800
test ax, cx
je 0x18007a42b
movsx eax, byte [rsi + 0x34]
cmp eax, dword [rdx]
jne 0x18007a42b
xor eax, eax
movsxd rcx, r11d
lea r8, [rsp + 0xf0]
mov qword [rsp + 0x30], r8
mov qword [rsp + 0xf0], rax
mov rax, qword [rbx + 0x18]
mov rax, qword [rax + rcx*8 - 8]
dec r11w
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov r8, rbx
mov rcx, rsi
mov word [rsp + 0x20], r11w
call fcn.180078690
movsx ecx, al
mov rax, qword [rsi + 0x10]
cmp ecx, dword [rax]
jne 0x18007a42b
mov rax, qword [rsp + 0xf0]
mov byte [rsi + 0x35], 1
mov qword [rsi + 0x28], rax
movzx eax, word [rbx + 0x10]
mov word [rsi + 0x30], ax
test r15, r15
je 0x18007a482
cmp qword [r15 + 0x320], 0
je 0x18007a451
mov rdx, qword [rsp + 0x50]
mov rcx, r15
call fcn.1800255d0
jmp 0x18007a48c
mov rcx, qword [rsp + 0x50]
cmp rcx, qword [r15 + 0x168]
jb 0x18007a487
cmp rcx, qword [r15 + 0x170]
jae 0x18007a487
mov rax, qword [r15 + 0x160]
mov qword [rcx], rax
dec dword [r15 + 0x14c]
mov qword [r15 + 0x160], rcx
jmp 0x18007a48c
mov rcx, qword [rsp + 0x50]
call sym.SQLite.Interop.dll_sqlite3_free
xor eax, eax
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret