Function at 0x49b590
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 + 0x1c], edx
mov dword [esp + 0x10], ecx
mov eax, dword [esi + 0x18]
mov dword [esp + 0x38], esi
mov dword [esp + 0x24], eax
cmp byte [esi + 0x51], bl
jne 0x49ba60
mov eax, dword [edx + 8]
mov dword [esp + 0x30], eax
test eax, eax
je 0x49b5f2
mov eax, dword [esi + 0x10]
xor edx, edx
mov ecx, dword [esp + 0x30]
add eax, 0xc
cmp dword [eax], ecx
je 0x49b5e8
nop dword [eax]
lea eax, [eax + 0x10]
inc edx
cmp dword [eax], ecx
jne 0x49b5e0
mov eax, dword [esi + 0x10]
add edx, edx
mov edx, dword [eax + edx*8]
jmp 0x49b5f5
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 + 0x1c]
push edx
xor edx, edx
push dword [eax + 0x10]
call fcn.004a28c0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
je 0x49ba60
mov ecx, dword [eax + 0x48]
mov edi, 0xffff8000
mov edx, dword [esp + 0x30]
mov dword [esp + 0x20], edi
test ecx, ecx
je 0x49b65f
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 0x49b65f
nop word [eax + eax]
lea eax, [eax + 0x10]
inc edi
cmp dword [eax], ecx
jne 0x49b650
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 0x49ba47
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
test eax, eax
je 0x49b6bd
xor eax, eax
add ecx, 1
adc eax, eax
push eax
push ecx
mov ecx, esi
call fcn.004581b0
mov edi, eax
add esp, 8
test edi, edi
je 0x49b6bf
push dword [esp + 0x30]
push dword [esp + 0x38]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x3c]
add esp, 0xc
mov byte [eax + edi], bl
jmp 0x49b6bf
xor edi, edi
mov ecx, edi
call fcn.0045b950
test edi, edi
je 0x49ba60
push dword [esp + 0x14]
mov edx, edi
mov ecx, esi
call fcn.004a24e0
add esp, 4
test eax, eax
jne 0x49ba3c
push dword [esp + 0x14]
mov edx, edi
mov ecx, esi
call fcn.004a2a70
add esp, 4
test eax, eax
jne 0x49ba3c
mov edx, dword [esp + 0x18]
mov ecx, esi
push edi
call fcn.004a5d10
add esp, 4
test eax, eax
jne 0x49ba3c
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
call fcn.0049b430
test eax, eax
jne 0x49ba60
mov ecx, dword [esp + 0x10]
mov edx, edi
push edi
push str.table
call fcn.004a36f0
add esp, 8
test eax, eax
jne 0x49ba60
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
cmp dword [ecx + 0xc], ebx
je 0x49b773
push eax
push str.view__s_may_not_be_altered
push dword [esp + 0x18]
call fcn.0045b840
mov edx, dword [esp + 0x28]
add esp, 0xc
mov ecx, esi
call fcn.004aa9b0
jmp 0x49ba6f
mov ecx, dword [esp + 0x10]
mov edx, 0x1a
push 0
push eax
push dword [esp + 0x1c]
call fcn.004a1b40
add esp, 0xc
test eax, eax
jne 0x49ba60
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
call fcn.004a6d70
test eax, eax
jne 0x49ba60
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x38], ebx
je 0x49b7d0
mov ebx, dword [eax + 0x40]
test ebx, ebx
je 0x49b7c3
cmp dword [ebx], esi
je 0x49b7c3
mov ebx, dword [ebx + 0x18]
test ebx, ebx
jne 0x49b7b8
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 + 0x28], eax
test eax, eax
je 0x49b7e8
lea ecx, [edx + 0x74]
mov dword [esp + 0x34], eax
jmp 0x49b820
cmp dword [edx + 0x74], 0
lea eax, [edx + 0x74]
mov dword [esp + 0x30], eax
jne 0x49b801
mov eax, dword [edx]
test byte [eax + 0x4c], 8
jne 0x49b801
mov byte [edx + 0x17], 1
mov ecx, edx
call fcn.0047a090
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], eax
test eax, eax
je 0x49ba60
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 + 0x18]
mov byte [ecx + 0x15], 1
mov eax, dword [eax]
mov ecx, eax
mov dword [esp + 0x2c], eax
cmp byte [eax], 0
je 0x49b873
cmp ecx, 0xffffffff
jae 0x49b873
mov al, byte [ecx]
inc ecx
cmp al, 0xc0
jb 0x49b86a
mov al, byte [ecx]
and al, 0xc0
cmp al, 0x80
jne 0x49b86a
nop word [eax + eax]
mov al, byte [ecx + 1]
inc ecx
and al, 0xc0
cmp al, 0x80
je 0x49b860
inc dword [esp + 0x30]
cmp byte [ecx], 0
jne 0x49b846
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 eax
push 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
push edx
call fcn.004a22f0
push dword [esp + 0x4c]
mov eax, edi
push dword [esp + 0x54]
push eax
push eax
push eax
push dword [esp + 0x48]
push 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_nocase_AND__typetable_OR_typeindex_OR_typetrigger__
push dword [esp + 0x4c]
call fcn.004a22f0
add esp, 0x40
mov edx, str.sqlite_sequence
mov ecx, esi
push dword [esp + 0x14]
call fcn.004a24e0
add esp, 4
test eax, eax
je 0x49b8f1
mov eax, dword [esp + 0x18]
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.004a22f0
add esp, 0x14
cmp dword [esp + 0x20], 1
je 0x49b919
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_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__THEN__Q_ELSE_tbl_name_END_WHERE_type_IN__view__trigger_
push dword [esp + 0x2c]
call fcn.004a22f0
add esp, 0x20
test ebx, ebx
je 0x49b9ef
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
push edi
inc dword [eax + 0x2c]
mov eax, dword [eax + 0x2c]
mov edx, eax
mov dword [esp + 0x34], eax
call fcn.0047a3b0
mov ecx, dword [esp + 0x2c]
add esp, 4
mov edx, dword [ecx + 0x6c]
cmp dword [ecx + 0x70], edx
jg 0x49b96e
push 0
push 0
push dword [esp + 0x38]
mov edx, 0xa7
call fcn.0047a300
mov edx, eax
add esp, 0xc
mov eax, dword [esp + 0x34]
add eax, 0x68
mov dword [esp + 0x34], eax
jmp 0x49b9ab
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], 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 + 0x28]
mov eax, dword [ecx]
cmp byte [eax + 0x51], 0
jne 0x49b9ef
test edx, edx
jns 0x49b9bf
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 0x49b9e5
mov ecx, dword [esp + 0x28]
mov edx, eax
push 0xfffffffffffffff4
push ebx
call fcn.0047b0d0
add esp, 8
jmp 0x49b9ef
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.0049b4f0
push dword [esp + 0x3c]
mov eax, dword [esp + 0x18]
push eax
push eax
push 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_NULL
push ebx
call fcn.004a22f0
add esp, 0x14
cmp dword [esp + 0x20], 1
je 0x49ba60
push dword [esp + 0x14]
push 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_NULL
push ebx
call fcn.004a22f0
mov edx, dword [esp + 0x28]
add esp, 0xc
mov ecx, esi
call fcn.004aa9b0
jmp 0x49ba6f
push edi
push str.there_is_already_another_table_or_index_with_this_name:__s
jmp 0x49b757
mov edx, dword [esp + 0x1c]
mov ecx, esi
call fcn.004aa9b0
mov eax, dword [esp + 0x24]
mov dword [esi + 0x18], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x1c]
mov ecx, esi
call fcn.004aa9b0
test edi, edi
je 0x49bae8
cmp dword [esi + 0x1f8], 0
je 0x49ba8f
mov edx, edi
mov ecx, esi
call fcn.00457e30
mov eax, dword [esp + 0x24]
mov dword [esi + 0x18], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, dword [esi + 0x14c]
jae 0x49badf
cmp edi, dword [esi + 0x144]
jb 0x49babb
mov eax, dword [esi + 0x140]
mov dword [edi], eax
mov eax, dword [esp + 0x24]
mov dword [esi + 0x140], edi
mov dword [esi + 0x18], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, dword [esi + 0x148]
jb 0x49badf
mov eax, dword [esi + 0x138]
mov dword [edi], eax
mov eax, dword [esp + 0x24]
mov dword [esi + 0x138], edi
mov dword [esi + 0x18], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.00457dc0
add esp, 4
mov eax, dword [esp + 0x24]
pop edi
mov dword [esi + 0x18], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret