Function at 0x487bc0
Capabilities:
Move file

Disassembly:
mov eax, 0x1144
call fcn.005322e0
push ebx
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
push esi
push edi
mov edi, dword [esp + 0x115c]
push edi
lea eax, [esp + 0x158]
mov esi, ecx
push str.select__from_sqlite_master_where_typetable_and_name_s
push eax
mov dword [esp + 0x20], esi
call ebp
add esp, 0xc
lea ecx, [esp + 0x28]
lea edx, [esp + 0x24]
lea eax, [esp + 0x20]
push ecx
push edx
mov edx, dword [esp + 0x1160]
lea ecx, [esp + 0x15c]
push eax
xor ebx, ebx
push ecx
push edx
mov ecx, esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
call fcn.00487b50
mov dword [esp + 0x38], eax
mov eax, str.TEXT
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
push edi
lea eax, [esp + 0x158]
push str.create_table__s__time_timestamp
push eax
mov dword [esp + 0x4c], 0x586d58
mov dword [esp + 0x50], str.unsigned_int
mov dword [esp + 0x5c], str.BLOB
call ebp
mov edx, eax
mov eax, dword [esp + 0x1170]
add esp, 0xc
xor esi, esi
cmp eax, ebx
mov dword [esp + 0x10], edx
mov ebp, edx
jle 0x487cff
mov ecx, dword [esp + 0x1160]
add ecx, 4
mov dword [esp + 0x18], ecx
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x55]
mov byte [esp + 0x54], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x1168]
lea edx, [esp + 0x54]
push edx
push eax
push esi
call fcn.0047a4d0
mov edi, dword [esp + 0x24]
xor ecx, ecx
lea eax, [esp + 0x60]
mov cl, byte [edi]
mov edx, dword [esp + ecx*4 + 0x4c]
lea ecx, [esp + ebp + 0x160]
push edx
push eax
push str.__s__s
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
add ebp, eax
mov eax, dword [esp + 0x1164]
inc esi
add edi, 0xc
cmp esi, eax
mov dword [esp + 0x18], edi
jl 0x487c97
mov edx, dword [esp + 0x10]
cmp dword [esp + 0x38], ebx
je 0x487e3e
cmp dword [esp + 0x20], ebx
je 0x487e3e
cmp dword [esp + 0x24], ebx
jle 0x487e3e
cmp dword [esp + 0x28], ebx
jle 0x487e3e
mov edi, 0x586d34
or ecx, 0xffffffff
xor eax, eax
lea ebp, [esp + ebp + 0x154]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x24]
cmp ecx, 1
jl 0x487d73
mov eax, dword [esp + 0x30]
cdq
idiv ecx
mov ecx, dword [esp + 0x20]
inc edx
imul edx, dword [esp + 0x28]
lea eax, [ecx + edx*4]
mov edx, dword [esp + 0x10]
mov esi, dword [eax + 0x10]
lea edi, [esp + edx + 0x154]
add esi, edx
mov dl, byte [edi]
mov cl, byte [esi]
mov al, dl
cmp dl, cl
jne 0x487da7
cmp al, bl
je 0x487da3
mov cl, byte [edi + 1]
mov dl, byte [esi + 1]
mov al, cl
cmp cl, dl
jne 0x487da7
add edi, 2
add esi, 2
cmp al, bl
jne 0x487d7f
xor eax, eax
jmp 0x487dac
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x487eb0
lea edx, [esp + 0x38]
push ebx
push edx
call fcn.004d9150
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.MSVCRT.dll_localtime]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
push ecx
mov ecx, dword [eax + 8]
mov esi, dword [esp + 0x1168]
push edx
mov edx, dword [eax + 0xc]
push ecx
mov ecx, dword [eax + 0x10]
push edx
mov edx, dword [eax + 0x14]
inc ecx
add edx, 0x76c
push ecx
push edx
push esi
lea eax, [esp + 0x7c]
push str._s__04u_02u_02u__02u_02u_02u
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea ecx, [esp + 0x84]
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_rename]
mov edx, dword [esp + 0x11a0]
mov eax, dword [esp + 0x119c]
mov ecx, dword [esp + 0x1198]
add esp, 0x38
push edx
mov edx, dword [esp + 0x1160]
push eax
push ecx
mov ecx, dword [esp + 0x20]
push edx
push esi
call fcn.00487bc0
jmp 0x487eb0
mov edi, 0x5854c0
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + ebp + 0x154]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1158]
mov esi, dword [esp + 0x14]
lea ecx, [esp + 0x154]
push ecx
push edi
mov ecx, esi
call fcn.00487b10
mov edx, dword [esp + 0x115c]
lea eax, [esp + 0x154]
push edx
push str.create_unique_index_idxtime_on__s_time__
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x154]
push ecx
push edi
mov ecx, esi
call fcn.00487b10
lea ecx, [esp + 0x1c]
call fcn.00488300
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1144
ret 0x14