Function at 0x1800ad070
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
push rbx
push rbp
push rdi
push r12
push r13
push r14
sub rsp, 0x78
mov eax, dword [rcx + 0x40]
xor r13d, r13d
xor ebx, ebx
mov qword [rsp + 0x38], r13
mov r12, r9
mov rbp, r8
mov r14d, edx
mov rdi, rcx
test eax, eax
jne 0x1800ad402
cmp qword [rcx + 0x20], rbx
jne 0x1800ad0d0
mov r9, qword [rcx + 0x10]
lea rdx, str.SELECT_data_FROM__Q._q_node_WHERE_nodeno_
mov r8, qword [rcx + 8]
call fcn.1800ace20
mov qword [rdi + 0x20], rax
mov eax, dword [rdi + 0x40]
test eax, eax
jne 0x1800ad402
mov rcx, qword [rdi + 0x20]
mov r8, r12
mov edx, 1
mov qword [rsp + 0xc8], rsi
call sym.SQLite3.dll_sqlite3_bind_int64
mov rcx, qword [rdi + 0x20]
call sym.SQLite3.dll_sqlite3_step
cmp eax, 0x64
jne 0x1800ad168
mov rcx, qword [rdi + 0x20]
xor edx, edx
call sym.SQLite3.dll_sqlite3_column_bytes
mov rcx, qword [rdi + 0x20]
xor edx, edx
movsxd rbp, eax
call sym.SQLite3.dll_sqlite3_column_blob
mov r14, rax
call sym.SQLite3.dll_sqlite3_initialize
test eax, eax
je 0x1800ad12a
mov qword [rsp + 0x38], r13
mov dword [rdi + 0x40], 7
jmp 0x1800ad158
mov rcx, rbp
call fcn.1800041a0
mov qword [rsp + 0x38], rax
mov r13, rax
test rax, rax
jne 0x1800ad148
mov dword [rdi + 0x40], 7
jmp 0x1800ad158
mov r8, rbp
mov rdx, r14
mov rcx, rax
call fcn.1800b02e0
mov ebx, ebp
mov r14d, dword [rsp + 0xb8]
mov rbp, qword [rsp + 0xc0]
mov rcx, qword [rdi + 0x20]
call sym.SQLite3.dll_sqlite3_reset
mov ecx, dword [rdi + 0x40]
test ecx, ecx
jne 0x1800ad19d
mov dword [rdi + 0x40], eax
mov ecx, eax
test eax, eax
jne 0x1800ad19d
test r13, r13
jne 0x1800ad1a6
mov r8, r12
lea rdx, str.Node__lld_missing_from_database
mov rcx, rdi
call fcn.1800aceb0
jmp 0x1800ad3fa
test r13, r13
je 0x1800ad3fa
cmp ebx, 4
jge 0x1800ad1c5
mov r9d, ebx
lea rdx, str.Node__lld_is_too_small___d_bytes_
mov r8, r12
mov rcx, rdi
call fcn.1800aceb0
jmp 0x1800ad3f2
test rbp, rbp
jne 0x1800ad200
movzx r14d, byte [r13]
movzx eax, byte [r13 + 1]
shl r14d, 8
add r14d, eax
mov dword [rsp + 0xb8], r14d
cmp r14d, 0x28
jbe 0x1800ad200
mov r8d, r14d
lea rdx, str.Rtree_depth_out_of_range___d_
mov rcx, rdi
call fcn.1800aceb0
jmp 0x1800ad3f2
movzx eax, byte [r13 + 3]
movzx ecx, byte [r13 + 2]
shl ecx, 8
add ecx, eax
mov eax, dword [rdi + 0x1c]
inc eax
mov dword [rsp + 0x34], ecx
imul eax, ecx
lea eax, [rax*8 + 4]
cmp eax, ebx
jle 0x1800ad244
mov r9d, ecx
mov dword [rsp + 0x20], ebx
mov rcx, rdi
lea rdx, str.Node__lld_is_too_small_for_cell_count_of__d___d_bytes_
mov r8, r12
call fcn.1800aceb0
jmp 0x1800ad3f2
mov qword [rsp + 0x70], r15
xor r15d, r15d
test ecx, ecx
je 0x1800ad3ed
movaps xmmword [rsp + 0x60], xmm6
movaps xmmword [rsp + 0x50], xmm7
nop
mov edx, dword [rdi + 0x1c]
xor esi, esi
lea eax, [rdx + 1]
imul eax, r15d
shl eax, 3
movsxd rcx, eax
lea rax, [r13 + 0xc]
add rax, rcx
mov qword [rsp + 0x48], rax
mov rbx, qword [rcx + r13 + 4]
bswap rbx
mov qword [rsp + 0x40], rbx
test edx, edx
jle 0x1800ad39a
mov r13, rax
lea r14, [rbp + 4]
sub r13, rbp
nop dword [rax]
mov ebp, dword [r14 + r13 - 4]
xor eax, eax
mov ebx, dword [r14 + r13]
bswap ebp
bswap ebx
mov dword [rsp + 0xb0], ebp
movss xmm6, dword [rsp + 0xb0]
mov dword [rsp + 0x30], ebx
movss xmm7, dword [rsp + 0x30]
cmp dword [rdi + 0x18], eax
je 0x1800ad2d5
cmp ebp, ebx
setg al
jmp 0x1800ad2db
comiss xmm6, xmm7
seta al
test eax, eax
je 0x1800ad2f9
mov r9d, r15d
mov qword [rsp + 0x20], r12
mov r8d, esi
lea rdx, str.Dimension__d_of_cell__d_on_node__lld_is_corrupt
mov rcx, rdi
call fcn.1800aceb0
cmp qword [rsp + 0xc0], 0
je 0x1800ad371
mov ecx, dword [r14 - 4]
xor eax, eax
mov edx, dword [r14]
mov r8d, dword [rdi + 0x18]
bswap ecx
mov dword [rsp + 0xb0], ecx
bswap edx
mov dword [rsp + 0x30], edx
test r8d, r8d
je 0x1800ad32c
cmp ebp, ecx
setl al
jmp 0x1800ad33b
movss xmm0, dword [rsp + 0xb0]
comiss xmm0, xmm6
seta al
test eax, eax
jne 0x1800ad357
test r8d, r8d
je 0x1800ad34b
cmp ebx, edx
setg al
jmp 0x1800ad353
comiss xmm7, dword [rsp + 0x30]
seta al
test eax, eax
je 0x1800ad371
mov r9d, r15d
mov qword [rsp + 0x20], r12
mov r8d, esi
lea rdx, str.Dimension__d_of_cell__d_on_node__lld_is_corrupt_relative_to_parent
mov rcx, rdi
call fcn.1800aceb0
inc esi
add r14, 8
cmp esi, dword [rdi + 0x1c]
jl 0x1800ad2a0
mov r13, qword [rsp + 0x38]
mov rbp, qword [rsp + 0xc0]
mov rbx, qword [rsp + 0x40]
mov r14d, dword [rsp + 0xb8]
mov r9, r12
mov r8, rbx
mov rcx, rdi
test r14d, r14d
jle 0x1800ad3c8
xor edx, edx
call fcn.1800acf30
mov r8, qword [rsp + 0x48]
lea edx, [r14 - 1]
mov r9, rbx
mov rcx, rdi
call fcn.1800ad070
inc dword [rdi + 0x3c]
jmp 0x1800ad3d5
mov edx, 1
call fcn.1800acf30
inc dword [rdi + 0x38]
inc r15d
cmp r15d, dword [rsp + 0x34]
jl 0x1800ad260
movaps xmm7, xmmword [rsp + 0x50]
movaps xmm6, xmmword [rsp + 0x60]
mov r15, qword [rsp + 0x70]
mov rcx, r13
call sym.SQLite3.dll_sqlite3_free
mov rsi, qword [rsp + 0xc8]
add rsp, 0x78
pop r14
pop r13
pop r12
pop rdi
pop rbp
pop rbx
ret