Function at 0x100507e0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov edx, dword [eax]
push ebx
push esi
xor esi, esi
push edi
mov dword [esp + 0x10], edx
cmp dword [eax + 0x24], esi
jne 0x10050b7b
mov ebx, dword [eax + 0xf4]
mov eax, dword [ebx + 0x3c]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], 0xffff8000
cmp eax, esi
je 0x10050832
mov ecx, dword [edx + 0x10]
add ecx, 0xc
mov dword [esp + 0x14], esi
cmp dword [ecx], eax
je 0x10050832
inc dword [esp + 0x14]
add ecx, 0x10
cmp dword [ecx], eax
jne 0x10050827
mov eax, dword [esp + 0x14]
mov ecx, dword [edx + 0x10]
mov edi, dword [ebx]
add eax, eax
mov edx, dword [ecx + eax*8]
movsx eax, word [ebx + 0x22]
mov ecx, dword [ebx + 4]
add eax, eax
lea eax, [ecx + eax*8 - 0x10]
mov dword [esp + 0x1c], eax
movzx eax, word [eax + 0xc]
add edi, 0x10
mov dword [esp + 0xc], edx
mov dword [esp + 0x24], edi
cmp ax, si
je 0x1005087d
cmp byte [ebx + 0x2b], 0
jne 0x1005087d
mov ecx, dword [ebx + 0x34]
cmp ecx, esi
je 0x1005087d
cmp dword [ecx], eax
jl 0x1005087d
lea eax, [eax + eax*4]
mov esi, dword [ecx + eax*4 - 0xc]
mov ecx, dword [esp + 0x10]
push edx
push edi
push ecx
call fcn.100576d0
mov edx, dword [eax]
mov eax, dword [esp + 0x18]
add esp, 0xc
push 0
push edx
push eax
mov eax, dword [ebp + 8]
push 0x1a
call fcn.10056e10
add esp, 0x10
test eax, eax
jne 0x10050b7b
mov ecx, dword [esp + 0x1c]
movzx eax, word [ecx + 0xe]
test al, 1
je 0x100508cf
mov edx, dword [ebp + 8]
push str.Cannot_add_a_PRIMARY_KEY_column
push edx
call fcn.1000e200
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 8], 0
je 0x100508ed
mov eax, dword [ebp + 8]
push str.Cannot_add_a_UNIQUE_column
push eax
call fcn.1000e200
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test al, 0x60
jne 0x100509ba
test esi, esi
je 0x10050903
mov ecx, dword [esi + 0xc]
cmp byte [ecx], 0x79
jne 0x10050903
xor esi, esi
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x20]
and eax, 0x4000
xor ecx, ecx
or eax, ecx
je 0x1005093c
cmp dword [ebx + 0x30], ecx
je 0x1005093c
test esi, esi
je 0x1005093c
mov ebx, dword [esp + 0xc]
mov eax, dword [ebp + 8]
push edi
push ebx
push str.Cannot_add_a_REFERENCES_column_with_non_NULL_default_value
push str.SELECT_raise_ABORT__Q__FROM___w_.__w_
push eax
call fcn.10057600
add esp, 0x14
jmp 0x10050940
mov ebx, dword [esp + 0xc]
mov ecx, dword [esp + 0x1c]
test byte [ecx + 4], 0xf
je 0x10050960
test esi, esi
jne 0x10050964
mov edx, dword [ebp + 8]
push edi
push ebx
push str.Cannot_add_a_NOT_NULL_column_with_default_value_NULL
push str.SELECT_raise_ABORT__Q__FROM___w_.__w_
push edx
jmp 0x100509d2
test esi, esi
je 0x100509da
mov dword [esp + 0x18], 0
test esi, esi
je 0x10050997
mov ecx, dword [esp + 0x10]
push 0
lea eax, [esp + 0x1c]
push eax
push 0x41
push 1
push esi
push ecx
call fcn.1002f000
add esp, 0x18
test eax, eax
jne 0x10050b7b
cmp dword [esp + 0x18], eax
jne 0x100509af
mov edx, dword [ebp + 8]
push edi
push ebx
push str.Cannot_add_a_column_with_non_constant_default
push str.SELECT_raise_ABORT__Q__FROM___w_.__w_
push edx
call fcn.10057600
add esp, 0x14
mov esi, dword [esp + 0x18]
call fcn.1002f4a0
jmp 0x100509da
test al, 0x40
je 0x100509da
mov eax, dword [esp + 0xc]
mov ecx, dword [ebp + 8]
push edi
push eax
push str.cannot_add_a_STORED_column
push str.SELECT_raise_ABORT__Q__FROM___w_.__w_
push ecx
call fcn.10057600
add esp, 0x14
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x10]
mov ebx, dword [eax]
push 0
push edx
push ecx
call fcn.1000adf0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x10050a4f
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
lea eax, [eax + esi - 1]
cmp eax, esi
jbe 0x10050a21
mov cl, byte [eax]
cmp cl, 0x3b
je 0x10050a19
movzx ecx, cl
test byte [ecx + 0x10113038], 1
je 0x10050a21
mov byte [eax], 0
dec eax
cmp eax, esi
ja 0x10050a06
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x2c]
push edi
mov edi, dword [ebp + 8]
push eax
push esi
push eax
mov eax, dword [esp + 0x1c]
push eax
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.10057600
mov ecx, dword [esp + 0x2c]
add esp, 0x1c
mov eax, esi
call fcn.1000a790
jmp 0x10050a52
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.10078830
mov esi, eax
test esi, esi
je 0x10050b7b
mov ecx, edi
call fcn.10050240
mov edi, dword [esp + 0x14]
push 2
mov ebx, eax
push ebx
push edi
push 0x63
push esi
call fcn.1002f870
mov edx, 1
mov ecx, edi
shl edx, cl
add esp, 0x14
or dword [esi + 0x9c], edx
cmp edi, 1
je 0x10050a9a
mov eax, esi
call fcn.10030b20
mov eax, dword [esi + 0x6c]
cmp dword [esi + 0x70], eax
jg 0x10050ab5
push 0
push 0xfffffffffffffffe
push ebx
push 0x56
mov eax, esi
call fcn.1002f760
add esp, 0x10
jmp 0x10050adf
lea ecx, [eax + 1]
mov dword [esi + 0x6c], ecx
lea edx, [eax + eax*4]
mov eax, dword [esi + 0x68]
lea eax, [eax + edx*4]
xor ecx, ecx
mov word [eax + 2], cx
mov dword [eax + 4], ebx
mov dword [eax + 8], 0xfffffffe
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov word [eax], 0x56
mov eax, dword [esi + 0x6c]
lea ecx, [eax + 2]
cmp dword [esi + 0x70], eax
jg 0x10050afc
push 0
push ecx
push ebx
push 0x3b
mov eax, esi
call fcn.1002f760
add esp, 0x10
jmp 0x10050b1f
lea edx, [eax + 1]
mov dword [esi + 0x6c], edx
mov edx, dword [esi + 0x68]
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov dword [eax + 8], ecx
xor ecx, ecx
mov dword [eax + 4], ebx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax], 0x3b
push 3
push 2
push edi
push 0x64
push esi
call fcn.1002f870
mov eax, dword [ebp + 8]
add esp, 0x14
mov edx, ebx
call fcn.10050260
mov esi, edi
push 3
mov edi, eax
call fcn.100503c0
mov eax, dword [esp + 0x24]
add esp, 4
cmp dword [eax + 0x10], 0
jne 0x10050b61
mov eax, dword [esp + 0x1c]
test byte [eax + 4], 0xf
je 0x10050b7b
test byte [eax + 0xe], 0x60
je 0x10050b7b
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x24]
push ecx
push edx
mov eax, edi
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 eax
call fcn.10057600
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret