Function at 0x10085180
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ecx, ecx
mov esi, eax
mov dword [esp + 0x1c], ecx
cmp byte [esi + 0x1c], cl
jne 0x100851b0
push str.cannot_VACUUM_from_within_a_transaction
call fcn.1003add0
mov eax, 1
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 0x3c]
mov ebx, dword [esi + 4]
mov dword [esp + 0x24], eax
and eax, 0xfaffffff
or eax, 0x10050000
cmp byte [esi + 0x1d], 2
mov dword [esp + 0x28], edx
mov edx, dword [esi + 0x40]
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x2c], edx
mov edx, dword [esi + 0x94]
mov dword [esi + 0x94], ecx
mov eax, dword [eax + 4]
mov ecx, dword [eax + 4]
mov dword [esp + 0x30], edx
mov edx, dword [ecx]
mov dword [esp + 0x10], eax
movzx eax, byte [edx + 0xd]
mov dword [esp + 0x20], eax
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
je 0x1008520c
mov eax, str.ATTACH__AS_vacuum_db_
push edi
call fcn.10084ec0
mov ebp, eax
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebx
jle 0x1008522e
mov edx, dword [esi + 8]
mov ecx, eax
shl ecx, 4
lea ecx, [ecx + edx - 0x10]
mov dword [esp + 0x1c], ecx
test ebp, ebp
jne 0x1008544a
mov edx, dword [esi + 8]
shl eax, 4
mov ebx, dword [eax + edx - 0xc]
mov eax, ebx
mov dword [esp + 0x14], ebx
call fcn.1004b190
mov ebp, dword [esp + 0x10]
mov eax, ebp
call fcn.10049ba0
mov ecx, eax
mov eax, dword [ebp + 4]
mov edx, dword [eax]
cmp byte [edx + 5], 5
mov dword [esp + 0x18], ecx
jne 0x1008526e
mov dword [esi + 0x24], 0
mov eax, dword [ebp + 4]
mov eax, dword [eax + 0x20]
push 0
push ecx
push ebx
call fcn.10049ad0
add esp, 0xc
test eax, eax
jne 0x10085445
cmp dword [esp + 0x20], eax
jne 0x100852a8
mov ecx, dword [esp + 0x18]
push eax
mov eax, dword [esi + 0x24]
push ecx
push ebx
call fcn.10049ad0
add esp, 0xc
test eax, eax
jne 0x10085445
cmp byte [esi + 0x1e], 0
jne 0x10085445
push edi
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
call fcn.10084ec0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x1008544a
mov al, byte [esi + 0x20]
test al, al
jl 0x100852d6
movsx eax, al
jmp 0x100852df
mov eax, dword [esp + 0x10]
call fcn.10049d00
push eax
mov eax, ebx
call fcn.10049c90
add esp, 4
push edi
mov eax, str.BEGIN_EXCLUSIVE_
call fcn.10084ec0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x1008544a
push edi
push esi
mov eax, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
call fcn.10084f50
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x1008544a
push edi
push esi
mov eax, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.10084f50
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x1008544a
push edi
push esi
mov eax, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.10084f50
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x1008544a
push edi
push esi
mov eax, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name____FROM_main.sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_rootpage_0
call fcn.10084f50
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x1008544a
push edi
push esi
mov eax, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.10084f50
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x1008544a
push edi
push esi
mov eax, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.10084f50
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x1008544a
push edi
mov eax, str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_main.sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
call fcn.10084ec0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x1008544a
xor edi, edi
movzx eax, byte [edi + 0x100b0400]
lea edx, [esp + 0x20]
push edx
push eax
mov eax, dword [esp + 0x18]
call fcn.1004fc00
movzx ecx, byte [edi + 0x100b0401]
add ecx, dword [esp + 0x28]
movzx ebx, byte [edi + 0x100b0400]
mov eax, dword [esp + 0x1c]
push ecx
call fcn.1004fc70
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x1008544a
add edi, 2
cmp edi, 8
jl 0x100853b2
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
push edi
call fcn.100520e0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x1008544a
mov eax, edi
call fcn.1004b190
mov ebp, eax
test ebp, ebp
jne 0x1008544a
mov eax, edi
call fcn.10049d00
push eax
mov eax, ebx
call fcn.10049c90
mov ecx, dword [esp + 0x1c]
mov edx, dword [edi + 4]
mov eax, dword [edx + 0x20]
add esp, 4
push 1
push ecx
push ebx
call fcn.10049ad0
add esp, 0xc
mov ebp, eax
jmp 0x1008544a
mov ebp, 7
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov dword [esi + 0x3c], eax
mov eax, dword [esp + 0x10]
push 1
mov dword [esi + 0xc], edx
mov edx, dword [esp + 0x34]
push 0xffffffffffffffff
push eax
or eax, 0xffffffff
mov dword [esi + 0x40], ecx
mov dword [esi + 0x94], edx
call fcn.10049ad0
mov edi, dword [esp + 0x28]
xor ebx, ebx
add esp, 0xc
mov byte [esi + 0x1c], 1
cmp edi, ebx
je 0x10085499
mov eax, dword [edi + 4]
call fcn.100498b0
mov dword [edi + 4], ebx
mov dword [edi + 0xc], ebx
push ebx
mov ebx, esi
call fcn.10067f40
add esp, 4
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x24
ret