Function at 0x10062570
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x102d4008]
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.100a9a40
test eax, eax
js 0x100625cd
mov ecx, dword [edi + 0x10]
add eax, eax
mov eax, dword [ecx + eax*8 + 4]
test eax, eax
je 0x100625cd
mov eax, dword [eax + 4]
mov ecx, dword [eax]
cmp byte [ecx + 0xf], 0
je 0x100625c5
mov ecx, 0x102ae4c6
jmp 0x100625cf
mov ecx, dword [ecx + 0xa8]
jmp 0x100625cf
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 0x10062d3c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10062612
sub ecx, edx
and ecx, 0x3fffffff
cmp ecx, 1
jb 0x10062d3c
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.10065db0
mov edi, eax
add esp, 8
mov dword [esp + 0x54], edi
test edi, edi
je 0x1006265c
xor ecx, ecx
test esi, esi
jle 0x1006265c
mov byte [ecx + edi], bl
inc ecx
cmp ecx, esi
jl 0x10062654
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 0x102ae4c6
push esi
call fcn.10061fa0
add esp, 0x10
mov dword [esp + 0xc], eax
test eax, eax
je 0x10062c8c
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.10061fa0
add esp, 0x18
test eax, eax
je 0x100628a7
test ebx, ebx
je 0x10062716
mov edx, ebx
lea ecx, [edx + 1]
nop dword [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x10062700
sub edx, ecx
mov ecx, ebx
and edx, 0x3fffffff
call fcn.10060fc0
dec esi
xor ebx, ebx
test esi, esi
jg 0x100626c0
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 0x1006275d
mov ecx, dword [esp + 0x1c]
xor eax, eax
test ecx, ecx
jle 0x1006274c
mov byte [eax + esi], 0
inc eax
cmp eax, ecx
jl 0x10062743
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 0x100627a0
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10062770
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x1006278f
mov byte [eax + esi], 0
inc eax
cmp eax, ecx
jl 0x10062786
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 0x100627e0
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100627b0
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x100627cf
mov byte [eax + esi], 0
inc eax
cmp eax, ecx
jl 0x100627c6
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 0x10062820
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100627f0
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x1006280f
mov byte [eax + esi], 0
inc eax
cmp eax, ecx
jl 0x10062806
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 0x10062860
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10062830
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x1006284f
mov byte [eax + esi], 0
inc eax
cmp eax, ecx
jl 0x10062846
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 0x10062c95
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10062870
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x1006288f
mov byte [eax + edi], 0
inc eax
cmp eax, ecx
jl 0x10062886
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 0x10062c9b
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 0x100628c4
xor ecx, ecx
jmp 0x100628df
mov ecx, eax
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100628d0
sub ecx, edx
and ecx, 0x3fffffff
add ecx, 2
push 0
push ecx
mov dword [esp + 0x1c], ecx
call fcn.10065db0
mov esi, eax
add esp, 8
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], esi
test esi, esi
je 0x1006290e
xor ecx, ecx
test eax, eax
je 0x1006290e
mov byte [ecx + esi], 0
inc ecx
cmp ecx, eax
jl 0x10062905
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualLock]
mov edx, dword [esp + 0xc]
test edx, edx
jne 0x10062922
xor ecx, ecx
jmp 0x10062941
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 0x10062930
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 0x10062958
xor ecx, ecx
jmp 0x10062989
mov ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x14], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10062961
sub ecx, dword [esp + 0x14]
mov eax, 0
and ecx, 0x3fffffff
jbe 0x10062989
nop dword [eax]
mov byte [eax + edx], 0
inc eax
cmp eax, ecx
jl 0x10062980
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 0x1006271d
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 0x1006271d
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 0x1006271d
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 0x1006271d
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 0x1006271d
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 0x1006271d
cmp byte [esi + 0x4f], al
je 0x1006271d
cmp dword [esi + 0xb0], 1
jg 0x1006271d
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.1007b000
mov ecx, dword [edi + 4]
mov edx, 0xfffd
push 0
push eax
and word [ecx + 0x18], dx
mov ecx, edi
mov edx, dword [0x102d6950]
call fcn.1007af20
add esp, 8
test eax, eax
jne 0x1006271d
mov edx, dword [esi + 0x14]
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x3c]
dec edx
push eax
mov ecx, esi
call fcn.100607e0
push dword [esp + 0x3c]
xor edx, edx
mov ecx, esi
push dword [esp + 0x44]
call fcn.100601d0
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.10065550
mov ecx, esi
call fcn.10065550
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.10060ff0
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.10060ff0
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 0x1006271d
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 0x1006271d
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 0x1006271d
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 0x10062c0e
nop word [eax + eax]
mov dword [eax + 0x10], 1
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x10062c00
mov ecx, dword [ecx + 0xe4]
xor edx, edx
call fcn.1006ed00
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 0x10062c8c
mov eax, dword [edi]
push 0
push esi
push eax
mov eax, dword [eax + 0x1c]
call eax
add esp, 0xc
test eax, eax
jne 0x1006271d
mov ecx, edi
call fcn.100a94e0
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 0x1006272d
jmp 0x10062725
mov edi, dword [esp + 0x18]
jmp 0x10062731
mov esi, dword [sym.imp.KERNEL32.dll_VirtualUnlock]
test ebx, ebx
je 0x10062cd6
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10062ca4
sub ecx, edx
mov eax, 0
and ecx, 0x3fffffff
jbe 0x10062cc9
nop word [eax + eax]
mov byte [eax + ebx], 0
inc eax
cmp eax, ecx
jl 0x10062cc0
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 0x10062cfe
mov ecx, dword [esp + 0x44]
xor eax, eax
test ecx, ecx
jle 0x10062cf1
mov byte [eax + ebx], 0
inc eax
cmp eax, ecx
jl 0x10062ce8
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 0x10062d26
mov ecx, dword [esp + 0x48]
xor eax, eax
test ecx, ecx
jle 0x10062d19
mov byte [eax + ebx], 0
inc eax
cmp eax, ecx
jl 0x10062d10
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.1010f56f
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.1010f56f
mov esp, ebp
pop ebp
ret