Function at 0x50c820
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov esi, ecx
xor edi, edi
cmp byte [esi + 0x43], 0
jne 0x50c84f
push str.cannot_VACUUM_from_within_a_transaction
mov edi, dword [esp + 0x40]
call fcn.004b0100
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
cmp dword [esi + 0x9c], 1
jle 0x50c85f
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x50c836
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x58]
mov dword [esp + 0x2c], ecx
and ecx, 0xffffaf7f
or ecx, 0x6000201
mov dword [esi + 0x18], ecx
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x30], edx
mov edx, dword [esi + 0x5c]
shl eax, 4
mov dword [esp + 0x34], edx
mov dl, byte [esi + 0x4c]
mov byte [esi + 0x4c], 0
mov ebx, dword [eax + ecx + 4]
mov dword [esp + 0x24], eax
add eax, ecx
mov byte [esp + 0x13], dl
mov edx, dword [eax]
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
mov eax, dword [esi + 0x14]
mov dword [esp + 0x14], edx
movzx edx, byte [ecx + 0xd]
mov ecx, dword [esp + 0x3c]
push str.ATTACHAS_vacuum_db
push ecx
push esi
mov dword [esp + 0x34], edx
mov dword [esp + 0x28], eax
call fcn.0050c640
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x50cb31
mov eax, dword [esp + 0x1c]
shl eax, 4
add eax, dword [esi + 0x10]
mov edi, dword [eax + 4]
mov dword [esp + 0x18], eax
mov eax, edi
call fcn.004c4470
mov eax, ebx
call fcn.004c3220
mov edx, dword [esi + 0x10]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [edx + eax + 0xc]
mov edx, dword [ecx + 0x50]
push edx
mov eax, edi
call fcn.004c3020
add esp, 4
push ebp
mov eax, ebx
call fcn.004c3070
add esp, 4
push eax
mov eax, edi
call fcn.004c3070
add esp, 4
push 0x21
mov eax, edi
call fcn.004c3110
mov eax, dword [esp + 0x40]
add esp, 4
push str.BEGIN
push eax
push esi
call fcn.0050c640
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x50cb2d
push 2
push ebx
call fcn.004c3740
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x50cb2d
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
cmp byte [edx + 5], 5
jne 0x50c973
mov dword [esi + 0x50], eax
mov eax, dword [ebx + 4]
mov eax, dword [eax + 0x20]
mov ebp, dword [esp + 0x20]
push 0
push ebp
push eax
mov eax, edi
call fcn.004c3160
add esp, 0xc
test eax, eax
jne 0x50cb28
cmp dword [esp + 0x28], eax
jne 0x50c9b1
mov ecx, dword [esi + 0x50]
push eax
push ebp
push ecx
mov eax, edi
call fcn.004c3160
add esp, 0xc
test eax, eax
jne 0x50cb28
cmp byte [esi + 0x45], 0
jne 0x50cb28
mov al, byte [esi + 0x48]
test al, al
jl 0x50c9c7
movsx eax, al
jmp 0x50c9ce
mov eax, ebx
call fcn.004c33a0
push eax
mov eax, edi
call fcn.004c3320
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x40]
mov dl, byte [esp + 0x20]
add esp, 4
push eax
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push ecx
mov eax, esi
mov byte [esi + 0x98], dl
call fcn.0050c700
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x50cb2d
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x3c]
push edx
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex_AND_length_sql__10
push eax
mov eax, esi
call fcn.0050c700
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x50cb2d
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x3c]
push ecx
mov byte [esi + 0x98], al
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
push edx
mov eax, esi
call fcn.0050c700
and dword [esi + 0x18], 0xfbffffff
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x50cb2d
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x3c]
push eax
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push ecx
mov eax, esi
call fcn.0050c700
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x50cb2d
mov dword [esp + 0x14], ebp
jmp 0x50ca94
mov ebp, dword [esp + 0x14]
movzx eax, byte [ebp + 0x59e218]
lea edx, [esp + 0x28]
push edx
push eax
mov eax, ebx
call fcn.004c9650
movzx ecx, byte [ebp + 0x59e219]
add ecx, dword [esp + 0x30]
movzx edx, byte [ebp + 0x59e218]
push ecx
push edx
mov eax, edi
call fcn.004c96b0
mov ebp, eax
add esp, 0x10
test ebp, ebp
jne 0x50cb2d
mov eax, dword [esp + 0x14]
add eax, 2
cmp eax, 0xa
mov dword [esp + 0x14], eax
jl 0x50ca90
push ebx
mov eax, edi
call fcn.004cbb60
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x50cb2d
mov eax, edi
call fcn.004c4470
mov ebp, eax
test ebp, ebp
jne 0x50cb2d
mov eax, edi
call fcn.004c33a0
push eax
mov eax, ebx
call fcn.004c3320
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0x24]
mov eax, dword [eax + 0x20]
add esp, 4
push 1
push ecx
push eax
mov eax, ebx
call fcn.004c3160
add esp, 0xc
mov ebp, eax
jmp 0x50cb2d
mov ebp, 7
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
push 1
mov dword [esi + 0x18], edx
mov dl, byte [esp + 0x17]
mov dword [esi + 0x58], eax
push 0xffffffffffffffff
push 0xffffffffffffffff
mov eax, ebx
mov byte [esi + 0x98], 0
mov dword [esi + 0x5c], ecx
mov byte [esi + 0x4c], dl
call fcn.004c3160
xor ebx, ebx
add esp, 0xc
mov byte [esi + 0x43], 1
cmp edi, ebx
je 0x50cb7c
mov eax, dword [edi + 4]
call fcn.004c2f30
mov dword [edi + 4], ebx
mov dword [edi + 0xc], ebx
mov eax, esi
call fcn.004ea8a0
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x28
ret