Function at 0x180359da0
Capabilities:
Reference sql statements

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xc8
movaps xmmword [rsp + 0xb0], xmm6
mov rax, qword [0x1804ca010]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov rsi, rcx
mov qword [rcx + 0x18], rdx
xor r13d, r13d
lea rbp, [0x1804cfa88]
mov r12, r9
mov r15, r8
mov r14, rdx
movq xmm6, rsi
punpcklqdq xmm6, xmm6
cmp dword [rsp + 0x130], r13d
je 0x180359f0a
mov rcx, rdx
call fcn.180297860
mov r9, r12
lea rdx, str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
mov r8, r15
mov rcx, rax
mov rbx, rax
call fcn.180297c70
mov edi, r13d
cmp byte [rsi + 0x29], r13b
jbe 0x180359e4c
nop dword [rax + rax]
mov r8d, edi
lea rdx, str._a_d
mov rcx, rbx
call fcn.180297c70
movzx eax, byte [rsi + 0x29]
inc edi
cmp edi, eax
jl 0x180359e30
mov r9, r12
lea rdx, str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
mov r8, r15
mov rcx, rbx
call fcn.180297c70
mov r9, r12
lea rdx, str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
mov r8, r15
mov rcx, rbx
call fcn.180297c70
mov eax, dword [rsi + 0x20]
lea rdx, str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
mov r9, r12
mov dword [rsp + 0x20], eax
mov r8, r15
mov rcx, rbx
call fcn.180297c70
test rbx, rbx
je 0x180359fbc
cmp rbx, rbp
je 0x180359fbc
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x180359ecd
mov eax, dword [rbx + 0x18]
mov byte [rax + rcx], r13b
cmp dword [rbx + 0x14], r13d
jbe 0x180359ecd
test byte [rbx + 0x1d], 4
jne 0x180359ecd
mov rcx, rbx
call fcn.1802976d0
mov rdi, rax
jmp 0x180359ed1
mov rdi, qword [rbx + 8]
mov rcx, rbx
call fcn.180295140
test rdi, rdi
je 0x180359fbc
xor r9d, r9d
mov qword [rsp + 0x20], r13
xor r8d, r8d
mov rdx, rdi
mov rcx, r14
call fcn.1802fb600
mov rcx, rdi
mov ebx, eax
call fcn.180295140
test ebx, ebx
jne 0x18035a42a
cmp dword [0x1804ca020], 2
jl 0x180359fc6
movdqa xmm5, xmmword [0x1803e6760]
mov eax, 3
movdqa xmm3, xmmword [0x1803e67d0]
movdqa xmm1, xmmword [0x1803e67c0]
movq xmm0, xmm3
paddd xmm1, xmm0
movd xmm4, eax
pmovsxdq xmm2, xmm0
psllq xmm2, xmm4
paddq xmm2, xmm5
paddq xmm2, xmm6
movdqu xmmword [rsp + 0x60], xmm2
pmovsxdq xmm2, xmm1
movdqa xmm1, xmmword [0x1803e67f0]
psllq xmm2, xmm4
paddd xmm1, xmm0
paddq xmm2, xmm5
paddq xmm2, xmm6
movdqu xmmword [rsp + 0x70], xmm2
pmovsxdq xmm2, xmm1
movdqa xmm1, xmmword [0x1803e6810]
psllq xmm2, xmm4
paddd xmm1, xmm0
paddq xmm2, xmm5
paddq xmm2, xmm6
movdqu xmmword [rsp + 0x80], xmm2
pmovsxdq xmm2, xmm1
psllq xmm2, xmm4
paddq xmm2, xmm5
paddq xmm2, xmm6
movdqu xmmword [rsp + 0x90], xmm2
jmp 0x180359ff8
mov eax, 7
jmp 0x18035a42c
lea rcx, [rsp + 0x60]
mov rdx, r13
mov r8d, 8
nop dword [rax]
nop dword [rax + rax]
lea rax, [rsi + 0x78]
add rax, rdx
add rdx, 8
mov qword [rcx], rax
lea rcx, [rcx + 8]
sub r8, 1
jne 0x180359fe0
mov rdx, qword [rsi + 0x30]
lea r8, str.sqlite_stat1
mov qword [rsp + 0x40], r13
xor r9d, r9d
mov qword [rsp + 0x38], r13
mov rcx, r14
mov qword [rsp + 0x30], r13
mov rdi, r13
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
call fcn.180335d80
mov ebx, eax
test eax, eax
je 0x18035a044
cmp eax, 1
mov qword [rsi + 0x48], 0x100000
cmove ebx, r13d
jmp 0x18035a0f7
mov r8, qword [rsi + 0x38]
lea rcx, str.SELECT_stat_FROM__Q.sqlite_stat1_WHERE_tbl___q_rowid
mov rdx, qword [rsi + 0x30]
call fcn.180297ab0
mov rbp, rax
test rax, rax
jne 0x18035a068
lea ebx, [rax + 7]
jmp 0x18035a0f7
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rax
mov r9d, 0x80
mov r8d, 0xffffffff
mov qword [rsp + 0x20], r13
mov rdx, rbp
mov rcx, r14
call fcn.180301810
mov ebx, eax
test eax, eax
jne 0x18035a0d5
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.1802c0f50
cmp eax, 0x64
jne 0x18035a0b8
xor edx, edx
mov rcx, rbx
call fcn.1802c1a30
mov rdi, rax
mov rcx, rbx
call fcn.1802bff70
mov ebx, eax
test ebx, ebx
jne 0x18035a0ef
test rdi, rdi
jne 0x18035a0df
mov qword [rsi + 0x48], 0x100000
jmp 0x18035a0ef
cmp eax, 7
je 0x18035a0c2
mov ebx, r13d
jmp 0x18035a0c6
mov eax, 0x64
cmp rdi, rax
cmovg rax, rdi
mov qword [rsi + 0x48], rax
mov rcx, rbp
call fcn.180295140
mov rdi, r13
lea rax, str.INSERT_OR_REPLACE_INTO__q._q_node_VALUES__1___2_
test ebx, ebx
jne 0x18035a1da
cmp rdi, 3
jne 0x18035a11c
lea rcx, str.INSERT_INTO__w_.__w_rowid__rowid_nodeno_VALUES__1__2_ON_CONFLICT_rowid_DO_UPDATE_SET_nodenoexcluded.nodeno
cmp byte [rsi + 0x29], r13b
jne 0x18035a120
mov rcx, qword [rax + rdi*8]
mov r8, r12
mov rdx, r15
call fcn.180297ab0
mov rbp, rax
test rax, rax
je 0x18035a1c1
mov rcx, qword [rsp + rdi*8 + 0x60]
mov r9d, 0x85
mov qword [rsp + 0x30], r13
mov r8d, 0xffffffff
mov qword [rsp + 0x28], rcx
mov rdx, rax
mov rcx, r14
mov qword [rsp + 0x20], r13
call fcn.180301810
cmp dword [0x1804cb130], r13d
mov ebx, eax
je 0x18035a1b6
mov rcx, qword [0x1804dc468]
test rcx, rcx
je 0x18035a17f
call qword [0x1804cb1b0]
mov rcx, rbp
call qword [0x1804cb168]
dec qword [0x1804dc1f8]
movsxd rcx, eax
sub qword [0x1804dc1b0], rcx
mov rcx, rbp
call qword [0x1804cb158]
mov rcx, qword [0x1804dc468]
test rcx, rcx
je 0x18035a1c6
call qword [0x1804cb1c0]
jmp 0x18035a1c6
mov rcx, rbp
call qword [0x1804cb158]
jmp 0x18035a1c6
mov ebx, 7
inc rdi
lea rax, str.INSERT_OR_REPLACE_INTO__q._q_node_VALUES__1___2_
cmp rdi, 8
jl 0x18035a101
cmp byte [rsi + 0x29], r13b
je 0x18035a42a
mov r8, r12
lea rcx, str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
mov rdx, r15
call fcn.180297ab0
mov qword [rsi + 0x58], rax
test rax, rax
je 0x18035a425
call fcn.1803315d0
test eax, eax
jne 0x18035a24c
lea ecx, [rax + 0x20]
call fcn.180294f00
mov rbx, rax
test rax, rax
je 0x18035a24c
test r14, r14
je 0x18035a227
mov eax, dword [r14 + 0x7c]
jmp 0x18035a22c
mov eax, 0x3b9aca00
mov qword [rbx + 8], r13
lea rbp, [0x1804cfa88]
mov qword [rbx], r13
mov dword [rbx + 0x10], r13d
mov dword [rbx + 0x14], eax
mov dword [rbx + 0x18], r13d
mov word [rbx + 0x1c], r13w
jmp 0x18035a256
lea rbp, [0x1804cfa88]
mov rbx, rbp
mov r9, r12
lea rdx, str.UPDATE___w_.__w_rowid_SET
mov r8, r15
mov rcx, rbx
call fcn.180297c70
mov edi, r13d
cmp byte [rsi + 0x29], r13b
jbe 0x18035a2e7
test edi, edi
je 0x18035a2ad
mov eax, dword [rbx + 0x18]
lea ecx, [rax + 1]
cmp ecx, dword [rbx + 0x10]
jb 0x18035a29a
mov r8d, 1
lea rdx, [0x1803df798]
mov rcx, rbx
call fcn.180297620
jmp 0x18035a2ad
mov dword [rbx + 0x18], ecx
mov rcx, rax
add rcx, qword [rbx + 8]
movzx eax, byte [0x1803df798]
mov byte [rcx], al
movzx eax, byte [rsi + 0x2a]
lea r9d, [rdi + 2]
mov r8d, edi
mov rcx, rbx
cmp edi, eax
jge 0x18035a2d1
lea rdx, str.a_dcoalesce___d_a_d_
mov dword [rsp + 0x20], edi
call fcn.180297c70
jmp 0x18035a2dd
lea rdx, str.a_d__d
call fcn.180297c70
movzx eax, byte [rsi + 0x29]
inc edi
cmp edi, eax
jl 0x18035a274
lea rdx, str._WHERE_rowid_1
mov rcx, rbx
call fcn.180297c70
test rbx, rbx
je 0x18035a425
cmp rbx, rbp
je 0x18035a425
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x18035a331
mov eax, dword [rbx + 0x18]
mov byte [rax + rcx], r13b
cmp dword [rbx + 0x14], r13d
jbe 0x18035a331
test byte [rbx + 0x1d], 4
jne 0x18035a331
mov rcx, rbx
call fcn.1802976d0
mov rdi, rax
jmp 0x18035a335
mov rdi, qword [rbx + 8]
cmp dword [0x1804cb130], r13d
je 0x18035a387
mov rcx, qword [0x1804dc468]
test rcx, rcx
je 0x18035a350
call qword [0x1804cb1b0]
mov rcx, rbx
call qword [0x1804cb168]
dec qword [0x1804dc1f8]
movsxd rcx, eax
sub qword [0x1804dc1b0], rcx
mov rcx, rbx
call qword [0x1804cb158]
mov rcx, qword [0x1804dc468]
test rcx, rcx
je 0x18035a390
call qword [0x1804cb1c0]
jmp 0x18035a390
mov rcx, rbx
call qword [0x1804cb158]
test rdi, rdi
je 0x18035a425
lea rax, [rsi + 0xb8]
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rax
mov r9d, 0x85
mov r8d, 0xffffffff
mov qword [rsp + 0x20], r13
mov rdx, rdi
mov rcx, r14
call fcn.180301810
cmp dword [0x1804cb130], r13d
mov ebx, eax
je 0x18035a41a
mov rcx, qword [0x1804dc468]
test rcx, rcx
je 0x18035a3e3
call qword [0x1804cb1b0]
mov rcx, rdi
call qword [0x1804cb168]
dec qword [0x1804dc1f8]
movsxd rcx, eax
sub qword [0x1804dc1b0], rcx
mov rcx, rdi
call qword [0x1804cb158]
mov rcx, qword [0x1804dc468]
test rcx, rcx
je 0x18035a42a
call qword [0x1804cb1c0]
jmp 0x18035a42a
mov rcx, rdi
call qword [0x1804cb158]
jmp 0x18035a42a
mov ebx, 7
mov eax, ebx
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.180385c10
movaps xmm6, xmmword [rsp + 0xb0]
add rsp, 0xc8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret