Function at 0x10101330
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x40], eax
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov dword [esp + 4], eax
push esi
mov esi, edx
mov dword [esp + 0x1c], ebx
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], edi
mov dword [ebx + 0xc], esi
je 0x1010156e
call fcn.100ca320
test eax, eax
jne 0x101013c0
push eax
push 0x18
call fcn.1001e500
mov esi, eax
add esp, 8
test esi, esi
je 0x101013c0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10101395
mov eax, dword [eax + 0x78]
jmp 0x1010139a
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 0x101013c5
mov esi, 0x10167bd8
push dword [esp + 0xc]
push edi
push str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
push esi
call fcn.10021730
add esp, 0x10
xor edi, edi
cmp byte [ebx + 0x19], 0
jbe 0x101013f8
push edi
push str._a_d
push esi
call fcn.10021730
movzx eax, byte [ebx + 0x19]
inc edi
add esp, 0xc
cmp edi, eax
jl 0x101013e0
push dword [esp + 0xc]
mov edi, dword [esp + 0x1c]
push edi
push str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
push esi
call fcn.10021730
push dword [esp + 0x1c]
push edi
push str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
push esi
call fcn.10021730
push dword [ebx + 0x10]
push dword [esp + 0x30]
push edi
push str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
push esi
call fcn.10021730
add esp, 0x34
test esi, esi
je 0x10101553
cmp esi, 0x10167bd8
je 0x10101553
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x1010146b
mov eax, dword [esi + 0x10]
mov byte [ecx + eax], 0
cmp dword [esi + 0xc], 0
jbe 0x1010146b
test byte [esi + 0x15], 4
jne 0x1010146b
mov ecx, esi
call fcn.10021100
mov edi, eax
jmp 0x1010146e
mov edi, dword [esi + 4]
cmp dword [0x10165b38], 0
je 0x101014bc
mov eax, dword [0x10168b88]
test eax, eax
je 0x1010148a
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 0x101014c6
push eax
call dword [0x10165b90]
jmp 0x101014c3
push esi
call dword [0x10165b5c]
add esp, 4
test edi, edi
je 0x10101553
push 0
push 0
push 0
push edi
push dword [esp + 0x20]
call fcn.10089af0
add esp, 0x14
mov esi, eax
cmp dword [0x10165b38], 0
je 0x10101531
mov eax, dword [0x10168b88]
test eax, eax
je 0x101014ff
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 0x1010153b
push eax
call dword [0x10165b90]
jmp 0x10101538
push edi
call dword [0x10165b5c]
add esp, 4
test esi, esi
je 0x1010156a
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.10128281
mov esp, ebp
pop ebp
ret
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.10128281
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x10]
movaps xmm1, xmmword [0x10160200]
lea eax, [ebx + 0x50]
movd xmm0, eax
xor ecx, ecx
pshufd xmm2, xmm0, 0
movd xmm0, ecx
pshufd xmm0, xmm0, 0
paddd xmm0, xmm1
pslld xmm0, 2
paddd xmm0, xmm2
movups xmmword [esp + ecx*4 + 0x2c], xmm0
add ecx, 4
cmp ecx, 8
jl 0x10101583
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 + 0x3c], edx
push esi
call fcn.100ce4e0
mov edi, eax
add esp, 0x24
test edi, edi
je 0x101015e3
xor eax, eax
cmp edi, 1
cmove edi, eax
mov eax, 0x100000
jmp 0x101016cf
push dword [ebx + 0x24]
push dword [ebx + 0x20]
push str.SELECT_stat_FROM__Q.sqlite_stat1_WHERE_tbl___q_rowid
call fcn.10021550
mov esi, eax
add esp, 0xc
mov dword [esp + 0x28], esi
test esi, esi
jne 0x10101608
lea edi, [eax + 7]
jmp 0x101016ca
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x24]
push 0
push eax
push 0
push 0x80
push 0xffffffffffffffff
mov edx, esi
call fcn.10092ad0
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x1010165f
mov esi, dword [esp + 0x24]
push esi
call fcn.10049de0
add esp, 4
cmp eax, 0x64
jne 0x10101650
push edi
push esi
call fcn.1004a9a0
add esp, 8
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
push esi
call fcn.10048cf0
mov esi, dword [esp + 0x2c]
add esp, 4
mov edi, eax
cmp dword [0x10165b38], 0
je 0x101016ad
mov eax, dword [0x10168b88]
test eax, eax
je 0x1010167b
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 0x101016b7
push eax
call dword [0x10165b90]
jmp 0x101016b4
push esi
call dword [0x10165b5c]
add esp, 4
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jl 0x101016ca
mov eax, dword [esp + 0x14]
jg 0x101016d1
cmp eax, 0x64
ja 0x101016d1
mov eax, 0x64
xor ecx, ecx
mov dword [ebx + 0x30], eax
xor esi, esi
mov dword [ebx + 0x34], ecx
nop dword [eax]
test edi, edi
jne 0x101017b8
cmp esi, 3
jne 0x10101701
cmp byte [ebx + 0x19], 0
je 0x10101701
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 0x1010170e
lea edi, [esi*4]
mov eax, dword [edi + 0x1014cfb4]
push dword [esp + 0xc]
push dword [esp + 0x1c]
push eax
call fcn.10021550
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x101017a5
mov ecx, dword [esp + 0x10]
mov edx, ebx
push 0
push dword [esp + edi + 0x30]
push 0
push 0x85
push 0xffffffffffffffff
call fcn.10092ad0
add esp, 0x14
mov edi, eax
cmp dword [0x10165b38], 0
je 0x10101799
mov eax, dword [0x10168b88]
test eax, eax
je 0x10101764
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 0x101017aa
push eax
call dword [0x10165b90]
add esp, 4
jmp 0x101017aa
push ebx
call dword [0x10165b5c]
add esp, 4
jmp 0x101017aa
mov edi, 7
mov ebx, dword [esp + 0x20]
inc esi
cmp esi, 8
jl 0x101016e0
cmp byte [ebx + 0x19], 0
je 0x101019ef
push dword [esp + 0xc]
mov edi, dword [esp + 0x1c]
push edi
push str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
call fcn.10021550
add esp, 0xc
mov dword [ebx + 0x40], eax
test eax, eax
je 0x101019ea
call fcn.100ca320
test eax, eax
jne 0x10101835
push eax
push 0x18
call fcn.1001e500
mov esi, eax
add esp, 8
test esi, esi
je 0x10101835
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1010180a
mov eax, dword [eax + 0x78]
jmp 0x1010180f
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 0x1010183a
mov esi, 0x10167bd8
push dword [esp + 0xc]
push edi
push str.UPDATE___w_.__w_rowid_SET
push esi
call fcn.10021730
add esp, 0x10
xor edi, edi
cmp byte [ebx + 0x19], 0
jbe 0x1010189c
test edi, edi
je 0x10101880
mov ecx, dword [esi + 0x10]
inc ecx
cmp ecx, dword [esi + 8]
jb 0x10101875
push 1
mov edx, 0x10159e64
mov ecx, esi
call fcn.10021020
add esp, 4
jmp 0x10101880
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.10021730
movzx eax, byte [ebx + 0x19]
inc edi
add esp, 0x10
cmp edi, eax
jl 0x10101855
push str._WHERE_rowid_1
push esi
call fcn.10021730
add esp, 8
test esi, esi
je 0x101019ea
cmp esi, 0x10167bd8
je 0x101019ea
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x101018e3
mov eax, dword [esi + 0x10]
mov byte [ecx + eax], 0
cmp dword [esi + 0xc], 0
jbe 0x101018e3
test byte [esi + 0x15], 4
jne 0x101018e3
mov ecx, esi
call fcn.10021100
mov ebx, eax
jmp 0x101018e6
mov ebx, dword [esi + 4]
cmp dword [0x10165b38], 0
je 0x10101934
mov eax, dword [0x10168b88]
test eax, eax
je 0x10101902
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 0x1010193e
push eax
call dword [0x10165b90]
jmp 0x1010193b
push esi
call dword [0x10165b5c]
add esp, 4
test ebx, ebx
je 0x101019ea
mov eax, dword [esp + 0x20]
mov edx, ebx
mov ecx, dword [esp + 0x10]
add eax, 0x70
push 0
push eax
push 0
push 0x85
push 0xffffffffffffffff
call fcn.10092ad0
add esp, 0x14
mov edi, eax
cmp dword [0x10165b38], 0
je 0x101019cc
mov eax, dword [0x10168b88]
test eax, eax
je 0x10101985
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 0x101019ef
push eax
call dword [0x10165b90]
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.10128281
mov esp, ebp
pop ebp
ret
push ebx
call dword [0x10165b5c]
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.10128281
mov esp, ebp
pop ebp
ret
mov edi, 7
mov ecx, dword [esp + 0x4c]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10128281
mov esp, ebp
pop ebp
ret