Function at 0x14018b6a0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xd8
movzx eax, byte [rcx + 0x40]
mov rdi, qword [rcx]
cmp eax, 1
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0xa4], edx
mov word [rsp + 0xa0], dx
mov byte [rsp + 0xa3], al
mov dword [rsp + 0x80], eax
jle 0x14018beb0
cmp eax, 2
setne al
setne bl
movzx eax, al
movzx ebx, bl
lea eax, [rax + rax*4 + 5]
lea rbx, [rbx + rbx*4 + 5]
mov dword [rsp + 0x84], eax
mov rsi, qword [rsp + 0x48]
mov rdx, qword [rsi + 0x10]
test rdx, rdx
je 0x14018b72c
cmp word [rsp + 0xa4], 0
je 0x14018b72c
movsxd r15, dword [rdx]
mov rcx, r15
mov dword [rsp + 0x60], r15d
add ecx, ecx
jmp 0x14018b739
xor ecx, ecx
xor r15d, r15d
mov dword [rsp + 0x60], 0
movzx r12d, byte [rsp + 0xa3]
lea rdx, [r12 + 4]
imul edx, eax
shl edx, 4
add edx, ecx
mov rcx, qword [rdi]
movsxd rdx, edx
call fcn.140168520
test rax, rax
mov rdx, rax
mov qword [rsp + 0x98], rax
je 0x14018c024
lea rsi, [r12*8]
mov rax, rbx
shl rax, 5
lea rbx, [rdx + rax]
lea r9, [rbx + rax]
mov eax, dword [rsp + 0x84]
mov qword [rbx], 0
mov qword [rbx + 8], 0
mov qword [rbx + 0x10], 0
mov qword [rbx + 0x18], 0
lea ecx, [rax + rax]
mov rax, rdx
mov r8, rcx
shl rcx, 5
add rcx, rdx
mov rdx, r9
mov qword [rax + 0x18], rdx
add rax, 0x20
add rdx, rsi
cmp rax, rcx
jne 0x14018b7be
mov r14d, dword [rsp + 0x60]
test r14d, r14d
jne 0x14018beca
movzx eax, word [rdi + 0xe0]
mov edx, 0x30
mov qword [rsp + 0x68], 0
mov r13d, dword [rsp + 0x80]
cmp ax, dx
cmovg eax, edx
test r13d, r13d
mov word [rbx + 0x10], ax
je 0x14018bf60
mov r14, qword [rsp + 0x98]
xor r15d, r15d
mov ebp, 1
mov qword [rsp + 0xa8], rdi
mov rdi, r15
mov r15d, ebp
xor r13d, r13d
mov qword [rsp + 0xb0], rsi
xor r11d, r11d
test r15d, r15d
mov esi, r13d
mov dword [rsp + 0x70], edi
mov word [rsp + 0x66], r11w
mov rbp, rbx
mov dword [rsp + 0x74], 0
mov r13, r14
mov qword [rsp + 0xb8], r12
jle 0x14018bbbb
lea rax, [rdi*8]
movsxd r8, r15d
mov r12, rbp
mov qword [rsp + 0x90], rdi
mov edi, dword [rsp + 0x84]
shl r8, 5
mov qword [rsp + 0x50], rax
xor r15d, r15d
lea rbx, [rbp + r8]
mov qword [rsp + 0x88], rbp
mov ebp, esi
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x78], rax
nop
mov rax, qword [rsp + 0x48]
mov rsi, qword [rax + 0x58]
test rsi, rsi
jne 0x14018b8d5
jmp 0x14018bb70
mov rsi, qword [rsi + 0x50]
test rsi, rsi
je 0x14018bb70
mov rbx, qword [r12]
mov rax, rbx
not rax
and rax, qword [rsi]
jne 0x14018b8c8
mov r11, qword [rsi + 8]
test rbx, r11
jne 0x14018b8c8
test byte [rsi + 0x39], 0x40
movzx r10d, word [r12 + 0x10]
je 0x14018b900
cmp r10w, 2
jle 0x14018b8c8
movzx edx, word [rsi + 0x14]
or rbx, r11
movsx ecx, word [rsi + 0x12]
add edx, r10d
movsx edx, dx
call fcn.1401507e0
movsx edx, word [r12 + 0x14]
movsx ecx, ax
call fcn.1401507e0
movzx r11d, byte [r12 + 0x16]
add r10w, word [rsi + 0x16]
mov r14d, eax
test r11b, r11b
js 0x14018bab8
mov rax, qword [r12 + 8]
mov qword [rsp + 0xc8], rax
movsx edx, r11b
cmp dword [rsp + 0x60], edx
jle 0x14018bb09
mov rcx, qword [rsp + 0x68]
movsx rax, r11b
lea r8, [rcx + rax*2]
movzx r9d, word [r8]
test r9w, r9w
je 0x14018bbd0
movsx ecx, r14w
movsx edx, r9w
call fcn.1401507e0
test r15d, r15d
mov r8d, r14d
lea r14d, [rax + 3]
jle 0x14018bb20
movsxd r9, r15d
mov rax, r13
xor edx, edx
shl r9, 5
add r9, r13
jmp 0x14018b9ac
add rax, 0x20
add edx, 1
cmp rax, r9
je 0x14018b9bc
cmp rbx, qword [rax]
jne 0x14018b9a0
mov ecx, r11d
xor cl, byte [rax + 0x16]
js 0x14018b9a0
mov r9, rax
cmp edx, r15d
jl 0x14018bb30
cmp edi, r15d
jg 0x14018bb20
cmp r14w, bp
jg 0x14018b8c8
jne 0x14018b9e6
cmp r8w, word [rsp + 0x66]
jge 0x14018b8c8
movsxd r9, dword [rsp + 0x74]
shl r9, 5
add r9, r13
mov rax, qword [r12]
movzx r10d, r10w
shl r14d, 0x10
mov qword [rsp + 0x40], r9
or rax, qword [rsi + 8]
mov byte [r9 + 0x16], r11b
or r14d, r10d
mov rbx, qword [rsp + 0x50]
mov word [r9 + 0x14], r8w
mov rcx, qword [r9 + 0x18]
mov dword [r9 + 0x10], r14d
mov rdx, qword [r12 + 0x18]
movq xmm0, rax
movhps xmm0, qword [rsp + 0xc8]
mov r8, rbx
movups xmmword [r9], xmm0
call sub.msvcrt.dll_memcpy
mov r9, qword [rsp + 0x40]
cmp edi, r15d
mov rax, qword [r9 + 0x18]
mov qword [rax + rbx], rsi
jg 0x14018b8c8
movzx r8d, word [r13 + 0x10]
lea rax, [r13 + 0x20]
cmp edi, 1
movzx ebp, word [r13 + 0x12]
mov word [rsp + 0x66], r8w
je 0x14018bcca
xor r9d, r9d
mov edx, 1
jmp 0x14018ba99
movzx r8d, word [rax + 0x14]
mov ebp, ecx
mov r9d, edx
add edx, 1
add rax, 0x20
cmp edi, edx
je 0x14018bbc0
movzx ecx, word [rax + 0x12]
cmp cx, bp
jg 0x14018ba80
jne 0x14018ba8a
movzx r10d, word [rax + 0x14]
cmp r10w, r8w
jle 0x14018ba8a
mov r8d, r10d
jmp 0x14018ba85
mov rax, qword [rsp + 0x48]
mov r8, r12
mov dword [rsp + 0x40], r10d
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0xc8], 0
mov rdx, qword [rax + 0x10]
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x30], rcx
mov ecx, dword [rsp + 0x70]
mov dword [rsp + 0x20], ecx
movzx r9d, word [rax + 0x3c]
mov rcx, rax
call fcn.14018ab60
mov r10d, dword [rsp + 0x40]
test al, al
mov r11d, eax
jns 0x14018b948
lea r8d, [r14 - 2]
test r15d, r15d
jg 0x14018b98e
nop word cs:[rax + rax]
movsxd r9, r15d
add r15d, 1
jmp 0x14018b9eb
cmp r14w, word [r9 + 0x12]
jg 0x14018b8c8
jne 0x14018b9f2
cmp r10w, word [r9 + 0x10]
jg 0x14018b8c8
jne 0x14018b9f2
cmp r8w, word [r9 + 0x14]
jl 0x14018b9f2
mov rsi, qword [rsi + 0x50]
test rsi, rsi
jne 0x14018b8d5
nop word [rax + rax]
mov rax, qword [rsp + 0x58]
add r12, 0x20
cmp r12, rax
jne 0x14018b8b0
mov esi, ebp
mov rdi, qword [rsp + 0x90]
mov rbp, qword [rsp + 0x88]
add rdi, 1
cmp dword [rsp + 0x80], edi
mov rax, rbp
mov rbp, r13
jle 0x14018bcd7
test r15d, r15d
mov r13, rax
mov dword [rsp + 0x70], edi
jg 0x14018b864
xor r15d, r15d
jmp 0x14018bb94
mov dword [rsp + 0x74], r9d
mov word [rsp + 0x66], r8w
jmp 0x14018b8c8
mov rax, qword [rsp + 0x48]
mov dword [rsp + 0x40], edx
mov rax, qword [rax + 0x20]
mov rax, qword [rax + 0x20]
mov ecx, dword [rax]
add ecx, 0x3b
movsxd rax, ecx
imul rax, rax, 0xffffffff88888889
shr rax, 0x20
add eax, ecx
sar ecx, 0x1f
sar eax, 4
sub eax, ecx
movsxd rcx, eax
call fcn.14014f6c0
movzx ecx, word [rsp + 0xa0]
test r11b, r11b
lea r9d, [rax + rcx]
jne 0x14018bc94
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + 0x3c]
test ah, 0x40
je 0x14018bc4f
add r9d, 0xa
mov rax, qword [rsp + 0x48]
movzx ecx, word [rsp + 0xa0]
movzx eax, word [rax + 0x3e]
cmp cx, ax
cmovle eax, ecx
cmp ax, 0xa
jg 0x14018bc6b
mov word [r8], r9w
jmp 0x14018b971
test ah, 1
movzx eax, word [rsp + 0xa0]
je 0x14018bc40
cmp ax, 0xa
jle 0x14018bc46
sub eax, 0xa
cmp ax, 0xa
jle 0x14018bc46
movsx rax, ax
bsr rdx, rax
lea ecx, [rdx - 3]
lea edx, [rcx + rcx*4]
shr rax, cl
lea rcx, [0x1403aecb0]
and eax, 7
lea edx, [r9 + rdx*2 - 3]
add dx, word [rcx + rax*2]
mov r9d, edx
jmp 0x14018bc46
mov ecx, dword [rsp + 0x60]
mov edx, dword [rsp + 0x40]
mov eax, ecx
sub eax, edx
imul eax, eax, 0x64
cdq
idiv ecx
movsxd rcx, eax
call fcn.14014f6c0
lea r9d, [r9 + rax - 0x42]
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + 0x3c]
test ah, 0x40
je 0x14018bc4f
add r9d, 0x10
jmp 0x14018bc29
mov dword [rsp + 0x74], 0
jmp 0x14018b8c8
test r15d, r15d
mov rdi, qword [rsp + 0xa8]
mov r14, r13
mov rsi, qword [rsp + 0xb0]
mov r12, qword [rsp + 0xb8]
je 0x14018c010
cmp r15d, 1
jle 0x14018bd28
lea edx, [r15 - 2]
lea rax, [r13 + 0x20]
shl rdx, 5
lea rdx, [r13 + rdx + 0x40]
movzx ecx, word [r14 + 0x12]
cmp word [rax + 0x12], cx
cmovl r14, rax
add rax, 0x20
cmp rax, rdx
jne 0x14018bd12
mov rax, qword [rsp + 0x48]
mov rcx, qword [r14 + 0x18]
mov r8, qword [rax + 8]
lea rdx, [rax + 0x364]
lea r9, [rcx + r12*8]
mov rax, qword [rcx]
add rcx, 8
add rdx, 0x70
mov qword [rdx - 0x14], rax
movzx eax, byte [rax + 0x10]
mov byte [rdx - 0x34], al
imul rax, rax, 0x68
mov eax, dword [r8 + rax + 0x4c]
mov dword [rdx - 0x70], eax
cmp r9, rcx
jne 0x14018bd40
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + 0x3c]
mov word [rsp + 0x40], ax
and ax, 0x180
cmp ax, 0x100
je 0x14018be2e
mov rbx, qword [rsp + 0x48]
movzx ecx, byte [rbx + 0x44]
mov rdx, qword [rbx + 0x10]
mov byte [rsp + 0x40], cl
and ecx, 0xfffffffb
test rdx, rdx
mov byte [rbx + 0x44], cl
je 0x14018bdfd
movzx r8d, word [rbx + 0x3c]
movsx eax, byte [r14 + 0x16]
test r8b, 0x80
mov byte [rbx + 0x41], al
je 0x14018bf11
cmp eax, dword [rdx]
je 0x14018c038
mov rbx, qword [rsp + 0x48]
mov rcx, qword [rbx + 0x20]
mov rcx, qword [rcx + 0x48]
test rcx, rcx
je 0x14018bdd9
mov ecx, dword [rcx]
cmp eax, ecx
jle 0x14018bdd9
mov byte [rbx + 0x41], cl
test r8w, 0x200
je 0x14018bdfd
mov rax, qword [rsp + 0x48]
movsx eax, byte [rax + 0x41]
cmp eax, dword [rdx]
jne 0x14018bdfd
mov eax, dword [rsp + 0x80]
test eax, eax
jne 0x14018c041
movzx eax, word [r14 + 0x10]
mov rsi, qword [rsp + 0x48]
mov word [rsi + 0x48], ax
mov rcx, qword [rdi]
mov rdx, qword [rsp + 0x98]
add rsp, 0xd8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.1401584a0
mov rax, qword [rsp + 0x48]
cmp byte [rax + 0x43], 0
jne 0x14018bd83
cmp word [rsp + 0xa4], 0
je 0x14018bd83
mov rdx, qword [rax + 0x18]
mov rbx, rax
mov rcx, rax
mov r9d, pe_nt_image_headers64
lea rax, [rsp + 0xc8]
mov r8, r14
mov qword [rsp + 0x30], rax
mov rax, qword [r14 + 0x18]
mov rax, qword [rax + rsi - 8]
mov qword [rsp + 0x28], rax
movzx eax, byte [rsp + 0xa3]
sub eax, 1
movzx eax, ax
mov dword [rsp + 0x20], eax
call fcn.14018ab60
mov rdx, qword [rbx + 0x18]
movsx eax, al
cmp eax, dword [rdx]
jne 0x14018bd83
mov rax, qword [rsp + 0x48]
mov byte [rax + 0x43], 2
jmp 0x14018bd83
mov eax, 1
mov ebx, 1
mov dword [rsp + 0x84], 1
jmp 0x14018b704
movsxd rax, r8d
xor edx, edx
imul rax, rsi
lea r8, [r15 + r15]
add rax, r9
mov rcx, rax
mov qword [rsp + 0x68], rax
call sub.msvcrt.dll_memset
movzx eax, word [rdi + 0xe0]
mov edx, 0x30
mov ebp, dword [rsp + 0x80]
cmp ax, dx
cmovg eax, edx
test ebp, ebp
mov word [rbx + 0x10], ax
je 0x14018bf58
mov byte [rbx + 0x16], 0xff
jmp 0x14018b80c
mov r9, qword [r14 + 8]
test al, al
mov rbx, qword [rsp + 0x48]
mov qword [rbx + 0x68], r9
jle 0x14018bf68
mov r9d, dword [rsp + 0x80]
test r9d, r9d
je 0x14018bdd9
cmp al, 1
jne 0x14018bdd9
test r8b, 3
je 0x14018bdd9
mov rax, qword [rsp + 0x48]
or ecx, 4
mov byte [rax + 0x44], cl
jmp 0x14018bdd9
movzx eax, byte [rsp + 0x60]
mov byte [rbx + 0x16], al
mov r14, rbx
jmp 0x14018bd67
mov r10d, dword [rsp + 0x80]
mov byte [rbx + 0x41], 0
test r10d, r10d
je 0x14018bdfd
mov rax, qword [r14 + 0x18]
mov rcx, qword [rax + rsi - 8]
mov eax, dword [rcx + 0x38]
test ah, 0x10
jne 0x14018bdd9
not eax
test eax, 0x104
je 0x14018bdd9
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x28], rcx
mov r9d, 0x800
mov r8, r14
mov qword [rsp + 0x30], rax
mov rcx, rbx
movzx eax, byte [rsp + 0xa3]
mov qword [rsp + 0xc8], 0
sub eax, 1
movzx eax, ax
mov dword [rsp + 0x20], eax
call fcn.14018ab60
mov rdx, qword [rbx + 0x10]
movsx eax, al
cmp eax, dword [rdx]
jne 0x14018c000
mov rcx, qword [rsp + 0x48]
mov rax, qword [rsp + 0xc8]
or byte [rcx + 0x44], 4
mov qword [rcx + 0x68], rax
mov rax, qword [rsp + 0x48]
movzx r8d, word [rax + 0x3c]
jmp 0x14018bdd9
lea rdx, str.no_query_solution
mov rcx, rdi
call fcn.140168320
jmp 0x14018be0b
add rsp, 0xd8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov byte [rbx + 0x43], 2
jmp 0x14018bdbe
lea rax, [rsp + 0xc8]
xor r9d, r9d
mov r8, r14
mov qword [rsp + 0xc8], 0
mov qword [rsp + 0x30], rax
mov rax, qword [r14 + 0x18]
mov rax, qword [rax + rsi - 8]
mov rsi, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
movzx eax, byte [rsp + 0xa3]
mov rcx, rsi
sub eax, 1
movzx eax, ax
mov dword [rsp + 0x20], eax
call fcn.14018ab60
mov rdx, qword [rsi + 0x10]
movsx eax, al
cmp eax, dword [rdx]
jne 0x14018bdfd
mov rcx, qword [rsp + 0x48]
mov rax, qword [rsp + 0xc8]
or byte [rcx + 0x44], 8
mov qword [rcx + 0x68], rax
jmp 0x14018bdfd