Function at 0x1008b5b0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
push ebx
mov ebx, ecx
mov dword [esp + 0x20], edx
push esi
push edi
xor edi, edi
mov esi, dword [ebx]
mov dword [esp + 0x30], esi
mov dword [esp + 0x24], edi
cmp byte [esi + 0x51], 0
mov eax, dword [esi + 0x18]
mov dword [esp + 0x1c], eax
jne 0x1008ba12
mov eax, edx
mov edx, dword [eax + 8]
test edx, edx
je 0x1008b606
mov eax, dword [esi + 0x10]
xor ecx, ecx
add eax, 0xc
cmp dword [eax], edx
je 0x1008b5fc
lea eax, [eax + 0x10]
inc ecx
cmp dword [eax], edx
jne 0x1008b5f4
mov eax, dword [esi + 0x10]
add ecx, ecx
mov eax, dword [eax + ecx*8]
jmp 0x1008b609
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [esp + 0x2c]
xor edx, edx
mov ecx, ebx
push dword [eax + 0x10]
call fcn.10091ae0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x1008ba12
mov ecx, dword [eax + 0x48]
mov edx, 0xfff0bdc0
mov dword [esp + 0x18], edx
test ecx, ecx
je 0x1008b65c
mov eax, dword [ebx]
xor edx, edx
mov dword [esp + 0x18], edx
mov eax, dword [eax + 0x10]
add eax, 0xc
cmp dword [eax], ecx
je 0x1008b65c
nop dword [eax + eax]
lea eax, [eax + 0x10]
inc edx
cmp dword [eax], ecx
jne 0x1008b650
mov dword [esp + 0x18], edx
mov eax, dword [esi + 0x10]
mov ecx, edx
add ecx, ecx
mov ecx, dword [eax + ecx*8]
or dword [esi + 0x18], 2
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], ecx
test eax, eax
je 0x1008b6d4
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x1008b695
xor edi, edi
mov ecx, edi
call fcn.1004fc00
mov ecx, dword [esp + 0xc]
jmp 0x1008b6d6
xor eax, eax
add ecx, 1
adc eax, eax
push eax
push ecx
mov ecx, esi
call fcn.1004c780
mov edi, eax
add esp, 8
test edi, edi
je 0x1008b6c7
push dword [esp + 0x20]
push dword [esp + 0x30]
push edi
call fcn.1014ffa0
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov byte [eax + edi], 0
mov ecx, edi
call fcn.1004fc00
mov ecx, dword [esp + 0xc]
jmp 0x1008b6d6
xor edi, edi
test edi, edi
je 0x1008ba12
push ecx
mov edx, edi
mov ecx, esi
call fcn.100919a0
add esp, 4
test eax, eax
jne 0x1008ba03
push dword [esp + 0xc]
mov edx, edi
mov ecx, esi
call fcn.10091c90
add esp, 4
test eax, eax
jne 0x1008ba03
mov edx, dword [esp + 0x14]
mov ecx, ebx
call fcn.1008b460
test eax, eax
jne 0x1008ba12
mov edx, edi
mov ecx, ebx
call fcn.10092710
test eax, eax
jne 0x1008ba12
mov ecx, dword [esp + 0x14]
cmp dword [ecx + 0xc], 0
mov eax, dword [ecx]
je 0x1008b746
push eax
push str.view__s_may_not_be_altered
jmp 0x1008ba09
push 0
push eax
push dword [esp + 0x14]
mov edx, 0x1a
mov ecx, ebx
call fcn.100910a0
add esp, 0xc
test eax, eax
jne 0x1008ba12
mov edx, dword [esp + 0x14]
mov ecx, ebx
call fcn.10095240
test eax, eax
jne 0x1008ba12
mov eax, dword [esp + 0x14]
cmp dword [eax + 0x38], 0
je 0x1008b7a4
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x1008b793
cmp dword [ecx], esi
je 0x1008b793
mov ecx, dword [ecx + 0x18]
test ecx, ecx
jne 0x1008b788
mov eax, dword [ecx + 8]
xor edx, edx
mov eax, dword [eax]
cmp dword [eax + 0x4c], edx
cmove ecx, edx
mov dword [esp + 0x24], ecx
mov eax, dword [ebx + 8]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x1008b7d3
cmp dword [ebx + 0x74], eax
jne 0x1008b7c0
mov eax, dword [ebx]
test byte [eax + 0x4c], 8
jne 0x1008b7c0
mov byte [ebx + 0x17], 1
mov ecx, ebx
call fcn.1006da60
mov dword [esp + 0x10], eax
test eax, eax
je 0x1008ba12
mov ecx, dword [ebx + 0x74]
mov edx, ebx
mov eax, dword [esp + 0x14]
test ecx, ecx
cmovne edx, ecx
mov byte [edx + 0x15], 1
xor edx, edx
mov eax, dword [eax]
mov ecx, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], edx
cmp byte [eax], dl
je 0x1008b824
cmp ecx, 0xffffffff
jae 0x1008b820
mov al, byte [ecx]
inc ecx
cmp al, 0xc0
jb 0x1008b81a
mov al, byte [ecx]
and al, 0xc0
cmp al, 0x80
jne 0x1008b81a
nop dword [eax + eax]
mov al, byte [ecx + 1]
inc ecx
and al, 0xc0
cmp al, 0x80
je 0x1008b810
inc edx
cmp byte [ecx], 0
jne 0x1008b7f7
mov dword [esp + 0x2c], edx
mov ecx, dword [esp + 0x20]
xor eax, eax
cmp dword [esp + 0x18], 1
push ecx
sete al
push eax
push edi
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 ebx
call fcn.10091800
add esp, 0x24
push dword [esp + 0x20]
push dword [esp + 0x30]
push edi
push edi
push edi
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 ebx
call fcn.10091800
add esp, 0x24
mov edx, str.sqlite_sequence
mov ecx, esi
push dword [esp + 0xc]
call fcn.100919a0
add esp, 4
test eax, eax
je 0x1008b8a5
mov eax, dword [esp + 0x14]
push dword [eax]
push edi
push dword [esp + 0x14]
push str.UPDATE___w_.sqlite_sequence_set_name___Q_WHERE_name___Q
push ebx
call fcn.10091800
add esp, 0x14
cmp dword [esp + 0x18], 1
je 0x1008b8c8
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x20]
push edi
push eax
push ecx
push edi
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 ebx
call fcn.10091800
add esp, 0x20
cmp dword [esp + 0x24], 0
je 0x1008b9bb
mov ecx, dword [esp + 0x10]
inc dword [ebx + 0x2c]
mov eax, dword [ebx + 0x2c]
mov dword [esp + 0x20], eax
mov edx, dword [ecx + 0x6c]
cmp dword [ecx + 0x70], edx
jg 0x1008b8ff
push 0
push eax
push 0
mov edx, 0x6e
call fcn.1006dd00
add esp, 0xc
mov edx, eax
jmp 0x1008b93a
mov esi, dword [esp + 0x20]
lea eax, [edx + 1]
mov dword [ecx + 0x6c], eax
lea ecx, [edx + edx*4]
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0x68]
mov dword [eax + ecx*4 + 8], esi
mov esi, dword [esp + 0x30]
mov dword [eax + ecx*4], 0x6e
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 + 0x10]
push 0
push edi
call fcn.1006e770
mov ecx, dword [esp + 0x18]
add esp, 8
mov edx, dword [ecx + 0x6c]
cmp dword [ecx + 0x70], edx
jg 0x1008b96e
push 0
push 0
push dword [esp + 0x28]
mov edx, 0xa5
call fcn.1006dd00
add esp, 0xc
mov edx, eax
jmp 0x1008b9a9
mov esi, dword [esp + 0x20]
lea eax, [edx + 1]
mov dword [ecx + 0x6c], eax
lea ecx, [edx + edx*4]
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0x68]
mov dword [eax + ecx*4 + 4], esi
mov esi, dword [esp + 0x30]
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 + 0x10]
push 0xfffffffffffffff4
push dword [esp + 0x28]
call fcn.1006e770
add esp, 8
mov edx, dword [esp + 0x18]
mov ecx, ebx
call fcn.1008b510
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 ebx
call fcn.10091800
add esp, 0x18
cmp dword [esp + 0x18], 1
je 0x1008ba12
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 ebx
call fcn.10091800
add esp, 0x10
jmp 0x1008ba12
push edi
push str.there_is_already_another_table_or_index_with_this_name:__s
push ebx
call fcn.1004fb10
add esp, 0xc
mov edx, dword [esp + 0x28]
mov ecx, esi
call fcn.100987e0
test edi, edi
je 0x1008ba76
cmp dword [esi + 0x1e8], 0
je 0x1008ba41
mov edx, edi
mov ecx, esi
call fcn.1004c3d0
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x18], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, dword [esi + 0x138]
jb 0x1008ba6d
cmp edi, dword [esi + 0x13c]
jae 0x1008ba6d
mov eax, dword [esi + 0x134]
mov dword [edi], eax
mov eax, dword [esp + 0x1c]
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.1004c320
add esp, 4
mov eax, dword [esp + 0x1c]
pop edi
mov dword [esi + 0x18], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret