Function at 0x1400777e0
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 esi, byte [rcx + 0x40]
mov r12, qword [rcx]
mov word [rsp + 0xb8], dx
mov r15, rcx
mov edi, edx
mov byte [rsp + 0xbb], sil
cmp esi, 1
jle 0x140078030
xor eax, eax
cmp esi, 2
setne al
setne bl
lea eax, [rax + rax*4 + 5]
movzx ebx, bl
mov dword [rsp + 0x40], eax
lea rbx, [rbx + rbx*4 + 5]
mov rdx, qword [r15 + 0x10]
test rdx, rdx
je 0x140077850
test di, di
je 0x140077850
movsxd r13, dword [rdx]
mov rcx, r13
mov dword [rsp + 0x5c], r13d
add ecx, ecx
jmp 0x14007785d
mov dword [rsp + 0x5c], 0
xor ecx, ecx
xor r13d, r13d
movzx r14d, byte [rsp + 0xbb]
lea rdx, [r14 + 4]
mov qword [rsp + 0xa0], r14
imul edx, eax
shl edx, 4
add edx, ecx
mov rcx, qword [r12]
movsxd rdx, edx
call sym.sqlite3DbMallocRawNN
mov qword [rsp + 0x98], rax
mov rcx, rax
test rax, rax
je 0x140078194
mov rax, rbx
mov rbx, rcx
pxor xmm0, xmm0
shl rax, 5
lea rbp, [r14*8]
lea r11, [rcx + rax]
lea r10, [r11 + rax]
mov eax, dword [rsp + 0x40]
movups xmmword [r11], xmm0
movups xmmword [r11 + 0x10], xmm0
mov rdx, r10
lea r9d, [rax + rax]
mov rax, rbx
mov rcx, r9
shl rcx, 5
add rcx, rbx
mov qword [rax + 0x18], rdx
add rax, 0x20
add rdx, rbp
cmp rax, rcx
jne 0x1400778d9
mov ebx, dword [rsp + 0x5c]
test ebx, ebx
jne 0x140078047
movzx eax, word [r12 + 0xe0]
mov edx, 0x30
mov qword [rsp + 0x68], 0
cmp ax, dx
cmovg eax, edx
mov word [r11 + 0x10], ax
test esi, esi
je 0x140078093
mov rax, qword [rsp + 0x98]
xor r8d, r8d
mov dword [rsp + 0x78], 0
xor r13d, r13d
mov word [rsp + 0x72], r8w
mov r14d, 1
mov qword [rsp + 0xa8], r12
mov dword [rsp + 0x84], esi
mov qword [rsp + 0xb0], rbp
mov dword [rsp + 0xbc], edi
mov qword [rsp + 0x48], rax
xor eax, eax
mov qword [rsp + 0x50], r15
mov r15d, dword [rsp + 0x40]
mov rdx, rax
mov dword [rsp + 0x74], edx
test r14d, r14d
je 0x140077c82
movsxd r14, r14d
lea rax, [rdx*8]
mov r12, r11
mov qword [rsp + 0x88], rdx
shl r14, 5
mov qword [rsp + 0x40], rax
lea rbx, [r11 + r14]
mov qword [rsp + 0x90], r11
xor r14d, r14d
mov qword [rsp + 0x60], rbx
nop dword [rax + rax]
mov rax, qword [rsp + 0x50]
mov rbp, qword [rax + 0x58]
test rbp, rbp
jne 0x1400779dd
jmp 0x140077c60
mov rbp, qword [rbp + 0x50]
test rbp, rbp
je 0x140077c60
mov rbx, qword [r12]
mov rax, rbx
not rax
and rax, qword [rbp]
jne 0x1400779d0
mov r10, qword [rbp + 8]
test rbx, r10
jne 0x1400779d0
movzx esi, word [r12 + 0x10]
test byte [rbp + 0x39], 0x40
je 0x140077a08
cmp si, 2
jle 0x1400779d0
movzx edx, word [rbp + 0x14]
movsx ecx, word [rbp + 0x12]
or rbx, r10
add edx, esi
movsx edx, dx
call sym.sqlite3LogEstAdd
movsx edx, word [r12 + 0x14]
movsx ecx, ax
call sym.sqlite3LogEstAdd
movzx r10d, byte [r12 + 0x16]
add si, word [rbp + 0x16]
mov edi, eax
test r10b, r10b
js 0x140077bc0
mov rax, qword [r12 + 8]
mov qword [rsp + 0xc8], rax
movsx edx, r10b
cmp dword [rsp + 0x5c], edx
jle 0x140077c07
mov rcx, qword [rsp + 0x68]
movsx rax, r10b
lea r8, [rcx + rax*2]
movzx eax, word [r8]
test ax, ax
je 0x140077d10
movsx ecx, di
movsx edx, ax
call sym.sqlite3LogEstAdd
mov r8d, edi
lea edi, [rax + 3]
test r14d, r14d
je 0x140077c18
mov rax, qword [rsp + 0x48]
xor edx, edx
jmp 0x140077ab0
add edx, 1
add rax, 0x20
cmp edx, r14d
je 0x140077c28
cmp rbx, qword [rax]
jne 0x140077aa0
mov ecx, r10d
xor cl, byte [rax + 0x16]
js 0x140077aa0
cmp r14d, edx
jle 0x140077c28
cmp di, word [rax + 0x12]
jg 0x1400779d0
je 0x140077cf0
mov rdx, qword [r12]
or rdx, qword [rbp + 8]
mov word [rax + 0x10], si
movq xmm0, rdx
cmp dword [rsp + 0x40], 8
mov byte [rax + 0x16], r10b
movhps xmm0, qword [rsp + 0xc8]
mov word [rax + 0x12], di
mov rdx, qword [rax + 0x18]
mov word [rax + 0x14], r8w
mov rsi, qword [r12 + 0x18]
movups xmmword [rax], xmm0
jae 0x140077ca8
xor edi, edi
test edi, edi
jne 0x140077e1b
mov ecx, dword [rsp + 0x40]
test ecx, ecx
je 0x140077b38
movzx ecx, byte [rsi]
xor edi, edi
mov byte [rdx], cl
test edi, edi
jne 0x140077e43
mov rdx, qword [rax + 0x18]
mov rax, qword [rsp + 0x40]
mov qword [rdx + rax], rbp
cmp r15d, r14d
jg 0x1400779d0
mov rax, qword [rsp + 0x48]
movzx r8d, word [rax + 0x10]
movzx r13d, word [rax + 0x12]
add rax, 0x20
mov word [rsp + 0x72], r8w
cmp r15d, 1
je 0x140077e36
xor r9d, r9d
mov edx, 1
jmp 0x140077b9b
movzx r8d, word [rax + 0x14]
mov r13d, ecx
mov r9d, edx
add edx, 1
add rax, 0x20
cmp r15d, edx
je 0x140077ce0
movzx ecx, word [rax + 0x12]
cmp cx, r13w
jg 0x140077b80
jne 0x140077b8b
movzx r10d, word [rax + 0x14]
cmp r10w, r8w
jle 0x140077b8b
mov r8d, r10d
jmp 0x140077b85
mov rcx, qword [rsp + 0x50]
mov r8, r12
lea rax, [rsp + 0xc8]
mov qword [rsp + 0xc8], 0
mov rdx, qword [rcx + 0x10]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x74]
mov qword [rsp + 0x28], rbp
mov dword [rsp + 0x20], eax
movzx r9d, word [rcx + 0x3c]
call sym.wherePathSatisfiesOrderBy
mov r10d, eax
test al, al
jns 0x140077a4d
lea r8d, [rdi - 2]
test r14d, r14d
jne 0x140077a8f
nop dword [rax]
movsxd rax, r14d
add r14d, 1
jmp 0x140077c4a
cmp r15d, r14d
jg 0x140077c18
cmp di, r13w
jg 0x1400779d0
jne 0x140077c45
cmp r8w, word [rsp + 0x72]
jge 0x1400779d0
movsxd rax, dword [rsp + 0x78]
mov rbx, qword [rsp + 0x48]
shl rax, 5
add rax, rbx
jmp 0x140077ad6
mov rax, qword [rsp + 0x60]
add r12, 0x20
cmp r12, rax
jne 0x1400779b8
mov rdx, qword [rsp + 0x88]
mov r11, qword [rsp + 0x90]
mov rax, r11
add rdx, 1
mov r11, qword [rsp + 0x48]
cmp dword [rsp + 0x84], edx
jle 0x140077e5c
mov qword [rsp + 0x48], rax
jmp 0x140077973
mov rcx, qword [rsi]
lea rdi, [rdx + 8]
and rdi, 0xfffffffffffffff8
mov qword [rdx], rcx
mov rbx, qword [rsp + 0x40]
mov ecx, ebx
mov r8, qword [rsi + rcx - 8]
mov qword [rdx + rcx - 8], r8
sub rdx, rdi
mov ecx, ebx
add ecx, edx
sub rsi, rdx
shr ecx, 3
rep movsq qword [rdi], qword [rsi]
jmp 0x140077b34
mov dword [rsp + 0x78], r9d
mov word [rsp + 0x72], r8w
jmp 0x1400779d0
cmp si, word [rax + 0x10]
jg 0x1400779d0
jne 0x140077ad6
cmp r8w, word [rax + 0x14]
jl 0x140077ad6
jmp 0x1400779d0
mov r9, qword [rsp + 0x50]
mov dword [rsp + 0x80], edx
mov rax, qword [r9 + 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 sym.sqlite3LogEst
movzx ecx, word [rsp + 0xb8]
movzx r9d, word [r9 + 0x3c]
lea r11d, [rax + rcx]
mov eax, r9d
and ax, 0x4000
mov word [rsp + 0x7e], ax
test r10b, r10b
jne 0x140077de8
cmp word [rsp + 0x7e], 0
je 0x140077da0
add r11d, 0xa
mov rax, qword [rsp + 0x50]
movzx ecx, word [rsp + 0xb8]
movzx eax, word [rax + 0x3e]
cmp cx, ax
cmovle eax, ecx
cmp ax, 0xa
jg 0x140077dbf
mov word [r8], r11w
mov eax, r11d
jmp 0x140077a75
movzx eax, word [rsp + 0xb8]
test r9w, 0x100
je 0x140077d8e
cmp ax, 0xa
jle 0x140077d94
sub eax, 0xa
cmp ax, 0xa
jle 0x140077d94
movsx rax, ax
bsr rdx, rax
lea ecx, [rdx - 3]
lea rdx, [0x14016d890]
shr rax, cl
lea ecx, [rcx + rcx*4]
and eax, 7
lea ecx, [r11 + rcx*2 - 3]
add cx, word [rdx + rax*2]
mov r11d, ecx
jmp 0x140077d94
mov ecx, dword [rsp + 0x5c]
mov edx, dword [rsp + 0x80]
mov eax, ecx
sub eax, edx
imul eax, eax, 0x64
cdq
idiv ecx
movsxd rcx, eax
call sym.sqlite3LogEst
cmp word [rsp + 0x7e], 0
lea r11d, [r11 + rax - 0x42]
je 0x140077da0
add r11d, 0x10
jmp 0x140077d77
mov ecx, dword [rsi]
mov dword [rdx], ecx
mov ecx, dword [rsp + 0x40]
mov r8d, dword [rsi + rcx - 4]
mov dword [rdx + rcx - 4], r8d
mov rdx, qword [rax + 0x18]
jmp 0x140077b38
mov dword [rsp + 0x78], 0
jmp 0x1400779d0
mov ecx, dword [rsp + 0x40]
movzx r8d, word [rsi + rcx - 2]
mov word [rdx + rcx - 2], r8w
mov rdx, qword [rax + 0x18]
jmp 0x140077b38
mov r12, qword [rsp + 0xa8]
mov esi, dword [rsp + 0x84]
mov rbp, qword [rsp + 0xb0]
mov r15, qword [rsp + 0x50]
mov edi, dword [rsp + 0xbc]
test r14d, r14d
je 0x140078180
cmp r14d, 1
je 0x140077ebe
mov rcx, qword [rsp + 0x48]
lea edx, [r14 - 2]
shl rdx, 5
lea rax, [rcx + 0x20]
lea rdx, [rcx + rdx + 0x40]
movzx ebx, word [rcx + 0x12]
cmp word [rax + 0x12], bx
cmovl rcx, rax
add rax, 0x20
cmp rax, rdx
jne 0x140077ea4
mov qword [rsp + 0x48], rcx
test esi, esi
je 0x140077f0d
mov rax, qword [rsp + 0x48]
mov r8, qword [r15 + 8]
lea rdx, [r15 + 0x364]
mov rcx, qword [rax + 0x18]
mov rax, qword [rsp + 0xa0]
lea r9, [rcx + rax*8]
mov rax, qword [rcx]
add rcx, 8
add rdx, 0x70
mov qword [rdx - 0x14], rax
movzx eax, byte [rax + 0x10]
lea r10, [rax + rax*2]
mov byte [rdx - 0x34], al
lea rax, [rax + r10*4]
mov eax, dword [r8 + rax*8 + 0x4c]
mov dword [rdx - 0x70], eax
cmp r9, rcx
jne 0x140077ee2
movzx eax, word [r15 + 0x3c]
and ax, 0x180
cmp ax, 0x100
je 0x140077fbb
movzx ecx, byte [r15 + 0x44]
mov rdx, qword [r15 + 0x10]
and ecx, 0xfffffffb
mov byte [r15 + 0x44], cl
test rdx, rdx
je 0x140077f89
mov rax, qword [rsp + 0x48]
movzx r8d, word [r15 + 0x3c]
movsx eax, byte [rax + 0x16]
mov byte [r15 + 0x41], al
test r8b, 0x80
je 0x1400780a7
cmp eax, dword [rdx]
je 0x1400781a8
mov rcx, qword [r15 + 0x20]
mov rcx, qword [rcx + 0x48]
test rcx, rcx
je 0x140077f70
mov ecx, dword [rcx]
cmp eax, ecx
jle 0x140077f70
mov byte [r15 + 0x41], cl
test r8w, 0x200
je 0x140077f89
movsx eax, byte [r15 + 0x41]
cmp eax, dword [rdx]
jne 0x140077f89
test esi, esi
jne 0x1400781b2
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + 0x10]
mov word [r15 + 0x48], ax
mov rcx, qword [r12]
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 sym.sqlite3DbFreeNN
cmp byte [r15 + 0x43], 0
jne 0x140077f20
test di, di
je 0x140077f20
mov r8, qword [rsp + 0x48]
mov rdx, qword [r15 + 0x18]
mov r9d, pe_nt_image_headers64
mov rcx, r15
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x30], rax
mov rax, qword [r8 + 0x18]
mov rax, qword [rax + rbp - 8]
mov qword [rsp + 0x28], rax
movzx eax, byte [rsp + 0xbb]
sub eax, 1
movzx eax, ax
mov dword [rsp + 0x20], eax
call sym.wherePathSatisfiesOrderBy
mov rdx, qword [r15 + 0x18]
movsx eax, al
cmp eax, dword [rdx]
jne 0x140077f20
mov byte [r15 + 0x43], 2
jmp 0x140077f20
mov dword [rsp + 0x40], 1
mov eax, 1
mov ebx, 1
jmp 0x140077833
imul r9, rbp
xor edx, edx
lea r8, [r13 + r13]
mov qword [rsp + 0x48], r11
lea rax, [r10 + r9]
mov rcx, rax
mov qword [rsp + 0x68], rax
call sym.memset
mov edx, 0x30
mov r11, qword [rsp + 0x48]
movzx eax, word [r12 + 0xe0]
cmp ax, dx
cmovg eax, edx
mov word [r11 + 0x10], ax
test esi, esi
jne 0x14007809d
movzx eax, byte [rsp + 0x5c]
mov byte [r11 + 0x16], al
mov qword [rsp + 0x48], r11
jmp 0x140077f0d
mov byte [r11 + 0x16], 0xff
jmp 0x14007791f
mov rdi, qword [rsp + 0x48]
mov r9, qword [rdi + 8]
mov qword [r15 + 0x68], r9
test al, al
jle 0x1400780de
cmp al, 1
jne 0x140077f70
test esi, esi
je 0x140077f70
test r8b, 3
je 0x140077f70
or ecx, 4
mov byte [r15 + 0x44], cl
jmp 0x140077f70
mov byte [r15 + 0x41], 0
test esi, esi
je 0x140077f89
mov rax, qword [rdi + 0x18]
mov rcx, qword [rax + rbp - 8]
mov eax, dword [rcx + 0x38]
test ah, 0x10
jne 0x140077f70
and eax, 0x104
cmp eax, 0x104
je 0x140077f70
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x28], rcx
mov r9d, 0x800
mov r8, rdi
mov qword [rsp + 0x30], rax
mov rcx, r15
movzx eax, byte [rsp + 0xbb]
mov qword [rsp + 0xc8], 0
sub eax, 1
movzx eax, ax
mov dword [rsp + 0x20], eax
call sym.wherePathSatisfiesOrderBy
mov rdx, qword [r15 + 0x10]
movsx eax, al
cmp eax, dword [rdx]
jne 0x14007816d
mov rax, qword [rsp + 0xc8]
or byte [r15 + 0x44], 4
mov qword [r15 + 0x68], rax
movzx r8d, word [r15 + 0x3c]
jmp 0x140077f70
lea rdx, str.no_query_solution
mov rcx, r12
call sym.sqlite3ErrorMsg
jmp 0x140077f97
add rsp, 0xd8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov byte [r15 + 0x43], 2
jmp 0x140077f59
mov r8, qword [rsp + 0x48]
lea rax, [rsp + 0xc8]
xor r9d, r9d
mov rcx, r15
mov qword [rsp + 0x30], rax
mov qword [rsp + 0xc8], 0
mov rax, qword [r8 + 0x18]
mov rax, qword [rax + rbp - 8]
mov qword [rsp + 0x28], rax
movzx eax, byte [rsp + 0xbb]
sub eax, 1
movzx eax, ax
mov dword [rsp + 0x20], eax
call sym.wherePathSatisfiesOrderBy
mov rdx, qword [r15 + 0x10]
movsx eax, al
cmp eax, dword [rdx]
jne 0x140077f89
mov rax, qword [rsp + 0xc8]
or byte [r15 + 0x44], 8
mov qword [r15 + 0x68], rax
jmp 0x140077f89