Function at 0x677a90
Capabilities:
Check if file exists
Copy file

Disassembly:
push ebp
lea ebp, [esp - 0xb0]
sub esp, 0xb0
push 0xffffffffffffffff
push 0x7c7c44
mov eax, dword fs:[0]
push eax
sub esp, 0x198
mov eax, dword [0x89b044]
xor eax, ebp
mov dword [ebp + 0xac], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xb8]
mov edi, ecx
mov ecx, dword [ebp + 0xbc]
mov edx, dword [edi]
mov edx, dword [edx + 0x18]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
push eax
mov ecx, edi
mov dword [ebp - 0x40], edi
call edx
mov eax, dword [ebp - 0x18]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call esi
test eax, eax
je 0x677bdf
push str.WebHistory
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 1
call fcn.004068d0
push 1
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x14]
push edx
mov byte [ebp - 4], 2
call fcn.00618a30
add esp, 0xc
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x677b5c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [edi]
mov edx, dword [edx]
lea eax, [ebp - 0x24]
push eax
mov ecx, edi
call edx
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x14]
push str._s_history.db
push ecx
mov byte [ebp - 4], 5
call fcn.004a23e0
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
add esp, 0xc
mov byte [ebp - 4], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x677ba3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
push ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov eax, dword [ebp - 0x14]
push eax
call esi
test eax, eax
jne 0x677c0c
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x677bdf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x677c05
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x677fef
lea ecx, [ebp - 0x84]
call fcn.00604620
mov ecx, dword [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 6
call fcn.00607360
push str.select_url_title__visit_count__last_visit_time_from_urls_where_visit_count_1_order_by_visit_count_DESC
lea edx, [ebp - 0x9c]
push edx
lea ecx, [ebp - 0x84]
call fcn.006069b0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x9c]
call fcn.00605910
cmp al, bl
jne 0x677f2f
mov eax, dword [ebp - 0x2c]
mov ecx, eax
inc eax
cmp ecx, dword [ebp + 0xc0]
mov dword [ebp - 0x2c], eax
jge 0x677f2f
lea ecx, [ebp - 0x68]
call fcn.00648bd0
push 0x83096c
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 8
call fcn.00606c20
push 0xfde9
lea edx, [ebp - 0x1a0]
push eax
lea ecx, [ebp - 0x1a4]
mov dword [ebp - 0x1a4], edx
call fcn.00580860
mov esi, dword [ebp - 0x1a4]
mov byte [ebp - 4], 9
cmp esi, ebx
jne 0x677cb8
xor eax, eax
jmp 0x677ccf
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x677cc0
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebp - 0x60]
call fcn.00406740
mov eax, dword [ebp - 0x1a4]
lea ecx, [ebp - 0x1a0]
mov byte [ebp - 4], 8
cmp eax, ecx
je 0x677cf6
push eax
call fcn.007238ab
add esp, 4
push str.title
lea ecx, [ebp - 0x9c]
call fcn.00606c20
push 0xfde9
lea edx, [ebp - 0x1a0]
push eax
lea ecx, [ebp - 0x1a4]
mov dword [ebp - 0x1a4], edx
call fcn.00580860
mov esi, dword [ebp - 0x1a4]
mov byte [ebp - 4], 0xa
cmp esi, ebx
jne 0x677d35
xor eax, eax
jmp 0x677d4f
mov eax, esi
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x677d40
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebp - 0x64]
call fcn.00406740
mov eax, dword [ebp - 0x1a4]
lea ecx, [ebp - 0x1a0]
mov byte [ebp - 4], 8
cmp eax, ecx
je 0x677d76
push eax
call fcn.007238ab
add esp, 4
push ebx
push str.visit_count
lea ecx, [ebp - 0x9c]
call fcn.00606c70
mov edx, dword [edi]
mov edx, dword [edx]
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x24]
push eax
mov ecx, edi
call edx
push eax
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 0xb
call fcn.00404210
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x677dc6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0x50]
push edx
call fcn.0067ffb0
add esp, 8
push eax
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 0xc
call fcn.00404210
mov eax, dword [ebp - 0x50]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x677e06
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
push ebx
push str.last_visit_time
lea ecx, [ebp - 0x9c]
call fcn.00606cf0
cmp edx, 0x1634578
ja 0x677e33
jb 0x677e29
cmp eax, 0x5d8a0000
jae 0x677e33
push ebx
push 0xa
push edx
push eax
call fcn.00729750
mov dword [ebp - 0x48], eax
xor eax, eax
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x44], edx
lea edx, [ebp - 0x78]
mov dword [ebp - 0x76], eax
mov dword [ebp - 0x72], eax
mov dword [ebp - 0x6e], eax
mov word [ebp - 0x6a], ax
push edx
lea eax, [ebp - 0x48]
xor ecx, ecx
push eax
mov word [ebp - 0x78], cx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
push 0xa8
lea ecx, [ebp + 4]
push ebx
push ecx
mov dword [ebp], ebx
call fcn.007202b0
add esp, 0xc
lea edx, [ebp]
push edx
call dword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
xor eax, eax
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x78]
mov word [ebp - 0x3c], ax
mov dword [ebp - 0x3a], eax
mov dword [ebp - 0x36], eax
mov dword [ebp - 0x32], eax
mov word [ebp - 0x2e], ax
push edx
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
movzx ecx, word [ebp - 0x30]
movzx edx, word [ebp - 0x32]
movzx eax, word [ebp - 0x34]
push ecx
movzx ecx, word [ebp - 0x36]
push edx
movzx edx, word [ebp - 0x3a]
push eax
movzx eax, word [ebp - 0x3c]
push ecx
push edx
push eax
lea ecx, [ebp - 0x54]
push 0x815878
push ecx
call fcn.0040e430
mov ecx, dword [ebp - 0x4c]
add esp, 0x20
cmp dword [ecx], ebx
je 0x677eea
lea edx, [ebp - 0x68]
push edx
call fcn.00675090
cmp eax, ebx
je 0x677f80
mov eax, dword [ebp - 0x1c]
mov edi, dword [eax + 0x14]
mov edx, dword [edi + 4]
lea ecx, [ebp - 0x68]
push ecx
push edx
push edi
mov ecx, eax
call fcn.00674c10
mov ecx, dword [ebp - 0x1c]
push 1
mov esi, eax
call fcn.00674cb0
mov dword [edi + 4], esi
mov eax, dword [esi + 4]
mov dword [eax], esi
mov eax, dword [ebp - 0x20]
inc eax
cmp eax, dword [ebp + 0xc4]
mov dword [ebp - 0x20], eax
jl 0x677f7d
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 7
call fcn.00648a90
lea ecx, [ebp - 0x84]
call fcn.00605000
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 6
call fcn.00605360
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 4
call fcn.006067f0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x677fbb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x677fbb
mov edi, dword [ebp - 0x40]
lea ecx, [ebp - 0x9c]
call fcn.00605960
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 7
call fcn.00648a90
jmp 0x677c45
mov eax, dword [ebp - 0x18]
xor edx, edx
cmp dword [ebp - 0x20], ebx
mov dword [ebp - 4], 0xffffffff
setne dl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov esi, edx
mov edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x677fed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xac]
xor ecx, ebp
call fcn.0071fe0b
add ebp, 0xb0
mov esp, ebp
pop ebp
ret 0x10