Function at 0x1800f28d0
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x80
cmp dword [rsp + 0xd0], 0
mov r12, r9
mov r13, r8
mov r14, rdx
mov rbp, rcx
mov qword [rcx + 0x18], rdx
lea rsi, [0x180172020]
je 0x1800f2a21
mov rcx, rdx
call sym.sqlite.dll_sqlite3_str_new
lea rdx, str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
mov r9, r12
mov rcx, rax
mov r8, r13
mov rbx, rax
call sym.sqlite.dll_sqlite3_str_appendf
xor edi, edi
cmp byte [rbp + 0x29], dil
jbe 0x1800f295c
nop word [rax + rax]
lea rdx, [0x180155f10]
mov r8d, edi
mov rcx, rbx
call sym.sqlite.dll_sqlite3_str_appendf
movzx eax, byte [rbp + 0x29]
inc edi
cmp edi, eax
jl 0x1800f2940
lea rdx, str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
mov r9, r12
mov r8, r13
mov rcx, rbx
call sym.sqlite.dll_sqlite3_str_appendf
lea rdx, str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
mov r9, r12
mov r8, r13
mov rcx, rbx
call sym.sqlite.dll_sqlite3_str_appendf
mov r11d, dword [rbp + 0x20]
lea rdx, str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
mov r9, r12
mov r8, r13
mov rcx, rbx
mov dword [rsp + 0x20], r11d
call sym.sqlite.dll_sqlite3_str_appendf
test rbx, rbx
je 0x1800f2a17
cmp rbx, rsi
je 0x1800f2a17
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1800f29d7
mov eax, dword [rbx + 0x18]
mov byte [rax + rcx], 0
cmp dword [rbx + 0x14], 0
jbe 0x1800f29d7
test byte [rbx + 0x1d], 4
jne 0x1800f29d7
mov rcx, rbx
call fcn.18000d700
mov rdi, rax
jmp 0x1800f29db
mov rdi, qword [rbx + 8]
mov rcx, rbx
call sym.sqlite.dll_sqlite3_free
test rdi, rdi
je 0x1800f2a17
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, r14
mov qword [rsp + 0x20], 0
call sym.sqlite.dll_sqlite3_exec
mov rcx, rdi
mov ebx, eax
call sym.sqlite.dll_sqlite3_free
test ebx, ebx
je 0x1800f2a21
mov eax, ebx
jmp 0x1800f2d72
mov eax, 7
jmp 0x1800f2d72
lea rax, [rbp + 0x78]
mov rdx, rbp
mov rcx, r14
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x80]
mov qword [rsp + 0xb0], r15
mov qword [rsp + 0x48], rax
lea rax, [rbp + 0x88]
mov qword [rsp + 0x50], rax
lea rax, [rbp + 0x90]
mov qword [rsp + 0x58], rax
lea rax, [rbp + 0x98]
mov qword [rsp + 0x60], rax
lea rax, [rbp + 0xa0]
mov qword [rsp + 0x68], rax
lea rax, [rbp + 0xa8]
mov qword [rsp + 0x70], rax
lea rax, [rbp + 0xb0]
mov qword [rsp + 0x78], rax
call fcn.1800f2630
xor ebx, ebx
mov edi, eax
lea r15, str.INSERT_OR_REPLACE_INTO__q._q_node_VALUES__1___2_
nop dword [rax]
test edi, edi
jne 0x1800f2b72
cmp rbx, 3
jne 0x1800f2abb
lea rcx, str.INSERT_INTO__w_.__w_rowid__rowid_nodeno_VALUES__1__2_ON_CONFLICT_rowid_DO_UPDATE_SET_nodenoexcluded.nodeno
cmp byte [rbp + 0x29], dil
jne 0x1800f2abf
mov rcx, qword [r15 + rbx*8]
mov r8, r12
mov rdx, r13
call sym.sqlite.dll_sqlite3_mprintf
mov rsi, rax
test rax, rax
je 0x1800f2b60
mov rcx, qword [rsp + rbx*8 + 0x40]
xor eax, eax
mov r9d, 0x85
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rcx
or r8d, 0xffffffff
mov rcx, r14
mov rdx, rsi
mov qword [rsp + 0x20], rax
call fcn.1800873e0
cmp dword [0x180171920], 0
mov edi, eax
je 0x1800f2b55
mov rcx, qword [0x1801811a8]
test rcx, rcx
je 0x1800f2b1e
call qword [0x1801719a0]
mov rcx, rsi
call qword [0x180171958]
dec qword [0x180181138]
movsxd rcx, eax
sub qword [0x1801810f0], rcx
mov rcx, rsi
call qword [0x180171948]
mov rcx, qword [0x1801811a8]
test rcx, rcx
je 0x1800f2b65
call qword [0x1801719b0]
jmp 0x1800f2b65
mov rcx, rsi
call qword [0x180171948]
jmp 0x1800f2b65
mov edi, 7
inc rbx
cmp rbx, 8
jl 0x1800f2aa0
cmp byte [rbp + 0x29], 0
mov r15, qword [rsp + 0xb0]
je 0x1800f2d70
lea rcx, str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
mov r8, r12
mov rdx, r13
call sym.sqlite.dll_sqlite3_mprintf
mov qword [rbp + 0x58], rax
test rax, rax
je 0x1800f2d6b
mov rcx, r14
call sym.sqlite.dll_sqlite3_str_new
lea rdx, str.UPDATE___w_.__w_rowid_SET
mov r9, r12
mov rcx, rax
mov r8, r13
mov rbx, rax
call sym.sqlite.dll_sqlite3_str_appendf
xor r12d, r12d
mov edi, r12d
cmp byte [rbp + 0x29], dil
jbe 0x1800f2c28
nop
test edi, edi
je 0x1800f2c08
mov eax, dword [rbx + 0x18]
inc eax
cmp eax, dword [rbx + 0x10]
jb 0x1800f2bf5
lea rdx, [0x18014ca68]
mov r8d, 1
mov rcx, rbx
call fcn.18000d5f0
jmp 0x1800f2c08
lea ecx, [rax - 1]
mov dword [rbx + 0x18], eax
movzx eax, byte [0x18014ca68]
add rcx, qword [rbx + 8]
mov byte [rcx], al
lea r9d, [rdi + 2]
lea rdx, str.a_d__d
mov r8d, edi
mov rcx, rbx
call sym.sqlite.dll_sqlite3_str_appendf
movzx eax, byte [rbp + 0x29]
inc edi
cmp edi, eax
jl 0x1800f2bd0
lea rdx, str._WHERE_rowid_1
mov rcx, rbx
call sym.sqlite.dll_sqlite3_str_appendf
test rbx, rbx
je 0x1800f2d6b
lea rax, [0x180172020]
cmp rbx, rax
je 0x1800f2d6b
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1800f2c79
mov eax, dword [rbx + 0x18]
mov byte [rax + rcx], r12b
cmp dword [rbx + 0x14], r12d
jbe 0x1800f2c79
test byte [rbx + 0x1d], 4
jne 0x1800f2c79
mov rcx, rbx
call fcn.18000d700
mov rsi, rax
jmp 0x1800f2c7d
mov rsi, qword [rbx + 8]
cmp dword [0x180171920], r12d
je 0x1800f2ccf
mov rcx, qword [0x1801811a8]
test rcx, rcx
je 0x1800f2c98
call qword [0x1801719a0]
mov rcx, rbx
call qword [0x180171958]
dec qword [0x180181138]
movsxd rcx, eax
sub qword [0x1801810f0], rcx
mov rcx, rbx
call qword [0x180171948]
mov rcx, qword [0x1801811a8]
test rcx, rcx
je 0x1800f2cd8
call qword [0x1801719b0]
jmp 0x1800f2cd8
mov rcx, rbx
call qword [0x180171948]
test rsi, rsi
je 0x1800f2d6b
lea rax, [rbp + 0xb8]
mov qword [rsp + 0x30], r12
mov r9d, 0x85
mov qword [rsp + 0x28], rax
or r8d, 0xffffffff
mov rdx, rsi
mov rcx, r14
mov qword [rsp + 0x20], r12
call fcn.1800873e0
cmp dword [0x180171920], r12d
mov edi, eax
je 0x1800f2d60
mov rcx, qword [0x1801811a8]
test rcx, rcx
je 0x1800f2d29
call qword [0x1801719a0]
mov rcx, rsi
call qword [0x180171958]
dec qword [0x180181138]
movsxd rcx, eax
sub qword [0x1801810f0], rcx
mov rcx, rsi
call qword [0x180171948]
mov rcx, qword [0x1801811a8]
test rcx, rcx
je 0x1800f2d70
call qword [0x1801719b0]
jmp 0x1800f2d70
mov rcx, rsi
call qword [0x180171948]
jmp 0x1800f2d70
mov edi, 7
mov eax, edi
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret