Function at 0x502940
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x24], 0
cmp byte [esi + 0x4f], 0
jne 0x50299b
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x50296b
push eax
push esi
call fcn.004eb390
add esp, 8
push 0
push 0x28
push esi
call fcn.004eb400
mov esi, eax
add esp, 0xc
test esi, esi
je 0x50298e
push 0x28
push str.cannot_VACUUM_from_within_a_transaction
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [edi], esi
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xb0], 1
jle 0x5029d3
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x5029b7
push eax
push esi
call fcn.004eb390
add esp, 8
push 0
push 0x2b
push esi
call fcn.004eb400
mov esi, eax
add esp, 0xc
test esi, esi
je 0x50298e
push 0x2b
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x502985
mov ecx, dword [ebp + 0x14]
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x502a4f
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x585b40], 3
je 0x502a36
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x502a03
push eax
push esi
call fcn.004eb390
add esp, 8
push 0
push 0x12
push esi
call fcn.004eb400
add esp, 0xc
test eax, eax
je 0x502a29
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [eax], xmm0
mov cx, word [0x58e27c]
mov word [eax + 0x10], cx
mov dword [edi], eax
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push ecx
call fcn.004b3160
mov ecx, dword [esi + 0x3c]
add esp, 4
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x502a54
mov edx, 0x5989f7
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x18]
push ebx
mov ebx, dword [esi + 0x24]
mov dword [ebp - 0x20], ecx
mov cl, byte [esi + 0x58]
mov edi, dword [esi + 0x64]
mov dword [ebp - 0x28], eax
or eax, 6
mov dword [ebp - 0x2c], ebx
and ebx, 0xfffffffe
mov dword [esi + 0x24], ebx
mov ebx, dword [ebp + 0x10]
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x20]
mov dword [esi + 0x18], eax
and ecx, 0xefffafff
mov eax, dword [esi + 0x10]
or ecx, 0x201
mov dword [esi + 0x20], ecx
shl ebx, 4
mov byte [esi + 0x58], 0
mov dword [ebp + 0x10], ebx
push edx
mov ecx, dword [eax + ebx]
mov ebx, dword [eax + ebx + 4]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + 8]
push str.ATTACH__Q_AS_vacuum_db
mov eax, dword [ebx + 4]
push ecx
mov dword [ebp - 0x30], edi
mov edi, dword [esi + 0x68]
mov eax, dword [eax]
push esi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x10], ebx
mov al, byte [eax + 0xc]
mov byte [ebp + 0xf], al
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x1c], eax
call fcn.004caa80
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x502dc3
mov eax, dword [ebp - 0x1c]
shl eax, 4
add eax, dword [esi + 0x10]
cmp dword [ebp + 0x14], 0
mov dword [ebp - 0x24], eax
mov edi, dword [eax + 4]
mov dword [ebp - 8], edi
je 0x502b84
mov eax, dword [edi + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
movlpd qword [ebp - 0x18], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x502b80
lea edx, [ebp - 0x18]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x502b37
cmp dword [ebp - 0x14], eax
jl 0x502b80
jg 0x502b37
cmp dword [ebp - 0x18], eax
jbe 0x502b80
mov eax, dword [ebp + 8]
mov edi, 1
mov eax, dword [eax]
test eax, eax
je 0x502b4f
push eax
push esi
call fcn.004eb390
add esp, 8
push 0
push 0x1b
push esi
call fcn.004eb400
add esp, 0xc
mov dword [ebp + 0xc], eax
test eax, eax
je 0x502b76
push 0x1b
push str.output_file_already_exists
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp + 0xc]
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x502dc3
or dword [esi + 0x18], 8
mov cl, byte [ebx + 9]
test cl, cl
je 0x502ba0
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x502ba0
push ebx
call fcn.004c3a20
mov cl, byte [ebx + 9]
add esp, 4
mov eax, dword [ebx + 4]
mov edx, dword [eax + 0x20]
sub edx, dword [eax + 0x24]
mov dword [ebp - 0x14], edx
test cl, cl
je 0x502bbf
add dword [ebx + 0xc], 0xffffffff
jne 0x502bbf
push ebx
call fcn.0051fbd0
add esp, 4
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp + 0x10]
mov eax, dword [eax + ecx + 0xc]
push dword [eax + 0x50]
push edi
call fcn.004e7b10
push 0
push ebx
call fcn.004e7d40
push eax
push edi
call fcn.004e7d40
push 0x21
push edi
call fcn.004e7c70
push str.BEGIN
push dword [ebp + 8]
push esi
call fcn.004ca9b0
mov edi, eax
add esp, 0x2c
test edi, edi
jne 0x502dc3
cmp dword [ebp + 0x14], eax
mov ecx, 2
push eax
cmove eax, ecx
push eax
push ebx
call fcn.004e51a0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x502dc3
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
cmp byte [eax + 5], 5
jne 0x502c35
mov dword [esi + 0x5c], edi
mov ecx, dword [ebx + 4]
mov edi, dword [ebp - 8]
push 0
push dword [ebp - 0x14]
push dword [ecx + 0x20]
push edi
call fcn.004e7ba0
add esp, 0x10
test eax, eax
jne 0x502db9
cmp byte [ebp + 0xf], al
jne 0x502c6e
push eax
push dword [ebp - 0x14]
push dword [esi + 0x5c]
push edi
call fcn.004e7ba0
add esp, 0x10
test eax, eax
jne 0x502db9
cmp byte [esi + 0x51], 0
jne 0x502db9
mov al, byte [esi + 0x54]
test al, al
js 0x502c84
movsx eax, al
jmp 0x502c8d
push ebx
call fcn.004e60a0
add esp, 4
push eax
push edi
call fcn.004e7a90
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [ebp + 8]
mov byte [esi + 0xa4], al
push esi
call fcn.004caa80
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x502dc3
push dword [ebp - 0xc]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push dword [ebp + 8]
push esi
call fcn.004caa80
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x502dc3
push dword [ebp - 0xc]
mov byte [esi + 0xa4], 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 dword [ebp + 8]
push esi
call fcn.004caa80
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x502dc3
push dword [ebp - 0xc]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [ebp + 8]
push esi
call fcn.004caa80
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x502dc3
xor ebx, ebx
lea eax, [ebp + 0xc]
push eax
movzx eax, byte [ebx + 0x585c38]
push eax
push dword [ebp - 0x10]
call fcn.004e6110
movzx eax, byte [ebx + 0x585c39]
add eax, dword [ebp + 0xc]
push eax
movzx eax, byte [ebx + 0x585c38]
push eax
push dword [ebp - 8]
call fcn.004e7fe0
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x502dc0
add ebx, 2
cmp ebx, 0xa
jl 0x502d21
mov ebx, dword [ebp - 0x10]
cmp dword [ebp + 0x14], eax
jne 0x502d7b
push dword [ebp - 8]
push ebx
call fcn.004e59a0
mov edi, eax
add esp, 8
test edi, edi
jne 0x502dc3
push dword [ebp - 8]
call fcn.004e57c0
mov edi, eax
add esp, 4
test edi, edi
jne 0x502dc3
cmp dword [ebp + 0x14], eax
jne 0x502dc3
mov edi, dword [ebp - 8]
push edi
call fcn.004e60a0
push eax
push ebx
call fcn.004e7a90
mov eax, dword [edi + 4]
push 1
push dword [ebp - 0x14]
push dword [eax + 0x20]
push ebx
call fcn.004e7ba0
add esp, 0x1c
mov edi, eax
jmp 0x502dc3
mov edi, 7
jmp 0x502dc3
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x30]
push 1
mov dword [esi + 0x64], eax
mov eax, dword [ebp - 0x34]
push 0xffffffffffffffff
mov dword [esi + 0x68], eax
mov al, byte [ebp - 1]
push 0xffffffffffffffff
push ebx
mov byte [esi + 0xa4], 0
mov byte [esi + 0x58], al
call fcn.004e7ba0
mov ebx, dword [ebp - 0x24]
add esp, 0x10
mov byte [esi + 0x4f], 1
test ebx, ebx
je 0x502e21
push dword [ebx + 4]
call fcn.004e5560
add esp, 4
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
push esi
call fcn.00501880
add esp, 4
mov eax, edi
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret