Function at 0x10211100
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
cmp dword [ebp + 0x14], 0
push ebx
mov ebx, eax
mov eax, dword [ebp + 8]
push esi
push edi
mov dword [ebx + 0xc], eax
je 0x10211212
push eax
call sym.SQLite.Interop.dll_sqlite3_str_new
mov ecx, dword [ebp + 0xc]
add esp, 4
mov esi, eax
mov eax, dword [ebp + 0x10]
push eax
push ecx
push str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
push esi
call sym.SQLite.Interop.dll_sqlite3_str_appendf
add esp, 0x10
xor edi, edi
cmp byte [ebx + 0x19], 0
jbe 0x1021115f
push edi
push str._a_d
push esi
call sym.SQLite.Interop.dll_sqlite3_str_appendf
movzx edx, byte [ebx + 0x19]
inc edi
add esp, 0xc
cmp edi, edx
jl 0x10211147
mov edi, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push edi
push eax
push str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
push esi
call sym.SQLite.Interop.dll_sqlite3_str_appendf
mov ecx, dword [ebp + 0xc]
push edi
push ecx
push str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
push esi
call sym.SQLite.Interop.dll_sqlite3_str_appendf
mov edx, dword [ebx + 0x10]
mov eax, dword [ebp + 0xc]
push edx
push edi
push eax
push str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
push esi
call sym.SQLite.Interop.dll_sqlite3_str_appendf
add esp, 0x34
test esi, esi
je 0x102111d8
cmp esi, 0x102927c4
je 0x102111d8
mov eax, dword [esi + 4]
test eax, eax
je 0x102111c8
mov ecx, dword [esi + 0x10]
mov byte [eax + ecx], 0
cmp dword [esi + 0xc], 0
jbe 0x102111c8
test byte [esi + 0x15], 4
jne 0x102111c8
call fcn.10155c80
mov edi, eax
jmp 0x102111cb
mov edi, dword [esi + 4]
push esi
call sym.SQLite.Interop.dll_sqlite3_free
add esp, 4
test edi, edi
jne 0x102111e4
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
push 0
push 0
push 0
push edi
push edx
call sym.SQLite.Interop.dll_sqlite3_exec
add esp, 0x14
push edi
mov esi, eax
call sym.SQLite.Interop.dll_sqlite3_free
add esp, 4
test esi, esi
je 0x1021120f
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
lea ecx, [ebx + 0x50]
mov dword [esp + 0x10], ecx
lea edx, [ebx + 0x54]
mov dword [esp + 0x14], edx
lea ecx, [ebx + 0x58]
lea edx, [ebx + 0x5c]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
lea ecx, [ebx + 0x60]
lea edx, [ebx + 0x64]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
lea ecx, [ebx + 0x68]
lea edx, [ebx + 0x6c]
push eax
mov esi, ebx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
call fcn.10210180
add esp, 4
mov dword [esp + 0xc], eax
xor edi, edi
cmp dword [esp + 0xc], 0
jne 0x10211321
cmp edi, 3
jne 0x10211276
cmp byte [ebx + 0x19], 0
mov eax, str.INSERT_INTO__w_.__w_rowid__rowid_nodeno_VALUES__1__2_ON_CONFLICT_rowid_DO_UPDATE_SET_nodenoexcluded.nodeno
jne 0x1021127d
mov eax, dword [edi*4 + 0x10293be8]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push ecx
push edx
push eax
call sym.SQLite.Interop.dll_sqlite3_mprintf
mov esi, eax
add esp, 0xc
test esi, esi
je 0x10211303
mov eax, dword [esp + edi*4 + 0x10]
mov ecx, dword [ebp + 8]
push 0
push eax
push 0
push 0x85
push 0xffffffffffffffff
push esi
push ecx
call fcn.101fbc70
add esp, 0x1c
cmp dword [0x10292428], 0
mov dword [esp + 0xc], eax
je 0x1021130d
mov eax, dword [0x10299778]
test eax, eax
je 0x102112d1
push eax
call dword [0x10292478]
add esp, 4
push esi
call dword [0x10292454]
sub dword [0x10299710], eax
dec dword [0x10299734]
add esp, 4
push esi
call dword [0x1029244c]
mov eax, dword [0x10299778]
add esp, 4
test eax, eax
je 0x10211317
push eax
call dword [0x10292480]
jmp 0x10211314
mov dword [esp + 0xc], 7
jmp 0x10211317
push esi
call dword [0x1029244c]
add esp, 4
inc edi
cmp edi, 8
jl 0x1021125b
cmp byte [ebx + 0x19], 0
je 0x1021151c
mov edi, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push edi
push edx
push str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
call sym.SQLite.Interop.dll_sqlite3_mprintf
add esp, 0xc
mov dword [ebx + 0x40], eax
test eax, eax
je 0x10211485
mov eax, dword [ebp + 8]
push eax
call sym.SQLite.Interop.dll_sqlite3_str_new
mov ecx, dword [ebp + 0xc]
add esp, 4
push edi
push ecx
mov esi, eax
push str.UPDATE___w_.__w_rowid_SET
push esi
call sym.SQLite.Interop.dll_sqlite3_str_appendf
add esp, 0x10
xor edi, edi
cmp byte [ebx + 0x19], 0
jbe 0x102113e1
test edi, edi
je 0x102113a7
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 8]
jb 0x10211397
push 0x102780c4
mov eax, 1
mov ecx, esi
call fcn.10204070
add esp, 4
jmp 0x102113a7
mov edx, dword [esi + 4]
mov dword [esi + 0x10], eax
mov cl, byte [0x102780c4]
mov byte [edx + eax - 1], cl
movzx edx, byte [ebx + 0x1a]
cmp edi, edx
jge 0x102113c5
push edi
lea eax, [edi + 2]
push eax
push edi
push str.a_dcoalesce___d_a_d_
push esi
call sym.SQLite.Interop.dll_sqlite3_str_appendf
add esp, 0x14
jmp 0x102113d8
lea ecx, [edi + 2]
push ecx
push edi
push str.a_d__d
push esi
call sym.SQLite.Interop.dll_sqlite3_str_appendf
add esp, 0x10
movzx edx, byte [ebx + 0x19]
inc edi
cmp edi, edx
jl 0x10211374
push str._WHERE_rowid_1
push esi
call sym.SQLite.Interop.dll_sqlite3_str_appendf
add esp, 8
test esi, esi
je 0x10211485
cmp esi, 0x102927c4
je 0x10211485
mov eax, dword [esi + 4]
test eax, eax
je 0x10211426
mov ecx, dword [esi + 0x10]
mov byte [eax + ecx], 0
cmp dword [esi + 0xc], 0
jbe 0x10211426
test byte [esi + 0x15], 4
jne 0x10211426
call fcn.10155c80
mov edi, eax
jmp 0x10211429
mov edi, dword [esi + 4]
cmp dword [0x10292428], 0
je 0x10211477
mov eax, dword [0x10299778]
test eax, eax
je 0x10211445
push eax
call dword [0x10292478]
add esp, 4
push esi
call dword [0x10292454]
sub dword [0x10299710], eax
dec dword [0x10299734]
add esp, 4
push esi
call dword [0x1029244c]
mov eax, dword [0x10299778]
add esp, 4
test eax, eax
je 0x10211481
push eax
call dword [0x10292480]
jmp 0x1021147e
push esi
call dword [0x1029244c]
add esp, 4
test edi, edi
jne 0x10211498
mov dword [esp + 0xc], 7
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
push 0
add ebx, 0x70
push ebx
push 0
push 0x85
push 0xffffffffffffffff
push edi
push edx
call fcn.101fbc70
add esp, 0x1c
cmp dword [0x10292428], 0
mov dword [esp + 0xc], eax
je 0x10211512
mov eax, dword [0x10299778]
test eax, eax
je 0x102114d4
push eax
call dword [0x10292478]
add esp, 4
push edi
call dword [0x10292454]
sub dword [0x10299710], eax
dec dword [0x10299734]
add esp, 4
push edi
call dword [0x1029244c]
mov eax, dword [0x10299778]
add esp, 4
test eax, eax
je 0x1021151c
push eax
call dword [0x10292480]
mov eax, dword [esp + 0x10]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [0x1029244c]
add esp, 4
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret