Function at 0x4c628c
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov edi, eax
mov esi, edx
mov edx, str.PRAGMA_page_size512
sub esp, 0x8c
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x54], str.REPLACE_INTO__s_name_mode_mtime_sz_data__n__SELECT_n_____s__n____mode__n____mtime__n____CASE_substr_lsmode_mode__1_1__n______WHEN___THEN_length_data__n______WHEN_d_THEN_0_n______ELSE__1_END__n____sqlar_compress_data__n__FROM_fsdir__Q__Q__AS_disk_n__WHERE_lsmode_mode__NOT_LIKE_____s_
mov dword [ebp - 0x50], str.REPLACE_INTO__s_name_mode_mtime_data__n__SELECT_n_____s__n____mode__n____mtime__n____data_n__FROM_fsdir__Q__Q__AS_disk_n__WHERE_lsmode_mode__NOT_LIKE_____s_
call fcn.004c61ff
mov edx, str.SAVEPOINT_ar_
mov eax, edi
call fcn.004c61ff
test eax, eax
mov ebx, eax
jne 0x4c64af
cmp byte [edi + 2], 0
mov byte [ebp - 0x4a], 0
je 0x4c635d
cmp dword [edi + 0x10], 0
mov dword [ebp - 0x6c], 0x508e06
je 0x4c6391
lea eax, [ebp - 0x60]
mov dword [esp], 8
lea esi, [ebp - 0x4a]
mov dword [esp + 4], eax
call fcn.00449f7b
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x60]
mov dword [esp + 8], str.zip_016llx
mov dword [esp + 4], esi
mov dword [esp], 0x32
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
call fcn.0042a3d9
mov eax, dword [edi + 0x10]
mov dword [esp + 4], esi
mov dword [esp], str.CREATE_VIRTUAL_TABLE_temp._s_USING_zipfile__Q_
mov dword [esp + 8], eax
call fcn.004440e8
mov edx, eax
mov dword [ebp - 0x6c], eax
mov eax, edi
call fcn.004c61ff
mov ecx, dword [ebp - 0x6c]
mov ebx, eax
mov dword [esp], ecx
call fcn.0040b268
mov dword [ebp - 0x6c], esi
jmp 0x4c6391
test esi, esi
je 0x4c6378
mov edx, str.CREATE_TABLE_IF_NOT_EXISTS_sqlar__n__name_TEXT_PRIMARY_KEY______name_of_the_file_n__mode_INT___________________access_permissions_n__mtime_INT__________________last_modification_time_n__sz_INT_____________________original_file_size_n__data_BLOB__________________compressed_content_n_
mov eax, edi
call fcn.004c61ff
mov dword [ebp - 0x6c], str.sqlar
mov ebx, eax
jmp 0x4c6391
mov edx, str.DROP_TABLE_IF_EXISTS_sqlar
mov eax, edi
call fcn.004c61ff
test eax, eax
mov ebx, eax
je 0x4c6361
xor esi, esi
jmp 0x4c6436
cmp dword [ebp - 0x70], 0
je 0x4c63ac
mov eax, dword [ebp - 0x6c]
mov dword [esp], str._AND_NOT_EXISTS_SELECT_1_FROM__s_AS_mem_WHERE_mem.namedisk.name_AND_mem.mtimedisk.mtime_AND_mem.modedisk.mode_
mov dword [esp + 4], eax
call fcn.004440e8
jmp 0x4c63b8
mov dword [esp], 0x506d14
call fcn.004440e8
test eax, eax
mov esi, eax
mov eax, 7
cmove ebx, eax
xor ecx, ecx
cmp ecx, dword [edi + 8]
jge 0x4c6432
test ebx, ebx
jne 0x4c6436
mov eax, dword [edi + 0x18]
cmp byte [edi + 1], 0
mov edx, str.name
mov ebx, dword [edi + 0x14]
mov dword [ebp - 0x74], ecx
mov eax, dword [eax + ecx*4]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov eax, str.shell_putsnl_name_
cmove eax, edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp + 4], eax
movzx eax, byte [edi + 2]
mov eax, dword [ebp + eax*4 - 0x54]
mov dword [esp], eax
call fcn.004440e8
mov edx, eax
mov dword [ebp - 0x70], eax
mov eax, edi
call fcn.004c61ff
mov ebx, eax
mov eax, dword [ebp - 0x70]
mov dword [esp], eax
call fcn.0040b268
mov ecx, dword [ebp - 0x74]
inc ecx
jmp 0x4c63c6
test ebx, ebx
je 0x4c6463
mov eax, dword [edi + 0x20]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.ROLLBACK_TO_ar__RELEASE_ar_
mov dword [esp], eax
call fcn.00477ee4
jmp 0x4c64a7
mov edx, str.RELEASE_ar_
mov eax, edi
call fcn.004c61ff
cmp byte [edi + 2], 0
mov ebx, eax
je 0x4c64a7
cmp dword [edi + 0x10], 0
je 0x4c64a7
lea eax, [ebp - 0x4a]
mov dword [esp], str.DROP_TABLE__s
mov dword [esp + 4], eax
call fcn.004440e8
mov edx, eax
mov dword [ebp - 0x6c], eax
mov eax, edi
call fcn.004c61ff
mov ecx, dword [ebp - 0x6c]
mov dword [esp], ecx
call fcn.0040b268
mov dword [esp], esi
call fcn.0040b268
add esp, 0x8c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret