Function at 0x10012ce0
Capabilities:
Check if file exists
Copy file
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10152896
mov eax, dword fs:[0]
push eax
sub esp, 0x2b8
mov eax, dword [0x101933a0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x1f0], ebx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x204], ebx
mov dword [ebp - 0x1fc], ebx
mov dword [ebp - 0x1f4], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 4], 0
cmp eax, dword [ebx + 8]
jne 0x10012d42
mov eax, dword [ebx]
call dword [eax + 8]
mov edi, dword [ebx + 4]
mov dword [ebp - 0x1f8], edi
call fcn.1000b6b0
mov ecx, eax
test ecx, ecx
je 0x10013363
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1d8], esi
xor eax, eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x1ec], eax
or ebx, 0xffffffff
test eax, eax
jne 0x10013305
mov eax, dword [ebp - 0x1fc]
cmp edi, dword [eax + 8]
je 0x10013305
mov edx, dword [edi]
lea ecx, [esi - 0x10]
mov dword [ebp - 0x1e0], ecx
lea eax, [edx - 0x10]
mov dword [ebp - 0x1d0], eax
cmp eax, ecx
je 0x10012e08
cmp dword [ecx + 0xc], 0
lea esi, [ecx + 0xc]
jl 0x10012df3
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x10012df3
push dword [ebp - 0x1d0]
call fcn.1000cb70
add esp, 4
mov dword [ebp - 0x1d0], eax
mov ecx, ebx
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x10012de8
mov esi, dword [ebp - 0x1e0]
push esi
mov ecx, dword [esi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1d0]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1d8], esi
jmp 0x10012e08
push dword [edx - 0xc]
lea ecx, [ebp - 0x1d8]
push edx
call fcn.1000e410
mov esi, dword [ebp - 0x1d8]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10012e54
mov eax, ebx
mov byte [ebp - 4], 0
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10012e2e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x10012e4d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
jmp 0x10013345
mov ecx, dword [ebp - 0x1f0]
lea eax, [ebp - 0x1dc]
push eax
call fcn.1000e280
push 0
push dword [ebp - 0x1dc]
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push dword [ebp - 0x1dc]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10012eaf
mov edx, dword [ebp - 0x1dc]
mov eax, ebx
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10012e13
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10012e13
lea ecx, [ebp - 0x210]
mov byte [ebp - 4], 3
call fcn.100622b0
push dword [ebp - 0x1dc]
lea ecx, [ebp - 0x210]
mov byte [ebp - 4], 4
call fcn.10063450
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
push eax
call fcn.1000cb70
add eax, 0x10
add esp, 4
mov dword [ebp - 0x1d0], eax
push 0x1015c458
push 0x1015c460
lea ecx, [ebp - 0x1d0]
mov byte [ebp - 4], 5
call fcn.1000fc10
call fcn.1000b6b0
mov ecx, eax
test ecx, ecx
je 0x1001336d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1e0], eax
push dword [ebp - 0x1d0]
lea eax, [ebp - 0x1e0]
mov byte [ebp - 4], 6
push str.SELECT_url__title__last_visit_date_FROM_moz_places_WHERE_visit_count_1_AND_title_sORDER_BY_last_visit_date_DESC__id_DESC_LIMIT_1
push eax
call fcn.1000ee70
add esp, 0xc
lea eax, [ebp - 0x210]
lea ecx, [ebp - 0x200]
push eax
call fcn.10029700
push dword [ebp - 0x1e0]
lea eax, [ebp - 0x22c]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x210]
call fcn.10062eb0
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 8
call fcn.10062bf0
test al, al
jne 0x1001310a
push 0x1015bbb0
lea ecx, [ebp - 0x22c]
call fcn.10063140
mov dword [ebp - 0x1e8], eax
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x148], ecx
test eax, eax
jne 0x10012fb7
xor edx, edx
mov dword [ebp - 0x148], edx
jmp 0x100130ac
mov ecx, eax
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10012fc0
sub ecx, edx
push 0x80
lea eax, [ecx + 1]
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x1e4], eax
push ecx
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.1000ebc0
mov eax, dword [ebp - 0x1e4]
add esp, 0x10
push eax
push dword [ebp - 0x148]
push eax
push dword [ebp - 0x1e8]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
test eax, eax
sete cl
mov dword [ebp - 0x1d4], ecx
test eax, eax
jne 0x1001309e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x10013098
push 0
push 0
push dword [ebp - 0x1e4]
push dword [ebp - 0x1e8]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x80
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x1d4], eax
push ecx
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.1000ebc0
add esp, 0x10
push dword [ebp - 0x1d4]
push dword [ebp - 0x148]
push dword [ebp - 0x1e4]
push dword [ebp - 0x1e8]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
neg ecx
sbb ecx, ecx
inc ecx
jmp 0x1001309e
mov ecx, dword [ebp - 0x1d4]
test ecx, ecx
jne 0x10013377
mov edx, dword [ebp - 0x148]
mov byte [ebp - 4], 9
test edx, edx
jne 0x100130b8
xor ecx, ecx
jmp 0x100130d6
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x1d4], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100130c3
sub ecx, dword [ebp - 0x1d4]
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x1f4]
push edx
call fcn.1000e410
mov eax, dword [ebp - 0x148]
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], 8
cmp eax, ecx
je 0x10013100
push eax
call fcn.1012d251
add esp, 4
mov dword [ebp - 0x1ec], 1
lea ecx, [ebp - 0x22c]
call fcn.10063160
lea ecx, [ebp - 0x22c]
call fcn.10062620
lea ecx, [ebp - 0x200]
mov byte [ebp - 4], 6
call fcn.10029740
lea ecx, [ebp - 0x210]
call fcn.10062a30
mov edx, dword [ebp - 0x1e0]
mov eax, ebx
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1001315b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x1d0]
mov eax, ebx
mov byte [ebp - 4], 4
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1001317c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x210]
call fcn.10062560
jmp 0x100132c9
mov edx, dword [ebp - 0x1dc]
mov eax, ebx
mov dword [ebp - 4], 2
add edx, 0xfffffff0
mov byte [ebp - 4], 1
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100132f1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1ec]
add edi, 4
mov dword [ebp - 0x1f8], edi
jmp 0x10012d77
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10013320
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x1001333f
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1ec]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10061045
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.1000b280
push 0x80004005
call fcn.1000b280
push 0x80
lea eax, [ebp - 0x144]
push eax
push dword [ebp - 0x148]
call fcn.1000a620
add esp, 0xc
call fcn.1000b2a0
int3