Function at 0x10186040
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x38
cmp dword [ebp + 0x10], 0
push esi
push edi
mov edi, ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], edi
movd xmm0, edi
pshufd xmm4, xmm0, 0
movaps xmmword [esp + 0x20], xmm4
mov dword [edi + 0xc], edx
je 0x10186181
push edx
call fcn.100e2410
add esp, 4
mov esi, eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
push esi
call fcn.100e2800
xor ecx, ecx
add esp, 0x10
mov dword [esp + 0x10], ecx
cmp byte [edi + 0x19], cl
jbe 0x101860c0
nop word [eax + eax]
push ecx
push str._a_d
push esi
call fcn.100e2800
mov ecx, dword [esp + 0x1c]
add esp, 0xc
movzx eax, byte [edi + 0x19]
inc ecx
mov dword [esp + 0x10], ecx
cmp ecx, eax
jl 0x101860a0
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
push esi
call fcn.100e2800
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
push esi
call fcn.100e2800
push dword [edi + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
push esi
call fcn.100e2800
add esp, 0x34
test esi, esi
je 0x1018620d
cmp esi, 0x1029e320
je 0x1018620d
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x10186130
mov eax, dword [esi + 0x10]
mov byte [ecx + eax], 0
cmp dword [esi + 0xc], 0
jbe 0x10186130
test byte [esi + 0x15], 4
jne 0x10186130
mov ecx, esi
call fcn.100e2250
jmp 0x10186133
mov eax, dword [esi + 4]
push esi
mov dword [esp + 0x14], eax
call fcn.100dfd40
mov esi, dword [esp + 0x14]
add esp, 4
test esi, esi
je 0x1018620d
push 0
push 0
push 0
push esi
push dword [esp + 0x1c]
call fcn.101356f0
add esp, 0x14
mov dword [esp + 0x18], eax
push esi
call fcn.100dfd40
mov eax, dword [esp + 0x1c]
add esp, 4
test eax, eax
jne 0x101865cc
movaps xmm4, xmmword [esp + 0x20]
mov edx, dword [esp + 0xc]
movaps xmm1, xmmword [0x1027a4c0]
mov ecx, 2
movaps xmm3, xmmword [0x1027a4f0]
xor eax, eax
movd xmm2, ecx
nop word [eax + eax]
movd xmm0, eax
pshufd xmm0, xmm0, 0
paddd xmm0, xmm1
pslld xmm0, xmm2
paddd xmm0, xmm3
paddd xmm0, xmm4
movups xmmword [esp + eax*4 + 0x20], xmm0
add eax, 4
cmp eax, 8
jl 0x101861a0
push 0
push 0
push 0
push 0
push 0
push 0
push str.sqlite_stat1
push dword [edi + 0x20]
xorps xmm0, xmm0
push edx
movlpd qword [esp + 0x34], xmm0
call fcn.10164290
mov esi, eax
add esp, 0x24
test esi, esi
je 0x10186218
xor eax, eax
mov dword [edi + 0x30], 0x100000
cmp esi, 1
mov dword [edi + 0x34], 0
cmove esi, eax
jmp 0x101862f4
mov eax, 7
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push dword [edi + 0x24]
push dword [edi + 0x20]
push str.SELECT_stat_FROM__Q.sqlite_stat1_WHERE_tbl___q_rowid
call fcn.100e2630
add esp, 0xc
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x1018623b
lea esi, [eax + 7]
jmp 0x101862f4
push 0
lea ecx, [esp + 0x1c]
mov edx, eax
push ecx
mov ecx, dword [esp + 0x14]
push 0
push 0x80
push 0xffffffffffffffff
call fcn.1013a960
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x1018629f
mov esi, dword [esp + 0x18]
push esi
call fcn.101066b0
add esp, 4
cmp eax, 0x64
jne 0x1018627e
push 0
push esi
call fcn.10107030
add esp, 8
jmp 0x10186286
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
call fcn.101057b0
mov edx, dword [esp + 0x1c]
add esp, 4
mov esi, eax
jmp 0x101862b6
cmp esi, 7
je 0x101862b2
xor esi, esi
mov dword [edi + 0x30], 0x100000
mov dword [edi + 0x34], esi
jmp 0x101862e8
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
test esi, esi
jne 0x101862e8
mov eax, ecx
or eax, edx
jne 0x101862d0
mov dword [edi + 0x30], 0x100000
mov dword [edi + 0x34], eax
jmp 0x101862e8
test edx, edx
jl 0x101862db
jg 0x101862e2
cmp ecx, 0x64
ja 0x101862e2
mov ecx, 0x64
xor edx, edx
mov dword [edi + 0x30], ecx
mov dword [edi + 0x34], edx
push dword [esp + 0x1c]
call fcn.100dfd40
add esp, 4
xor edi, edi
test esi, esi
jne 0x101863c8
cmp edi, 3
jne 0x10186312
mov eax, dword [esp + 8]
cmp byte [eax + 0x19], 0
mov eax, str.INSERT_INTO__w_.__w_rowid__rowid_nodeno_VALUES__1__2_ON_CONFLICT_rowid_DO_UPDATE_SET_nodenoexcluded.nodeno
jne 0x10186319
mov eax, dword [edi*4 + 0x1025fd8c]
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
call fcn.100e2630
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
je 0x101863b9
mov ecx, dword [esp + 0xc]
mov edx, eax
push 0
push dword [esp + edi*4 + 0x24]
push 0
push 0x85
push 0xffffffffffffffff
call fcn.1013a960
add esp, 0x14
mov esi, eax
cmp dword [0x10299d90], 0
je 0x101863aa
mov eax, dword [0x102ad520]
test eax, eax
je 0x1018636f
push eax
call dword [0x10299dec]
add esp, 4
push dword [esp + 0x10]
call dword [0x10299dc8]
sub dword [0x102ad348], eax
add esp, 4
dec dword [0x102ad36c]
push dword [esp + 0x10]
call dword [0x10299dc0]
mov eax, dword [0x102ad520]
add esp, 4
test eax, eax
je 0x101863be
push eax
call dword [0x10299df4]
add esp, 4
jmp 0x101863be
push dword [esp + 0x10]
call dword [0x10299dc0]
add esp, 4
jmp 0x101863be
mov esi, 7
inc edi
cmp edi, 8
jl 0x101862f6
mov edi, dword [esp + 8]
cmp byte [edi + 0x19], 0
je 0x101865ca
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
call fcn.100e2630
add esp, 0xc
mov dword [edi + 0x40], eax
test eax, eax
je 0x101865c5
call fcn.10160610
test eax, eax
jne 0x10186446
push eax
push 0x18
call fcn.100dfb50
mov esi, eax
add esp, 8
test esi, esi
je 0x10186446
mov eax, dword [esp + 0xc]
test eax, eax
je 0x1018641b
mov eax, dword [eax + 0x6c]
jmp 0x10186420
mov eax, 0x3b9aca00
mov dword [esi + 4], 0
mov dword [esi], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], 0
mov word [esi + 0x14], 0
jmp 0x1018644b
mov esi, 0x1029e320
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.UPDATE___w_.__w_rowid_SET
push esi
call fcn.100e2800
mov eax, dword [esp + 0x18]
add esp, 0x10
xor edi, edi
cmp byte [eax + 0x19], 0
jbe 0x101864de
nop dword [eax + eax]
test edi, edi
je 0x1018649f
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 8]
jb 0x10186490
push 1
mov edx, 0x10269f90
mov ecx, esi
call fcn.100e2180
add esp, 4
jmp 0x1018649f
mov ecx, dword [esi + 4]
mov dword [esi + 0x10], edx
mov al, byte [0x10269f90]
mov byte [ecx + edx - 1], al
mov eax, dword [esp + 8]
lea ecx, [edi + 2]
movzx eax, byte [eax + 0x1a]
cmp edi, eax
jge 0x101864c1
push edi
push ecx
push edi
push str.a_dcoalesce___d_a_d_
push esi
call fcn.100e2800
add esp, 0x14
jmp 0x101864d1
push ecx
push edi
push str.a_d__d
push esi
call fcn.100e2800
add esp, 0x10
mov eax, dword [esp + 8]
inc edi
movzx eax, byte [eax + 0x19]
cmp edi, eax
jl 0x10186470
push str._WHERE_rowid_1
push esi
call fcn.100e2800
add esp, 8
test esi, esi
je 0x101865c5
cmp esi, 0x1029e320
je 0x101865c5
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x10186525
mov eax, dword [esi + 0x10]
mov byte [ecx + eax], 0
cmp dword [esi + 0xc], 0
jbe 0x10186525
test byte [esi + 0x15], 4
jne 0x10186525
mov ecx, esi
call fcn.100e2250
mov edi, eax
jmp 0x10186528
mov edi, dword [esi + 4]
push esi
call fcn.100dfd40
add esp, 4
test edi, edi
je 0x101865c5
mov eax, dword [esp + 8]
mov edx, edi
mov ecx, dword [esp + 0xc]
add eax, 0x70
push 0
push eax
push 0
push 0x85
push 0xffffffffffffffff
call fcn.1013a960
add esp, 0x14
mov esi, eax
cmp dword [0x10299d90], 0
je 0x101865b3
mov eax, dword [0x102ad520]
test eax, eax
je 0x10186578
push eax
call dword [0x10299dec]
add esp, 4
push edi
call dword [0x10299dc8]
sub dword [0x102ad348], eax
add esp, 4
dec dword [0x102ad36c]
push edi
call dword [0x10299dc0]
mov eax, dword [0x102ad520]
add esp, 4
test eax, eax
je 0x101865ca
push eax
call dword [0x10299df4]
add esp, 4
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push edi
call dword [0x10299dc0]
add esp, 4
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov esi, 7
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret