Function at 0x140178190
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
sub rsp, 0xb0
mov rax, qword [rcx]
movzx edi, dx
xor edx, edx
mov qword [rsp + 0x88], rax
mov r14, rcx
mov dword [rsp + 0x5c], edx
movzx ecx, byte [rcx + 0x40]
mov r13d, 1
mov r8, qword [rax]
movzx esi, dx
mov qword [rsp + 0x90], r8
movzx r12d, dx
mov qword [rsp + 0x80], rdx
mov dword [rsp + 0x100], ecx
cmp ecx, r13d
ja 0x1401781f7
mov ebx, r13d
jmp 0x140178207
cmp ecx, 2
mov ebx, 0xa
mov eax, 5
cmove ebx, eax
mov rax, qword [r14 + 0x10]
mov dword [rsp + 0x58], ebx
test rax, rax
je 0x140178221
test di, di
je 0x140178221
mov ebp, dword [rax]
mov dword [rsp + 0x54], ebp
jmp 0x140178227
mov ebp, edx
mov dword [rsp + 0x54], edx
lea eax, [rcx + 4]
imul eax, ebx
lea ecx, [rax*8]
add ecx, ebp
add ecx, ecx
movsxd rdx, ecx
mov rcx, r8
call fcn.14011fde0
mov qword [rsp + 0x60], rax
mov rdx, rax
test rax, rax
jne 0x140178258
lea eax, [rdx + 7]
jmp 0x140178d19
movsxd r11, dword [rsp + 0x100]
xorps xmm0, xmm0
mov eax, ebx
mov r8, r11
shl rax, 5
lea r10, [rax + rdx]
mov qword [rsp + 0xa8], r15
shl r8, 3
mov r15, rdx
movups xmmword [r10], xmm0
lea rcx, [rax + r10]
mov qword [rsp + 0x40], rdx
movups xmmword [r10 + 0x10], xmm0
lea eax, [rbx + rbx]
mov qword [rsp + 0x78], r10
add rdx, 0x18
nop dword [rax]
mov qword [rdx], rcx
lea rdx, [rdx + 0x20]
add rcx, r8
dec eax
test eax, eax
jg 0x1401782a0
test ebp, ebp
je 0x1401782d6
movsxd r8, ebp
xor edx, edx
add r8, r8
mov qword [rsp + 0x80], rcx
call fcn.1401ab060
mov r11d, dword [rsp + 0x100]
mov r10, qword [rsp + 0x78]
mov rax, qword [rsp + 0x88]
mov ecx, 0x30
mov edx, r13d
mov dword [rsp + 0x6c], edx
mov eax, dword [rax + 0xc0]
cmp eax, ecx
cmovb ecx, eax
mov word [r10 + 0x10], cx
test ebp, ebp
je 0x140178311
test r11b, r11b
movzx eax, bpl
mov ecx, 0xffffffff
cmovne eax, ecx
mov byte [r10 + 0x16], al
xor r8d, r8d
mov ebp, 0x100
mov ecx, r8d
mov dword [rsp + 0x50], ecx
test r11b, r11b
je 0x1401789b7
mov ebx, 0x4000
lea rbp, [0x140000000]
nop word [rax + rax]
mov dword [rsp + 0x108], r8d
mov eax, r8d
mov dword [rsp + 0x68], eax
mov r9d, r8d
mov qword [rsp + 0x48], r10
mov rdi, r10
test edx, edx
jle 0x14017886b
mov r13, qword [r14 + 0x58]
test r13, r13
je 0x140178843
nop
mov r9, qword [rdi]
movzx r11d, byte [rdi + 0x16]
mov rax, r9
not rax
mov qword [rsp + 0x70], r8
test qword [r13], rax
jne 0x140178803
mov r15, qword [r13 + 8]
test r9, r15
jne 0x1401787f4
test dword [r13 + 0x28], ebx
je 0x1401783ab
cmp word [rdi + 0x10], 3
jl 0x1401787f4
movsx ebx, word [r13 + 0x12]
movzx r10d, word [rdi + 0x10]
mov ecx, ebx
movzx r8d, word [r13 + 0x14]
add r8w, r10w
movsx edx, r8w
cmp bx, r8w
jl 0x1401783ef
lea eax, [rdx + 0x31]
cmp ebx, eax
jg 0x14017841a
lea eax, [rdx + 0x1f]
cmp ebx, eax
jle 0x1401783dd
inc bx
jmp 0x14017841a
sub ecx, edx
movsxd rax, ecx
movzx eax, byte [rax + rbp + 0x22ed98]
add bx, ax
jmp 0x14017841a
lea eax, [rbx + 0x31]
cmp edx, eax
jle 0x1401783fc
movzx ebx, r8w
jmp 0x14017841a
lea eax, [rbx + 0x1f]
cmp edx, eax
jle 0x140178409
lea ebx, [r8 + 1]
jmp 0x14017841a
sub edx, ecx
movsxd rax, edx
movzx ebx, byte [rax + rbp + 0x22ed98]
add bx, r8w
movsx r8d, word [rdi + 0x14]
movsx ecx, bx
mov edx, r8d
cmp bx, r8w
jl 0x140178452
lea eax, [r8 + 0x31]
cmp ecx, eax
jg 0x14017847d
lea eax, [r8 + 0x1f]
cmp ecx, eax
jle 0x140178440
inc bx
jmp 0x14017847d
sub ecx, edx
movsxd rax, ecx
movzx eax, byte [rax + rbp + 0x22ed98]
add bx, ax
jmp 0x14017847d
lea eax, [rcx + 0x31]
cmp edx, eax
jle 0x14017845f
movzx ebx, r8w
jmp 0x14017847d
lea eax, [rcx + 0x1f]
cmp edx, eax
jle 0x14017846c
lea ebx, [r8 + 1]
jmp 0x14017847d
sub edx, ecx
movsxd rax, edx
movzx ebx, byte [rax + rbp + 0x22ed98]
add bx, r8w
movzx ebp, word [r13 + 0x16]
or r15, r9
add bp, r10w
test r11b, r11b
jns 0x14017860c
movzx r9d, word [r14 + 0x3c]
lea rax, [rsp + 0x70]
mov rdx, qword [r14 + 0x10]
mov r8, rdi
mov qword [rsp + 0x30], rax
mov rcx, r14
mov eax, dword [rsp + 0x50]
mov qword [rsp + 0x28], r13
mov word [rsp + 0x20], ax
call fcn.140177800
mov r14, qword [rsp + 0x70]
movzx r11d, al
test al, al
jns 0x140178610
movzx r8d, bx
add bx, 0xfffe
mov r9d, dword [rsp + 0x108]
xor ecx, ecx
mov rdi, qword [rsp + 0x40]
test r9d, r9d
jle 0x14017850d
nop dword [rax + rax]
cmp qword [rdi], r15
jne 0x140178502
movzx eax, byte [rdi + 0x16]
xor al, r11b
jge 0x1401787cb
inc ecx
add rdi, 0x20
cmp ecx, r9d
jl 0x1401784f0
mov r10d, dword [rsp + 0x58]
cmp r9d, r10d
jl 0x14017852d
cmp r8w, si
jg 0x14017880d
jne 0x14017852d
cmp bx, r12w
jge 0x14017880d
mov r15, qword [rsp + 0x40]
cmp r9d, r10d
mov eax, r9d
cmovge eax, dword [rsp + 0x5c]
movsxd rdi, eax
lea eax, [r9 + 1]
shl rdi, 5
add rdi, r15
cmp r9d, r10d
cmovge eax, r9d
mov dword [rsp + 0x108], 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 + 0x50]
mov word [rdi + 0x14], bx
mov word [rdi + 0x12], r8w
mov qword [rdi + 8], r14
lea rbx, [rax*8]
mov word [rdi + 0x10], bp
mov byte [rdi + 0x16], r11b
mov r8, rbx
mov rdx, qword [rdx + 0x18]
call fcn.1401ab210
mov rax, qword [rdi + 0x18]
xor r8d, r8d
mov r10d, dword [rsp + 0x58]
mov r9d, dword [rsp + 0x108]
mov qword [rbx + rax], r13
cmp r9d, r10d
jl 0x140178815
movzx esi, word [r15 + 0x12]
mov edx, 1
movzx r12d, word [r15 + 0x10]
mov dword [rsp + 0x5c], r8d
cmp r10d, edx
jbe 0x140178815
lea rax, [r15 + 0x34]
nop dword [rax + rax]
movzx ecx, word [rax - 2]
cmp cx, si
jg 0x1401785f1
jne 0x1401785fc
cmp word [rax], r12w
jle 0x1401785fc
movzx r12d, word [rax]
movzx esi, cx
mov dword [rsp + 0x5c], edx
inc edx
add rax, 0x20
cmp edx, r10d
jl 0x1401785e0
jmp 0x140178815
mov r14, qword [rdi + 8]
mov edx, dword [rsp + 0x54]
movsx ecx, r11b
cmp ecx, edx
jge 0x1401784cf
mov r8, qword [rsp + 0x80]
movsx rax, r11b
lea r10, [r8 + rax*2]
movzx r8d, word [r8 + rax*2]
test r8w, r8w
jne 0x140178733
movzx edi, word [rsp + 0xf8]
mov eax, edx
sub eax, ecx
movzx r9d, di
imul eax, eax, 0x64
mov ecx, 0x28
cdq
idiv dword [rsp + 0x54]
cdqe
cmp rax, 8
jae 0x14017867f
cmp rax, 2
jae 0x140178670
movzx r8d, di
jmp 0x1401786dd
add cx, 0xfff6
add rax, rax
cmp rax, 8
jb 0x140178670
jmp 0x1401786bd
cmp rax, 0xff
jbe 0x1401786a0
nop word [rax + rax]
add cx, 0x28
shr rax, 4
cmp rax, 0xff
ja 0x140178690
cmp rax, 0xf
jbe 0x1401786bd
nop word [rax + rax]
add cx, 0xa
shr rax, 1
cmp rax, 0xf
ja 0x1401786b0
and eax, 7
lea rdx, [0x140000000]
movzx r8d, word [rdx + rax*2 + 0x2ac078]
sub r8w, 0xa
add r8w, cx
add r8w, di
mov rax, qword [rsp + 0xf0]
movzx ecx, word [rax + 0x3c]
bt cx, 0xe
jae 0x1401786ff
movzx eax, word [rax + 0x3e]
cmp ax, di
jge 0x1401786ff
movzx r9d, ax
jmp 0x140178710
bt cx, 8
jae 0x140178710
cmp di, 0xa
jle 0x140178717
lea r9d, [rdi - 0xa]
cmp r9w, 0xa
jg 0x14017871e
mov eax, 0xffffffce
jmp 0x14017872b
movsx rcx, r9w
call fcn.140134fc0
sub ax, 0x53
add r8w, ax
mov word [r10], r8w
movsx ecx, bx
movsx edx, r8w
cmp bx, r8w
jl 0x14017878d
lea eax, [rdx + 0x31]
cmp ecx, eax
jle 0x140178755
movzx r8d, bx
add r8w, 5
jmp 0x1401784d7
lea eax, [rdx + 0x1f]
cmp ecx, eax
jle 0x14017876a
lea r8d, [rbx + 1]
add r8w, 5
jmp 0x1401784d7
sub ecx, edx
movsxd rax, ecx
lea rcx, [0x140000000]
movzx r8d, byte [rax + rcx + 0x22ed98]
add r8w, bx
add r8w, 5
jmp 0x1401784d7
lea eax, [rcx + 0x31]
cmp edx, eax
jg 0x1401787c1
lea eax, [rcx + 0x1f]
cmp edx, eax
jle 0x1401787a9
inc r8w
add r8w, 5
jmp 0x1401784d7
sub edx, ecx
lea rcx, [0x140000000]
movsxd rax, edx
movzx eax, byte [rax + rcx + 0x22ed98]
add r8w, ax
add r8w, 5
jmp 0x1401784d7
mov r15, qword [rsp + 0x40]
cmp word [rdi + 0x12], r8w
jl 0x140178812
jne 0x140178559
cmp word [rdi + 0x10], bp
jl 0x140178812
jne 0x140178559
cmp word [rdi + 0x14], bx
jle 0x140178812
jmp 0x140178559
mov r9d, dword [rsp + 0x108]
mov r15, qword [rsp + 0x40]
jmp 0x14017882e
mov r9d, dword [rsp + 0x108]
jmp 0x14017882e
mov r15, qword [rsp + 0x40]
xor r8d, r8d
mov r14, qword [rsp + 0xf0]
lea rbp, [0x140000000]
mov rdi, qword [rsp + 0x48]
mov ebx, 0x4000
mov r13, qword [r13 + 0x40]
test r13, r13
jne 0x140178370
mov eax, dword [rsp + 0x68]
mov edx, dword [rsp + 0x6c]
inc eax
add rdi, 0x20
mov dword [rsp + 0x68], eax
mov qword [rsp + 0x48], rdi
cmp eax, edx
jl 0x140178362
mov ecx, dword [rsp + 0x50]
mov r11d, dword [rsp + 0x100]
mov r10, qword [rsp + 0x78]
mov rax, r15
mov qword [rsp + 0x40], r10
inc ecx
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x50], ecx
mov edx, r9d
mov dword [rsp + 0x6c], edx
mov r15, r10
mov r10, rax
cmp ecx, r11d
jl 0x140178340
test r9d, r9d
jne 0x1401789a4
mov rcx, qword [rsp + 0x88]
lea rdx, str.no_query_solution
call fcn.140122730
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x140178932
cmp qword [rcx + 0x2e0], 0
je 0x1401788dc
mov rdx, qword [rsp + 0x60]
call fcn.1400ff1a0
mov eax, 1
jmp 0x140178d11
mov rbx, qword [rsp + 0x60]
cmp rbx, qword [rcx + 0x1d0]
jae 0x140178937
cmp rbx, qword [rcx + 0x1c0]
jb 0x14017890e
mov rax, qword [rcx + 0x1b8]
mov qword [rbx], rax
mov eax, 1
mov qword [rcx + 0x1b8], rbx
jmp 0x140178d11
cmp rbx, qword [rcx + 0x1c8]
jb 0x140178937
mov rax, qword [rcx + 0x1a8]
mov qword [rbx], rax
mov eax, 1
mov qword [rcx + 0x1a8], rbx
jmp 0x140178d11
mov rbx, qword [rsp + 0x60]
cmp dword [0x1402ab270], 0
je 0x140178991
mov rcx, qword [0x1402b4ec0]
test rcx, rcx
je 0x140178952
call qword [0x1402ab2f0]
mov rcx, rbx
call qword [0x1402ab2a8]
dec qword [0x1402b4e58]
movsxd rcx, eax
sub qword [0x1402b4e10], rcx
mov rcx, rbx
call qword [0x1402ab298]
mov rcx, qword [0x1402b4ec0]
test rcx, rcx
je 0x14017899a
call qword [0x1402ab300]
mov eax, 1
jmp 0x140178d11
mov rcx, rbx
call qword [0x1402ab298]
mov eax, 1
jmp 0x140178d11
movzx edi, word [rsp + 0xf8]
mov ebp, 0x100
mov r13d, 1
movsxd rdx, edx
mov rbx, r10
cmp rdx, 1
jle 0x1401789f0
lea rcx, [r10 + 0x32]
dec rdx
nop word [rax + rax]
movzx eax, word [rcx]
cmp word [rbx + 0x12], ax
jle 0x1401789e3
movsxd rbx, r13d
shl rbx, 5
add rbx, r10
inc r13d
add rcx, 0x20
sub rdx, 1
jne 0x1401789d0
test r11b, r11b
je 0x140178a34
lea rdx, [r14 + 0x394]
mov r9d, r11d
nop
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 [r14 + 8]
mov ecx, dword [rcx + rax + 0x4c]
mov dword [rdx - 0x90], ecx
sub r9, 1
jne 0x140178a00
movzx eax, word [r14 + 0x3c]
mov ecx, 0x180
and ax, cx
cmp ax, bp
jne 0x140178aa7
cmp byte [r14 + 0x43], 0
jne 0x140178aa7
test di, di
je 0x140178aa7
mov rax, qword [rbx + 0x18]
lea edx, [r11 - 1]
movzx ecx, r11b
lea r8, [rsp + 0xf0]
mov qword [rsp + 0x30], r8
mov r9d, 0x80
mov r8, rbx
mov rax, qword [rax + rcx*8 - 8]
mov rcx, r14
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], dx
mov rdx, qword [r14 + 0x18]
call fcn.140177800
mov r11d, dword [rsp + 0x100]
movsx ecx, al
mov rax, qword [r14 + 0x18]
cmp ecx, dword [rax]
jne 0x140178aa7
mov byte [r14 + 0x43], 2
mov r8d, dword [r14 + 0x44]
mov r10, qword [r14 + 0x10]
and r8d, 0xfffffffb
mov dword [r14 + 0x44], r8d
test r10, r10
je 0x140178c3a
movzx ecx, word [r14 + 0x3c]
movsx r9d, byte [rbx + 0x16]
test cl, cl
jns 0x140178ae3
cmp r9d, dword [r10]
jne 0x140178ad8
mov byte [r14 + 0x43], 2
movzx eax, cx
mov rdx, r10
jmp 0x140178bc6
mov byte [r14 + 0x41], r9b
mov rdx, r10
mov rax, qword [rbx + 8]
mov qword [r14 + 0x68], rax
test r9b, r9b
jg 0x140178bab
mov byte [r14 + 0x41], 0
test r11b, r11b
je 0x140178ba4
mov rax, qword [rbx + 0x18]
movzx ecx, r11b
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 0x140178b9c
mov eax, dword [rsp + 0x100]
lea rcx, [rsp + 0xf0]
mov qword [rsp + 0x30], rcx
dec eax
mov qword [rsp + 0x28], r11
mov rcx, r14
mov r9d, 0x800
mov word [rsp + 0x20], ax
mov r8, rbx
mov qword [rsp + 0xf0], 0
call fcn.140177800
mov rdx, qword [r14 + 0x10]
mov r11d, dword [rsp + 0x100]
movsx ecx, al
cmp ecx, dword [rdx]
jne 0x140178ba4
mov rax, qword [rsp + 0xf0]
or dword [r14 + 0x44], 4
mov qword [r14 + 0x68], rax
movzx eax, word [r14 + 0x3c]
jmp 0x140178bc6
mov r11d, dword [rsp + 0x100]
movzx eax, word [r14 + 0x3c]
jmp 0x140178bc6
movzx eax, cx
test r11b, r11b
je 0x140178bc6
cmp r9b, 1
jne 0x140178bc6
test cl, 3
je 0x140178bc6
or r8d, 4
mov dword [r14 + 0x44], r8d
bt ax, 9
jae 0x140178c3a
movsx eax, byte [r14 + 0x41]
cmp eax, dword [rdx]
jne 0x140178c3a
test r11b, r11b
je 0x140178c3a
mov rax, qword [rbx + 0x18]
lea r8, [rsp + 0xf0]
movzx ecx, r11b
xor r9d, r9d
mov qword [rsp + 0x30], r8
dec r11w
mov r8, rbx
mov qword [rsp + 0xf0], 0
mov rax, qword [rax + rcx*8 - 8]
mov rcx, r14
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], r11w
call fcn.140177800
movsx ecx, al
mov rax, qword [r14 + 0x10]
cmp ecx, dword [rax]
jne 0x140178c3a
mov rax, qword [rsp + 0xf0]
or dword [r14 + 0x44], 8
mov qword [r14 + 0x68], rax
mov rcx, qword [rsp + 0x90]
movzx eax, word [rbx + 0x10]
mov word [r14 + 0x48], ax
test rcx, rcx
je 0x140178caf
cmp qword [rcx + 0x2e0], 0
je 0x140178c69
mov rdx, qword [rsp + 0x60]
call fcn.1400ff1a0
jmp 0x140178d0f
mov rbx, qword [rsp + 0x60]
cmp rbx, qword [rcx + 0x1d0]
jae 0x140178cb4
cmp rbx, qword [rcx + 0x1c0]
jb 0x140178c93
mov rax, qword [rcx + 0x1b8]
mov qword [rbx], rax
mov qword [rcx + 0x1b8], rbx
jmp 0x140178d0f
cmp rbx, qword [rcx + 0x1c8]
jb 0x140178cb4
mov rax, qword [rcx + 0x1a8]
mov qword [rbx], rax
mov qword [rcx + 0x1a8], rbx
jmp 0x140178d0f
mov rbx, qword [rsp + 0x60]
cmp dword [0x1402ab270], 0
je 0x140178d06
mov rcx, qword [0x1402b4ec0]
test rcx, rcx
je 0x140178ccf
call qword [0x1402ab2f0]
mov rcx, rbx
call qword [0x1402ab2a8]
dec qword [0x1402b4e58]
movsxd rcx, eax
sub qword [0x1402b4e10], rcx
mov rcx, rbx
call qword [0x1402ab298]
mov rcx, qword [0x1402b4ec0]
test rcx, rcx
je 0x140178d0f
call qword [0x1402ab300]
jmp 0x140178d0f
mov rcx, rbx
call qword [0x1402ab298]
xor eax, eax
mov r15, qword [rsp + 0xa8]
add rsp, 0xb0
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret