Function at 0x1007ae10
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov esi, eax
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
mov dword [ebp - 0x18], eax
or eax, 0x2800
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebx + 4]
push edi
mov dword [ebp - 0x20], edx
mov edx, dword [ecx]
mov eax, dword [edx + 0x38]
xor ecx, ecx
cmp dword [eax], ecx
push 0
lea edx, [ebp - 8]
push edx
sete cl
push 0
push 0xffffffffffffffff
push str.ATTACH__AS_vacuum_db_
push esi
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], ecx
call fcn.1006e660
add esp, 0x18
test eax, eax
je 0x1007ae78
push esi
call fcn.10085370
jmp 0x1007ae8d
mov eax, dword [ebp - 8]
push eax
call fcn.1004d590
mov ecx, dword [ebp - 8]
add esp, 4
push ecx
call fcn.1004cbd0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007b0cd
mov eax, dword [esi + 4]
lea edx, [eax + eax*2]
mov eax, dword [esi + 8]
lea eax, [eax + edx*8]
mov edx, dword [eax - 0x14]
lea ecx, [eax - 0x18]
mov edi, ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], edx
call fcn.1003eb90
mov eax, dword [ebx + 4]
movzx ecx, word [eax + 0x16]
movzx edi, word [eax + 0x14]
sub edi, ecx
cmp byte [ebx + 9], 0
mov dword [ebp - 0x14], edi
je 0x1007aee9
dec dword [ebx + 0xc]
jne 0x1007aee9
mov eax, dword [eax + 0x30]
test eax, eax
je 0x1007aee5
push eax
call dword [0x101058e8]
add esp, 4
mov byte [ebx + 0xa], 0
mov edx, dword [ebx + 4]
movzx eax, word [edx + 0x14]
push 0
push edi
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.100409c0
add esp, 0x10
test eax, eax
jne 0x1007b0c8
cmp dword [ebp - 0x10], eax
jne 0x1007af27
mov ecx, dword [esi + 0x24]
mov edx, dword [ebp - 4]
push eax
push edi
push ecx
push edx
call fcn.100409c0
add esp, 0x10
test eax, eax
jne 0x1007b0c8
cmp byte [esi + 0x1e], 0
jne 0x1007b0c8
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
call fcn.1007ab40
mov edi, eax
test edi, edi
jne 0x1007b0cd
mov al, byte [esi + 0x21]
test al, al
js 0x1007af51
movsx eax, al
jmp 0x1007af58
mov eax, ebx
call fcn.10040b80
push eax
mov eax, dword [ebp - 4]
call fcn.10040b00
add esp, 4
mov eax, str.BEGIN_EXCLUSIVE_
call fcn.1007ab40
mov edi, eax
test edi, edi
jne 0x1007b0cd
push esi
mov ecx, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
call fcn.1007aba0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007b0cd
push esi
mov ecx, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.1007aba0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007b0cd
push esi
mov ecx, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.1007aba0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007b0cd
push esi
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name____FROM_sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_rootpage_0
call fcn.1007aba0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007b0cd
push esi
mov ecx, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.1007aba0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007b0cd
push esi
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.1007aba0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007b0cd
mov eax, str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
call fcn.1007ab40
mov edi, eax
test edi, edi
jne 0x1007b0cd
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
movzx edx, byte [ecx + 0x100e49dc]
lea eax, [ebp - 0x10]
push eax
push edx
mov eax, ebx
call fcn.10046a40
mov edi, eax
add esp, 8
test edi, edi
jne 0x1007b0cd
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + 0x100e49dd]
add ecx, dword [ebp - 0x10]
movzx edx, byte [eax + 0x100e49dc]
mov eax, dword [ebp - 4]
push ecx
push edx
call fcn.10046ba0
mov edi, eax
add esp, 8
test edi, edi
jne 0x1007b0cd
mov eax, dword [ebp - 8]
add eax, 2
mov dword [ebp - 8], eax
cmp eax, 8
jl 0x1007b01f
mov eax, dword [ebp - 4]
push eax
push ebx
call fcn.10048af0
mov edi, eax
add esp, 8
test edi, edi
jne 0x1007b0cd
mov eax, dword [ebp - 4]
call fcn.10041ca0
mov edi, eax
test edi, edi
jne 0x1007b0cd
mov edi, dword [ebp - 4]
mov eax, edi
call fcn.10040b80
push eax
mov eax, ebx
call fcn.10040b00
mov ecx, dword [edi + 4]
movzx eax, word [ecx + 0x14]
mov edx, dword [ebp - 0x14]
add esp, 4
push 1
push edx
push eax
push ebx
call fcn.100409c0
add esp, 0x10
mov edi, eax
jmp 0x1007b0cd
mov edi, 7
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
mov dword [esi + 0xc], eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], edx
mov byte [esi + 0x1c], 1
test ebx, ebx
je 0x1007b0fa
mov eax, dword [ebx + 4]
call fcn.100407a0
xor eax, eax
mov dword [ebx + 4], eax
mov dword [ebx + 0x14], eax
push 0
push esi
call fcn.1005e3d0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret