Function at 0x14016f260
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

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]
movzx ebp, dx
xor edx, edx
mov qword [rsp + 0x90], rax
mov rdi, rcx
mov dword [rsp + 0x58], edx
movzx ecx, byte [rcx + 0x40]
mov r15d, 1
mov r8, qword [rax]
movzx esi, dx
mov qword [rsp + 0x98], r8
movzx r12d, dx
mov qword [rsp + 0x80], rdx
mov dword [rsp + 0x108], ecx
cmp ecx, r15d
ja 0x14016f2c9
mov ebx, r15d
jmp 0x14016f2d9
cmp ecx, 2
mov ebx, 0xa
mov eax, 5
cmove ebx, eax
mov rax, qword [rdi + 0x10]
mov dword [rsp + 0x54], ebx
test rax, rax
je 0x14016f2f5
test bp, bp
je 0x14016f2f5
mov r14d, dword [rax]
mov dword [rsp + 0x50], r14d
jmp 0x14016f2fc
mov r14d, edx
mov dword [rsp + 0x50], edx
lea eax, [rcx + 4]
imul eax, ebx
lea ecx, [r14 + rax*8]
add ecx, ecx
movsxd rdx, ecx
mov rcx, r8
call fcn.140121770
mov qword [rsp + 0x68], rax
mov r13, rax
test rax, rax
jne 0x14016f329
lea eax, [r13 + 7]
jmp 0x14016fd5f
movsxd r8, dword [rsp + 0x108]
lea rdx, [r13 + 0x18]
xor ecx, ecx
mov eax, ebx
shl rax, 5
mov r10, r13
lea r9, [rax + r13]
mov qword [rsp + 0x60], r13
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]
mov qword [rsp + 0x70], r9
shl r8, 3
nop dword [rax + rax]
mov qword [rdx], rcx
lea rdx, [rdx + 0x20]
add rcx, r8
dec eax
test eax, eax
jg 0x14016f370
test r14d, r14d
je 0x14016f3a2
movsxd r8, r14d
xor edx, edx
add r8, r8
mov qword [rsp + 0x80], rcx
call sub.msvcrt.dll_memset
mov r9, qword [rsp + 0x70]
mov r10, r13
mov rax, qword [rsp + 0x90]
mov ecx, 0x30
mov eax, dword [rax + 0xbc]
cmp eax, ecx
cmovb ecx, eax
mov word [r9 + 0x10], cx
mov ecx, r15d
test r14d, r14d
je 0x14016f3e4
movzx eax, r14b
mov edx, 0xffffffff
mov r14d, dword [rsp + 0x108]
test r14b, r14b
cmovne eax, edx
mov byte [r9 + 0x16], al
jmp 0x14016f3ec
mov r14d, dword [rsp + 0x108]
xor ebx, ebx
mov dword [rsp + 0x40], ebx
mov r8d, ebx
test r14b, r14b
je 0x14016fa62
nop
mov dword [rsp + 0x100], ebx
mov edx, ebx
test ecx, ecx
jle 0x14016f91a
lea r15, [r9 + 0x10]
mov eax, ecx
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x88], rax
nop dword [rax]
nop dword [rax + rax]
mov r13, qword [rdi + 0x50]
test r13, r13
je 0x14016f8ed
nop dword [rax]
mov rbp, qword [r15 - 0x10]
movzx r11d, byte [r15 + 6]
mov rax, rbp
not rax
mov qword [rsp + 0x78], rbx
test qword [r13], rax
jne 0x14016f8d0
mov r10, qword [r13 + 8]
test r10, rbp
jne 0x14016f8cb
mov eax, 0x4000
test dword [r13 + 0x28], eax
je 0x14016f481
cmp word [r15], 3
jl 0x14016f8cb
movsx ebx, word [r13 + 0x12]
lea r14, [0x140000000]
movzx r9d, word [r15]
mov ecx, ebx
movzx r8d, word [r13 + 0x14]
add r8w, r9w
movsx edx, r8w
cmp bx, r8w
jl 0x14016f4cc
lea eax, [rdx + 0x31]
cmp ebx, eax
jg 0x14016f4f8
lea eax, [rdx + 0x1f]
cmp ebx, eax
jle 0x14016f4b9
inc bx
jmp 0x14016f4f8
sub ecx, edx
movsxd rax, ecx
movzx eax, byte [rax + r14 + 0x1d9fa8]
add bx, ax
jmp 0x14016f4f8
lea eax, [rcx + 0x31]
cmp edx, eax
jle 0x14016f4d9
movzx ebx, r8w
jmp 0x14016f4f8
lea eax, [rcx + 0x1f]
cmp edx, eax
jle 0x14016f4e6
lea ebx, [r8 + 1]
jmp 0x14016f4f8
sub edx, ecx
movsxd rax, edx
movzx ebx, byte [rax + r14 + 0x1d9fa8]
add bx, r8w
movsx r8d, word [r15 + 4]
movsx ecx, bx
mov edx, r8d
cmp bx, r8w
jl 0x14016f52f
lea eax, [rdx + 0x31]
cmp ecx, eax
jg 0x14016f55b
lea eax, [rdx + 0x1f]
cmp ecx, eax
jle 0x14016f51c
inc bx
jmp 0x14016f55b
sub ecx, edx
movsxd rax, ecx
movzx eax, byte [rax + r14 + 0x1d9fa8]
add bx, ax
jmp 0x14016f55b
lea eax, [rcx + 0x31]
cmp edx, eax
jle 0x14016f53c
movzx ebx, r8w
jmp 0x14016f55b
lea eax, [rcx + 0x1f]
cmp edx, eax
jle 0x14016f549
lea ebx, [r8 + 1]
jmp 0x14016f55b
sub edx, ecx
movsxd rax, edx
movzx ebx, byte [rax + r14 + 0x1d9fa8]
add bx, r8w
movzx r14d, word [r13 + 0x16]
or rbp, r10
mov rdi, qword [rsp + 0xf0]
add r14w, r9w
test r11b, r11b
jns 0x14016f5af
mov rdx, qword [rdi + 0x10]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r8, [r15 - 0x10]
mov eax, dword [rsp + 0x40]
mov rcx, rdi
mov qword [rsp + 0x28], r13
mov word [rsp + 0x20], ax
mov rax, rdi
movzx r9d, word [rax + 0x3c]
call fcn.14016e970
mov r15, qword [rsp + 0x78]
movzx r11d, al
jmp 0x14016f5b3
mov r15, qword [r15 - 8]
test r11b, r11b
js 0x14016f75a
mov edx, dword [rsp + 0x50]
movsx ecx, r11b
cmp ecx, edx
jge 0x14016f75a
mov r8, qword [rsp + 0x80]
movsx rax, r11b
lea r10, [r8 + rax*2]
movzx r8d, word [r8 + rax*2]
test r8w, r8w
jne 0x14016f6cd
movzx r9d, word [rsp + 0xf8]
mov eax, edx
sub eax, ecx
mov ecx, 0x28
imul eax, eax, 0x64
cdq
idiv dword [rsp + 0x50]
cdqe
cmp rax, 8
jae 0x14016f62f
cmp rax, 2
jae 0x14016f620
movzx ecx, r9w
movzx r8d, cx
jmp 0x14016f695
add cx, 0xfff6
add rax, rax
cmp rax, 8
jb 0x14016f620
jmp 0x14016f66d
cmp rax, 0xff
jbe 0x14016f650
nop word [rax + rax]
add cx, 0x28
shr rax, 4
cmp rax, 0xff
ja 0x14016f640
cmp rax, 0xf
jbe 0x14016f66d
nop word [rax + rax]
add cx, 0xa
shr rax, 1
cmp rax, 0xf
ja 0x14016f660
and eax, 7
lea rdx, [0x140000000]
movzx r8d, word [rdx + rax*2 + 0x227af8]
add r8w, cx
movzx ecx, word [rsp + 0xf8]
sub r8w, 0xa
add r8w, cx
mov eax, 0x4000
test word [rdi + 0x3c], ax
je 0x14016f6aa
cmp word [rdi + 0x3e], cx
cmovl r9w, word [rdi + 0x3e]
cmp r9w, 0xa
jg 0x14016f6b8
mov eax, 0xffffffce
jmp 0x14016f6c5
movsx rcx, r9w
call fcn.1401352c0
sub ax, 0x53
add r8w, ax
mov word [r10], r8w
movsx ecx, bx
movsx edx, r8w
cmp bx, r8w
jl 0x14016f71e
lea eax, [rdx + 0x31]
cmp ecx, eax
jle 0x14016f6ec
movzx r8d, bx
add r8w, 5
jmp 0x14016f762
lea eax, [rdx + 0x1f]
cmp ecx, eax
jle 0x14016f6fe
lea r8d, [rbx + 1]
add r8w, 5
jmp 0x14016f762
sub ecx, edx
movsxd rax, ecx
lea rcx, [0x140000000]
movzx r8d, byte [rax + rcx + 0x1d9fa8]
add r8w, bx
add r8w, 5
jmp 0x14016f762
lea eax, [rcx + 0x31]
cmp edx, eax
jg 0x14016f753
lea eax, [rcx + 0x1f]
cmp edx, eax
jle 0x14016f737
inc r8w
add r8w, 5
jmp 0x14016f762
sub edx, ecx
lea rcx, [0x140000000]
movsxd rax, edx
movzx eax, byte [rax + rcx + 0x1d9fa8]
add ax, r8w
movzx r8d, ax
add r8w, 5
jmp 0x14016f762
movzx r8d, bx
add bx, 0xfffe
mov r10, qword [rsp + 0x60]
xor ecx, ecx
mov edx, dword [rsp + 0x100]
mov rdi, r10
test edx, edx
jle 0x14016f793
cmp qword [rdi], rbp
jne 0x14016f789
movzx eax, byte [rdi + 0x16]
xor al, r11b
jge 0x14016f890
inc ecx
add rdi, 0x20
cmp ecx, edx
jl 0x14016f777
mov r9d, dword [rsp + 0x54]
cmp edx, r9d
jl 0x14016f7b3
cmp r8w, si
jg 0x14016f8c2
jne 0x14016f7b3
cmp bx, r12w
jge 0x14016f8c2
cmp edx, r9d
mov eax, edx
cmovge eax, dword [rsp + 0x58]
movsxd rdi, eax
lea eax, [rdx + 1]
shl rdi, 5
add rdi, r10
cmp edx, r9d
cmovge eax, edx
mov dword [rsp + 0x100], eax
mov rax, qword [r13 + 8]
mov rcx, qword [rsp + 0x48]
or rax, qword [rcx - 0x10]
mov qword [rdi], rax
movsxd rax, dword [rsp + 0x40]
mov word [rdi + 0x14], bx
mov qword [rdi + 8], r15
mov r15, rcx
mov word [rdi + 0x12], r8w
lea rbx, [rax*8]
mov word [rdi + 0x10], r14w
mov byte [rdi + 0x16], r11b
mov r8, rbx
mov rdx, qword [rcx + 8]
mov rcx, qword [rdi + 0x18]
call sub.msvcrt.dll_memcpy
mov rax, qword [rdi + 0x18]
mov edx, dword [rsp + 0x100]
mov r9d, dword [rsp + 0x54]
mov r10, qword [rsp + 0x60]
mov qword [rbx + rax], r13
xor ebx, ebx
cmp edx, r9d
jl 0x14016f8d0
movzx esi, word [r10 + 0x12]
mov edx, 1
movzx r12d, word [r10 + 0x10]
mov dword [rsp + 0x58], ebx
cmp r9d, edx
jbe 0x14016f887
lea rax, [r10 + 0x34]
nop dword [rax]
movzx ecx, word [rax - 2]
cmp cx, si
jg 0x14016f871
jne 0x14016f87c
cmp word [rax], r12w
jle 0x14016f87c
movzx r12d, word [rax]
movzx esi, cx
mov dword [rsp + 0x58], edx
inc edx
add rax, 0x20
cmp edx, r9d
jl 0x14016f860
mov edx, dword [rsp + 0x100]
jmp 0x14016f8d0
cmp ecx, edx
jge 0x14016f793
movzx eax, word [rdi + 0x12]
cmp ax, r8w
jl 0x14016f8c2
jne 0x14016f7d7
movzx eax, word [rdi + 0x10]
cmp ax, r14w
jl 0x14016f8c2
jne 0x14016f7d7
cmp word [rdi + 0x14], bx
jg 0x14016f7d7
mov r15, qword [rsp + 0x48]
xor ebx, ebx
jmp 0x14016f8d0
mov r10, qword [rsp + 0x60]
mov r13, qword [r13 + 0x40]
test r13, r13
jne 0x14016f440
mov rdi, qword [rsp + 0xf0]
mov rax, qword [rsp + 0x88]
add r15, 0x20
sub rax, 1
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x88], rax
jne 0x14016f430
mov r8d, dword [rsp + 0x40]
mov r9, qword [rsp + 0x70]
mov r14d, dword [rsp + 0x108]
mov rax, r10
mov qword [rsp + 0x60], r9
inc r8d
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x40], r8d
mov r10, r9
mov r9, rax
mov ecx, edx
cmp r8d, r14d
jl 0x14016f400
test edx, edx
jne 0x14016fa4f
mov rcx, qword [rsp + 0x90]
lea rdx, str.no_query_solution
call fcn.140123d60
mov rcx, qword [rsp + 0x98]
test rcx, rcx
je 0x14016f9dd
cmp qword [rcx + 0x2d8], 0
je 0x14016f987
mov rdx, qword [rsp + 0x68]
call fcn.140105bc0
mov eax, 1
jmp 0x14016fd5f
mov rbx, qword [rsp + 0x68]
cmp rbx, qword [rcx + 0x1c8]
jae 0x14016f9e2
cmp rbx, qword [rcx + 0x1b8]
jb 0x14016f9b9
mov rax, qword [rcx + 0x1b0]
mov qword [rbx], rax
mov eax, 1
mov qword [rcx + 0x1b0], rbx
jmp 0x14016fd5f
cmp rbx, qword [rcx + 0x1c0]
jb 0x14016f9e2
mov rax, qword [rcx + 0x1a0]
mov qword [rbx], rax
mov eax, 1
mov qword [rcx + 0x1a0], rbx
jmp 0x14016fd5f
mov rbx, qword [rsp + 0x68]
cmp dword [0x140227480], 0
je 0x14016fa3c
mov rcx, qword [0x14022f738]
test rcx, rcx
je 0x14016f9fd
call qword [0x140227500]
mov rcx, rbx
call qword [0x1402274b8]
dec qword [0x14022f6c8]
movsxd rcx, eax
sub qword [0x14022f680], rcx
mov rcx, rbx
call qword [0x1402274a8]
mov rcx, qword [0x14022f738]
test rcx, rcx
je 0x14016fa45
call qword [0x140227510]
mov eax, 1
jmp 0x14016fd5f
mov rcx, rbx
call qword [0x1402274a8]
mov eax, 1
jmp 0x14016fd5f
movzx ebp, word [rsp + 0xf8]
mov r15d, 1
mov r13, qword [rsp + 0x68]
movsxd rdx, ecx
mov rbx, r9
cmp rdx, 1
jle 0x14016fa95
lea rcx, [r9 + 0x32]
dec rdx
movzx eax, word [rcx]
cmp word [rbx + 0x12], ax
jle 0x14016fa88
movsxd rbx, r15d
shl rbx, 5
add rbx, r9
inc r15d
add rcx, 0x20
sub rdx, 1
jne 0x14016fa75
test r14b, r14b
je 0x14016fae4
xor r8d, r8d
mov r9d, r14d
lea rdx, [rdi + 0x3cc]
nop word [rax + rax]
mov rax, qword [rbx + 0x18]
lea rdx, [rdx + 0x60]
lea r8, [r8 + 8]
mov rcx, qword [r8 + rax - 8]
mov qword [rdx - 0x44], rcx
movzx eax, byte [rcx + 0x10]
imul rcx, rax, 0x70
mov byte [rdx - 0x60], al
mov rax, qword [rdi + 8]
mov ecx, dword [rcx + rax + 0x4c]
mov dword [rdx - 0x90], ecx
sub r9, 1
jne 0x14016fab0
movzx eax, word [rdi + 0x3c]
mov ecx, 0x180
and ax, cx
mov ecx, 0x100
cmp ax, cx
jne 0x14016fb51
cmp byte [rdi + 0x43], 0
jne 0x14016fb51
test bp, bp
je 0x14016fb51
mov rax, qword [rbx + 0x18]
lea r8, [rsp + 0xf0]
mov qword [rsp + 0x30], r8
lea edx, [r14 - 1]
movzx ecx, r14b
mov r9d, 0x80
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.14016e970
movsx ecx, al
mov rax, qword [rdi + 0x18]
cmp ecx, dword [rax]
jne 0x14016fb51
mov byte [rdi + 0x43], 2
and dword [rdi + 0x44], 0xfffffffb
mov r10, qword [rdi + 0x10]
test r10, r10
je 0x14016fc93
test byte [rdi + 0x3c], 0x80
movzx ecx, byte [rbx + 0x16]
je 0x14016fb80
movsx eax, cl
cmp eax, dword [r10]
jne 0x14016fb78
mov byte [rdi + 0x43], 2
mov rdx, r10
jmp 0x14016fc1d
mov byte [rdi + 0x41], cl
mov rdx, r10
mov rax, qword [rbx + 8]
mov qword [rdi + 0x60], rax
test cl, cl
jg 0x14016fc1d
mov byte [rdi + 0x41], 0
test r14b, r14b
je 0x14016fc1d
mov rax, qword [rbx + 0x18]
movzx ecx, r14b
mov r11, qword [rax + rcx*8 - 8]
mov eax, dword [r11 + 0x28]
and eax, 0x104
cmp eax, 0x104
setne cl
bt dword [r11 + 0x28], 0xc
setae al
test al, cl
je 0x14016fc1d
lea rcx, [rsp + 0xf0]
mov qword [rsp + 0xf0], 0
mov qword [rsp + 0x30], rcx
lea eax, [r14 - 1]
mov qword [rsp + 0x28], r11
mov rcx, rdi
mov r9d, 0x800
mov word [rsp + 0x20], ax
mov r8, rbx
call fcn.14016e970
mov rdx, qword [rdi + 0x10]
movsx ecx, al
cmp ecx, dword [rdx]
jne 0x14016fc1d
mov rax, qword [rsp + 0xf0]
or dword [rdi + 0x44], 4
mov qword [rdi + 0x60], rax
mov eax, 0x200
test word [rdi + 0x3c], ax
je 0x14016fc93
movsx eax, byte [rdi + 0x41]
cmp eax, dword [rdx]
jne 0x14016fc93
test r14b, r14b
je 0x14016fc93
mov rax, qword [rbx + 0x18]
lea r8, [rsp + 0xf0]
mov qword [rsp + 0x30], r8
xor r9d, r9d
movzx ecx, r14b
mov r8, rbx
dec r14w
mov qword [rsp + 0xf0], 0
mov rax, qword [rax + rcx*8 - 8]
mov rcx, rdi
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], r14w
call fcn.14016e970
movsx ecx, al
mov rax, qword [rdi + 0x10]
cmp ecx, dword [rax]
jne 0x14016fc93
mov rax, qword [rsp + 0xf0]
or dword [rdi + 0x44], 8
mov qword [rdi + 0x60], rax
mov rcx, qword [rsp + 0x98]
movzx eax, word [rbx + 0x10]
mov word [rdi + 0x48], ax
test rcx, rcx
je 0x14016fd02
cmp qword [rcx + 0x2d8], 0
je 0x14016fcbf
mov rdx, r13
call fcn.140105bc0
jmp 0x14016fd5d
cmp r13, qword [rcx + 0x1c8]
jae 0x14016fd02
cmp r13, qword [rcx + 0x1b8]
jb 0x14016fce5
mov rax, qword [rcx + 0x1b0]
mov qword [r13], rax
mov qword [rcx + 0x1b0], r13
jmp 0x14016fd5d
cmp r13, qword [rcx + 0x1c0]
jb 0x14016fd02
mov rax, qword [rcx + 0x1a0]
mov qword [r13], rax
mov qword [rcx + 0x1a0], r13
jmp 0x14016fd5d
cmp dword [0x140227480], 0
je 0x14016fd54
mov rcx, qword [0x14022f738]
test rcx, rcx
je 0x14016fd1d
call qword [0x140227500]
mov rcx, r13
call qword [0x1402274b8]
dec qword [0x14022f6c8]
movsxd rcx, eax
sub qword [0x14022f680], rcx
mov rcx, r13
call qword [0x1402274a8]
mov rcx, qword [0x14022f738]
test rcx, rcx
je 0x14016fd5d
call qword [0x140227510]
jmp 0x14016fd5d
mov rcx, r13
call qword [0x1402274a8]
xor eax, eax
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret