Function at 0x18008b560
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]
mov r15, rcx
movzx ecx, byte [rcx + 0x3b]
mov r13, qword [rax]
movzx edi, dx
xor edx, edx
mov ebp, 1
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x100], ecx
mov qword [rsp + 0x98], r13
mov dword [rsp + 0x48], edx
movzx esi, dx
movzx r12d, dx
mov qword [rsp + 0x80], rdx
cmp ecx, ebp
jg 0x18008b5c6
mov ebx, ebp
jmp 0x18008b5d6
mov ebx, 0xa
mov eax, 5
cmp ecx, 2
cmove ebx, eax
mov rax, qword [r15 + 0x10]
mov dword [rsp + 0x4c], ebx
test rax, rax
je 0x18008b5f2
test di, di
je 0x18008b5f2
mov r14d, dword [rax]
mov dword [rsp + 0x60], r14d
jmp 0x18008b5f9
mov r14d, edx
mov dword [rsp + 0x60], edx
lea eax, [rcx + 4]
imul eax, ebx
lea ecx, [r14 + rax*8]
add ecx, ecx
movsxd rdx, ecx
mov rcx, r13
call fcn.180046280
mov rdx, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x18008b625
lea eax, [rdx + 7]
jmp 0x18008c092
xor ecx, ecx
mov r10, rax
mov qword [rsp + 0x70], 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 0x18008b680
movsxd r8, dword [rsp + 0x100]
shl r8, 3
add rdx, 0x18
nop dword [rax]
mov qword [rdx], rcx
dec eax
add rcx, r8
lea rdx, [rdx + 0x20]
test eax, eax
jg 0x18008b670
test r14d, r14d
je 0x18008b6a4
movsxd r8, r14d
xor edx, edx
mov qword [rsp + 0x80], rcx
add r8, r8
call fcn.180092be0
mov r10, qword [rsp + 0x70]
mov r9, qword [rsp + 0x78]
mov rax, qword [rsp + 0x88]
mov ecx, 0x30
mov edx, ebp
mov eax, dword [rax + 0x1dc]
mov dword [rsp + 0x68], edx
cmp eax, ecx
cmovb ecx, eax
mov word [r9 + 0x10], cx
test r14d, r14d
je 0x18008b6e7
movzx eax, r14b
mov r14d, dword [rsp + 0x100]
or ecx, 0xffffffff
test r14d, r14d
cmovg eax, ecx
mov byte [r9 + 0x16], al
jmp 0x18008b6ef
mov r14d, dword [rsp + 0x100]
xor ebx, ebx
mov ecx, ebx
mov dword [rsp + 0x108], ebx
test r14d, r14d
jle 0x18008bdcc
nop dword [rax]
nop word [rax + rax]
mov r8d, ebx
mov dword [rsp + 0x50], ebx
mov rdi, r9
mov qword [rsp + 0x40], r9
mov eax, ebx
mov dword [rsp + 0x64], ebx
test edx, edx
jle 0x18008bbcd
nop dword [rax]
mov r13, qword [r15 + 0x20]
test r13, r13
je 0x18008bba2
nop dword [rax]
mov r9, qword [rdi]
movzx r11d, byte [rdi + 0x16]
mov qword [rsp + 0x90], rbx
mov rax, r9
not rax
test qword [r13], rax
jne 0x18008bb8d
mov rbp, qword [r13 + 8]
test r9, rbp
jne 0x18008bb88
mov eax, 0x4000
test dword [r13 + 0x28], eax
je 0x18008b783
cmp word [rdi + 0x10], 0xa
jl 0x18008bb88
movzx r10d, word [rdi + 0x10]
movzx edx, word [r13 + 0x14]
movzx ebx, word [r13 + 0x12]
add dx, r10w
lea r14, [0x180000000]
cmp bx, dx
jl 0x18008b7d7
movsx ecx, dx
movsx r8d, bx
lea eax, [rcx + 0x31]
cmp r8d, eax
jg 0x18008b80f
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x18008b7be
inc bx
jmp 0x18008b80f
movsx rcx, bx
movsx rax, dx
sub rcx, rax
movzx eax, byte [rcx + r14 + 0xa1830]
add bx, ax
jmp 0x18008b80f
movsx ecx, bx
movsx r8d, dx
lea eax, [rcx + 0x31]
cmp r8d, eax
jle 0x18008b7eb
movzx ebx, dx
jmp 0x18008b80f
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x18008b7f8
lea ebx, [rdx + 1]
jmp 0x18008b80f
movsx rax, bx
movsx rcx, dx
sub rcx, rax
movzx ebx, byte [rcx + r14 + 0xa1830]
add bx, dx
movzx edx, word [rdi + 0x14]
cmp bx, dx
jl 0x18008b84d
movsx ecx, dx
movsx r8d, bx
lea eax, [rcx + 0x31]
cmp r8d, eax
jg 0x18008b885
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x18008b834
inc bx
jmp 0x18008b885
movsx rax, dx
movsx rcx, bx
sub rcx, rax
movzx eax, byte [rcx + r14 + 0xa1830]
add bx, ax
jmp 0x18008b885
movsx ecx, bx
movsx r8d, dx
lea eax, [rcx + 0x31]
cmp r8d, eax
jle 0x18008b861
movzx ebx, dx
jmp 0x18008b885
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x18008b86e
lea ebx, [rdx + 1]
jmp 0x18008b885
movsx rax, bx
movsx rcx, dx
sub rcx, rax
movzx ebx, byte [rcx + r14 + 0xa1830]
add bx, dx
movzx r14d, word [r13 + 0x16]
or rbp, r9
add r14w, r10w
test r11b, r11b
jns 0x18008b8d6
movzx r9d, word [r15 + 0x34]
mov rdx, qword [r15 + 0x10]
lea rax, [rsp + 0x90]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x108]
mov r8, rdi
mov rcx, r15
mov qword [rsp + 0x28], r13
mov word [rsp + 0x20], ax
call fcn.18008acc0
mov r15, qword [rsp + 0x90]
movzx r11d, al
jmp 0x18008b8da
mov r15, qword [rdi + 8]
test r11b, r11b
js 0x18008bb02
mov r8d, dword [rsp + 0x60]
movsx ecx, r11b
cmp ecx, r8d
jge 0x18008bb02
mov rdx, qword [rsp + 0x80]
movsx rax, r11b
lea r10, [rdx + rax*2]
movzx edx, word [rdx + rax*2]
test dx, dx
jne 0x18008ba84
movzx edi, word [rsp + 0xf8]
mov eax, r8d
sub eax, ecx
movzx r9d, di
imul eax, eax, 0x64
cdq
idiv r8d
movsxd rcx, eax
mov eax, 0x28
cmp rcx, 8
jae 0x18008b95f
cmp rcx, 2
jae 0x18008b950
xor edx, edx
movzx r8d, dx
jmp 0x18008b9bb
add rcx, rcx
add ax, 0xfff6
cmp rcx, 8
jb 0x18008b950
jmp 0x18008b99d
cmp rcx, 0xff
jbe 0x18008b981
nop dword [rax + rax]
shr rcx, 4
add ax, 0x28
cmp rcx, 0xff
ja 0x18008b970
cmp rcx, 0xf
jbe 0x18008b99d
nop word [rax + rax]
shr rcx, 1
add ax, 0xa
cmp rcx, 0xf
ja 0x18008b990
lea rdx, [0x180000000]
and ecx, 7
movzx r8d, word [rdx + rcx*2 + 0xbd0d0]
sub r8w, 0xa
add r8w, ax
xor edx, edx
mov rax, qword [rsp + 0xf0]
sub r8w, 0x32
mov ecx, 0x4000
add r8w, di
test word [rax + 0x34], cx
je 0x18008b9e3
movzx eax, word [rax + 0x32]
cmp ax, di
cmovl r9w, ax
cmp r9w, 0xa
jle 0x18008ba7c
movsx rax, r9w
mov ecx, 0x28
cmp rax, 8
jae 0x18008ba1f
cmp rax, 2
jae 0x18008ba10
movzx eax, dx
jmp 0x18008ba76
add rax, rax
add cx, 0xfff6
cmp rax, 8
jb 0x18008ba10
jmp 0x18008ba5d
cmp rax, 0xff
jbe 0x18008ba40
nop word [rax + rax]
shr rax, 4
add cx, 0x28
cmp rax, 0xff
ja 0x18008ba30
cmp rax, 0xf
jbe 0x18008ba5d
nop word [rax + rax]
shr rax, 1
add cx, 0xa
cmp rax, 0xf
ja 0x18008ba50
and eax, 7
lea rdx, [0x180000000]
movzx eax, word [rdx + rax*2 + 0xbd0d0]
sub ax, 0xa
add ax, cx
movsx edx, ax
sub edx, 0x21
add dx, r8w
mov word [r10], dx
cmp bx, dx
jl 0x18008bac4
movsx ecx, dx
movsx r8d, bx
lea eax, [rcx + 0x31]
cmp r8d, eax
jg 0x18008bb02
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x18008baa5
lea edx, [rbx + 1]
jmp 0x18008bb05
movsx rax, dx
movsx rcx, bx
sub rcx, rax
lea rax, [0x180000000]
movzx edx, byte [rcx + rax + 0xa1830]
add dx, bx
jmp 0x18008bb05
movsx ecx, bx
movsx r8d, dx
lea eax, [rcx + 0x31]
cmp r8d, eax
jg 0x18008bb05
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x18008bae0
inc dx
jmp 0x18008bb05
movsx rcx, dx
movsx rax, bx
sub rcx, rax
lea rax, [0x180000000]
movzx eax, byte [rcx + rax + 0xa1830]
add ax, dx
movzx edx, ax
jmp 0x18008bb05
movzx edx, bx
mov r8d, dword [rsp + 0x50]
mov r10, qword [rsp + 0x70]
xor ecx, ecx
mov rdi, r10
test r8d, r8d
jle 0x18008bb39
nop dword [rax]
cmp qword [rdi], rbp
jne 0x18008bb2e
movzx eax, byte [rdi + 0x16]
xor al, r11b
jns 0x18008bb5a
inc ecx
add rdi, 0x20
cmp ecx, r8d
jl 0x18008bb20
cmp r8d, dword [rsp + 0x4c]
jl 0x18008bc46
cmp dx, si
jg 0x18008bb79
jne 0x18008bb51
cmp bx, r12w
jge 0x18008bb79
mov eax, dword [rsp + 0x48]
jmp 0x18008bc51
cmp ecx, r8d
jge 0x18008bb39
movzx eax, word [rdi + 0x12]
cmp ax, dx
jl 0x18008bb79
jne 0x18008bc5b
cmp word [rdi + 0x10], r14w
jg 0x18008bc5b
mov r15, qword [rsp + 0xf0]
mov rdi, qword [rsp + 0x40]
xor ebx, ebx
mov ebp, 1
mov r13, qword [r13 + 0x40]
test r13, r13
jne 0x18008b740
mov eax, dword [rsp + 0x64]
mov edx, dword [rsp + 0x68]
inc eax
add rdi, 0x20
mov dword [rsp + 0x64], eax
mov qword [rsp + 0x40], rdi
cmp eax, edx
jl 0x18008b730
mov ecx, dword [rsp + 0x108]
mov r9, qword [rsp + 0x78]
mov r14d, dword [rsp + 0x100]
mov rax, r10
inc ecx
mov edx, r8d
mov r10, r9
mov qword [rsp + 0x70], r9
mov r9, rax
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x68], edx
mov dword [rsp + 0x108], ecx
cmp ecx, r14d
jl 0x18008b710
test r8d, r8d
jne 0x18008bdbc
mov rcx, qword [rsp + 0x88]
lea rdx, str.no_query_solution
call fcn.180048910
mov rcx, qword [rsp + 0x98]
test rcx, rcx
je 0x18008bd50
cmp qword [rcx + 0x298], 0
je 0x18008bd1b
mov rdx, qword [rsp + 0x58]
call fcn.18002c290
mov eax, ebp
jmp 0x18008c092
mov eax, r8d
inc r8d
mov dword [rsp + 0x50], r8d
movsxd rdi, eax
shl rdi, 5
add rdi, r10
mov rax, qword [r13 + 8]
mov rcx, qword [rsp + 0x40]
or rax, qword [rcx]
mov word [rdi + 0x14], bx
mov qword [rdi + 8], r15
mov qword [rdi], rax
movsxd rax, dword [rsp + 0x108]
mov word [rdi + 0x10], r14w
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.180091e20
mov rax, qword [rdi + 0x18]
mov r8d, dword [rsp + 0x50]
mov r10, qword [rsp + 0x70]
mov qword [rbx + rax], r13
mov ebx, dword [rsp + 0x4c]
mov ebp, 1
cmp r8d, ebx
jl 0x18008bd07
movzx esi, word [r10 + 0x12]
movzx r12d, word [r10 + 0x10]
mov edx, ebp
mov dword [rsp + 0x48], 0
cmp ebx, edx
jle 0x18008bd07
lea rax, [r10 + 0x32]
nop dword [rax + rax]
movzx ecx, word [rax]
cmp cx, si
jg 0x18008bcf1
jne 0x18008bcfd
cmp word [rax + 2], r12w
jle 0x18008bcfd
movzx r12d, word [rax + 2]
movzx esi, cx
mov dword [rsp + 0x48], edx
inc edx
add rax, 0x20
cmp edx, ebx
jl 0x18008bce0
mov rdi, qword [rsp + 0x40]
mov r15, qword [rsp + 0xf0]
xor ebx, ebx
jmp 0x18008bb8d
mov rbx, qword [rsp + 0x58]
cmp rbx, qword [rcx + 0x180]
jb 0x18008bd55
cmp rbx, qword [rcx + 0x188]
jae 0x18008bd55
mov rax, qword [rcx + 0x178]
mov qword [rbx], rax
dec dword [rcx + 0x160]
mov qword [rcx + 0x178], rbx
mov eax, ebp
jmp 0x18008c092
mov rbx, qword [rsp + 0x58]
cmp dword [0x1800bce70], 0
je 0x18008bdac
mov rcx, qword [0x1800bf700]
test rcx, rcx
je 0x18008bd70
call qword [0x1800bcef8]
mov rcx, rbx
call qword [0x1800bceb0]
dec qword [0x1800bf788]
movsxd rcx, eax
sub qword [0x1800bf740], rcx
mov rcx, rbx
call qword [0x1800bcea0]
mov rcx, qword [0x1800bf700]
test rcx, rcx
je 0x18008bdb5
call qword [0x1800bcf08]
mov eax, ebp
jmp 0x18008c092
mov rcx, rbx
call qword [0x1800bcea0]
mov eax, ebp
jmp 0x18008c092
movzx edi, word [rsp + 0xf8]
mov r13, qword [rsp + 0x98]
movsxd rdx, edx
mov rbx, r9
cmp rdx, 1
jle 0x18008bdfe
lea rcx, [r9 + 0x32]
dec rdx
nop
movzx eax, word [rcx]
cmp word [rbx + 0x12], ax
jle 0x18008bdf3
movsxd rbx, ebp
shl rbx, 5
add rbx, r9
inc ebp
add rcx, 0x20
dec rdx
jne 0x18008bde0
test r14d, r14d
jle 0x18008be40
xor r8d, r8d
lea rdx, [r15 + 0x374]
mov r9d, r14d
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]
mov byte [rdx - 0x58], al
imul rcx, rax, 0x78
mov rax, qword [r15 + 8]
mov ecx, dword [rcx + rax + 0x50]
mov dword [rdx - 0x80], ecx
dec r9
jne 0x18008be10
movzx eax, word [r15 + 0x34]
mov ecx, 0x100
test cx, ax
je 0x18008beab
test al, al
js 0x18008beab
cmp byte [r15 + 0x3a], 0
jne 0x18008beab
test di, di
je 0x18008beab
mov rax, qword [rbx + 0x18]
movsxd rcx, r14d
lea r8, [rsp + 0xf0]
mov rax, qword [rax + rcx*8 - 8]
mov qword [rsp + 0x30], r8
lea edx, [r14 - 1]
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], dx
mov rdx, qword [r15 + 0x18]
mov r9d, 0x80
mov r8, rbx
mov rcx, r15
call fcn.18008acc0
movsx ecx, al
mov rax, qword [r15 + 0x18]
cmp ecx, dword [rax]
jne 0x18008beab
mov byte [r15 + 0x3a], 2
mov rdx, qword [r15 + 0x10]
test rdx, rdx
je 0x18008bfd5
test byte [r15 + 0x34], 0x80
je 0x18008bed5
movsx eax, byte [rbx + 0x16]
cmp eax, dword [rdx]
jne 0x18008bf5d
mov byte [r15 + 0x3a], 2
jmp 0x18008bf5d
movzx ecx, byte [rbx + 0x16]
mov byte [r15 + 0x36], cl
mov rax, qword [rbx + 8]
mov qword [r15 + 0x28], rax
test cl, cl
jg 0x18008bf5d
mov byte [r15 + 0x36], 0
test r14d, r14d
jle 0x18008bf5d
mov rax, qword [rbx + 0x18]
movsxd rcx, r14d
mov r8, qword [rax + rcx*8 - 8]
test dword [r8 + 0x28], 0x1000
jne 0x18008bf5d
lea rcx, [rsp + 0xf0]
lea eax, [r14 - 1]
mov r9d, 0x800
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], r8
mov r8, rbx
mov rcx, r15
mov qword [rsp + 0xf0], 0
mov word [rsp + 0x20], ax
call fcn.18008acc0
mov rdx, qword [r15 + 0x10]
movsx ecx, al
cmp ecx, dword [rdx]
jne 0x18008bf5d
mov rax, qword [rsp + 0xf0]
mov byte [r15 + 0x3c], 1
mov qword [r15 + 0x28], rax
mov eax, 0x200
test word [r15 + 0x34], ax
je 0x18008bfd5
movsx eax, byte [r15 + 0x36]
cmp eax, dword [rdx]
jne 0x18008bfd5
test r14d, r14d
jle 0x18008bfd5
mov rax, qword [rbx + 0x18]
movsxd rcx, r14d
lea r8, [rsp + 0xf0]
mov rax, qword [rax + rcx*8 - 8]
mov qword [rsp + 0x30], r8
dec r14w
mov qword [rsp + 0x28], rax
xor r9d, r9d
mov r8, rbx
mov rcx, r15
mov qword [rsp + 0xf0], 0
mov word [rsp + 0x20], r14w
call fcn.18008acc0
movsx ecx, al
mov rax, qword [r15 + 0x10]
cmp ecx, dword [rax]
jne 0x18008bfd5
mov rax, qword [rsp + 0xf0]
mov byte [r15 + 0x37], 1
mov qword [r15 + 0x28], rax
movzx eax, word [rbx + 0x10]
mov word [r15 + 0x30], ax
test r13, r13
je 0x18008c030
cmp qword [r13 + 0x298], 0
je 0x18008bfff
mov rdx, qword [rsp + 0x58]
mov rcx, r13
call fcn.18002c290
jmp 0x18008c090
mov rbx, qword [rsp + 0x58]
cmp rbx, qword [r13 + 0x180]
jb 0x18008c035
cmp rbx, qword [r13 + 0x188]
jae 0x18008c035
mov rax, qword [r13 + 0x178]
mov qword [rbx], rax
dec dword [r13 + 0x160]
mov qword [r13 + 0x178], rbx
jmp 0x18008c090
mov rbx, qword [rsp + 0x58]
cmp dword [0x1800bce70], 0
je 0x18008c087
mov rcx, qword [0x1800bf700]
test rcx, rcx
je 0x18008c050
call qword [0x1800bcef8]
mov rcx, rbx
call qword [0x1800bceb0]
dec qword [0x1800bf788]
movsxd rcx, eax
sub qword [0x1800bf740], rcx
mov rcx, rbx
call qword [0x1800bcea0]
mov rcx, qword [0x1800bf700]
test rcx, rcx
je 0x18008c090
call qword [0x1800bcf08]
jmp 0x18008c090
mov rcx, rbx
call qword [0x1800bcea0]
xor eax, eax
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret