Function at 0x487740
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x64
push ebx
push ebp
mov ebp, edx
xor eax, eax
push esi
push edi
mov edi, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], edi
cmp byte [ebp + 0x3f], al
jne 0x4877e5
mov edx, dword [edi]
test edx, edx
je 0x4877a4
cmp dword [ebp + 0x208], eax
je 0x487775
mov ecx, ebp
call fcn.0041f520
jmp 0x4877a4
cmp edx, dword [ebp + 0x114]
jb 0x48779b
cmp edx, dword [ebp + 0x118]
jae 0x48779b
mov eax, dword [ebp + 0x110]
mov dword [edx], eax
dec dword [ebp + 0xfc]
mov dword [ebp + 0x110], edx
jmp 0x4877a4
push edx
call fcn.0041f4b0
add esp, 4
mov edx, 0x28
mov ecx, ebp
call fcn.0041f7a0
test eax, eax
je 0x4877d6
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [eax], xmm0
movups xmm0, xmmword [0x4d5428]
movups xmmword [eax + 0x10], xmm0
movq xmm0, qword [0x4d5438]
movq qword [eax + 0x20], xmm0
mov dword [edi], eax
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
cmp dword [ebp + 0x94], 1
jle 0x48788f
mov ecx, dword [edi]
test ecx, ecx
je 0x48783a
cmp dword [ebp + 0x208], eax
je 0x48780b
mov edx, ecx
mov ecx, ebp
call fcn.0041f520
jmp 0x48783a
cmp ecx, dword [ebp + 0x114]
jb 0x487831
cmp ecx, dword [ebp + 0x118]
jae 0x487831
mov eax, dword [ebp + 0x110]
mov dword [ecx], eax
dec dword [ebp + 0xfc]
mov dword [ebp + 0x110], ecx
jmp 0x48783a
push ecx
call fcn.0041f4b0
add esp, 4
mov edx, 0x2b
mov ecx, ebp
call fcn.0041f7a0
mov ecx, eax
test ecx, ecx
je 0x487880
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [ecx], xmm0
movups xmm0, xmmword [0x4d5450]
movups xmmword [ecx + 0x10], xmm0
movq xmm0, qword [0x4d5460]
movq qword [ecx + 0x20], xmm0
mov ax, word [0x4d5468]
mov word [ecx + 0x28], ax
mov al, byte [0x4d546a]
mov byte [ecx + 0x2a], al
mov dword [edi], ecx
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
mov eax, dword [ebp + 0x18]
mov edx, edi
mov ecx, dword [ebp + 0x50]
mov dword [esp + 0x30], eax
and eax, 0xfff5ffff
or eax, 0x202800
mov dword [esp + 0x34], ecx
mov ecx, dword [ebp + 0x54]
cmp byte [ebp + 0x40], 2
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
mov dword [esp + 0x38], ecx
mov ecx, dword [ebp + 0xb0]
mov dword [ebp + 0xb0], 0
mov ebx, dword [eax + 4]
mov dword [esp + 0x3c], ecx
mov ecx, str.ATTACH_:memory:_AS_vacuum_db_
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov al, byte [eax + 0xf]
mov byte [esp + 0x13], al
mov eax, str.ATTACH__AS_vacuum_db_
cmove eax, ecx
mov ecx, ebp
push eax
call fcn.004875a0
mov ecx, dword [ebp + 0x14]
add esp, 4
mov edi, eax
mov dword [esp + 0x14], edi
cmp ecx, esi
jle 0x487916
mov eax, dword [ebp + 0x10]
mov edx, ecx
shl edx, 4
add eax, 0xfffffff0
add eax, edx
mov dword [esp + 0x24], eax
test edi, edi
jne 0x487fed
mov eax, dword [ebp + 0x10]
add ecx, ecx
mov esi, dword [eax + ecx*8 - 0xc]
cmp byte [esi + 9], 0
je 0x48793d
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x48793d
mov ecx, esi
call fcn.0042f8f0
xor edx, edx
mov ecx, esi
call fcn.00432db0
test eax, eax
jne 0x487953
xor edx, edx
mov ecx, esi
call fcn.00432fb0
cmp byte [esi + 9], 0
je 0x487966
add dword [esi + 0xc], 0xffffffff
jne 0x487966
mov ecx, esi
call fcn.0042f8d0
mov cl, byte [ebx + 9]
test cl, cl
je 0x487980
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x487980
mov ecx, ebx
call fcn.0042f8f0
mov cl, byte [ebx + 9]
mov eax, dword [ebx + 4]
mov edx, dword [eax + 0x20]
sub edx, dword [eax + 0x24]
mov dword [esp + 0x20], edx
test cl, cl
je 0x48799e
add dword [ebx + 0xc], 0xffffffff
jne 0x48799e
mov ecx, ebx
call fcn.0042f8d0
push 0
lea eax, [esp + 0x20]
mov edx, str.PRAGMA_vacuum_db.synchronousOFF
push eax
push 0
push 0
push 0xffffffffffffffff
mov ecx, ebp
call fcn.00477e90
add esp, 0x14
test eax, eax
je 0x4879e4
push ebp
call fcn.0049c1b0
mov ecx, dword [esp + 0x1c]
add esp, 4
mov edx, ebp
push eax
call fcn.0041f980
add esp, 4
push ebp
call fcn.0049c400
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x487a42
push dword [esp + 0x1c]
call fcn.00442640
mov eax, dword [esp + 0x20]
xor edi, edi
add esp, 4
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], edi
mov ecx, dword [eax + 0x28]
cmp ecx, 0xbdf20da3
je 0x487a11
cmp ecx, 0x519c2973
jne 0x487a22
mov ecx, eax
call fcn.0043f9e0
mov edi, eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
mov ecx, eax
call fcn.0043fe10
test edi, edi
je 0x487a4d
push ebp
call fcn.0049c1b0
mov ecx, dword [esp + 0x1c]
add esp, 4
mov edx, ebp
push eax
call fcn.0041f980
add esp, 4
test edi, edi
jne 0x487fed
push 0
lea eax, [esp + 0x20]
mov edx, str.BEGIN_
push eax
push 0
push 0
push 0xffffffffffffffff
mov ecx, ebp
call fcn.00477e90
add esp, 0x14
test eax, eax
je 0x487a93
push ebp
call fcn.0049c1b0
mov ecx, dword [esp + 0x1c]
add esp, 4
mov edx, ebp
push eax
call fcn.0041f980
add esp, 4
push ebp
call fcn.0049c400
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x487af1
push dword [esp + 0x1c]
call fcn.00442640
mov eax, dword [esp + 0x20]
xor edi, edi
add esp, 4
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], edi
mov ecx, dword [eax + 0x28]
cmp ecx, 0xbdf20da3
je 0x487ac0
cmp ecx, 0x519c2973
jne 0x487ad1
mov ecx, eax
call fcn.0043f9e0
mov edi, eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
mov ecx, eax
call fcn.0043fe10
test edi, edi
je 0x487afc
push ebp
call fcn.0049c1b0
mov ecx, dword [esp + 0x1c]
add esp, 4
mov edx, ebp
push eax
call fcn.0041f980
add esp, 4
test edi, edi
jne 0x487fed
mov edx, 2
mov ecx, ebx
call fcn.00431f90
mov dword [esp + 0x14], eax
test eax, eax
jne 0x487fed
mov edx, dword [ebx + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x487b29
mov dword [ebp + 0x48], 0
mov edx, dword [ebx + 4]
mov edi, dword [esp + 0x20]
mov ecx, esi
mov edx, dword [edx + 0x20]
push 0
push edi
call fcn.00431a10
add esp, 8
test eax, eax
jne 0x487fe5
cmp byte [esp + 0x13], al
jne 0x487b62
mov edx, dword [ebp + 0x48]
mov ecx, esi
push eax
push edi
call fcn.00431a10
add esp, 8
test eax, eax
jne 0x487fe5
cmp byte [ebp + 0x41], 0
jne 0x487fe5
mov al, byte [ebp + 0x43]
test al, al
js 0x487b78
movsx edi, al
jmp 0x487bbf
mov cl, byte [ebx + 9]
test cl, cl
je 0x487b92
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x487b92
mov ecx, ebx
call fcn.0042f8f0
mov cl, byte [ebx + 9]
mov edx, dword [ebx + 4]
cmp byte [edx + 0x11], 0
jne 0x487b9f
xor edi, edi
jmp 0x487bae
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [esp + 0x28], eax
mov edi, eax
test cl, cl
je 0x487bbf
add dword [ebx + 0xc], 0xffffffff
jne 0x487bbf
mov ecx, ebx
call fcn.0042f8d0
mov edx, edi
mov ecx, esi
call fcn.00431b30
mov edi, dword [esp + 0x18]
mov ecx, ebp
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
mov edx, edi
call fcn.00487650
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x487fed
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov edx, edi
mov ecx, ebp
call fcn.00487650
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x487fed
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov edx, edi
mov ecx, ebp
call fcn.00487650
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x487fed
or dword [ebp + 0x18], 0x8000000
mov edx, edi
push 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_coalesce_rootpage_1__0
mov ecx, ebp
call fcn.00487650
and dword [ebp + 0x18], 0xf7ffffff
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x487fed
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov edx, edi
mov ecx, ebp
call fcn.00487650
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x487fed
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov edx, edi
mov ecx, ebp
call fcn.00487650
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x487fed
push eax
lea eax, [esp + 0x20]
mov edx, 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_
push eax
push 0
push 0
push 0xffffffffffffffff
mov ecx, ebp
call fcn.00477e90
add esp, 0x14
test eax, eax
je 0x487ccb
push ebp
call fcn.0049c1b0
add esp, 4
mov edx, ebp
mov ecx, edi
push eax
call fcn.0041f980
add esp, 4
push ebp
call fcn.0049c400
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x487d29
push dword [esp + 0x1c]
call fcn.00442640
mov eax, dword [esp + 0x20]
xor edi, edi
add esp, 4
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], edi
mov ecx, dword [eax + 0x28]
cmp ecx, 0xbdf20da3
je 0x487cf8
cmp ecx, 0x519c2973
jne 0x487d09
mov ecx, eax
call fcn.0043f9e0
mov edi, eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
mov ecx, eax
call fcn.0043fe10
test edi, edi
je 0x487d34
push ebp
call fcn.0049c1b0
mov ecx, dword [esp + 0x1c]
add esp, 4
mov edx, ebp
push eax
call fcn.0041f980
add esp, 4
test edi, edi
jne 0x487fed
xor eax, eax
mov dword [esp + 0x18], eax
nop word [eax + eax]
mov cl, byte [ebx + 9]
movzx edi, byte [eax + 0x4ca124]
mov eax, dword [ebx + 4]
mov dword [esp + 0x28], eax
test cl, cl
je 0x487d6c
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x487d6c
mov ecx, ebx
call fcn.0042f8f0
mov cl, byte [ebx + 9]
mov eax, dword [esp + 0x28]
cmp edi, 0xf
jne 0x487d7b
mov eax, dword [eax]
mov edi, dword [eax + 0x64]
add edi, dword [ebx + 0x14]
jmp 0x487d87
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov edi, dword [eax + edi*4 + 0x24]
bswap edi
test cl, cl
je 0x487d98
add dword [ebx + 0xc], 0xffffffff
jne 0x487d98
mov ecx, ebx
call fcn.0042f8d0
mov ecx, dword [esp + 0x18]
movzx eax, byte [ecx + 0x4ca125]
movzx edx, byte [ecx + 0x4ca124]
add eax, edi
push eax
mov ecx, esi
call fcn.00439580
mov edi, eax
add esp, 4
mov dword [esp + 0x14], edi
test edi, edi
jne 0x487fed
mov eax, dword [esp + 0x18]
add eax, 2
mov dword [esp + 0x18], eax
cmp eax, 0xa
jl 0x487d40
cmp byte [ebx + 9], 0
je 0x487def
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x487def
mov ecx, ebx
call fcn.0042f8f0
cmp byte [esi + 9], 0
je 0x487e05
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x487e05
mov ecx, esi
call fcn.0042f8f0
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov edi, dword [eax + 0x3c]
cmp dword [edi], 0
je 0x487e53
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x2c]
mov eax, dword [eax + 0x20]
cdq
push edx
push eax
push 0
push ecx
call fcn.004befc0
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [edi]
mov dword [esp + 0x30], edx
push 0xb
push edi
mov eax, dword [eax + 0x28]
call eax
mov edi, eax
add esp, 0xc
mov dword [esp + 0x14], edi
cmp edi, 0xc
je 0x487e53
test edi, edi
jne 0x487efc
mov eax, dword [esi]
xorps xmm0, xmm0
mov dword [esp + 0x54], eax
lea eax, [esp + 0x40]
push 0x7fffffff
push eax
mov dword [esp + 0x48], 0
movlpd qword [esp + 0x50], xmm0
movlpd qword [esp + 0x64], xmm0
movlpd qword [esp + 0x6c], xmm0
mov dword [esp + 0x74], 0
mov dword [esp + 0x60], esi
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x58], 1
call fcn.0043b0a0
lea eax, [esp + 0x48]
push eax
call fcn.0043b7b0
mov edi, eax
add esp, 0xc
mov dword [esp + 0x14], edi
test edi, edi
jne 0x487ec2
mov eax, dword [ebx + 4]
mov ecx, 0xfffd
and word [eax + 0x16], cx
jmp 0x487efc
mov eax, dword [esp + 0x44]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
cmp byte [ecx + 0xf], 0
jne 0x487efc
cmp byte [ecx + 0xc], 0
jne 0x487efc
inc dword [ecx + 0x64]
mov eax, dword [ecx + 0x58]
test eax, eax
je 0x487eef
mov dword [eax + 0x10], 1
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x487ee1
mov ecx, dword [ecx + 0xcc]
xor edx, edx
call fcn.00427110
cmp byte [esi + 9], 0
je 0x487f0f
add dword [esi + 0xc], 0xffffffff
jne 0x487f0f
mov ecx, esi
call fcn.0042f8d0
cmp byte [ebx + 9], 0
je 0x487f22
add dword [ebx + 0xc], 0xffffffff
jne 0x487f22
mov ecx, ebx
call fcn.0042f8d0
test edi, edi
jne 0x487fed
cmp byte [esi + 9], 0
je 0x487f40
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x487f40
mov ecx, esi
call fcn.0042f8f0
xor edx, edx
mov ecx, esi
call fcn.00432db0
mov edi, eax
mov dword [esp + 0x14], edi
test edi, edi
jne 0x487f62
xor edx, edx
mov ecx, esi
call fcn.00432fb0
mov edi, eax
mov dword [esp + 0x14], eax
cmp byte [esi + 9], 0
je 0x487f75
add dword [esi + 0xc], 0xffffffff
jne 0x487f75
mov ecx, esi
call fcn.0042f8d0
test edi, edi
jne 0x487fed
mov cl, byte [esi + 9]
test cl, cl
je 0x487f93
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x487f93
mov ecx, esi
call fcn.0042f8f0
mov cl, byte [esi + 9]
mov edx, dword [esi + 4]
cmp byte [edx + 0x11], 0
jne 0x487fa0
xor edi, edi
jmp 0x487faf
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [esp + 0x28], eax
mov edi, eax
test cl, cl
je 0x487fc0
add dword [esi + 0xc], 0xffffffff
jne 0x487fc0
mov ecx, esi
call fcn.0042f8d0
mov edx, edi
mov ecx, ebx
call fcn.00431b30
mov eax, dword [esi + 4]
mov ecx, ebx
push 1
push dword [esp + 0x24]
mov edx, dword [eax + 0x20]
call fcn.00431a10
add esp, 8
mov dword [esp + 0x14], eax
jmp 0x487fed
mov dword [esp + 0x14], 7
mov eax, dword [esp + 0x30]
mov dword [ebp + 0x18], eax
mov eax, dword [esp + 0x34]
mov dword [ebp + 0x50], eax
mov eax, dword [esp + 0x38]
mov dword [ebp + 0x54], eax
mov eax, dword [esp + 0x3c]
mov dword [ebp + 0xb0], eax
cmp byte [ebx + 9], 0
mov eax, dword [ebx + 4]
mov dword [esp + 0x20], eax
je 0x48802d
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x48802d
mov ecx, ebx
call fcn.0042f8f0
mov eax, dword [esp + 0x20]
test byte [eax + 0x16], 2
jne 0x48805c
mov esi, dword [eax + 0x20]
lea edi, [eax + 0x20]
sub esi, dword [eax + 0x24]
mov edx, edi
mov ecx, dword [eax]
push esi
call fcn.0042a410
mov ecx, dword [edi]
add esp, 4
movzx eax, si
sub ecx, eax
mov eax, dword [esp + 0x20]
or word [eax + 0x16], 2
mov dword [eax + 0x24], ecx
cmp byte [ebx + 9], 0
je 0x48806f
add dword [ebx + 0xc], 0xffffffff
jne 0x48806f
mov ecx, ebx
call fcn.0042f8d0
mov ebx, dword [esp + 0x24]
mov byte [ebp + 0x3f], 1
test ebx, ebx
je 0x488091
mov ecx, dword [ebx + 4]
call fcn.00431760
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
mov ecx, ebp
call fcn.0045bed0
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret