Function at 0x14004d5f0
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rbx, qword [rcx]
xor r15d, r15d
mov r12, r8
mov r14, rcx
mov esi, r15d
mov edi, r15d
mov ebp, dword [rbx + 0x2c]
mov dword [rsp + 0x90], ebp
cmp byte [rbx + 0x63], r15b
jne 0x14004dad2
mov rcx, qword [rsp + 0x98]
mov rdx, qword [rcx + 8]
test rdx, rdx
je 0x14004d671
mov r9, qword [rbx + 0x20]
mov ecx, r15d
cmp qword [r9 + 0x18], rdx
lea rax, [r9 + 0x18]
je 0x14004d65c
inc ecx
lea rax, [rax + 0x20]
cmp qword [rax], rdx
jne 0x14004d651
movsxd rax, ecx
mov rcx, qword [rsp + 0x98]
shl rax, 5
mov r9, qword [rax + r9]
jmp 0x14004d675
mov r9, qword [rcx + 0x10]
mov r8, qword [rcx + 0x18]
xor edx, edx
mov rcx, r14
call fcn.1400565e0
mov r13, rax
test rax, rax
je 0x14004daca
mov rdx, qword [rax + 0x70]
mov ebp, 0xffff8000
test rdx, rdx
je 0x14004d6bb
mov rax, qword [r14]
mov ebp, r15d
mov rcx, qword [rax + 0x20]
add rcx, 0x18
cmp qword [rcx], rdx
je 0x14004d6bb
inc ebp
lea rcx, [rcx + 0x20]
cmp qword [rcx], rdx
jne 0x14004d6b0
mov rax, qword [rbx + 0x20]
mov rdx, r12
movsxd rcx, ebp
shl rcx, 5
mov r15, qword [rcx + rax]
mov rcx, rbx
or dword [rbx + 0x2c], 2
mov qword [rsp + 0x40], r15
call fcn.1400575c0
mov rsi, rax
test rax, rax
je 0x14004dac3
mov r8, r15
mov rdx, rax
mov rcx, rbx
call fcn.1400561f0
test rax, rax
jne 0x14004dab1
mov r8, r15
mov rdx, rsi
mov rcx, rbx
call fcn.1400567b0
test rax, rax
jne 0x14004dab1
mov r8, rsi
mov rdx, r13
mov rcx, rbx
call fcn.14005a5b0
test eax, eax
jne 0x14004dab1
mov rdx, r13
mov rcx, r14
call fcn.14004d430
test eax, eax
jne 0x14004dac3
mov r9, rsi
lea r8, str.table
mov rdx, rsi
mov rcx, r14
call fcn.140057870
test eax, eax
jne 0x14004dac3
mov rcx, r14
mov r9, qword [r13]
cmp qword [r13 + 0x18], rdi
je 0x14004d78f
mov r8, r9
lea rdx, str.view__s_may_not_be_altered
call fcn.140007d30
mov rdx, qword [rsp + 0x98]
mov rcx, rbx
call fcn.14005f680
jmp 0x14004dae3
xor r12d, r12d
mov r8, r15
mov qword [rsp + 0x20], r12
lea edx, [r12 + 0x1a]
call fcn.140055540
test eax, eax
jne 0x14004dac3
mov rdx, r13
mov rcx, r14
call fcn.14005b640
test eax, eax
jne 0x14004dac3
cmp dword [r13 + 0x54], edi
je 0x14004d7f0
mov rdi, qword [r13 + 0x60]
test rdi, rdi
je 0x14004d7de
nop
cmp qword [rdi], rbx
je 0x14004d7de
mov rdi, qword [rdi + 0x28]
test rdi, rdi
jne 0x14004d7d0
mov rax, qword [rdi + 0x10]
mov rcx, qword [rax]
cmp qword [rcx + 0x98], r12
cmove rdi, r12
mov r15, qword [r14 + 0x10]
test r15, r15
jne 0x14004d824
cmp qword [r14 + 0xa0], r12
jne 0x14004d810
mov rax, qword [r14]
test byte [rax + 0x5c], 8
jne 0x14004d810
mov byte [r14 + 0x23], 1
mov rcx, r14
call fcn.14002a390
mov r15, rax
test rax, rax
je 0x14004dac3
mov rax, qword [r14 + 0xa0]
mov rcx, r14
test rax, rax
cmovne rcx, rax
mov byte [rcx + 0x21], 1
mov rcx, qword [r13]
mov qword [rsp + 0x48], rcx
mov rax, rcx
cmp byte [rcx], r12b
je 0x14004d88c
nop word [rax + rax]
cmp rax, 0xffffffffffffffff
jae 0x14004d887
movzx ecx, byte [rax]
inc rax
cmp cl, 0xc0
jb 0x14004d87f
movzx ecx, byte [rax]
and cl, 0xc0
cmp cl, 0x80
jne 0x14004d87f
nop dword [rax]
movzx ecx, byte [rax + 1]
inc rax
and cl, 0xc0
cmp cl, 0x80
je 0x14004d870
inc r12d
cmp byte [rax], 0
jne 0x14004d850
mov rcx, qword [rsp + 0x48]
mov r9, qword [rsp + 0x40]
lea rdx, 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
xor eax, eax
mov qword [rsp + 0x38], rcx
cmp ebp, 1
mov r8, r9
sete al
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rcx
mov rcx, r14
mov dword [rsp + 0xa8], eax
call fcn.140055f20
mov rax, qword [rsp + 0x48]
lea rdx, 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__
mov r8, qword [rsp + 0x40]
mov r9, rsi
mov qword [rsp + 0x38], rax
mov rcx, r14
mov dword [rsp + 0x30], r12d
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
call fcn.140055f20
mov r8, qword [rsp + 0x40]
lea rdx, str.sqlite_sequence
mov rcx, rbx
call fcn.1400561f0
test rax, rax
je 0x14004d933
mov rax, qword [r13]
lea rdx, str.UPDATE___w_.sqlite_sequence_set_name___Q_WHERE_name___Q
mov r13, qword [rsp + 0x40]
mov r9, rsi
mov r8, r13
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.140055f20
jmp 0x14004d938
mov r13, qword [rsp + 0x40]
cmp ebp, 1
je 0x14004d96b
mov rax, qword [rsp + 0x48]
lea rdx, 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 qword [rsp + 0x38], rsi
mov r9, rax
mov qword [rsp + 0x30], r13
mov r8, r13
mov qword [rsp + 0x28], rax
mov rcx, r14
mov qword [rsp + 0x20], rsi
call fcn.140055f20
test rdi, rdi
je 0x14004da37
inc dword [r14 + 0x38]
mov r8, rsi
mov r12d, dword [r14 + 0x38]
mov rcx, r15
mov edx, r12d
call fcn.14002a800
movsxd rdx, dword [r15 + 0x90]
cmp dword [r15 + 0x94], edx
jg 0x14004d9b9
xor r9d, r9d
mov dword [rsp + 0x20], 0
mov r8d, r12d
mov edx, 0xaa
mov rcx, r15
call fcn.14002a730
mov edx, eax
jmp 0x14004d9e7
lea rcx, [rdx + rdx*2]
xor r8d, r8d
lea eax, [rdx + 1]
mov dword [r15 + 0x90], eax
mov rax, qword [r15 + 0x88]
mov dword [rax + rcx*8], 0xaa
mov dword [rax + rcx*8 + 4], r12d
mov qword [rax + rcx*8 + 8], r8
mov qword [rax + rcx*8 + 0x10], r8
mov rax, qword [r15]
cmp byte [rax + 0x63], 0
jne 0x14004da37
test edx, edx
jns 0x14004d9fd
mov edx, dword [r15 + 0x90]
dec edx
movsxd rax, edx
lea rdx, [rax + rax*2]
mov rax, qword [r15 + 0x88]
cmp byte [rax + rdx*8 + 1], 0
lea rcx, [rax + rdx*8]
je 0x14004da2c
mov rdx, rcx
mov r9d, 0xfffffff4
mov rcx, r15
mov r8, rdi
call fcn.14002b6f0
jmp 0x14004da37
mov qword [rcx + 0x10], rdi
mov byte [rcx + 1], 0xf4
inc dword [rdi + 0x18]
mov r8d, 1
mov edx, ebp
mov rcx, r14
call fcn.14004d510
mov eax, dword [rsp + 0xa8]
lea rdi, str.after_rename
xor r15d, r15d
mov byte [r14 + 0x1c], 1
mov qword [rsp + 0x30], r15
lea rdx, 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 qword [rsp + 0x28], rdi
mov r9, r13
mov r8, r13
mov dword [rsp + 0x20], eax
mov rcx, r14
call fcn.140055f20
cmp ebp, 1
je 0x14004dac3
mov r9, rdi
mov qword [rsp + 0x20], r15
mov r8, r13
lea rdx, 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 rcx, r14
call fcn.140055f20
mov rdx, qword [rsp + 0x98]
mov rcx, rbx
call fcn.14005f680
jmp 0x14004dae3
mov r8, rsi
lea rdx, str.there_is_already_another_table_or_index_with_this_name:__s
mov rcx, r14
jmp 0x14004d775
mov ebp, dword [rsp + 0x90]
mov rdx, qword [rsp + 0x98]
mov rcx, rbx
call fcn.14005f680
test rsi, rsi
je 0x14004db6d
cmp qword [rbx + 0x2e0], 0
je 0x14004db04
mov rdx, rsi
mov rcx, rbx
call fcn.140004480
mov eax, dword [rsp + 0x90]
mov dword [rbx + 0x2c], eax
jmp 0x14004db70
cmp rsi, qword [rbx + 0x1d0]
jae 0x14004db59
cmp rsi, qword [rbx + 0x1c0]
jb 0x14004db33
mov rax, qword [rbx + 0x1b8]
mov qword [rsi], rax
mov eax, dword [rsp + 0x90]
mov dword [rbx + 0x2c], eax
mov qword [rbx + 0x1b8], rsi
jmp 0x14004db70
cmp rsi, qword [rbx + 0x1c8]
jb 0x14004db59
mov rax, qword [rbx + 0x1a8]
mov qword [rsi], rax
mov eax, dword [rsp + 0x90]
mov dword [rbx + 0x2c], eax
mov qword [rbx + 0x1a8], rsi
jmp 0x14004db70
mov rcx, rsi
call fcn.140004410
mov eax, dword [rsp + 0x90]
mov dword [rbx + 0x2c], eax
jmp 0x14004db70
mov dword [rbx + 0x2c], ebp
mov rbx, qword [rsp + 0xa0]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret