Function at 0x101020d0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, ecx
push esi
push edi
mov edi, edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x10], edi
mov dword [ebx + 0xc], edi
je 0x101022d4
call fcn.100cb1b0
test eax, eax
jne 0x10102143
push eax
push 0x18
call fcn.1001e4e0
mov esi, eax
add esp, 8
test esi, esi
je 0x10102143
test edi, edi
je 0x10102118
mov eax, dword [edi + 0x78]
jmp 0x1010211d
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 0x10102148
mov esi, 0x10167bd8
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
push esi
call fcn.10021720
add esp, 0x10
xor edi, edi
cmp byte [ebx + 0x19], 0
jbe 0x1010217c
push edi
push str._a_d
push esi
call fcn.10021720
movzx eax, byte [ebx + 0x19]
inc edi
add esp, 0xc
cmp edi, eax
jl 0x10102164
mov edi, dword [ebp + 0xc]
push edi
push dword [ebp + 8]
push str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
push esi
call fcn.10021720
push edi
push dword [ebp + 8]
push str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
push esi
call fcn.10021720
push dword [ebx + 0x10]
push edi
push dword [ebp + 8]
push str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
push esi
call fcn.10021720
add esp, 0x34
test esi, esi
je 0x101022c4
cmp esi, 0x10167bd8
je 0x101022c4
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x101021eb
mov eax, dword [esi + 0x10]
mov byte [ecx + eax], 0
cmp dword [esi + 0xc], 0
jbe 0x101021eb
test byte [esi + 0x15], 4
jne 0x101021eb
mov ecx, esi
call fcn.100210f0
mov edi, eax
jmp 0x101021ee
mov edi, dword [esi + 4]
cmp dword [0x10165b38], 0
je 0x1010223c
mov eax, dword [0x10168b88]
test eax, eax
je 0x1010220a
push eax
call dword [0x10165b88]
add esp, 4
push esi
call dword [0x10165b64]
sub dword [0x10168a10], eax
add esp, 4
dec dword [0x10168a34]
push esi
call dword [0x10165b5c]
mov eax, dword [0x10168b88]
add esp, 4
test eax, eax
je 0x10102246
push eax
call dword [0x10165b90]
jmp 0x10102243
push esi
call dword [0x10165b5c]
add esp, 4
test edi, edi
je 0x101022c4
push 0
push 0
push 0
push edi
push dword [esp + 0x20]
call fcn.10089a20
add esp, 0x14
mov esi, eax
cmp dword [0x10165b38], 0
je 0x101022ad
mov eax, dword [0x10168b88]
test eax, eax
je 0x1010227b
push eax
call dword [0x10165b88]
add esp, 4
push edi
call dword [0x10165b64]
sub dword [0x10168a10], eax
add esp, 4
dec dword [0x10168a34]
push edi
call dword [0x10165b5c]
mov eax, dword [0x10168b88]
add esp, 4
test eax, eax
je 0x101022b7
push eax
call dword [0x10165b90]
jmp 0x101022b4
push edi
call dword [0x10165b5c]
add esp, 4
test esi, esi
je 0x101022d0
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x10]
movaps xmm1, xmmword [0x10160200]
lea eax, [ebx + 0x50]
movd xmm0, eax
xor ecx, ecx
pshufd xmm2, xmm0, 0
nop dword [eax]
movd xmm0, ecx
pshufd xmm0, xmm0, 0
paddd xmm0, xmm1
pslld xmm0, 2
paddd xmm0, xmm2
movups xmmword [esp + ecx*4 + 0x28], xmm0
add ecx, 4
cmp ecx, 8
jl 0x101022f0
xor edx, edx
mov dword [esp + 0x14], 0x64
push edx
push edx
push edx
push edx
push edx
push edx
push str.sqlite_stat1
push dword [ebx + 0x20]
mov dword [esp + 0x38], edx
push edi
call fcn.100cf360
mov edi, eax
add esp, 0x24
test edi, edi
je 0x10102350
xor eax, eax
cmp edi, 1
cmove edi, eax
mov eax, 0x100000
jmp 0x1010243c
push dword [ebx + 0x24]
push dword [ebx + 0x20]
push str.SELECT_stat_FROM__Q.sqlite_stat1_WHERE_tbl___q_rowid
call fcn.10021540
mov esi, eax
add esp, 0xc
mov dword [esp + 0x20], esi
test esi, esi
jne 0x10102375
lea edi, [eax + 7]
jmp 0x10102437
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push 0
push eax
push 0
push 0x80
push 0xffffffffffffffff
mov edx, esi
call fcn.10092a20
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x101023cc
mov esi, dword [esp + 0x1c]
push esi
call fcn.10049d90
add esp, 4
cmp eax, 0x64
jne 0x101023bd
push edi
push esi
call fcn.1004a950
add esp, 8
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
push esi
call fcn.10048ca0
mov esi, dword [esp + 0x24]
add esp, 4
mov edi, eax
cmp dword [0x10165b38], 0
je 0x1010241a
mov eax, dword [0x10168b88]
test eax, eax
je 0x101023e8
push eax
call dword [0x10165b88]
add esp, 4
push esi
call dword [0x10165b64]
sub dword [0x10168a10], eax
add esp, 4
dec dword [0x10168a34]
push esi
call dword [0x10165b5c]
mov eax, dword [0x10168b88]
add esp, 4
test eax, eax
je 0x10102424
push eax
call dword [0x10165b90]
jmp 0x10102421
push esi
call dword [0x10165b5c]
add esp, 4
mov ecx, dword [esp + 0x18]
test ecx, ecx
jl 0x10102437
mov eax, dword [esp + 0x14]
jg 0x1010243e
cmp eax, 0x64
ja 0x1010243e
mov eax, 0x64
xor ecx, ecx
mov dword [ebx + 0x30], eax
xor esi, esi
mov dword [ebx + 0x34], ecx
test edi, edi
jne 0x10102518
cmp esi, 3
jne 0x10102467
cmp byte [ebx + 0x19], 0
je 0x10102467
mov eax, str.INSERT_INTO__w_.__w_rowid__rowid_nodeno_VALUES__1__2_ON_CONFLICT_rowid_DO_UPDATE_SET_nodenoexcluded.nodeno
lea edi, [esi*4]
jmp 0x10102474
lea edi, [esi*4]
mov eax, dword [edi + 0x1014cfb4]
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
call fcn.10021540
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x10102505
mov ecx, dword [esp + 0x10]
mov edx, ebx
push 0
push dword [esp + edi + 0x2c]
push 0
push 0x85
push 0xffffffffffffffff
call fcn.10092a20
add esp, 0x14
mov edi, eax
cmp dword [0x10165b38], 0
je 0x101024f9
mov eax, dword [0x10168b88]
test eax, eax
je 0x101024c4
push eax
call dword [0x10165b88]
add esp, 4
push ebx
call dword [0x10165b64]
sub dword [0x10168a10], eax
add esp, 4
dec dword [0x10168a34]
push ebx
call dword [0x10165b5c]
mov eax, dword [0x10168b88]
add esp, 4
test eax, eax
je 0x1010250a
push eax
call dword [0x10165b90]
add esp, 4
jmp 0x1010250a
push ebx
call dword [0x10165b5c]
add esp, 4
jmp 0x1010250a
mov edi, 7
mov ebx, dword [esp + 0x24]
inc esi
cmp esi, 8
jl 0x10102446
cmp byte [ebx + 0x19], 0
je 0x10102738
mov edi, dword [ebp + 0xc]
push edi
push dword [ebp + 8]
push str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
call fcn.10021540
add esp, 0xc
mov dword [ebx + 0x40], eax
test eax, eax
je 0x10102733
call fcn.100cb1b0
test eax, eax
jne 0x10102593
push eax
push 0x18
call fcn.1001e4e0
mov esi, eax
add esp, 8
test esi, esi
je 0x10102593
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10102568
mov eax, dword [eax + 0x78]
jmp 0x1010256d
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 0x10102598
mov esi, 0x10167bd8
push edi
push dword [ebp + 8]
push str.UPDATE___w_.__w_rowid_SET
push esi
call fcn.10021720
add esp, 0x10
xor edi, edi
cmp byte [ebx + 0x19], 0
jbe 0x101025f9
test edi, edi
je 0x101025dd
mov ecx, dword [esi + 0x10]
inc ecx
cmp ecx, dword [esi + 8]
jb 0x101025d2
push 1
mov edx, 0x10159e5c
mov ecx, esi
call fcn.10021010
add esp, 4
jmp 0x101025dd
mov eax, dword [esi + 4]
mov dword [esi + 0x10], ecx
mov byte [eax + ecx - 1], 0x2c
lea eax, [edi + 2]
push eax
push edi
push str.a_d__d
push esi
call fcn.10021720
movzx eax, byte [ebx + 0x19]
inc edi
add esp, 0x10
cmp edi, eax
jl 0x101025b2
push str._WHERE_rowid_1
push esi
call fcn.10021720
add esp, 8
test esi, esi
je 0x10102733
cmp esi, 0x10167bd8
je 0x10102733
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x1010263e
mov eax, dword [esi + 0x10]
mov byte [ecx + eax], 0
cmp dword [esi + 0xc], 0
jbe 0x1010263e
test byte [esi + 0x15], 4
jne 0x1010263e
mov ecx, esi
call fcn.100210f0
jmp 0x10102641
mov eax, dword [esi + 4]
cmp dword [0x10165b38], 0
mov dword [esp + 0x18], eax
je 0x10102693
mov eax, dword [0x10168b88]
test eax, eax
je 0x10102661
push eax
call dword [0x10165b88]
add esp, 4
push esi
call dword [0x10165b64]
sub dword [0x10168a10], eax
add esp, 4
dec dword [0x10168a34]
push esi
call dword [0x10165b5c]
mov eax, dword [0x10168b88]
add esp, 4
test eax, eax
je 0x1010269d
push eax
call dword [0x10165b90]
jmp 0x1010269a
push esi
call dword [0x10165b5c]
add esp, 4
mov esi, dword [esp + 0x18]
test esi, esi
je 0x10102733
mov ecx, dword [esp + 0x10]
lea eax, [ebx + 0x70]
push 0
push eax
push 0
push 0x85
push 0xffffffffffffffff
mov edx, esi
call fcn.10092a20
add esp, 0x14
mov edi, eax
cmp dword [0x10165b38], 0
je 0x10102720
mov eax, dword [0x10168b88]
test eax, eax
je 0x101026e4
push eax
call dword [0x10165b88]
add esp, 4
push esi
call dword [0x10165b64]
sub dword [0x10168a10], eax
add esp, 4
dec dword [0x10168a34]
push esi
call dword [0x10165b5c]
mov eax, dword [0x10168b88]
add esp, 4
test eax, eax
je 0x10102738
push eax
call dword [0x10165b90]
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [0x10165b5c]
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 7
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret