Function at 0x1401d67ec
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 [0x1402fe828]
xor rax, rsp
mov qword [rsp + 0xa0], rax
xor ebx, ebx
mov qword [rsp + 0x50], r9
mov r15, r9
mov r13, r8
mov r14, rdx
mov rdi, rcx
mov qword [rcx + 0x18], rdx
cmp dword [rsp + 0x120], ebx
je 0x1401d6902
mov rcx, rdx
call fcn.14018b70c
mov r9, r15
lea rdx, str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
mov r8, r13
mov rcx, rax
mov rsi, rax
call fcn.14018b79c
xor ebp, ebp
cmp byte [rdi + 0x29], bpl
jbe 0x1401d687a
mov r8d, ebx
lea rdx, str._a_d
mov rcx, rsi
call fcn.14018b79c
movzx eax, byte [rdi + 0x29]
inc ebx
cmp ebx, eax
jl 0x1401d685e
mov r9, r15
lea rdx, str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
mov r8, r13
mov rcx, rsi
call fcn.14018b79c
mov r9, r15
lea rdx, str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
mov r8, r13
mov rcx, rsi
call fcn.14018b79c
mov eax, dword [rdi + 0x20]
lea rdx, str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
mov r9, r15
mov dword [rsp + 0x20], eax
mov r8, r13
mov rcx, rsi
call fcn.14018b79c
mov rcx, rsi
call fcn.14018b75c
mov rsi, rax
test rax, rax
jne 0x1401d68d8
lea eax, [rsi + 7]
jmp 0x1401d6b7a
xor r9d, r9d
mov qword [rsp + 0x20], rbp
xor r8d, r8d
mov rdx, rsi
mov rcx, r14
call fcn.140185048
mov rcx, rsi
mov ebx, eax
call fcn.140186c1c
test ebx, ebx
jne 0x1401d6b78
xor ebx, ebx
lea rcx, [rsp + 0x60]
mov rdx, rbx
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 0x1401d6910
mov rdx, qword [rdi + 0x30]
lea ebp, [r8 + 0x64]
mov qword [rsp + 0x40], rbx
lea r8, str.sqlite_stat1
mov qword [rsp + 0x38], rbx
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov rcx, r14
mov qword [rsp + 0x28], rbx
mov r12d, ebp
mov qword [rsp + 0x20], rbx
call fcn.140189d4c
mov ebx, eax
lea esi, [rbp - 0x5d]
xor eax, eax
test ebx, ebx
je 0x1401d697d
cmp ebx, 1
mov r12d, eax
mov ebp, 0x100000
cmove ebx, r12d
jmp 0x1401d6a0d
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.1401868a4
xor ecx, ecx
mov r15, rax
test rax, rax
jne 0x1401d699f
mov ebx, esi
jmp 0x1401d69fe
mov qword [rsp + 0x30], rcx
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov r9d, 0x80
mov qword [rsp + 0x20], rcx
or r8d, 0xffffffff
mov rcx, r14
mov rdx, r15
call fcn.1401fc468
mov ebx, eax
test eax, eax
jne 0x1401d69f6
mov rbx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140188220
cmp eax, ebp
jne 0x1401d69ec
xor edx, edx
mov rcx, rbx
call fcn.1401885f0
mov r12, rax
mov rcx, rbx
call fcn.140188784
mov ebx, eax
mov rcx, r15
call fcn.140186c1c
mov r15, qword [rsp + 0x50]
cmp r12, rbp
cmovg rbp, r12
xor r12d, r12d
mov qword [rdi + 0x48], rbp
mov rbp, r12
test ebx, ebx
jne 0x1401d6a90
cmp rbp, 3
jne 0x1401d6a2d
cmp byte [rdi + 0x29], r12b
je 0x1401d6a2d
lea rcx, str.INSERT_INTO__w_.__w_rowid__rowid_nodeno_VALUES__1__2_ON_CONFLICT_rowid_DO_UPDATE_SET_nodenoexcluded.nodeno
jmp 0x1401d6a38
lea rcx, str.INSERT_OR_REPLACE_INTO__q._q_node_VALUES__1___2_
mov rcx, qword [rcx + rbp*8]
mov r8, r15
mov rdx, r13
call fcn.1401868a4
mov r15, rax
test rax, rax
je 0x1401d6a78
mov rcx, qword [rsp + rbp*8 + 0x60]
mov r9d, 0x85
mov qword [rsp + 0x30], r12
or r8d, 0xffffffff
mov qword [rsp + 0x28], rcx
mov rdx, rax
mov rcx, r14
mov qword [rsp + 0x20], r12
call fcn.1401fc468
mov ebx, eax
jmp 0x1401d6a7a
mov ebx, esi
mov rcx, r15
call fcn.140186c1c
mov r15, qword [rsp + 0x50]
inc rbp
cmp rbp, 8
jl 0x1401d6a14
cmp byte [rdi + 0x29], r12b
je 0x1401d6b78
mov rbx, qword [rsp + 0x50]
lea rcx, str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
mov r8, rbx
mov rdx, r13
call fcn.1401868a4
mov qword [rdi + 0x58], rax
test rax, rax
je 0x1401d6b3f
mov rcx, r14
call fcn.14018b70c
mov r9, rbx
lea rdx, str.UPDATE___w_.__w_rowid_SET
mov r8, r13
mov rcx, rax
mov rbp, rax
call fcn.14018b79c
mov ebx, r12d
cmp byte [rdi + 0x29], r12b
jbe 0x1401d6b20
test ebx, ebx
je 0x1401d6b00
mov r8d, 1
lea rdx, [0x1402e45c0]
mov rcx, rbp
call fcn.14018cbac
lea r9d, [rbx + 2]
mov r8d, ebx
lea rdx, str.a_d__d
mov rcx, rbp
call fcn.14018b79c
movzx eax, byte [rdi + 0x29]
inc ebx
cmp ebx, eax
jl 0x1401d6ae7
lea rdx, str._WHERE_rowid_1
mov rcx, rbp
call fcn.14018b79c
mov rcx, rbp
call fcn.14018b75c
mov rbp, rax
test rax, rax
jne 0x1401d6b43
mov ebx, esi
jmp 0x1401d6b78
lea rax, [rdi + 0xb8]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], rax
mov r9d, 0x85
or r8d, 0xffffffff
mov qword [rsp + 0x20], r12
mov rdx, rbp
mov rcx, r14
call fcn.1401fc468
mov rcx, rbp
mov ebx, eax
call fcn.140186c1c
mov eax, ebx
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.1402358e0
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret