Function at 0x485110
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
push esi
push edi
mov edi, edx
xor eax, eax
mov ebx, ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], ebx
cmp byte [edi + 0x3f], al
jne 0x4851a2
mov edx, dword [ebx]
test edx, edx
je 0x485170
cmp dword [edi + 0x208], eax
je 0x485141
mov ecx, edi
call fcn.0041ffa0
jmp 0x485170
cmp edx, dword [edi + 0x114]
jb 0x485167
cmp edx, dword [edi + 0x118]
jae 0x485167
mov eax, dword [edi + 0x110]
mov dword [edx], eax
dec dword [edi + 0xfc]
mov dword [edi + 0x110], edx
jmp 0x485170
push edx
call fcn.0041ff30
add esp, 4
push 0
push 0x28
mov ecx, edi
call fcn.00420260
mov esi, eax
add esp, 8
test esi, esi
je 0x485194
push 0x28
push str.cannot_VACUUM_from_within_a_transaction
push esi
call fcn.004e69f0
add esp, 0xc
mov dword [ebx], esi
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x94], 1
jle 0x485213
mov ecx, dword [ebx]
test ecx, ecx
je 0x4851f3
cmp dword [edi + 0x208], eax
je 0x4851c4
mov edx, ecx
mov ecx, edi
call fcn.0041ffa0
jmp 0x4851f3
cmp ecx, dword [edi + 0x114]
jb 0x4851ea
cmp ecx, dword [edi + 0x118]
jae 0x4851ea
mov eax, dword [edi + 0x110]
mov dword [ecx], eax
dec dword [edi + 0xfc]
mov dword [edi + 0x110], ecx
jmp 0x4851f3
push ecx
call fcn.0041ff30
add esp, 4
push 0
push 0x2b
mov ecx, edi
call fcn.00420260
mov esi, eax
add esp, 8
test esi, esi
je 0x485194
push 0x2b
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x48518b
mov eax, dword [edi + 0x18]
mov edx, ebx
mov ecx, dword [edi + 0x50]
mov dword [ebp - 0x24], eax
and eax, 0xfff5ffff
or eax, 0x202800
mov dword [ebp - 0x28], ecx
mov ecx, dword [edi + 0x54]
cmp byte [edi + 0x40], 2
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x10]
mov esi, dword [edi + 0x14]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [edi + 0xb0]
mov dword [edi + 0xb0], 0
mov eax, dword [eax + 4]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x30], ecx
mov ecx, str.ATTACH_:memory:_AS_vacuum_db_
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov al, byte [eax + 0xf]
mov byte [ebp - 1], al
mov eax, str.ATTACH__AS_vacuum_db_
cmove eax, ecx
mov ecx, edi
push eax
call fcn.00484ea0
mov ecx, dword [edi + 0x14]
add esp, 4
mov ebx, eax
cmp ecx, esi
jle 0x485293
mov eax, dword [edi + 0x10]
mov edx, ecx
shl edx, 4
add eax, 0xfffffff0
add eax, edx
mov dword [ebp - 0x14], eax
test ebx, ebx
jne 0x485649
mov eax, dword [edi + 0x10]
add ecx, ecx
mov eax, dword [eax + ecx*8 - 0xc]
mov ecx, eax
mov dword [ebp - 0xc], eax
call fcn.00434b40
mov esi, dword [ebp - 0x10]
mov cl, byte [esi + 9]
test cl, cl
je 0x4852ca
inc dword [esi + 0xc]
cmp byte [esi + 0xa], bl
jne 0x4852ca
mov ecx, esi
call fcn.00431180
mov cl, byte [esi + 9]
mov eax, dword [esi + 4]
mov edx, dword [eax + 0x20]
sub edx, dword [eax + 0x24]
mov dword [ebp - 0x10], edx
test cl, cl
je 0x4852e7
add dword [esi + 0xc], 0xffffffff
jne 0x4852e7
mov ecx, esi
call fcn.00431140
mov edx, dword [ebp - 8]
mov ecx, edi
push str.PRAGMA_vacuum_db.synchronousOFF
call fcn.00484ea0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x48564c
mov edx, dword [ebp - 8]
mov ecx, edi
push str.BEGIN_
call fcn.00484ea0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x48564c
lea edx, [eax + 2]
mov ecx, esi
call fcn.00433bc0
mov ebx, eax
test ebx, ebx
jne 0x48564c
mov edx, dword [esi + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x485344
mov dword [edi + 0x48], ebx
mov edx, dword [esi + 4]
mov ebx, dword [ebp - 0xc]
mov ecx, ebx
mov edx, dword [edx + 0x20]
push 0
push dword [ebp - 0x10]
call fcn.004335a0
add esp, 8
test eax, eax
jne 0x485642
cmp byte [ebp - 1], al
jne 0x48537f
mov edx, dword [edi + 0x48]
mov ecx, ebx
push eax
push dword [ebp - 0x10]
call fcn.004335a0
add esp, 8
test eax, eax
jne 0x485642
cmp byte [edi + 0x41], 0
jne 0x485642
mov al, byte [edi + 0x43]
test al, al
js 0x485395
movsx eax, al
jmp 0x48539c
mov ecx, esi
call fcn.004337b0
mov edx, eax
mov ecx, ebx
call fcn.00433730
mov edx, dword [ebp - 8]
mov ecx, edi
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
call fcn.00484f50
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x48564c
mov edx, dword [ebp - 8]
mov ecx, edi
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.00484f50
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x48564c
mov edx, dword [ebp - 8]
mov ecx, edi
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.00484f50
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x48564c
mov edx, dword [ebp - 8]
mov ecx, edi
or dword [edi + 0x18], 0x8000000
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
call fcn.00484f50
and dword [edi + 0x18], 0xf7ffffff
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x48564c
mov edx, dword [ebp - 8]
mov ecx, edi
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.00484f50
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x48564c
mov edx, dword [ebp - 8]
mov ecx, edi
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.00484f50
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x48564c
mov edx, dword [ebp - 8]
mov ecx, edi
push 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.00484ea0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x48564c
mov dword [ebp - 8], ebx
nop word [eax + eax]
movzx edx, byte [ebx + 0x524754]
lea eax, [ebp - 0x1c]
push eax
mov ecx, esi
call fcn.0043a840
movzx eax, byte [ebx + 0x524755]
add esp, 4
add eax, dword [ebp - 0x1c]
movzx edx, byte [ebx + 0x524754]
mov ecx, dword [ebp - 0xc]
push eax
call fcn.0043a8a0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x48564c
mov ebx, dword [ebp - 8]
add ebx, 2
mov dword [ebp - 8], ebx
cmp ebx, 0xa
jl 0x485480
cmp byte [esi + 9], al
je 0x4854de
inc dword [esi + 0xc]
cmp byte [esi + 0xa], al
jne 0x4854de
mov ecx, esi
call fcn.00431180
mov ecx, dword [ebp - 0xc]
cmp byte [ecx + 9], 0
je 0x4854f8
inc dword [ecx + 0xc]
cmp byte [ecx + 0xa], 0
jne 0x4854f8
call fcn.00431180
mov ecx, dword [ebp - 0xc]
mov eax, dword [esi + 4]
mov eax, dword [eax]
mov ebx, dword [eax + 0x3c]
cmp dword [ebx], 0
je 0x48553f
mov eax, dword [ecx + 4]
mov ecx, dword [eax + 0x2c]
mov eax, dword [eax + 0x20]
cdq
push edx
push eax
push 0
push ecx
call fcn.0049fb00
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebx]
mov dword [ebp - 0x1c], edx
push 0xb
push ebx
mov eax, dword [eax + 0x28]
call eax
mov ebx, eax
add esp, 0xc
cmp ebx, 0xc
je 0x48553f
test ebx, ebx
jne 0x4855db
mov ecx, dword [ebp - 0xc]
xorps xmm0, xmm0
push closesocket
mov dword [ebp - 0x60], 0
movlpd qword [ebp - 0x58], xmm0
mov eax, dword [ecx]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x60]
push eax
movlpd qword [ebp - 0x44], xmm0
movlpd qword [ebp - 0x3c], xmm0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x50], 1
call fcn.0043bf70
lea eax, [ebp - 0x60]
push eax
call fcn.0043c660
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4855a2
mov eax, dword [esi + 4]
mov ecx, 0xfffd
and word [eax + 0x16], cx
jmp 0x4855db
mov eax, dword [ebp - 0x5c]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
cmp byte [ecx + 0xf], 0
jne 0x4855db
cmp byte [ecx + 0xc], 0
jne 0x4855db
inc dword [ecx + 0x64]
mov eax, dword [ecx + 0x58]
test eax, eax
je 0x4855ce
mov dword [eax + 0x10], 1
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x4855c0
mov ecx, dword [ecx + 0xcc]
xor edx, edx
call fcn.00428720
mov eax, dword [ebp - 0xc]
cmp byte [eax + 9], 0
je 0x4855f1
add dword [eax + 0xc], 0xffffffff
jne 0x4855f1
mov ecx, eax
call fcn.00431140
cmp byte [esi + 9], 0
je 0x485604
add dword [esi + 0xc], 0xffffffff
jne 0x485604
mov ecx, esi
call fcn.00431140
test ebx, ebx
jne 0x48564c
mov ecx, dword [ebp - 0xc]
call fcn.00434b40
mov ebx, eax
test ebx, ebx
jne 0x48564c
mov ebx, dword [ebp - 0xc]
mov ecx, ebx
call fcn.004337b0
mov edx, eax
mov ecx, esi
call fcn.00433730
mov eax, dword [ebx + 4]
mov ecx, esi
push 1
push dword [ebp - 0x10]
mov edx, dword [eax + 0x20]
call fcn.004335a0
add esp, 8
mov ebx, eax
jmp 0x48564c
mov ebx, 7
jmp 0x48564c
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x24]
or edx, 0xffffffff
mov dword [edi + 0x18], eax
mov ecx, esi
mov eax, dword [ebp - 0x28]
mov dword [edi + 0x50], eax
mov eax, dword [ebp - 0x2c]
mov dword [edi + 0x54], eax
mov eax, dword [ebp - 0x30]
push 1
push 0xffffffffffffffff
mov dword [edi + 0xb0], eax
call fcn.004335a0
mov esi, dword [ebp - 0x14]
add esp, 8
mov byte [edi + 0x3f], 1
test esi, esi
je 0x485699
mov ecx, dword [esi + 4]
call fcn.00433250
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov ecx, edi
call fcn.0045c560
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret