Function at 0x4581b0
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
push ebx
push esi
mov esi, ecx
mov eax, edx
push edi
xor ebx, ebx
mov dword [esp + 0x10], eax
xor edi, edi
mov dword [esp + 0x30], esi
mov edx, dword [esi]
mov dword [esp + 0x18], edx
cmp byte [edx + 0x57], bl
jne 0x45864e
mov ecx, eax
mov edx, dword [ecx + 8]
test edx, edx
je 0x45820f
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov eax, dword [eax + 0x10]
mov dword [esp + 0x2c], eax
add eax, 0xc
cmp dword [eax], edx
je 0x458200
lea eax, [eax + 0x10]
inc ecx
cmp dword [eax], edx
jne 0x4581f8
mov eax, dword [esp + 0x2c]
add ecx, ecx
mov eax, dword [eax + ecx*8]
mov ecx, dword [esp + 0x10]
jmp 0x458212
mov eax, dword [ecx + 0xc]
push eax
push dword [ecx + 0x10]
xor edx, edx
mov ecx, esi
call fcn.00460440
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x45864a
mov ecx, dword [eax + 0x3c]
mov edx, 0xffff8000
mov dword [esp + 0x24], edx
test ecx, ecx
je 0x45825c
mov eax, dword [esi]
xor edx, edx
mov dword [esp + 0x24], edx
mov eax, dword [eax + 0x10]
add eax, 0xc
cmp dword [eax], ecx
je 0x45825c
lea eax, [eax + 0x10]
inc edx
cmp dword [eax], ecx
jne 0x458250
mov dword [esp + 0x24], edx
mov ecx, edx
mov edx, dword [esp + 0x18]
add ecx, ecx
mov eax, dword [edx + 0x10]
mov eax, dword [eax + ecx*8]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x458648
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], eax
test eax, eax
je 0x4582be
xor eax, eax
add ecx, 1
adc eax, eax
push eax
push ecx
mov ecx, edx
call fcn.00413890
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4582c0
push dword [esp + 0x28]
push dword [esp + 0x30]
push ebx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x34]
add esp, 0xc
mov byte [eax + ebx], 0
jmp 0x4582c0
xor ebx, ebx
mov ecx, ebx
call fcn.004178f0
test ebx, ebx
je 0x45864a
push dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov edx, ebx
call fcn.00460060
add esp, 4
test eax, eax
jne 0x458637
push dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov edx, ebx
call fcn.00460600
add esp, 4
test eax, eax
jne 0x458637
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push ebx
call fcn.00463760
add esp, 4
test eax, eax
jne 0x458637
mov edx, dword [esp + 0x1c]
mov ecx, esi
call fcn.00458020
test eax, eax
jne 0x45864a
push ebx
push str.table
mov edx, ebx
mov ecx, esi
call fcn.00461000
add esp, 8
test eax, eax
jne 0x45864a
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x2b], 2
mov ecx, dword [eax]
jne 0x458369
push ecx
push str.view__s_may_not_be_altered
push esi
call fcn.00417860
add esp, 0xc
jmp 0x45864a
push 0
push ecx
push dword [esp + 0x1c]
mov edx, 0x1a
mov ecx, esi
call fcn.0045f5c0
add esp, 0xc
test eax, eax
jne 0x45864a
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x2b], 1
je 0x458397
cmp word [eax + 0x22], di
jg 0x4583ac
mov edx, eax
mov ecx, esi
call fcn.004645a0
test eax, eax
jne 0x45864a
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x2b], 1
jne 0x4583d8
mov edi, dword [eax + 0x34]
test edi, edi
je 0x4583cb
mov eax, dword [esp + 0x18]
nop dword [eax]
cmp dword [edi], eax
je 0x4583cb
mov edi, dword [edi + 0x18]
test edi, edi
jne 0x4583c0
mov eax, dword [edi + 8]
xor ecx, ecx
mov eax, dword [eax]
cmp dword [eax + 0x4c], ecx
cmove edi, ecx
mov edx, dword [esi + 8]
mov dword [esp + 0x20], edx
test edx, edx
jne 0x458407
cmp dword [esi + 0x78], edx
jne 0x4583f4
mov eax, dword [esi]
test byte [eax + 0x50], 8
jne 0x4583f4
mov byte [esi + 0x17], 1
mov ecx, esi
call fcn.00436f50
mov dword [esp + 0x20], eax
test eax, eax
je 0x45864a
mov eax, dword [esi + 0x78]
mov ecx, esi
test eax, eax
cmovne ecx, eax
mov eax, dword [esp + 0x1c]
xor edx, edx
mov dword [esp + 0x2c], edx
mov byte [ecx + 0x15], 1
mov eax, dword [eax]
mov ecx, eax
mov dword [esp + 0x28], eax
cmp byte [eax], dl
je 0x458458
nop dword [eax + eax]
cmp ecx, 0xffffffff
jae 0x458454
mov al, byte [ecx]
inc ecx
cmp al, 0xc0
jb 0x45844e
mov al, byte [ecx]
and al, 0xc0
cmp al, 0x80
jne 0x45844e
mov al, byte [ecx + 1]
inc ecx
and al, 0xc0
cmp al, 0x80
je 0x458444
inc edx
cmp byte [ecx], 0
jne 0x458430
mov dword [esp + 0x2c], edx
mov ecx, dword [esp + 0x28]
xor eax, eax
cmp dword [esp + 0x24], 1
push ecx
sete al
push eax
push ebx
push ecx
mov dword [esp + 0x44], 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 esi
call fcn.0045ff40
push dword [esp + 0x48]
mov eax, ebx
push dword [esp + 0x50]
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 esi
call fcn.0045ff40
mov ecx, dword [esp + 0x58]
add esp, 0x40
mov edx, str.sqlite_sequence
push dword [esp + 0x14]
call fcn.00460060
add esp, 4
test eax, eax
je 0x4584d0
mov eax, dword [esp + 0x1c]
push dword [eax]
push ebx
push dword [esp + 0x1c]
push str.UPDATE___w_.sqlite_sequence_set_name___Q_WHERE_name___Q
push esi
call fcn.0045ff40
add esp, 0x14
cmp dword [esp + 0x24], 1
je 0x4584f5
mov eax, dword [esp + 0x14]
mov ecx, ebx
mov edx, dword [esp + 0x28]
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__after_rename__0__THEN__Q_ELSE_tbl_name_END_WHERE_type_IN__view__trigger_
push esi
call fcn.0045ff40
add esp, 0x20
test edi, edi
je 0x4585e2
mov ecx, dword [esp + 0x20]
inc dword [esi + 0x2c]
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x28], eax
mov edx, dword [ecx + 0x6c]
cmp dword [ecx + 0x70], edx
jg 0x458529
push 0
push eax
push 0
mov edx, 0x75
call fcn.00437140
add esp, 0xc
mov edx, eax
jmp 0x458564
mov esi, dword [esp + 0x28]
lea eax, [edx + 1]
mov dword [ecx + 0x6c], eax
lea ecx, [edx + edx*4]
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x68]
mov dword [eax + ecx*4 + 8], esi
mov esi, dword [esp + 0x30]
mov dword [eax + ecx*4], 0x75
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 + 0x20]
push 0
push ebx
call fcn.00437de0
mov ecx, dword [esp + 0x28]
add esp, 8
mov edx, dword [ecx + 0x6c]
cmp dword [ecx + 0x70], edx
jg 0x458598
push 0
push 0
push dword [esp + 0x30]
mov edx, 0xb0
call fcn.00437140
add esp, 0xc
mov edx, eax
jmp 0x4585d3
mov esi, dword [esp + 0x28]
lea eax, [edx + 1]
mov dword [ecx + 0x6c], eax
lea ecx, [edx + edx*4]
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x68]
mov dword [eax + ecx*4 + 4], esi
mov esi, dword [esp + 0x30]
mov dword [eax + ecx*4], 0xb0
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 + 0x20]
push 0xfffffffffffffff5
push edi
call fcn.00437de0
add esp, 8
mov edx, dword [esp + 0x24]
mov ecx, esi
push 1
call fcn.00458100
mov eax, dword [esp + 0x18]
add esp, 4
mov byte [esi + 0x10], 1
push 0
push str.after_rename
push dword [esp + 0x3c]
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___Q___d_NULL
push esi
call fcn.0045ff40
add esp, 0x1c
cmp dword [esp + 0x24], 1
je 0x45864a
push 0
push str.after_rename
push dword [esp + 0x1c]
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___Q___d_NULL
push esi
call fcn.0045ff40
add esp, 0x14
jmp 0x45864a
push ebx
push str.there_is_already_another_table_or_index_with_this_name:__s
push esi
call fcn.00417860
add esp, 0xc
jmp 0x45864a
xor ebx, ebx
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov edx, eax
mov ecx, esi
call fcn.00467c40
push ebx
push esi
call fcn.00413560
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret