Function at 0x4b2950
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
cmp dword [rsp + 0x120], 0
mov rbx, rcx
mov rdi, rdx
mov rsi, r8
mov rbp, r9
mov qword [rbx + 0x18], rdx
jne 0x4b2a40
lea rax, [rbx + 0x78]
mov rdx, qword [rbx + 0x30]
xor r9d, r9d
mov rcx, rdi
mov qword [rsp + 0x70], rax
lea rax, [rbx + 0x80]
mov qword [rsp + 0x78], rax
lea rax, [rbx + 0x88]
mov qword [rsp + 0x80], rax
lea rax, [rbx + 0x90]
mov qword [rsp + 0x88], rax
lea rax, [rbx + 0x98]
mov qword [rsp + 0x90], rax
lea rax, [rbx + 0xa0]
mov qword [rsp + 0x98], rax
lea rax, [rbx + 0xa8]
mov qword [rsp + 0xa0], rax
lea r8, str.sqlite_stat1
mov qword [rsp + 0x40], 0
lea rax, [rbx + 0xb0]
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov qword [rsp + 0xa8], rax
call sym.sqlite3_table_column_metadata
test eax, eax
jne 0x4b2b1d
jmp 0x4b2b35
lea r14, str._a_d
mov rcx, rdx
xor r13d, r13d
call sym.sqlite3_str_new
mov r9, rbp
mov r8, rsi
lea rdx, str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
mov rcx, rax
mov r12, rax
call sym.sqlite3_str_appendf
movzx eax, byte [rbx + 0x29]
cmp eax, r13d
jle 0x4b2a86
mov r8d, r13d
mov rdx, r14
mov rcx, r12
call sym.sqlite3_str_appendf
inc r13d
jmp 0x4b2a6a
mov rcx, r12
mov r9, rbp
mov r8, rsi
lea rdx, str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
call sym.sqlite3_str_appendf
mov rcx, r12
mov r9, rbp
mov r8, rsi
lea rdx, str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
call sym.sqlite3_str_appendf
mov eax, dword [rbx + 0x20]
mov rcx, r12
mov r9, rbp
lea rdx, str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
mov r8, rsi
mov dword [rsp + 0x20], eax
call sym.sqlite3_str_appendf
mov rcx, r12
call sym.sqlite3_str_finish
test rax, rax
mov r12, rax
jne 0x4b2ae6
mov eax, 7
jmp 0x4b2d60
xor r9d, r9d
xor r8d, r8d
mov rdx, rax
mov qword [rsp + 0x20], 0
mov rcx, rdi
call sym.sqlite3_exec
mov rcx, r12
mov dword [rsp + 0x5c], eax
call sym.sqlite3_free
mov eax, dword [rsp + 0x5c]
test eax, eax
je 0x4b2981
jmp 0x4b2d60
cmp eax, 1
mov qword [rbx + 0x48], 0x100000
jne 0x4b2bce
xor eax, eax
jmp 0x4b2bce
mov rdx, qword [rbx + 0x30]
lea rcx, str.SELECT_stat_FROM__Q.sqlite_stat1_WHERE_tbl___q_rowid
mov r8, qword [rbx + 0x38]
call sym.sqlite3_mprintf
test rax, rax
mov r13, rax
je 0x4b2bb2
or r8d, 0xffffffff
mov rdx, rax
mov rcx, rdi
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x68]
mov r12d, 0x64
call sym.sqlite3_prepare_v2
test eax, eax
jne 0x4b2ba0
mov rcx, qword [rsp + 0x68]
call sym.sqlite3_step
cmp eax, 0x64
jne 0x4b2b96
mov rcx, qword [rsp + 0x68]
xor edx, edx
call sym.sqlite3_column_int64
mov r12, rax
mov rcx, qword [rsp + 0x68]
call sym.sqlite3_finalize
mov rcx, r13
mov dword [rsp + 0x5c], eax
call sym.sqlite3_free
mov eax, dword [rsp + 0x5c]
jmp 0x4b2bbd
mov r12d, 0x64
mov eax, 7
cmp r12, 0x64
mov edx, 0x64
cmovl r12, rdx
mov qword [rbx + 0x48], r12
lea r13, str.INSERT_OR_REPLACE_INTO__q._q_node_VALUES__1___2_
xor r12d, r12d
lea r14, str.INSERT_INTO__w_.__w_rowid__rowid_nodeno_VALUES__1__2_ON_CONFLICT_rowid_DO_UPDATE_SET_nodenoexcluded.nodeno
cmp r12d, 7
mov edx, r12d
jg 0x4b2c54
test eax, eax
jne 0x4b2c54
cmp edx, 3
jne 0x4b2bfa
cmp byte [rbx + 0x29], 0
mov rcx, r14
jne 0x4b2bff
mov rcx, qword [r13 + r12*8]
mov r8, rbp
mov rdx, rsi
call sym.sqlite3_mprintf
mov r15, rax
mov eax, 7
test r15, r15
je 0x4b2c3f
mov qword [rsp + 0x28], 0
mov rax, qword [rsp + r12*8 + 0x70]
or r8d, 0xffffffff
mov rdx, r15
mov r9d, 5
mov rcx, rdi
mov qword [rsp + 0x20], rax
call sym.sqlite3_prepare_v3
mov rcx, r15
mov dword [rsp + 0x5c], eax
inc r12
call sym.sqlite3_free
mov eax, dword [rsp + 0x5c]
jmp 0x4b2bdf
cmp byte [rbx + 0x29], 0
je 0x4b2d60
lea rcx, str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
mov r8, rbp
mov rdx, rsi
call sym.sqlite3_mprintf
test rax, rax
mov qword [rbx + 0x58], rax
je 0x4b2adc
lea r13, str.a_d__d
mov rcx, rdi
call sym.sqlite3_str_new
mov r9, rbp
mov r8, rsi
xor esi, esi
lea rdx, str.UPDATE___w_.__w_rowid_SET
mov rcx, rax
mov r12, rax
call sym.sqlite3_str_appendf
lea rbp, [0x004e0de2]
lea r14, str.a_dcoalesce___d_a_d_
movzx eax, byte [rbx + 0x29]
cmp eax, esi
jle 0x4b2d03
test esi, esi
je 0x4b2cd1
mov r8d, 1
mov rdx, rbp
mov rcx, r12
call sym.sqlite3_str_append
movzx eax, byte [rbx + 0x2a]
lea r9d, [rsi + 2]
cmp eax, esi
jle 0x4b2cf1
mov dword [rsp + 0x20], esi
mov r8d, esi
mov rdx, r14
mov rcx, r12
call sym.sqlite3_str_appendf
jmp 0x4b2cff
mov r8d, esi
mov rdx, r13
mov rcx, r12
call sym.sqlite3_str_appendf
inc esi
jmp 0x4b2cb4
lea rdx, str._WHERE_rowid_1
mov rcx, r12
call sym.sqlite3_str_appendf
mov rcx, r12
call sym.sqlite3_str_finish
test rax, rax
mov rsi, rax
je 0x4b2adc
add rbx, 0xb8
mov r9d, 5
or r8d, 0xffffffff
mov qword [rsp + 0x28], 0
mov rdx, rax
mov rcx, rdi
mov qword [rsp + 0x20], rbx
call sym.sqlite3_prepare_v3
mov rcx, rsi
mov dword [rsp + 0x5c], eax
call sym.sqlite3_free
mov eax, dword [rsp + 0x5c]
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret