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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], edx
xor esi, esi
mov dword [esp + 0x10], 0
mov ebx, dword [edi]
mov dword [esp + 0x38], ebx
cmp byte [ebx + 0x57], 0
jne 0x4a5d2e
mov ecx, edx
mov edx, dword [ecx + 8]
test edx, edx
je 0x4a5883
mov eax, dword [ebx + 0x10]
xor ecx, ecx
add eax, 0xc
cmp dword [eax], edx
je 0x4a5879
lea eax, [eax + 0x10]
inc ecx
cmp dword [eax], edx
jne 0x4a5871
mov eax, dword [ebx + 0x10]
add ecx, ecx
mov ecx, dword [eax + ecx*8]
jmp 0x4a5886
mov ecx, dword [ecx + 0xc]
mov edx, 0x10
mov eax, ebx
add eax, edx
xor edx, edx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
push ecx
mov ecx, edi
push dword [eax + 0x10]
call fcn.004adea0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
je 0x4a5d2e
mov ecx, dword [eax + 0x3c]
mov edx, 0xffff8000
mov dword [esp + 0x28], edx
test ecx, ecx
je 0x4a58f3
mov eax, dword [edi]
xor edx, edx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x24], edx
mov edx, esi
mov eax, dword [eax + 0x10]
add eax, 0xc
cmp dword [eax], ecx
je 0x4a58f3
nop
lea eax, [eax + 0x10]
inc edx
cmp dword [eax], ecx
jne 0x4a58e0
lea ecx, [ebx + 0x10]
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x24]
add edx, edx
mov eax, dword [eax]
mov eax, dword [eax + edx*8]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x4a5d1c
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x34], eax
test eax, eax
je 0x4a5958
xor eax, eax
add ecx, 1
adc eax, eax
push eax
push ecx
mov ecx, ebx
call fcn.004600a0
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x4a595e
push dword [esp + 0x2c]
push dword [esp + 0x38]
push eax
call fcn.00533a40
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov ecx, dword [esp + 0x2c]
mov byte [ecx + eax], 0
jmp 0x4a595e
xor eax, eax
mov dword [esp + 0x10], eax
mov ecx, eax
call fcn.00463430
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a5d2e
push dword [esp + 0x14]
mov edx, eax
mov ecx, ebx
call fcn.004adae0
add esp, 4
test eax, eax
jne 0x4a5d0e
push dword [esp + 0x14]
mov edx, dword [esp + 0x14]
mov ecx, ebx
call fcn.004ae060
add esp, 4
test eax, eax
jne 0x4a5d0e
push dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov ecx, ebx
call fcn.004b1330
add esp, 4
test eax, eax
jne 0x4a5d0e
mov edx, dword [esp + 0x18]
mov ecx, edi
call fcn.004a56b0
test eax, eax
jne 0x4a5d2e
mov eax, dword [esp + 0x10]
mov ecx, edi
push eax
push str.table
mov edx, eax
call fcn.004aea60
add esp, 8
test eax, eax
jne 0x4a5d2e
mov ecx, dword [esp + 0x18]
cmp byte [ecx + 0x2b], 2
mov eax, dword [ecx]
jne 0x4a5a26
push eax
push str.view__s_may_not_be_altered
push edi
call fcn.004633a0
mov edx, dword [esp + 0x2c]
add esp, 0xc
mov ecx, ebx
call fcn.004b5e20
mov edx, dword [esp + 0x10]
mov ecx, ebx
call fcn.0045fcb0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push eax
push dword [esp + 0x1c]
mov edx, 0x1a
mov ecx, edi
call fcn.004acec0
add esp, 0xc
test eax, eax
jne 0x4a5d2e
mov edx, dword [esp + 0x18]
mov ecx, edi
call fcn.004b2400
test eax, eax
jne 0x4a5d2e
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
cmp byte [ecx + 0x2b], 1
jne 0x4a5a90
mov esi, dword [ecx + 0x34]
mov dword [esp + 0x1c], eax
test esi, esi
je 0x4a5a83
mov dword [esp + 0x1c], eax
cmp dword [esi], ebx
je 0x4a5a83
mov esi, dword [esi + 0x18]
test esi, esi
jne 0x4a5a78
mov eax, dword [esi + 8]
xor ecx, ecx
mov eax, dword [eax]
cmp dword [eax + 0x4c], ecx
cmove esi, ecx
mov edx, dword [edi + 8]
mov dword [esp + 0x24], edx
test edx, edx
je 0x4a5aa4
lea eax, [edi + 0x74]
mov dword [esp + 0x34], edx
jmp 0x4a5ad2
cmp dword [edi + 0x74], 0
jne 0x4a5ab6
mov eax, dword [edi]
test byte [eax + 0x50], 8
jne 0x4a5ab6
mov byte [edi + 0x17], 1
mov ecx, edi
call fcn.004843a0
mov edx, eax
lea eax, [edi + 0x74]
mov dword [esp + 0x24], edx
mov dword [esp + 0x34], edx
test edx, edx
je 0x4a5d2e
mov eax, dword [eax]
mov ecx, edi
test eax, eax
cmovne ecx, eax
mov eax, dword [esp + 0x18]
xor edx, edx
mov dword [esp + 0x30], edx
mov byte [ecx + 0x15], 1
mov eax, dword [eax]
mov ecx, eax
mov dword [esp + 0x2c], eax
cmp byte [eax], dl
je 0x4a5b24
cmp ecx, 0xffffffff
jae 0x4a5b20
mov al, byte [ecx]
inc ecx
cmp al, 0xc0
jb 0x4a5b1a
mov al, byte [ecx]
and al, 0xc0
cmp al, 0x80
jne 0x4a5b1a
nop dword [eax]
mov al, byte [ecx + 1]
inc ecx
and al, 0xc0
cmp al, 0x80
je 0x4a5b10
inc edx
cmp byte [ecx], 0
jne 0x4a5af5
mov dword [esp + 0x30], edx
mov ecx, dword [esp + 0x2c]
xor eax, eax
cmp dword [esp + 0x28], 1
push ecx
sete al
push eax
push dword [esp + 0x24]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x20]
push ecx
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 edi
call fcn.004ad9b0
push dword [esp + 0x4c]
mov eax, dword [esp + 0x40]
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 edi
call fcn.004ad9b0
add esp, 0x40
mov edx, str.sqlite_sequence
mov ecx, ebx
push dword [esp + 0x14]
call fcn.004adae0
add esp, 4
test eax, eax
je 0x4a5ba2
mov eax, dword [esp + 0x18]
push dword [eax]
push dword [esp + 0x20]
push dword [esp + 0x1c]
push str.UPDATE___w_.sqlite_sequence_set_name___Q_WHERE_name___Q
push edi
call fcn.004ad9b0
add esp, 0x14
cmp dword [esp + 0x28], 1
je 0x4a5bc9
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
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__after_rename__0__THEN__Q_ELSE_tbl_name_END_WHERE_type_IN__view__trigger_
push edi
call fcn.004ad9b0
add esp, 0x20
test esi, esi
je 0x4a5c9e
inc dword [edi + 0x2c]
mov eax, dword [edi + 0x2c]
mov edx, eax
push dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x34], eax
call fcn.00484710
mov ecx, dword [esp + 0x28]
add esp, 4
mov edx, dword [ecx + 0x74]
cmp dword [ecx + 0x78], edx
jg 0x4a5c1d
push 0
push 0
push dword [esp + 0x38]
mov edx, 0xaf
call fcn.004845f0
mov edx, eax
add esp, 0xc
mov eax, dword [esp + 0x34]
add eax, 0x70
mov dword [esp + 0x34], eax
jmp 0x4a5c5a
mov ebx, dword [esp + 0x30]
lea eax, [edx + 1]
mov dword [ecx + 0x74], eax
lea eax, [ecx + 0x70]
mov dword [esp + 0x34], eax
lea ecx, [edx + edx*4]
mov eax, dword [eax]
mov dword [eax + ecx*4 + 4], ebx
mov ebx, dword [esp + 0x38]
mov dword [eax + ecx*4], 0xaf
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 + 0x24]
mov eax, dword [ecx]
cmp byte [eax + 0x57], 0
jne 0x4a5c9e
test edx, edx
jns 0x4a5c6e
mov edx, dword [ecx + 0x74]
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 0x4a5c94
mov ecx, dword [esp + 0x24]
mov edx, eax
push 0xfffffffffffffff4
push esi
call fcn.00485350
add esp, 8
jmp 0x4a5c9e
mov dword [eax + 0x10], esi
mov byte [eax + 1], 0xf4
inc dword [esi + 0xc]
mov edx, dword [esp + 0x28]
mov ecx, edi
push 1
call fcn.004a5780
mov eax, dword [esp + 0x18]
add esp, 4
mov byte [edi + 0x10], 1
push 0
push str.after_rename
push dword [esp + 0x44]
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 edi
call fcn.004ad9b0
add esp, 0x1c
cmp dword [esp + 0x28], 1
je 0x4a5d2e
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 edi
call fcn.004ad9b0
mov edx, dword [esp + 0x34]
add esp, 0x14
mov ecx, ebx
call fcn.004b5e20
mov edx, dword [esp + 0x10]
mov ecx, ebx
call fcn.0045fcb0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [esp + 0x10]
push str.there_is_already_another_table_or_index_with_this_name:__s
jmp 0x4a5a00
mov edx, dword [esp + 0x20]
mov ecx, ebx
call fcn.004b5e20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x20]
mov ecx, ebx
call fcn.004b5e20
mov edx, dword [esp + 0x10]
test edx, edx
je 0x4a5d48
mov ecx, ebx
call fcn.0045fcb0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret