Function at 0x1800f3260
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, [0x180173020]
je 0x1800f33b1
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 0x1800f32ec
nop word [rax + rax]
lea rdx, str._a_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 0x1800f32d0
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 0x1800f33a7
cmp rbx, rsi
je 0x1800f33a7
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1800f3367
mov eax, dword [rbx + 0x18]
mov byte [rax + rcx], 0
cmp dword [rbx + 0x14], 0
jbe 0x1800f3367
test byte [rbx + 0x1d], 4
jne 0x1800f3367
mov rcx, rbx
call fcn.18000e5b0
mov rdi, rax
jmp 0x1800f336b
mov rdi, qword [rbx + 8]
mov rcx, rbx
call sym.sqlite.dll_sqlite3_free
test rdi, rdi
je 0x1800f33a7
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 0x1800f33b1
mov eax, ebx
jmp 0x1800f3702
mov eax, 7
jmp 0x1800f3702
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.1800f2fc0
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 0x1800f3502
cmp rbx, 3
jne 0x1800f344b
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 0x1800f344f
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 0x1800f34f0
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.180088380
cmp dword [0x180172920], 0
mov edi, eax
je 0x1800f34e5
mov rcx, qword [0x1801821a8]
test rcx, rcx
je 0x1800f34ae
call qword [0x1801729a0]
mov rcx, rsi
call qword [0x180172958]
dec qword [0x180182138]
movsxd rcx, eax
sub qword [0x1801820f0], rcx
mov rcx, rsi
call qword [0x180172948]
mov rcx, qword [0x1801821a8]
test rcx, rcx
je 0x1800f34f5
call qword [0x1801729b0]
jmp 0x1800f34f5
mov rcx, rsi
call qword [0x180172948]
jmp 0x1800f34f5
mov edi, 7
inc rbx
cmp rbx, 8
jl 0x1800f3430
cmp byte [rbp + 0x29], 0
mov r15, qword [rsp + 0xb0]
je 0x1800f3700
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 0x1800f36fb
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 0x1800f35b8
nop
test edi, edi
je 0x1800f3598
mov eax, dword [rbx + 0x18]
inc eax
cmp eax, dword [rbx + 0x10]
jb 0x1800f3585
lea rdx, [0x18014dd58]
mov r8d, 1
mov rcx, rbx
call fcn.18000e4a0
jmp 0x1800f3598
lea ecx, [rax - 1]
mov dword [rbx + 0x18], eax
movzx eax, byte [0x18014dd58]
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 0x1800f3560
lea rdx, str._WHERE_rowid_1
mov rcx, rbx
call sym.sqlite.dll_sqlite3_str_appendf
test rbx, rbx
je 0x1800f36fb
lea rax, [0x180173020]
cmp rbx, rax
je 0x1800f36fb
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1800f3609
mov eax, dword [rbx + 0x18]
mov byte [rax + rcx], r12b
cmp dword [rbx + 0x14], r12d
jbe 0x1800f3609
test byte [rbx + 0x1d], 4
jne 0x1800f3609
mov rcx, rbx
call fcn.18000e5b0
mov rsi, rax
jmp 0x1800f360d
mov rsi, qword [rbx + 8]
cmp dword [0x180172920], r12d
je 0x1800f365f
mov rcx, qword [0x1801821a8]
test rcx, rcx
je 0x1800f3628
call qword [0x1801729a0]
mov rcx, rbx
call qword [0x180172958]
dec qword [0x180182138]
movsxd rcx, eax
sub qword [0x1801820f0], rcx
mov rcx, rbx
call qword [0x180172948]
mov rcx, qword [0x1801821a8]
test rcx, rcx
je 0x1800f3668
call qword [0x1801729b0]
jmp 0x1800f3668
mov rcx, rbx
call qword [0x180172948]
test rsi, rsi
je 0x1800f36fb
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.180088380
cmp dword [0x180172920], r12d
mov edi, eax
je 0x1800f36f0
mov rcx, qword [0x1801821a8]
test rcx, rcx
je 0x1800f36b9
call qword [0x1801729a0]
mov rcx, rsi
call qword [0x180172958]
dec qword [0x180182138]
movsxd rcx, eax
sub qword [0x1801820f0], rcx
mov rcx, rsi
call qword [0x180172948]
mov rcx, qword [0x1801821a8]
test rcx, rcx
je 0x1800f3700
call qword [0x1801729b0]
jmp 0x1800f3700
mov rcx, rsi
call qword [0x180172948]
jmp 0x1800f3700
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