Function at 0x10061eb0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x102d2008]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
mov esi, ecx
mov edx, str.main
push edi
mov dword [esp + 0xc], esi
mov eax, dword [esi + 0x50]
mov edi, dword [eax]
mov ecx, edi
mov dword [esp + 0x3c], edi
call fcn.100a9370
test eax, eax
js 0x10061f0d
mov ecx, dword [edi + 0x10]
add eax, eax
mov eax, dword [ecx + eax*8 + 4]
test eax, eax
je 0x10061f0d
mov eax, dword [eax + 4]
mov ecx, dword [eax]
cmp byte [ecx + 0xf], 0
je 0x10061f05
mov ecx, 0x102ad38a
jmp 0x10061f0f
mov ecx, dword [ecx + 0xa8]
jmp 0x10061f0f
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x10], ecx
xor ebx, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
test ecx, ecx
je 0x1006267c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10061f52
sub ecx, edx
and ecx, 0x3fffffff
cmp ecx, 1
jb 0x1006267c
mov eax, dword [esi + 0x54]
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
lea esi, [eax + 1]
mov eax, esi
cdq
push edx
push eax
call fcn.100656f0
mov edi, eax
add esp, 8
mov dword [esp + 0x54], edi
test edi, edi
je 0x10061f9c
xor ecx, ecx
test esi, esi
jle 0x10061f9c
mov byte [ecx + edi], bl
inc ecx
cmp ecx, esi
jl 0x10061f94
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualLock]
push esi
push 0
push edi
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x18]
add esp, 0xc
mov esi, dword [esp + 0x1c]
mov eax, dword [eax + 0x54]
push esi
push dword [eax + 0x10]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x24]
add esp, 0xc
mov edx, edi
push eax
lea eax, [esp + 0x28]
push eax
push 0x102ad38a
push esi
call fcn.100618e0
add esp, 0x10
mov dword [esp + 0xc], eax
test eax, eax
je 0x100625cc
mov esi, 3
nop word [eax + eax]
push esi
push str.PRAGMA_cipher_compatibility___d_
call sym.BasicSQLite.dll_sqlite3_mprintf
mov ecx, dword [esp + 0x18]
mov ebx, eax
lea eax, [esp + 0x20]
mov edx, edi
push eax
lea eax, [esp + 0x30]
push eax
push ebx
push dword [esp + 0x30]
call fcn.100618e0
add esp, 0x18
test eax, eax
je 0x100621e7
test ebx, ebx
je 0x10062056
mov edx, ebx
lea ecx, [edx + 1]
nop dword [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x10062040
sub edx, ecx
mov ecx, ebx
and edx, 0x3fffffff
call fcn.10060900
dec esi
xor ebx, ebx
test esi, esi
jg 0x10062000
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 1
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x54]
test esi, esi
je 0x1006209d
mov ecx, dword [esp + 0x1c]
xor eax, eax
test ecx, ecx
jle 0x1006208c
mov byte [eax + esi], 0
inc eax
cmp eax, ecx
jl 0x10062083
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push esi
call sym.BasicSQLite.dll_sqlite3_free
add esp, 4
mov esi, dword [esp + 0x28]
test esi, esi
je 0x100620e0
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100620b0
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x100620cf
mov byte [eax + esi], 0
inc eax
cmp eax, ecx
jl 0x100620c6
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push esi
call sym.BasicSQLite.dll_sqlite3_free
add esp, 4
mov esi, dword [esp + 0x20]
test esi, esi
je 0x10062120
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100620f0
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x1006210f
mov byte [eax + esi], 0
inc eax
cmp eax, ecx
jl 0x10062106
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push esi
call sym.BasicSQLite.dll_sqlite3_free
add esp, 4
mov esi, dword [esp + 0x14]
test esi, esi
je 0x10062160
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10062130
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x1006214f
mov byte [eax + esi], 0
inc eax
cmp eax, ecx
jl 0x10062146
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push esi
call sym.BasicSQLite.dll_sqlite3_free
add esp, 4
mov esi, dword [esp + 0x40]
test esi, esi
je 0x100621a0
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10062170
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x1006218f
mov byte [eax + esi], 0
inc eax
cmp eax, ecx
jl 0x10062186
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push esi
call sym.BasicSQLite.dll_sqlite3_free
add esp, 4
test edi, edi
je 0x100625d5
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100621b0
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x100621cf
mov byte [eax + edi], 0
inc eax
cmp eax, ecx
jl 0x100621c6
mov esi, dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push ecx
push edi
call esi
push edi
call sym.BasicSQLite.dll_sqlite3_free
add esp, 4
jmp 0x100625db
push dword [esp + 0x10]
push str._s_migrated
call sym.BasicSQLite.dll_sqlite3_mprintf
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x10062204
xor ecx, ecx
jmp 0x1006221f
mov ecx, eax
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10062210
sub ecx, edx
and ecx, 0x3fffffff
add ecx, 2
push 0
push ecx
mov dword [esp + 0x1c], ecx
call fcn.100656f0
mov esi, eax
add esp, 8
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], esi
test esi, esi
je 0x1006224e
xor ecx, ecx
test eax, eax
je 0x1006224e
mov byte [ecx + esi], 0
inc ecx
cmp ecx, eax
jl 0x10062245
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualLock]
mov edx, dword [esp + 0xc]
test edx, edx
jne 0x10062262
xor ecx, ecx
jmp 0x10062281
mov ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x14], eax
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10062270
sub ecx, dword [esp + 0x14]
and ecx, 0x3fffffff
push ecx
push edx
push esi
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [esp + 0x18]
add esp, 0xc
test edx, edx
jne 0x10062298
xor ecx, ecx
jmp 0x100622c9
mov ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x14], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100622a1
sub ecx, dword [esp + 0x14]
mov eax, 0
and ecx, 0x3fffffff
jbe 0x100622c9
nop dword [eax]
mov byte [eax + edx], 0
inc eax
cmp eax, ecx
jl 0x100622c0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
mov edx, dword [esp + 0xc]
push edx
call sym.BasicSQLite.dll_sqlite3_free
add esp, 4
push edi
push esi
push str.ATTACH_DATABASE__s_as_migrate_
call sym.BasicSQLite.dll_sqlite3_mprintf
add esp, 0xc
mov dword [esp + 0x28], eax
push dword [esp + 0x24]
push str.PRAGMA_migrate.user_version___d_
call sym.BasicSQLite.dll_sqlite3_mprintf
mov esi, dword [esp + 0x44]
push 0
push 0
push 0
push ebx
push esi
mov dword [esp + 0x30], eax
call sym.BasicSQLite.dll_sqlite3_exec
add esp, 0x1c
test eax, eax
jne 0x1006205d
push eax
push eax
push eax
push str.PRAGMA_journal_mode__delete_
push esi
call sym.BasicSQLite.dll_sqlite3_exec
add esp, 0x14
test eax, eax
jne 0x1006205d
push eax
push eax
push eax
mov eax, dword [esp + 0x34]
push eax
push esi
call sym.BasicSQLite.dll_sqlite3_exec
add esp, 0x14
test eax, eax
jne 0x1006205d
push dword [esp + 0x1c]
push edi
push str.migrate
push esi
call sym.BasicSQLite.dll_sqlite3_key_v2
add esp, 0x10
test eax, eax
jne 0x1006205d
push eax
push eax
push eax
push str.SELECT_sqlcipher_export_migrate__
push esi
call sym.BasicSQLite.dll_sqlite3_exec
add esp, 0x14
test eax, eax
jne 0x1006205d
push eax
push eax
push eax
mov eax, dword [esp + 0x20]
push eax
push esi
call sym.BasicSQLite.dll_sqlite3_exec
add esp, 0x14
test eax, eax
jne 0x1006205d
cmp byte [esi + 0x4f], al
je 0x1006205d
cmp dword [esi + 0xb0], 1
jg 0x1006205d
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
add eax, eax
mov edi, dword [ecx + 4]
mov dword [esp + 0x50], edi
mov eax, dword [ecx + eax*8 - 0xc]
mov ecx, eax
mov dword [esp + 0xc], eax
call fcn.1007a930
mov ecx, dword [edi + 4]
mov edx, 0xfffd
push 0
push eax
and word [ecx + 0x18], dx
mov ecx, edi
mov edx, dword [0x102d4950]
call fcn.1007a850
add esp, 8
test eax, eax
jne 0x1006205d
mov edx, dword [esi + 0x14]
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x3c]
dec edx
push eax
mov ecx, esi
call fcn.10060120
push dword [esp + 0x3c]
xor edx, edx
mov ecx, esi
push dword [esp + 0x44]
call fcn.1005fb10
mov eax, dword [esp + 0x1c]
add esp, 0x10
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov ecx, dword [eax + 0x3c]
mov eax, dword [edi + 4]
mov dword [esp + 0xc], ecx
mov eax, dword [eax]
mov esi, dword [eax + 0x3c]
mov dword [esp + 0x4c], esi
call fcn.10064e90
mov ecx, esi
call fcn.10064e90
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0xffffffffffffffff
push dword [esp + 0x1c]
push 0
push 0xfde9
call edi
mov esi, eax
lea ecx, [esi + esi]
call fcn.10060930
push esi
push eax
push 0xffffffffffffffff
push dword [esp + 0x1c]
mov dword [esp + 0x3c], eax
push 0
push 0xfde9
call edi
push 0
push 0
push 0xffffffffffffffff
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x2c]
push eax
push 0
push 0xfde9
call edi
mov esi, eax
lea ecx, [esi + esi]
call fcn.10060930
push esi
mov esi, dword [esp + 0x24]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
mov dword [esp + 0x48], eax
call edi
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x2c]
push 1
push eax
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x1006205d
mov edi, dword [esp + 0x3c]
lea ecx, [esp + 0x58]
push ecx
push 0x106
push dword [esp + 0x14]
mov eax, dword [edi]
push esi
push eax
mov eax, dword [eax + 0x18]
call eax
add esp, 0x14
test eax, eax
jne 0x1006205d
mov eax, dword [edi]
lea ecx, [esp + 0x58]
push ecx
push 0x106
push dword [esp + 0x54]
push dword [esp + 0x1c]
push eax
mov eax, dword [eax + 0x18]
call eax
add esp, 0x14
test eax, eax
jne 0x1006205d
mov eax, dword [esp + 0x50]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
inc dword [ecx + 0x64]
mov eax, dword [ecx + 0x58]
test eax, eax
je 0x1006254e
nop word [eax + eax]
mov dword [eax + 0x10], 1
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x10062540
mov ecx, dword [ecx + 0xe4]
xor edx, edx
call fcn.1006e640
push 0
push 0
push 0
push str.DETACH_DATABASE_migrate_
push edi
call sym.BasicSQLite.dll_sqlite3_exec
add esp, 0x14
mov dword [esp + 0xc], eax
test eax, eax
jne 0x100625cc
mov eax, dword [edi]
push 0
push esi
push eax
mov eax, dword [eax + 0x1c]
call eax
add esp, 0xc
test eax, eax
jne 0x1006205d
mov ecx, edi
call fcn.100a8e10
mov eax, dword [esp + 0x18]
push eax
push str.PRAGMA_journal_mode___s_
mov dword [esp + 0x18], eax
call sym.BasicSQLite.dll_sqlite3_mprintf
push 0
push 0
push 0
push eax
push edi
mov dword [esp + 0x5c], eax
call sym.BasicSQLite.dll_sqlite3_exec
add esp, 0x1c
mov dword [esp + 0xc], eax
test eax, eax
je 0x1006206d
jmp 0x10062065
mov edi, dword [esp + 0x18]
jmp 0x10062071
mov esi, dword [sym.imp.KERNEL32.dll_VirtualUnlock]
test ebx, ebx
je 0x10062616
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100625e4
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x10062609
nop word [eax + eax]
mov byte [eax + ebx], 0
inc eax
cmp eax, ecx
jl 0x10062600
push ecx
push ebx
call esi
push ebx
call sym.BasicSQLite.dll_sqlite3_free
add esp, 4
mov ebx, dword [esp + 0x2c]
test ebx, ebx
je 0x1006263e
mov ecx, dword [esp + 0x44]
xor eax, eax
test ecx, ecx
jle 0x10062631
mov byte [eax + ebx], 0
inc eax
cmp eax, ecx
jl 0x10062628
push ecx
push ebx
call esi
push ebx
call sym.BasicSQLite.dll_sqlite3_free
add esp, 4
mov ebx, dword [esp + 0x30]
test ebx, ebx
je 0x10062666
mov ecx, dword [esp + 0x48]
xor eax, eax
test ecx, ecx
jle 0x10062659
mov byte [eax + ebx], 0
inc eax
cmp eax, ecx
jl 0x10062650
push ecx
push ebx
call esi
push ebx
call sym.BasicSQLite.dll_sqlite3_free
add esp, 4
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.1010eeaf
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x5c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1010eeaf
mov esp, ebp
pop ebp
ret