Function at 0x5e3b70
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov esi, dword [rcx + 0x40]
mov dword [rsp + 0x3c], edx
mov r12, rcx
mov rbp, r8
mov rdi, r9
test esi, esi
je 0x5e3ba8
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rcx + 0x20]
test rcx, rcx
je 0x5e3ee8
mov r8, rdi
mov edx, 1
xor ebx, ebx
xor r14d, r14d
call sym.sqlite3_bind_int64
mov rcx, qword [r12 + 0x20]
call dbg.sqlite3_step
cmp eax, 0x64
je 0x5e3e98
mov rcx, qword [r12 + 0x20]
call dbg.sqlite3_reset
mov r10d, dword [r12 + 0x40]
test r10d, r10d
je 0x5e3d80
test r14, r14
je 0x5e3b94
cmp ebx, 3
jle 0x5e3e38
test rbp, rbp
je 0x5e3f60
movzx eax, byte [r14 + 2]
movzx edx, byte [r14 + 3]
shl eax, 8
lea r10d, [rax + rdx]
mov edx, dword [r12 + 0x1c]
mov ecx, r10d
mov dword [rsp + 0x58], r10d
lea eax, [rdx + 1]
imul ecx, eax
lea ecx, [rcx*8 + 3]
cmp ecx, ebx
jge 0x5e3f38
mov ebx, dword [rsp + 0x3c]
sub ebx, 1
mov dword [rsp + 0x5c], ebx
test r10d, r10d
je 0x5e3e4d
mov qword [rsp + 0x50], r14
mov r14, r12
mov r12d, esi
imul eax, r12d
mov rbx, qword [rsp + 0x50]
xor r13d, r13d
lea eax, [rax*8 + 4]
cdqe
lea rsi, [rbx + rax]
mov r15, qword [rsi]
lea rax, [rsi + 8]
mov qword [rsp + 0x48], rax
bswap r15
test edx, edx
jle 0x5e3de8
mov qword [rsp + 0x40], r15
mov r9d, r12d
mov r15, rsi
jmp 0x5e3d1f
cmp esi, ebx
setg al
test al, al
jne 0x5e3d53
test rbp, rbp
je 0x5e3d11
mov eax, dword [rbp + r13*8]
mov edx, dword [rbp + r13*8 + 4]
mov ecx, dword [r14 + 0x18]
bswap eax
bswap edx
test ecx, ecx
jne 0x5e3dc0
movd xmm0, eax
movd xmm2, esi
comiss xmm0, xmm2
ja 0x5e3cf0
movd xmm0, ebx
movd xmm3, edx
comiss xmm0, xmm3
jbe 0x5e3d11
nop word cs:[rax + rax]
mov qword [rsp + 0x20], rdi
mov r8d, r12d
lea rdx, str.Dimension__d_of_cell__d_on_node__lld_is_corrupt_relative_to_parent
mov rcx, r14
mov dword [rsp + 0x38], r9d
call dbg.rtreeCheckAppendMsg
mov r9d, dword [rsp + 0x38]
add r13, 1
cmp dword [r14 + 0x1c], r13d
jle 0x5e3de0
mov esi, dword [r15 + r13*8 + 8]
mov ebx, dword [r15 + r13*8 + 0xc]
mov r12d, r13d
mov r8d, dword [r14 + 0x18]
bswap esi
bswap ebx
test r8d, r8d
jne 0x5e3ca0
movd xmm0, esi
movd xmm1, ebx
comiss xmm0, xmm1
seta al
test al, al
je 0x5e3cad
mov qword [rsp + 0x20], rdi
mov r8d, r12d
lea rdx, str.Dimension__d_of_cell__d_on_node__lld_is_corrupt
mov rcx, r14
mov dword [rsp + 0x38], r9d
call dbg.rtreeCheckAppendMsg
mov r9d, dword [rsp + 0x38]
jmp 0x5e3cad
mov dword [r12 + 0x40], eax
test eax, eax
jne 0x5e3bf2
test r14, r14
jne 0x5e3bf7
mov r8, rdi
lea rdx, str.Node__lld_missing_from_database
mov rcx, r12
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp dbg.rtreeCheckAppendMsg
cmp ebx, edx
jg 0x5e3cf0
cmp esi, eax
jl 0x5e3cf0
add r13, 1
cmp dword [r14 + 0x1c], r13d
jg 0x5e3d1f
nop
mov r15, qword [rsp + 0x40]
mov r12d, r9d
mov r9d, dword [rsp + 0x3c]
test r9d, r9d
je 0x5e3e68
mov r9, rdi
mov r8, r15
xor edx, edx
mov rcx, r14
call sym.rtreeCheckMapping
mov r8, qword [rsp + 0x48]
mov r9, r15
mov rcx, r14
mov edx, dword [rsp + 0x5c]
add r12d, 1
call dbg.rtreeCheckNode
add dword [r14 + 0x3c], 1
cmp r12d, dword [rsp + 0x58]
je 0x5e3e8b
mov edx, dword [r14 + 0x1c]
lea eax, [rdx + 1]
jmp 0x5e3c5b
mov r9d, ebx
mov r8, rdi
lea rdx, str.Node__lld_is_too_small___d_bytes_
mov rcx, r12
call dbg.rtreeCheckAppendMsg
mov rcx, r14
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.sqlite3_free
mov r9, rdi
mov r8, r15
mov edx, 1
mov rcx, r14
call sym.rtreeCheckMapping
add r12d, 1
add dword [r14 + 0x38], 1
cmp r12d, dword [rsp + 0x58]
jne 0x5e3e26
mov r14, qword [rsp + 0x50]
jmp 0x5e3e4d
mov rcx, qword [r12 + 0x20]
xor edx, edx
call dbg.sqlite3_column_bytes
mov rcx, qword [r12 + 0x20]
xor edx, edx
mov ebx, eax
call dbg.sqlite3_column_blob
mov r13, rax
call sym.sqlite3_initialize
test eax, eax
jne 0x5e3f20
movsxd r15, ebx
mov rcx, r15
call sym.sqlite3Malloc
mov r14, rax
test rax, rax
je 0x5e3f20
mov r8, r15
mov rdx, r13
mov rcx, rax
call sym.memcpy
jmp 0x5e3bda
mov r9, qword [r12 + 0x10]
mov r8, qword [r12 + 8]
mov rcx, r12
lea rdx, str.SELECT_data_FROM__Q._q_node_WHERE_nodeno_
call dbg.rtreeCheckPrepare
mov r11d, dword [r12 + 0x40]
mov qword [r12 + 0x20], rax
mov rcx, rax
test r11d, r11d
je 0x5e3bb5
jmp 0x5e3b94
mov dword [r12 + 0x40], 7
xor ebx, ebx
xor r14d, r14d
jmp 0x5e3bda
mov dword [rsp + 0x20], ebx
mov r9d, dword [rsp + 0x58]
mov r8, rdi
mov rcx, r12
lea rdx, str.Node__lld_is_too_small_for_cell_count_of__d___d_bytes_
call dbg.rtreeCheckAppendMsg
jmp 0x5e3e4d
movzx edx, byte [r14]
movzx eax, byte [r14 + 1]
shl edx, 8
add eax, edx
mov dword [rsp + 0x3c], eax
cmp eax, 0x28
jle 0x5e3c09
mov r8d, eax
lea rdx, str.Rtree_depth_out_of_range___d_
mov rcx, r12
call dbg.rtreeCheckAppendMsg
jmp 0x5e3e4d