Function at 0x1016ec40
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x30
mov eax, dword [0x101f1014]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp dword [ecx + 0x24], 0
je 0x1016ec6b
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10157a00
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x1c], edx
mov edx, dword [ecx]
mov dword [ebp - 0x3c], ecx
mov eax, dword [ecx + 0xf4]
mov dword [ebp - 0x34], eax
mov ecx, dword [eax + 0x3c]
mov dword [ebp - 0x18], edx
mov eax, dword [edx + 0x10]
test ecx, ecx
je 0x1016ec9b
lea edx, [eax + 0xc]
xor ebx, ebx
dec ebx
inc ebx
lea edi, [edx + 0x10]
cmp dword [edx], ecx
mov edx, edi
jne 0x1016ec8f
jmp 0x1016eca0
mov ebx, 0xffff8000
mov edi, ebx
shl edi, 4
mov eax, dword [eax + edi]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x34]
mov esi, dword [eax]
mov ecx, dword [eax + 4]
add esi, 0x10
movsx edx, word [eax + 0x22]
dec edx
shl edx, 4
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], edx
movzx edx, word [ecx + edx + 0xc]
mov dword [ebp - 0x28], 0
test edx, edx
mov dword [ebp - 0x38], edi
je 0x1016ecf9
cmp byte [eax + 0x2b], 0
mov ecx, dword [ebp - 0x18]
jne 0x1016ecfc
mov eax, dword [eax + 0x34]
test eax, eax
je 0x1016ecfc
cmp dword [eax], edx
jl 0x1016ecfc
mov edi, eax
lea eax, [edx + edx*4]
mov eax, dword [edi + eax*4 - 0xc]
mov dword [ebp - 0x28], eax
jmp 0x1016ecfc
mov ecx, dword [ebp - 0x18]
mov edx, esi
mov edi, dword [ebp - 0x20]
push edi
call fcn.10152030
add esp, 4
mov ecx, dword [ebp - 0x3c]
mov edx, 0x1a
push 0
push dword [eax]
push edi
mov edi, ecx
call fcn.10159600
add esp, 0xc
test eax, eax
mov edx, dword [ebp - 0x1c]
jne 0x1016ec59
mov dword [ebp - 0x24], esi
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
movzx eax, word [eax + ecx + 0xe]
test al, 1
jne 0x1016ed4e
mov ecx, dword [ebp - 0x34]
cmp dword [ecx + 8], 0
je 0x1016ed61
push str.Cannot_add_a_UNIQUE_column
jmp 0x1016ed53
push str.Cannot_add_a_PRIMARY_KEY_column
push edi
call fcn.10046a40
add esp, 8
jmp 0x1016ec59
test al, 0x60
je 0x1016ee47
test al, 0x40
je 0x1016ed89
push dword [ebp - 0x24]
push dword [ebp - 0x20]
push str.cannot_add_a_STORED_column
push str.SELECT_raise_ABORT__Q__FROM___w_.__w_
push edi
call fcn.10025a50
mov edx, dword [ebp - 0x1c]
add esp, 0x14
mov esi, dword [edx]
test esi, esi
je 0x1016ee0e
mov edx, dword [edx + 4]
xor eax, eax
mov dword [ebp - 0x28], edx
inc edx
sete al
mov ecx, dword [ebp - 0x18]
push eax
call fcn.10158fd0
add esp, 4
test eax, eax
je 0x1016ee0e
push dword [ebp - 0x28]
push esi
push eax
mov esi, eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x28]
mov byte [esi + eax], 0
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 4]
dec eax
test eax, eax
jle 0x1016ede7
add eax, esi
movzx ecx, byte [eax]
cmp ecx, 0x3b
je 0x1016eddf
test byte [ecx + 0x101b199a], 1
je 0x1016ede7
mov byte [eax], 0
dec eax
cmp eax, esi
ja 0x1016edce
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x2c]
push dword [ebp - 0x24]
push eax
push esi
push eax
push dword [ebp - 0x20]
push str.UPDATE___w_.sqlite_master_SET_sql__printf___._ds___sql____Q__substr_sql_1length_printf___._ds_sql____WHERE_type__table_AND_name___Q
push edi
call fcn.10025a50
add esp, 0x1c
mov ecx, dword [ebp - 0x18]
mov edx, esi
call fcn.10129dd0
mov esi, dword [edi + 8]
test esi, esi
jne 0x1016ee30
cmp dword [edi + 0x78], 0
je 0x1016eea6
mov ecx, edi
call fcn.1002fa90
test eax, eax
je 0x1016ec59
mov esi, eax
mov al, byte [edi + 0x13]
test al, al
jne 0x1016ef3e
mov eax, dword [edi + 0x2c]
inc eax
mov dword [edi + 0x2c], eax
jmp 0x1016ef4d
mov esi, dword [ebp - 0x28]
test esi, esi
mov edx, dword [ebp - 0x20]
je 0x1016ef2b
mov eax, dword [esi + 0xc]
xor edx, edx
cmp byte [eax], 0x79
cmovne edx, esi
mov esi, edx
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
test byte [eax + 0x21], 0x40
jne 0x1016eebb
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
test byte [eax + ecx + 4], 0xf
je 0x1016ef32
test esi, esi
jne 0x1016ef32
push dword [ebp - 0x24]
push edx
push str.Cannot_add_a_NOT_NULL_column_with_default_value_NULL
push str.SELECT_raise_ABORT__Q__FROM___w_.__w_
push edi
call fcn.10025a50
add esp, 0x14
mov edx, dword [ebp - 0x1c]
jmp 0x1016ed89
mov eax, dword [edi]
test byte [eax + 0x50], 8
jne 0x1016ee1f
mov byte [edi + 0x17], 1
jmp 0x1016ee1f
cmp dword [ecx + 0x30], 0
je 0x1016ee6e
test esi, esi
je 0x1016ee6e
push dword [ebp - 0x24]
push edx
push str.Cannot_add_a_REFERENCES_column_with_non_NULL_default_value
push str.SELECT_raise_ABORT__Q__FROM___w_.__w_
push edi
call fcn.10025a50
add esp, 0x14
lea eax, [ebp - 0x14]
mov dword [eax], 0
mov ecx, dword [ebp - 0x18]
mov edx, esi
push eax
push 0x41
push 1
call fcn.10036580
add esp, 0xc
test eax, eax
jne 0x1016ec59
mov esi, dword [ebp - 0x14]
test esi, esi
jne 0x1016ef1f
push dword [ebp - 0x24]
push dword [ebp - 0x20]
push str.Cannot_add_a_column_with_non_constant_default
push str.SELECT_raise_ABORT__Q__FROM___w_.__w_
push edi
call fcn.10025a50
add esp, 0x14
mov ecx, esi
call fcn.1015caf0
jmp 0x1016ee9e
xor esi, esi
jmp 0x1016ee65
test esi, esi
mov edx, dword [ebp - 0x1c]
jne 0x1016eedc
jmp 0x1016ed89
dec al
mov byte [edi + 0x13], al
movzx eax, al
mov eax, dword [edi + eax*4 + 0xa0]
mov ecx, esi
mov edx, 0x63
push 2
mov dword [ebp - 0x18], eax
push eax
push ebx
call fcn.10030110
add esp, 0xc
xor eax, eax
inc eax
mov ecx, ebx
shl eax, cl
or dword [esi + 0x9c], eax
cmp ebx, 1
je 0x1016ef8d
mov ecx, dword [esi]
mov ecx, dword [ecx + 0x10]
mov edx, dword [ebp - 0x38]
mov ecx, dword [ecx + edx + 4]
cmp byte [ecx + 9], 0
je 0x1016ef8d
or dword [esi + 0xa0], eax
xor eax, eax
mov ecx, esi
mov edx, 0x56
push eax
push 0xfffffffffffffffe
push dword [ebp - 0x18]
call fcn.10030110
add esp, 0xc
mov eax, dword [esi + 0x6c]
add eax, 2
mov dword [ebp - 0x1c], eax
mov ecx, esi
mov edx, 0x3b
xor eax, eax
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
call fcn.10030110
add esp, 0xc
mov ecx, esi
mov edx, 0x64
push 3
push 2
push ebx
call fcn.10030110
mov edx, dword [ebp - 0x18]
add esp, 0xc
test edx, edx
je 0x1016eff7
movzx eax, byte [edi + 0x13]
cmp eax, 7
ja 0x1016eff7
mov ecx, eax
inc cl
mov byte [edi + 0x13], cl
mov dword [edi + eax*4 + 0xa0], edx
mov ecx, edi
mov edx, ebx
push 3
call fcn.1017be00
add esp, 4
mov eax, dword [ebp - 0x34]
cmp dword [eax + 0x10], 0
mov ecx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x24]
je 0x1016f029
push ecx
push esi
push str.SELECT_CASE_WHEN_quick_check_GLOB_CHECK_THEN_raise_ABORT_CHECK_constraint_failed__ELSE_raise_ABORT_NOT_NULL_constraint_failed__END__FROM_pragma_quick_check__Q__Q__WHERE_quick_check_GLOB_CHECK_OR_quick_check_GLOB_NULL
push edi
call fcn.10025a50
add esp, 0x10
jmp 0x1016ec59
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
test byte [eax + edx + 4], 0xf
je 0x1016ec59
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
add eax, edx
add eax, 0xe
test byte [eax], 0x60
jne 0x1016f014
jmp 0x1016ec59