Function at 0x140145a44
Capabilities:
Reference sql statements

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb8
mov rax, qword [0x140250b18]
xor rax, rsp
mov qword [rsp + 0xa0], rax
xor ebp, ebp
mov qword [rsp + 0x58], r9
mov r12, r9
mov r13, r8
mov r15, rdx
mov rdi, rcx
mov qword [rcx + 0x18], rdx
cmp dword [rsp + 0x120], ebp
je 0x140145b58
mov rcx, rdx
call fcn.1400fa400
mov r9, r12
lea rdx, str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
mov r8, r13
mov rcx, rax
mov rsi, rax
call fcn.1400fa544
mov ebx, ebp
cmp byte [rdi + 0x29], bpl
jbe 0x140145ad2
mov r8d, ebx
lea rdx, str._a_d
mov rcx, rsi
call fcn.1400fa544
movzx eax, byte [rdi + 0x29]
inc ebx
cmp ebx, eax
jl 0x140145ab6
mov r9, r12
lea rdx, str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
mov r8, r13
mov rcx, rsi
call fcn.1400fa544
mov r9, r12
lea rdx, str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
mov r8, r13
mov rcx, rsi
call fcn.1400fa544
mov eax, dword [rdi + 0x20]
lea rdx, str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
mov r9, r12
mov dword [rsp + 0x20], eax
mov r8, r13
mov rcx, rsi
call fcn.1400fa544
mov rcx, rsi
call fcn.1400fa44c
mov rsi, rax
test rax, rax
jne 0x140145b30
lea eax, [rsi + 7]
jmp 0x140145dfe
xor r9d, r9d
mov qword [rsp + 0x20], rbp
xor r8d, r8d
mov rdx, rsi
mov rcx, r15
call fcn.1400f1a4c
mov rcx, rsi
mov ebx, eax
call fcn.1400f3680
test ebx, ebx
jne 0x140145dfc
lea rcx, [rsp + 0x60]
mov rdx, rbp
mov r8d, 8
lea rax, [rdi + 0x78]
add rax, rdx
add rdx, 8
mov qword [rcx], rax
lea rcx, [rcx + 8]
sub r8, 1
jne 0x140145b66
mov rdx, qword [rdi + 0x30]
lea r8, str.sqlite_stat1
mov qword [rsp + 0x40], rbp
xor r9d, r9d
mov qword [rsp + 0x38], rbp
mov rcx, r15
mov qword [rsp + 0x30], rbp
mov r14, rbp
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rbp
call fcn.1400f854c
mov ebx, eax
mov esi, 7
test eax, eax
je 0x140145bce
cmp eax, 1
mov qword [rdi + 0x48], 0x100000
cmove ebx, ebp
jmp 0x140145c80
mov r8, qword [rdi + 0x38]
lea rcx, str.SELECT_stat_FROM__Q.sqlite_stat1_WHERE_tbl___q_rowid
mov rdx, qword [rdi + 0x30]
call fcn.1400f3418
mov r12, rax
test rax, rax
jne 0x140145bf1
mov ebx, esi
jmp 0x140145c7b
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rbp
mov qword [rsp + 0x28], rax
mov r9d, 0x80
or r8d, 0xffffffff
mov qword [rsp + 0x20], rbp
mov rdx, r12
mov rcx, r15
call fcn.1401692ec
mov ebx, eax
test eax, eax
jne 0x140145c63
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.1400f55d0
mov ebp, 0x64
cmp eax, ebp
jne 0x140145c43
xor edx, edx
mov rcx, rbx
call fcn.1400f5b28
mov r14, rax
mov rcx, rbx
call fcn.1400f5dd8
mov ebx, eax
test eax, eax
jne 0x140145c71
test r14, r14
je 0x140145c69
cmp r14, rbp
cmovg rbp, r14
mov qword [rdi + 0x48], rbp
jmp 0x140145c71
cmp eax, esi
je 0x140145c71
mov ebx, ebp
mov qword [rdi + 0x48], 0x100000
mov rcx, r12
call fcn.1400f3680
xor ebp, ebp
mov r12, qword [rsp + 0x58]
xor r14d, r14d
test ebx, ebx
jne 0x140145cff
cmp rbp, 3
jne 0x140145c9c
cmp byte [rdi + 0x29], r14b
je 0x140145c9c
lea rcx, str.INSERT_INTO__w_.__w_rowid__rowid_nodeno_VALUES__1__2_ON_CONFLICT_rowid_DO_UPDATE_SET_nodenoexcluded.nodeno
jmp 0x140145ca7
lea rcx, str.INSERT_OR_REPLACE_INTO__q._q_node_VALUES__1___2_
mov rcx, qword [rcx + rbp*8]
mov r8, r12
mov rdx, r13
call fcn.1400f3418
mov r14, rax
test rax, rax
je 0x140145ce9
and qword [rsp + 0x30], 0
mov r9d, 0x85
mov rcx, qword [rsp + rbp*8 + 0x60]
or r8d, 0xffffffff
mov qword [rsp + 0x28], rcx
mov rdx, rax
and qword [rsp + 0x20], 0
mov rcx, r15
call fcn.1401692ec
mov ebx, eax
jmp 0x140145ceb
mov ebx, esi
mov rcx, r14
call fcn.1400f3680
inc rbp
cmp rbp, 8
jl 0x140145c80
xor r14d, r14d
cmp byte [rdi + 0x29], r14b
je 0x140145dfc
mov r8, r12
lea rcx, str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
mov rdx, r13
call fcn.1400f3418
mov qword [rdi + 0x58], rax
test rax, rax
je 0x140145dc3
mov rcx, r15
call fcn.1400fa400
mov r9, r12
lea rdx, str.UPDATE___w_.__w_rowid_SET
mov r8, r13
mov rcx, rax
mov rbp, rax
call fcn.1400fa544
mov ebx, r14d
cmp byte [rdi + 0x29], r14b
jbe 0x140145da4
test ebx, ebx
je 0x140145d6a
mov r8d, 1
lea rdx, [0x140222460]
mov rcx, rbp
call fcn.1400fb810
movzx eax, byte [rdi + 0x2a]
lea r9d, [rbx + 2]
mov r8d, ebx
mov rcx, rbp
cmp ebx, eax
jge 0x140145d8e
lea rdx, str.a_dcoalesce___d_a_d_
mov dword [rsp + 0x20], ebx
call fcn.1400fa544
jmp 0x140145d9a
lea rdx, str.a_d__d
call fcn.1400fa544
movzx eax, byte [rdi + 0x29]
inc ebx
cmp ebx, eax
jl 0x140145d51
lea rdx, str._WHERE_rowid_1
mov rcx, rbp
call fcn.1400fa544
mov rcx, rbp
call fcn.1400fa44c
mov rbp, rax
test rax, rax
jne 0x140145dc7
mov ebx, esi
jmp 0x140145dfc
lea rax, [rdi + 0xb8]
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], rax
mov r9d, 0x85
or r8d, 0xffffffff
mov qword [rsp + 0x20], r14
mov rdx, rbp
mov rcx, r15
call fcn.1401692ec
mov rcx, rbp
mov ebx, eax
call fcn.1400f3680
mov eax, ebx
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.14019eac0
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret