Function at 0x5f48a0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x1c], edx
push edi
xor ebx, ebx
mov dword [esp + 0x28], esi
xor edi, edi
mov edx, dword [esi]
mov dword [esp + 0x18], edx
mov eax, dword [edx + 0x18]
mov dword [esp + 0x30], eax
cmp byte [edx + 0x51], bl
jne 0x5f4d32
mov ecx, dword [esp + 0x20]
cmp dword [ecx + 8], ebx
je 0x5f490b
mov eax, dword [edx + 0x10]
xor ecx, ecx
mov esi, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
add eax, 0xc
mov edx, dword [esi + 8]
mov esi, dword [esp + 0x28]
cmp dword [eax], edx
je 0x5f48fc
lea eax, [eax + 0x10]
inc ecx
cmp dword [eax], edx
jne 0x5f48f4
mov eax, dword [esp + 0x2c]
add ecx, ecx
mov eax, dword [eax + ecx*8]
mov ecx, dword [esp + 0x20]
jmp 0x5f490e
mov eax, dword [ecx + 0xc]
push eax
push dword [ecx + 0x10]
xor edx, edx
mov ecx, esi
call fcn.005faf20
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x5f4d32
mov ecx, dword [eax + 0x48]
mov edx, 0xfff0bdc0
mov dword [esp + 0x1c], edx
test ecx, ecx
je 0x5f495c
mov eax, dword [esi]
xor edx, edx
mov dword [esp + 0x1c], edx
mov eax, dword [eax + 0x10]
add eax, 0xc
cmp dword [eax], ecx
je 0x5f495c
nop dword [eax]
lea eax, [eax + 0x10]
inc edx
cmp dword [eax], ecx
jne 0x5f4950
mov dword [esp + 0x1c], edx
mov ecx, edx
mov edx, dword [esp + 0x18]
add ecx, ecx
mov eax, dword [edx + 0x10]
mov ecx, dword [eax + ecx*8]
or dword [edx + 0x18], 2
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], ecx
test eax, eax
je 0x5f49d8
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x5f4999
xor ebx, ebx
mov ecx, ebx
call fcn.005b9170
mov ecx, dword [esp + 0xc]
jmp 0x5f49da
xor eax, eax
add ecx, 1
adc eax, eax
push eax
push ecx
mov ecx, edx
call fcn.005b5d30
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x5f49cb
push dword [esp + 0x24]
push dword [esp + 0x30]
push ebx
call fcn.006e8ef0
mov eax, dword [esp + 0x30]
add esp, 0xc
mov byte [eax + ebx], 0
mov ecx, ebx
call fcn.005b9170
mov ecx, dword [esp + 0xc]
jmp 0x5f49da
xor ebx, ebx
test ebx, ebx
je 0x5f4d32
push ecx
mov ecx, dword [esp + 0x1c]
mov edx, ebx
call fcn.005fad30
add esp, 4
test eax, eax
jne 0x5f4d23
push dword [esp + 0xc]
mov ecx, dword [esp + 0x1c]
mov edx, ebx
call fcn.005fb0d0
add esp, 4
test eax, eax
jne 0x5f4d23
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push ebx
call fcn.005fd890
add esp, 4
test eax, eax
jne 0x5f4d23
mov edx, dword [esp + 0x10]
mov ecx, esi
call fcn.005f4740
test eax, eax
jne 0x5f4d32
push ebx
push str.table
mov edx, ebx
mov ecx, esi
call fcn.005fb7e0
add esp, 8
test eax, eax
jne 0x5f4d32
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
cmp dword [ecx + 0xc], edi
je 0x5f4a6f
push eax
push str.view__s_may_not_be_altered
jmp 0x5f4d29
push 0
push eax
push dword [esp + 0x14]
mov edx, 0x1a
mov ecx, esi
call fcn.005fa470
add esp, 0xc
test eax, eax
jne 0x5f4d32
mov edx, dword [esp + 0x10]
mov ecx, esi
call fcn.005fe590
test eax, eax
jne 0x5f4d32
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x38], edi
je 0x5f4acc
mov edi, dword [eax + 0x40]
test edi, edi
je 0x5f4abf
mov eax, dword [esp + 0x18]
cmp dword [edi], eax
je 0x5f4abf
mov edi, dword [edi + 0x18]
test edi, edi
jne 0x5f4ab4
mov eax, dword [edi + 8]
xor ecx, ecx
mov eax, dword [eax]
cmp dword [eax + 0x4c], ecx
cmove edi, ecx
mov eax, dword [esi + 8]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x5f4afb
cmp dword [esi + 0x74], eax
jne 0x5f4ae8
mov eax, dword [esi]
test byte [eax + 0x4c], 8
jne 0x5f4ae8
mov byte [esi + 0x17], 1
mov ecx, esi
call fcn.005d64e0
mov dword [esp + 0x14], eax
test eax, eax
je 0x5f4d32
mov ecx, dword [esi + 0x74]
mov edx, esi
mov eax, dword [esp + 0x10]
test ecx, ecx
cmovne edx, ecx
mov byte [edx + 0x15], 1
xor edx, edx
mov eax, dword [eax]
mov ecx, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], edx
cmp byte [eax], dl
je 0x5f4b48
nop
cmp ecx, 0xffffffff
jae 0x5f4b44
mov al, byte [ecx]
inc ecx
cmp al, 0xc0
jb 0x5f4b3e
mov al, byte [ecx]
and al, 0xc0
cmp al, 0x80
jne 0x5f4b3e
mov al, byte [ecx + 1]
inc ecx
and al, 0xc0
cmp al, 0x80
je 0x5f4b34
inc edx
cmp byte [ecx], 0
jne 0x5f4b20
mov dword [esp + 0x2c], edx
mov ecx, dword [esp + 0x24]
xor eax, eax
cmp dword [esp + 0x1c], 1
push ecx
sete al
push eax
push ebx
push ecx
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x1c]
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 esi
call fcn.005fac10
add esp, 0x24
push dword [esp + 0x24]
push dword [esp + 0x30]
push ebx
push ebx
push ebx
push str.sqlite_master
push dword [esp + 0x24]
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 esi
call fcn.005fac10
mov ecx, dword [esp + 0x3c]
add esp, 0x24
mov edx, str.sqlite_sequence
push dword [esp + 0xc]
call fcn.005fad30
add esp, 4
test eax, eax
je 0x5f4bcb
mov eax, dword [esp + 0x10]
push dword [eax]
push ebx
push dword [esp + 0x14]
push str.UPDATE___w_.sqlite_sequence_set_name___Q_WHERE_name___Q
push esi
call fcn.005fac10
add esp, 0x14
cmp dword [esp + 0x1c], 1
je 0x5f4bee
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x24]
push ebx
push eax
push ecx
push ebx
push ecx
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 esi
call fcn.005fac10
add esp, 0x20
test edi, edi
je 0x5f4cdb
mov ecx, dword [esp + 0x14]
inc dword [esi + 0x2c]
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x24], eax
mov edx, dword [ecx + 0x6c]
cmp dword [ecx + 0x70], edx
jg 0x5f4c22
push 0
push eax
push 0
mov edx, 0x73
call fcn.005d6700
add esp, 0xc
mov edx, eax
jmp 0x5f4c5d
mov esi, dword [esp + 0x24]
lea eax, [edx + 1]
mov dword [ecx + 0x6c], eax
lea ecx, [edx + edx*4]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x68]
mov dword [eax + ecx*4 + 8], esi
mov esi, dword [esp + 0x28]
mov dword [eax + ecx*4], 0x73
mov dword [eax + ecx*4 + 4], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esp + 0x14]
push 0
push ebx
call fcn.005d7190
mov ecx, dword [esp + 0x1c]
add esp, 8
mov edx, dword [ecx + 0x6c]
cmp dword [ecx + 0x70], edx
jg 0x5f4c91
push 0
push 0
push dword [esp + 0x2c]
mov edx, 0xa7
call fcn.005d6700
add esp, 0xc
mov edx, eax
jmp 0x5f4ccc
mov esi, dword [esp + 0x24]
lea eax, [edx + 1]
mov dword [ecx + 0x6c], eax
lea ecx, [edx + edx*4]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x68]
mov dword [eax + ecx*4 + 4], esi
mov esi, dword [esp + 0x28]
mov dword [eax + ecx*4], 0xa7
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 + 0x14]
push 0xfffffffffffffff4
push edi
call fcn.005d7190
add esp, 8
mov edx, dword [esp + 0x1c]
mov ecx, esi
call fcn.005f4800
push dword [esp + 0x34]
mov eax, dword [esp + 0x10]
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 esi
call fcn.005fac10
add esp, 0x18
cmp dword [esp + 0x1c], 1
je 0x5f4d32
push dword [esp + 0xc]
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 esi
call fcn.005fac10
add esp, 0x10
jmp 0x5f4d32
push ebx
push str.there_is_already_another_table_or_index_with_this_name:__s
push esi
call fcn.005b9110
add esp, 0xc
mov esi, dword [esp + 0x18]
mov ecx, esi
mov edx, dword [esp + 0x20]
call fcn.00601ab0
test ebx, ebx
je 0x5f4d4e
mov edx, ebx
mov ecx, esi
call fcn.005b5a40
mov eax, dword [esp + 0x30]
pop edi
mov dword [esi + 0x18], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret