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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101c316a
mov eax, dword fs:[0]
push eax
sub esp, 0x330
mov eax, dword [0x1022b584]
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 edi, ecx
mov dword [ebp - 0x230], edi
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x25c], eax
mov eax, dword [edi]
mov dword [ebp - 0x274], edi
mov dword [ebp - 0x264], edi
mov dword [ebp - 0x234], esi
call dword [eax + 0x30]
mov ecx, dword [esi + 4]
mov eax, 0x2aaaaaab
sub ecx, dword [esi]
mov edi, dword [edi + 4]
imul ecx
mov dword [ebp - 0x254], 0
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
xor ecx, ecx
mov dword [ebp - 0x258], eax
mov dword [ebp - 0x238], ecx
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x260], edi
cmp edi, dword [eax + 8]
je 0x10021765
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.100121a0
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x22c], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
mov dword [ebp - 4], 0
jge 0x10020bea
push 0x104
lea ecx, [ebp - 0x22c]
call fcn.1000f500
mov esi, dword [ebp - 0x22c]
push str.History
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.101952b4
add esp, 8
test eax, eax
js 0x100217f5
cmp eax, dword [esi - 8]
jg 0x100217f5
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1002173c
mov byte [ebp - 4], 1
call fcn.1000ed90
mov ecx, eax
test ecx, ecx
je 0x1002178e
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x228], eax
mov eax, 0x101d26d8
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x228]
test eax, 0xffff0000
jne 0x10020c6f
movzx eax, ax
push eax
call fcn.1000f350
jmp 0x10020c7b
push 0xb
push 0x101d26d8
call fcn.1000f6e0
push 1
lea eax, [ebp - 0x228]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.100336a0
add esp, 0xc
mov edx, dword [ebp - 0x228]
or eax, 0xffffffff
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10020cb9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x230]
lea edx, [ebp - 0x268]
push edx
mov eax, dword [ecx]
mov eax, dword [eax]
call eax
push dword [eax]
lea eax, [ebp - 0x224]
mov byte [ebp - 4], 6
push str._s_history.db
push eax
call fcn.100120d0
mov edx, dword [ebp - 0x268]
add esp, 0xc
mov byte [ebp - 4], 5
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10020d08
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push dword [ebp - 0x224]
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push dword [ebp - 0x224]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10020d6e
mov edx, dword [ebp - 0x224]
or edi, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10020d4b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x10020d67
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
jmp 0x10021770
lea ecx, [ebp - 0x280]
call fcn.100acbb0
mov eax, dword [ebp - 0x224]
lea ecx, [ebp - 0x1e8]
mov byte [ebp - 4], 7
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x1ec], ecx
test eax, eax
jne 0x10020da4
mov dword [ebp - 0x1ec], eax
jmp 0x10020eb3
mov ecx, eax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10020db0
sub ecx, edx
sar ecx, 1
push 0x80
lea eax, [ecx + 1]
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x1e8]
shl eax, 2
push ecx
push eax
lea eax, [ebp - 0x1ec]
push eax
call fcn.1001a300
mov ecx, dword [ebp - 0x220]
add esp, 0x10
push 0
push 0
lea eax, [ecx*4]
push eax
push dword [ebp - 0x1ec]
push ecx
push dword [ebp - 0x21c]
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor ecx, ecx
test eax, eax
sete cl
mov dword [ebp - 0x218], ecx
test eax, eax
jne 0x10020ea5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x10020e9f
push 0
push 0
push 0
push 0
push dword [ebp - 0x220]
push dword [ebp - 0x21c]
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0x80
lea ecx, [ebp - 0x1e8]
mov dword [ebp - 0x218], eax
push ecx
push eax
lea eax, [ebp - 0x1ec]
push eax
call fcn.1001a300
add esp, 0x10
push 0
push 0
push dword [ebp - 0x218]
push dword [ebp - 0x1ec]
push dword [ebp - 0x220]
push dword [ebp - 0x21c]
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, eax
neg ecx
sbb ecx, ecx
inc ecx
jmp 0x10020ea5
mov ecx, dword [ebp - 0x218]
test ecx, ecx
jne 0x10021798
mov eax, dword [ebp - 0x1ec]
push eax
lea ecx, [ebp - 0x280]
mov byte [ebp - 4], 8
call fcn.100ad960
mov eax, dword [ebp - 0x1ec]
lea ecx, [ebp - 0x1e8]
mov byte [ebp - 4], 7
cmp eax, ecx
je 0x10020ee0
push eax
call fcn.10190ee6
add esp, 4
push str.select_url_title__visit_count__last_visit_time_from_urls_where_visit_count_1_order_by_last_visit_time_DESC
lea eax, [ebp - 0x2a0]
push eax
lea ecx, [ebp - 0x280]
call fcn.100ad540
mov byte [ebp - 4], 9
nop dword [eax + eax]
lea ecx, [ebp - 0x2a0]
call fcn.100ad3e0
test al, al
jne 0x10021540
mov ecx, dword [ebp - 0x254]
mov eax, ecx
inc ecx
mov dword [ebp - 0x254], ecx
cmp eax, dword [ebp + 0x10]
jge 0x10021540
lea ecx, [ebp - 0x250]
call fcn.10011110
push 0x101d2654
lea ecx, [ebp - 0x2a0]
mov byte [ebp - 4], 0xa
call fcn.100ad7a0
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x164]
mov dword [ebp - 0x168], ecx
test eax, eax
jne 0x10020f6d
xor edx, edx
mov dword [ebp - 0x168], edx
jmp 0x10021062
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10020f72
sub ecx, edx
push 0x80
lea eax, [ecx + 1]
lea ecx, [ebp - 0x164]
mov dword [ebp - 0x21c], eax
push ecx
push eax
lea eax, [ebp - 0x168]
push eax
call fcn.1001a380
mov eax, dword [ebp - 0x21c]
add esp, 0x10
push eax
push dword [ebp - 0x168]
push eax
push dword [ebp - 0x220]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
test eax, eax
sete cl
mov dword [ebp - 0x218], ecx
test eax, eax
jne 0x10021054
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1002104e
push 0
push 0
push dword [ebp - 0x21c]
push dword [ebp - 0x220]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x80
lea ecx, [ebp - 0x164]
mov dword [ebp - 0x218], eax
push ecx
push eax
lea eax, [ebp - 0x168]
push eax
call fcn.1001a380
add esp, 0x10
push dword [ebp - 0x218]
push dword [ebp - 0x168]
push dword [ebp - 0x21c]
push dword [ebp - 0x220]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
neg ecx
sbb ecx, ecx
inc ecx
jmp 0x10021054
mov ecx, dword [ebp - 0x218]
test ecx, ecx
jne 0x100217b7
mov edx, dword [ebp - 0x168]
mov byte [ebp - 4], 0xb
test edx, edx
jne 0x1002106e
xor ecx, ecx
jmp 0x10021093
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x218], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021080
sub ecx, dword [ebp - 0x218]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x248]
call fcn.1000f6e0
mov eax, dword [ebp - 0x168]
lea ecx, [ebp - 0x164]
mov byte [ebp - 4], 0xa
cmp eax, ecx
je 0x100210bd
push eax
call fcn.10190ee6
add esp, 4
push str.title
lea ecx, [ebp - 0x2a0]
call fcn.100ad7a0
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x164]
mov dword [ebp - 0x168], ecx
test eax, eax
jne 0x100210f0
xor edx, edx
mov dword [ebp - 0x168], edx
jmp 0x100211e5
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100210f5
sub ecx, edx
push 0x80
lea eax, [ecx + 1]
lea ecx, [ebp - 0x164]
mov dword [ebp - 0x21c], eax
push ecx
push eax
lea eax, [ebp - 0x168]
push eax
call fcn.1001a380
mov eax, dword [ebp - 0x21c]
add esp, 0x10
push eax
push dword [ebp - 0x168]
push eax
push dword [ebp - 0x220]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
test eax, eax
sete cl
mov dword [ebp - 0x218], ecx
test eax, eax
jne 0x100211d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x100211d1
push 0
push 0
push dword [ebp - 0x21c]
push dword [ebp - 0x220]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x80
lea ecx, [ebp - 0x164]
mov dword [ebp - 0x218], eax
push ecx
push eax
lea eax, [ebp - 0x168]
push eax
call fcn.1001a380
add esp, 0x10
push dword [ebp - 0x218]
push dword [ebp - 0x168]
push dword [ebp - 0x21c]
push dword [ebp - 0x220]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
neg ecx
sbb ecx, ecx
inc ecx
jmp 0x100211d7
mov ecx, dword [ebp - 0x218]
test ecx, ecx
jne 0x100217d6
mov edx, dword [ebp - 0x168]
mov byte [ebp - 4], 0xc
test edx, edx
jne 0x100211f1
xor eax, eax
jmp 0x10021213
mov eax, edx
lea ecx, [eax + 2]
mov dword [ebp - 0x218], ecx
nop dword [eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10021200
sub eax, dword [ebp - 0x218]
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x24c]
call fcn.1000f6e0
mov eax, dword [ebp - 0x168]
lea ecx, [ebp - 0x164]
mov byte [ebp - 4], 0xa
cmp eax, ecx
je 0x1002123d
push eax
call fcn.10190ee6
add esp, 4
push 0
push str.visit_count
lea ecx, [ebp - 0x2a0]
call fcn.100ad860
mov ecx, dword [ebp - 0x230]
lea edx, [ebp - 0x26c]
mov dword [ebp - 0x240], eax
push edx
mov eax, dword [ecx]
mov eax, dword [eax]
call eax
mov edx, dword [eax]
mov ecx, dword [ebp - 0x250]
add ecx, 0xfffffff0
mov byte [ebp - 4], 0xd
mov dword [ebp - 0x220], ecx
lea eax, [edx - 0x10]
mov dword [ebp - 0x218], eax
lea eax, [edx - 0x10]
cmp eax, ecx
je 0x100212f8
cmp dword [ecx + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [ebp - 0x21c], eax
jl 0x100212e9
mov eax, dword [edx - 0x10]
cmp eax, dword [ecx]
jne 0x100212e9
mov eax, dword [ebp - 0x218]
push eax
call fcn.100121a0
mov dword [ebp - 0x218], eax
add esp, 4
mov eax, dword [ebp - 0x21c]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100212d8
mov edx, dword [ebp - 0x220]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x218]
add eax, 0x10
mov dword [ebp - 0x250], eax
jmp 0x100212f8
push dword [edx - 0xc]
lea ecx, [ebp - 0x250]
push edx
call fcn.1000f6e0
mov edx, dword [ebp - 0x26c]
or eax, 0xffffffff
mov byte [ebp - 4], 0xa
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1002131a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x270]
push eax
call fcn.1002cbf0
add esp, 8
mov edx, dword [eax]
mov ecx, dword [ebp - 0x244]
add ecx, 0xfffffff0
mov byte [ebp - 4], 0xe
mov dword [ebp - 0x220], ecx
lea eax, [edx - 0x10]
mov dword [ebp - 0x218], eax
lea eax, [edx - 0x10]
cmp eax, ecx
je 0x100213c0
cmp dword [ecx + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [ebp - 0x21c], eax
jl 0x100213b1
mov eax, dword [edx - 0x10]
cmp eax, dword [ecx]
jne 0x100213b1
mov eax, dword [ebp - 0x218]
push eax
call fcn.100121a0
mov dword [ebp - 0x218], eax
add esp, 4
mov eax, dword [ebp - 0x21c]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100213a0
mov edx, dword [ebp - 0x220]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x218]
add eax, 0x10
mov dword [ebp - 0x244], eax
jmp 0x100213c0
push dword [edx - 0xc]
lea ecx, [ebp - 0x244]
push edx
call fcn.1000f6e0
mov edx, dword [ebp - 0x270]
or eax, 0xffffffff
mov byte [ebp - 4], 0xa
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100213e2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push 0
push str.last_visit_time
lea ecx, [ebp - 0x2a0]
call fcn.100ad820
cmp edx, 0x1634578
ja 0x1002142a
jb 0x10021407
cmp eax, 0x5d8a0000
jae 0x1002142a
mov dword [ebp - 0x21c], eax
mov ecx, edx
shld ecx, eax, 2
shl eax, 2
add dword [ebp - 0x21c], eax
mov eax, dword [ebp - 0x21c]
adc edx, ecx
shld edx, eax, 1
add eax, eax
mov dword [ebp - 0x288], eax
xorps xmm0, xmm0
lea eax, [ebp - 0x64]
mov dword [ebp - 0x284], edx
push eax
lea eax, [ebp - 0x288]
push eax
movups xmmword [ebp - 0x64], xmm0
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
push 0xac
lea eax, [ebp - 0x214]
push 0
push eax
call fcn.1018d4b0
add esp, 0xc
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
lea eax, [ebp - 0x24]
xorps xmm0, xmm0
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x214]
push eax
movups xmmword [ebp - 0x24], xmm0
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
movzx eax, word [ebp - 0x18]
push eax
movzx eax, word [ebp - 0x1a]
push eax
movzx eax, word [ebp - 0x1c]
push eax
movzx eax, word [ebp - 0x1e]
push eax
movzx eax, word [ebp - 0x22]
push eax
movzx eax, word [ebp - 0x24]
push eax
lea eax, [ebp - 0x23c]
push 0x101d2f50
push eax
call fcn.100132f0
mov eax, dword [ebp - 0x25c]
add esp, 0x20
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x100214e2
mov eax, dword [ecx]
lea edx, [ebp - 0x250]
push edx
mov eax, dword [eax + 8]
call eax
test eax, eax
je 0x10021599
mov ecx, dword [ebp - 0x234]
mov eax, dword [ecx + 4]
cmp dword [ecx + 8], eax
je 0x1002150a
lea ecx, [ebp - 0x250]
push ecx
mov ecx, eax
call fcn.10011040
mov eax, dword [ebp - 0x234]
add dword [eax + 4], 0x18
jmp 0x10021517
lea edx, [ebp - 0x250]
push edx
push eax
call fcn.100100e0
mov ecx, dword [ebp - 0x238]
mov eax, dword [ebp + 0x14]
inc ecx
sub eax, dword [ebp - 0x258]
mov dword [ebp - 0x238], ecx
cmp ecx, eax
jb 0x10021599
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 9
call fcn.10011610
lea ecx, [ebp - 0x2a0]
call fcn.100ad7c0
lea ecx, [ebp - 0x280]
call fcn.100ad2b0
lea ecx, [ebp - 0x2a0]
call fcn.100acf20
lea ecx, [ebp - 0x280]
call fcn.100ace60
mov edx, dword [ebp - 0x224]
or ecx, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
mov eax, ecx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1002173f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x1002173c
lea ecx, [ebp - 0x2a0]
call fcn.100ad8e0
mov edx, dword [ebp - 0x23c]
or eax, 0xffffffff
mov byte [ebp - 4], 9
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100215c6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x244]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100215e4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x248]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10021602
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x24c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10021620
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x250]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10020f00
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10020f00
or ecx, 0xffffffff
mov eax, ecx
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1002175d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 4
jmp 0x10020b8d
xor eax, eax
cmp dword [ebp - 0x238], eax
setne al
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.101799ce
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.10009b10
push 0x80
lea eax, [ebp - 0x1e8]
push eax
push dword [ebp - 0x1ec]
call fcn.1001a400
add esp, 0xc
call fcn.1001be50
push 0x80
lea eax, [ebp - 0x164]
push eax
push dword [ebp - 0x168]
call fcn.1001a400
add esp, 0xc
call fcn.1001be50
push 0x80
lea eax, [ebp - 0x164]
push eax
push dword [ebp - 0x168]
call fcn.1001a400
add esp, 0xc
call fcn.1001be50
push 0x80070057
call fcn.10009b10
int3