Function at 0x66649920
Capabilities:
Reference sql statements

Disassembly:
push ebp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x5c
mov esi, dword [eax]
mov dword [esp + 0x2c], edx
mov eax, dword [esi + 0x18]
cmp byte [esi + 0x53], 0
mov dword [esp + 0x30], eax
je 0x66649958
mov eax, esi
call fcn.66597680
mov eax, dword [esp + 0x30]
mov dword [esi + 0x18], eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x2c]
mov ebp, ecx
xor edx, edx
lea ecx, [eax + 8]
mov eax, edi
call fcn.6662d9b0
mov dword [esp + 0x34], eax
test eax, eax
je 0x66649a10
mov eax, dword [esp + 0x34]
mov edx, dword [eax + 0x48]
mov eax, dword [edi]
test edx, edx
je 0x66649d57
mov ecx, dword [eax + 0x10]
cmp edx, dword [ecx + 0xc]
je 0x66649aa0
xor ebx, ebx
lea esi, [esi]
add ebx, 1
mov eax, ebx
shl eax, 4
cmp edx, dword [ecx + eax + 0xc]
jne 0x66649998
mov edx, dword [esi + 0x10]
mov eax, dword [edx + eax]
or dword [esi + 0x18], 2
mov edx, ebp
mov dword [esp + 0x38], eax
mov eax, esi
call fcn.66593510
mov ebp, eax
test eax, eax
je 0x66649a10
mov ecx, dword [esp + 0x38]
mov edx, eax
mov eax, esi
call fcn.665aabb0
test eax, eax
je 0x66649a20
mov dword [esp + 8], ebp
mov dword [esp + 4], str.there_is_already_another_table_or_index_with_this_name:__s
mov dword [esp], edi
call fcn.665b3dd0
mov edx, dword [esp + 0x2c]
mov eax, esi
call fcn.66597680
mov eax, esi
mov edx, ebp
call fcn.665926e0
mov eax, dword [esp + 0x30]
mov dword [esi + 0x18], eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x2c]
jmp 0x6664993c
mov ecx, dword [esp + 0x38]
mov edx, ebp
mov eax, esi
call fcn.6659af50
test eax, eax
jne 0x666499d4
mov eax, dword [esp + 0x34]
mov edx, dword [eax + 0x38]
test edx, edx
je 0x66649a4b
mov edx, eax
mov ecx, ebp
mov eax, esi
call fcn.66593e60
test eax, eax
jne 0x666499d4
mov edx, dword [esp + 0x34]
mov eax, edi
call fcn.665b9310
test eax, eax
jne 0x666499e8
mov dword [esp], ebp
mov ecx, str.table
mov edx, ebp
mov eax, edi
call fcn.665beec0
test eax, eax
jne 0x666499e8
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 0xc]
mov eax, dword [eax]
mov dword [esp + 0x3c], ecx
test ecx, ecx
je 0x66649aa9
mov dword [esp + 8], eax
mov dword [esp + 4], str.view__s_may_not_be_altered
mov dword [esp], edi
call fcn.665b3dd0
jmp 0x666499e8
xor eax, eax
xor ebx, ebx
jmp 0x666499a6
mov dword [esp], eax
mov ecx, dword [esp + 0x38]
mov edx, 0x1a
mov eax, edi
mov dword [esp + 4], 0
call fcn.665b6330
test eax, eax
jne 0x666499e8
mov edx, dword [esp + 0x34]
mov eax, edi
call fcn.665d6bb0
mov dword [esp + 0x44], eax
test eax, eax
jne 0x666499e8
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 0x38]
test ecx, ecx
je 0x66649b21
mov eax, dword [eax + 0x40]
test eax, eax
jne 0x66649b0b
jmp 0x66649d85
mov eax, dword [eax + 0x18]
test eax, eax
je 0x6667a009
cmp esi, dword [eax]
jne 0x66649b00
mov edx, dword [eax + 8]
mov edx, dword [edx]
cmp dword [edx + 0x4c], 0
cmove eax, dword [esp + 0x3c]
mov dword [esp + 0x3c], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x48], eax
test eax, eax
je 0x66649d66
mov eax, dword [edi + 0x74]
test eax, eax
cmove eax, edi
mov byte [eax + 0x15], 1
mov eax, dword [esp + 0x34]
mov eax, dword [eax]
movzx edx, byte [eax]
mov dword [esp + 0x40], eax
test dl, dl
je 0x66649b82
cmp eax, 0xffffffff
je 0x66649b82
mov dword [esp + 0x4c], ebx
mov ebx, dword [esp + 0x44]
lea ecx, [eax + 1]
movzx eax, byte [eax + 1]
cmp dl, 0xbf
mov edx, eax
ja 0x66649d37
mov eax, ecx
add ebx, 1
test dl, dl
je 0x66649b7a
cmp eax, 0xffffffff
jne 0x66649b5a
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0x4c]
xor eax, eax
cmp ebx, 1
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x14], ebp
sete al
mov dword [esp + 4], str.UPDATE___w_.sqlite_master_SET_sql__sqlite_rename_table__Q__type__name__sql___Q___Q___d__WHERE__type_index_OR_tbl_name_Q_COLLATE_nocase_AND___name_NOT_LIKE_sqliteX____ESCAPE_X
mov dword [esp + 0x4c], eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.66645940
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
mov dword [esp], edi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 8], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], ebp
mov dword [esp + 4], str.UPDATE__Q.sqlite_master_SET_tbl_name___Q__name__CASE_WHEN_typetable_THEN__Q_WHEN_name_LIKE_sqliteX_autoindex___ESCAPE_X______AND_typeindex_THEN_sqlite_autoindex____Q__substr_name__d18__ELSE_name_END_WHERE_tbl_name_Q_COLLATE_nocapicosecond.dxf
call fcn.66645940
mov ecx, dword [esp + 0x38]
mov edx, str.sqlite_sequence
mov eax, esi
call fcn.665aabb0
test eax, eax
je 0x66649c2c
mov edx, dword [esp + 0x34]
mov eax, dword [edx]
mov dword [esp + 0xc], ebp
mov dword [esp + 4], str.UPDATE___w_.sqlite_sequence_set_name___Q_WHERE_name___Q
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
mov dword [esp], edi
mov dword [esp + 8], eax
call fcn.66645940
cmp ebx, 1
je 0x66649c61
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], str.UPDATE_sqlite_temp_schema_SET_sql__sqlite_rename_table__Q__type__name__sql___Q___Q__1___tbl_name__CASE_WHEN_tbl_name_Q_COLLATE_nocase_AND___sqlite_rename_test__Q__sql__type__name__1__after_rename_0__THEN__Q_ELSE_tbl_name_END_WHERE_type_IN__view__trigger_
mov dword [esp], edi
call fcn.66645940
mov edx, dword [esp + 0x3c]
test edx, edx
je 0x66649cb4
mov edx, dword [edi + 0x2c]
mov eax, dword [esp + 0x48]
mov ecx, ebp
add edx, 1
mov dword [edi + 0x2c], edx
mov dword [esp + 0x34], edx
call fcn.665a0a80
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x34]
mov dword [esp + 0xc], 0xfffffff4
mov dword [esp + 4], 0
mov eax, dword [esp + 0x48]
mov dword [esp + 8], ecx
mov ecx, edx
mov edx, 0xaa
mov dword [esp], 0
call fcn.665a0890
mov eax, dword [edi + 8]
test eax, eax
je 0x66649cc9
mov ecx, 1
mov edx, ebx
mov eax, edi
call fcn.665a10d0
mov eax, dword [esp + 0x4c]
mov byte [edi + 0x10], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x14], str.after_rename
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], str.SELECT_1_FROM___w_.sqlite_master_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name___d___Q___Q_NULL
mov dword [esp], edi
call fcn.66645940
cmp ebx, 1
je 0x666499e8
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], str.after_rename
mov dword [esp + 8], eax
mov dword [esp + 4], str.SELECT_1_FROM_temp.sqlite_master_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name__1___Q___Q_NULL
mov dword [esp], edi
call fcn.66645940
jmp 0x666499e8
and edx, 0xffffffc0
cmp dl, 0x80
jne 0x66649d7e
mov eax, ecx
movzx edx, byte [eax + 1]
add eax, 1
mov ecx, edx
and ecx, 0xffffffc0
cmp cl, 0x80
je 0x66649d41
jmp 0x66649b6e
mov eax, 0xfff80000
mov ebx, 0xffff8000
jmp 0x666499a6
mov eax, edi
call fcn.6659feb0
mov dword [esp + 0x48], eax
test eax, eax
jne 0x66649b30
jmp 0x666499e8
mov edx, eax
jmp 0x66649b6c
jmp 0x6667a009
mov eax, dword [8]
ud2