Function at 0x4651f0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push ebx
push esi
mov esi, dword [ecx]
xor ebx, ebx
push edi
xor edi, edi
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], ecx
mov eax, dword [esi + 0x18]
mov dword [esp + 0x38], esi
mov dword [esp + 0x28], eax
cmp byte [esi + 0x51], bl
jne 0x4656bb
mov eax, dword [edx + 8]
mov dword [esp + 0x30], eax
test eax, eax
je 0x465252
mov eax, dword [esi + 0x10]
xor edx, edx
mov ecx, dword [esp + 0x30]
add eax, 0xc
cmp dword [eax], ecx
je 0x465248
nop dword [eax]
lea eax, [eax + 0x10]
inc edx
cmp dword [eax], ecx
jne 0x465240
mov eax, dword [esi + 0x10]
add edx, edx
mov edx, dword [eax + edx*8]
jmp 0x465255
mov edx, dword [edx + 0xc]
mov ecx, dword [esp + 0x10]
mov eax, esi
add eax, 0x10
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x18]
push edx
xor edx, edx
push dword [eax + 0x10]
call fcn.0046c300
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x4656bb
mov ecx, dword [eax + 0x48]
mov edi, 0xfff0bdc0
mov edx, dword [esp + 0x30]
mov dword [esp + 0x20], edi
test ecx, ecx
je 0x4652bf
mov eax, dword [esp + 0x10]
xor edi, edi
mov dword [esp + 0x20], edi
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
add eax, 0xc
cmp dword [eax], ecx
je 0x4652bf
nop word [eax + eax]
lea eax, [eax + 0x10]
inc edi
cmp dword [eax], ecx
jne 0x4652b0
mov dword [esp + 0x20], edi
lea edx, [esi + 0x10]
mov eax, dword [edx]
add edi, edi
mov eax, dword [eax + edi*8]
or dword [esi + 0x18], 2
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x4656a2
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
test eax, eax
jne 0x4652ee
xor edi, edi
jmp 0x46531f
xor eax, eax
add ecx, 1
adc eax, eax
push eax
push ecx
mov ecx, esi
call fcn.0041ca80
mov edi, eax
add esp, 8
test edi, edi
je 0x46531f
push dword [esp + 0x30]
push dword [esp + 0x38]
push edi
call fcn.004f0e30
mov eax, dword [esp + 0x3c]
add esp, 0xc
mov byte [eax + edi], bl
mov ecx, edi
call fcn.004206c0
test edi, edi
je 0x4656bb
push dword [esp + 0x14]
mov edx, edi
mov ecx, esi
call fcn.0046c1d0
add esp, 4
test eax, eax
jne 0x465697
push dword [esp + 0x14]
mov edx, edi
mov ecx, esi
call fcn.0046c500
add esp, 4
test eax, eax
jne 0x465697
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
call fcn.00465060
test eax, eax
jne 0x4656bb
mov ecx, dword [esp + 0x10]
mov edx, edi
push edi
push str.table
call fcn.0046d1a0
add esp, 8
test eax, eax
jne 0x4656bb
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
cmp dword [ecx + 0xc], ebx
je 0x4653bc
push eax
push str.view__s_may_not_be_altered
push dword [esp + 0x18]
call fcn.004205b0
mov edx, dword [esp + 0x24]
add esp, 0xc
mov ecx, esi
call fcn.00473d20
jmp 0x4656ca
mov ecx, dword [esp + 0x10]
mov edx, 0x1a
push 0
push eax
push dword [esp + 0x1c]
call fcn.0046b840
add esp, 0xc
test eax, eax
jne 0x4656bb
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
call fcn.00470310
test eax, eax
jne 0x4656bb
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x38], ebx
je 0x465419
mov ebx, dword [eax + 0x40]
test ebx, ebx
je 0x46540c
cmp dword [ebx], esi
je 0x46540c
mov ebx, dword [ebx + 0x18]
test ebx, ebx
jne 0x465401
mov eax, dword [ebx + 8]
xor ecx, ecx
mov eax, dword [eax]
cmp dword [eax + 0x4c], ecx
cmove ebx, ecx
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 8]
mov dword [esp + 0x24], eax
test eax, eax
je 0x465431
lea ecx, [edx + 0x74]
mov dword [esp + 0x34], eax
jmp 0x465469
cmp dword [edx + 0x74], 0
lea eax, [edx + 0x74]
mov dword [esp + 0x30], eax
jne 0x46544a
mov eax, dword [edx]
test byte [eax + 0x4c], 8
jne 0x46544a
mov byte [edx + 0x17], 1
mov ecx, edx
call fcn.00442f90
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
test eax, eax
je 0x4656bb
mov edx, dword [esp + 0x10]
mov eax, dword [ecx]
mov ecx, edx
test eax, eax
mov dword [esp + 0x30], 0
cmovne ecx, eax
mov eax, dword [esp + 0x1c]
mov byte [ecx + 0x15], 1
mov eax, dword [eax]
mov ecx, eax
mov dword [esp + 0x2c], eax
cmp byte [eax], 0
je 0x4654b7
nop
cmp ecx, 0xffffffff
jae 0x4654b7
mov al, byte [ecx]
inc ecx
cmp al, 0xc0
jb 0x4654ae
mov al, byte [ecx]
and al, 0xc0
cmp al, 0x80
jne 0x4654ae
mov al, byte [ecx + 1]
inc ecx
and al, 0xc0
cmp al, 0x80
je 0x4654a4
inc dword [esp + 0x30]
cmp byte [ecx], 0
jne 0x465490
push dword [esp + 0x2c]
xor eax, eax
cmp dword [esp + 0x24], 1
sete al
push eax
push edi
push dword [esp + 0x38]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x24]
push eax
push str.sqlite_master
push eax
push str.UPDATE___w_._s_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
push edx
call fcn.0046c030
add esp, 0x24
mov eax, edi
push dword [esp + 0x2c]
push dword [esp + 0x34]
push eax
push eax
push eax
push str.sqlite_master
push dword [esp + 0x2c]
push str.UPDATE__Q._s_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_nocase_AND__typetable_OR_typeindex_OR_typetrigger__
push dword [esp + 0x30]
call fcn.0046c030
add esp, 0x24
mov edx, str.sqlite_sequence
mov ecx, esi
push dword [esp + 0x14]
call fcn.0046c1d0
add esp, 4
test eax, eax
je 0x465542
mov eax, dword [esp + 0x1c]
push dword [eax]
push edi
push dword [esp + 0x1c]
push str.UPDATE___w_.sqlite_sequence_set_name___Q_WHERE_name___Q
push dword [esp + 0x20]
call fcn.0046c030
add esp, 0x14
cmp dword [esp + 0x20], 1
je 0x46556a
mov eax, dword [esp + 0x14]
mov ecx, edi
mov edx, dword [esp + 0x2c]
push ecx
push eax
push edx
push ecx
push edx
push eax
push str.UPDATE_sqlite_temp_master_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__THEN__Q_ELSE_tbl_name_END_WHERE_type_IN__view__trigger_
push dword [esp + 0x2c]
call fcn.0046c030
add esp, 0x20
test ebx, ebx
je 0x465640
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
push edi
inc dword [eax + 0x2c]
mov eax, dword [eax + 0x2c]
mov edx, eax
mov dword [esp + 0x34], eax
call fcn.004435b0
mov ecx, dword [esp + 0x28]
add esp, 4
mov edx, dword [ecx + 0x6c]
cmp dword [ecx + 0x70], edx
jg 0x4655bf
push 0
push 0
push dword [esp + 0x38]
mov edx, 0xa5
call fcn.00443360
mov edx, eax
add esp, 0xc
mov eax, dword [esp + 0x34]
add eax, 0x68
mov dword [esp + 0x34], eax
jmp 0x4655fc
mov esi, dword [esp + 0x30]
lea eax, [edx + 1]
mov dword [ecx + 0x6c], eax
lea eax, [ecx + 0x68]
mov dword [esp + 0x34], eax
lea ecx, [edx + edx*4]
mov eax, dword [eax]
mov dword [eax + ecx*4 + 4], esi
mov esi, dword [esp + 0x38]
mov dword [eax + ecx*4], 0xa5
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx]
cmp byte [eax + 0x51], 0
jne 0x465640
test edx, edx
jns 0x465610
mov edx, dword [ecx + 0x6c]
dec edx
mov eax, dword [esp + 0x34]
lea ecx, [edx + edx*4]
mov eax, dword [eax]
cmp byte [eax + ecx*4 + 1], 0
lea eax, [eax + ecx*4]
je 0x465636
mov ecx, dword [esp + 0x24]
mov edx, eax
push 0xfffffffffffffff4
push ebx
call fcn.00444540
add esp, 8
jmp 0x465640
mov dword [eax + 0x10], ebx
mov byte [eax + 1], 0xf4
inc dword [ebx + 0xc]
mov ebx, dword [esp + 0x10]
mov ecx, ebx
mov edx, dword [esp + 0x20]
call fcn.00465150
push dword [esp + 0x3c]
mov eax, dword [esp + 0x18]
push eax
push str.sqlite_master
push eax
push str.SELECT_1_FROM___w_._s_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name___d_NULL
push ebx
call fcn.0046c030
add esp, 0x18
cmp dword [esp + 0x20], 1
je 0x4656bb
push dword [esp + 0x14]
push str.sqlite_master
push str.SELECT_1_FROM_temp._s_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name__1_NULL
push ebx
call fcn.0046c030
mov edx, dword [esp + 0x28]
add esp, 0x10
mov ecx, esi
call fcn.00473d20
jmp 0x4656ca
push edi
push str.there_is_already_another_table_or_index_with_this_name:__s
jmp 0x4653a0
mov edx, dword [esp + 0x18]
mov ecx, esi
call fcn.00473d20
mov eax, dword [esp + 0x28]
mov dword [esi + 0x18], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x18]
mov ecx, esi
call fcn.00473d20
test edi, edi
je 0x46571f
cmp dword [esi + 0x1e8], 0
je 0x4656ea
mov edx, edi
mov ecx, esi
call fcn.0041c6a0
mov eax, dword [esp + 0x28]
mov dword [esi + 0x18], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, dword [esi + 0x138]
jb 0x465716
cmp edi, dword [esi + 0x13c]
jae 0x465716
mov eax, dword [esi + 0x134]
mov dword [edi], eax
mov eax, dword [esp + 0x28]
mov dword [esi + 0x134], edi
mov dword [esi + 0x18], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.0041c630
add esp, 4
mov eax, dword [esp + 0x28]
pop edi
mov dword [esi + 0x18], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret