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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
push edi
mov dword [ebp - 0x14], ecx
xor ebx, ebx
push 0x1a
pop edx
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x10], ebx
call fcn.00414891
push 0x41a58c
lea ecx, [ebp - 0xc]
call fcn.004034f3
push 8
pop edx
lea ecx, [ebp - 0x28]
call fcn.00403700
push eax
lea ecx, [ebp - 0xc]
call fcn.004034b6
mov ecx, dword [ebp - 0x28]
call fcn.004068b7
push str..tmp
lea ecx, [ebp - 0xc]
call fcn.004034f3
push 0x1c
pop edx
lea ecx, [ebp - 0x28]
call fcn.00414891
push eax
lea ecx, [ebp - 0x10]
call fcn.004035de
mov ecx, dword [ebp - 0x28]
call fcn.004068b7
push str.GoogleChromeUser_DataDefaultHistory
lea ecx, [ebp - 0x10]
call fcn.004034f3
mov edi, dword [ebp - 0x10]
push edi
mov dword [ebp - 0x10], edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [ebp - 0xc]
test eax, eax
je 0x40cf16
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40cf16
mov eax, ebx
mov dword [ebp - 0x10], eax
test esi, esi
je 0x40ce53
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406886
push esi
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov edi, ebx
mov dword [ebp - 0x1c], edi
mov ecx, dword [ecx + 0x40]
mov dword [ebp - 0x24], ecx
test eax, eax
je 0x40ced2
mov edi, dword [ebp - 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
push ebx
push ebx
push ebx
push eax
push edi
push 0x200
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
mov ecx, ebx
call fcn.00406875
push edi
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
push ecx
push ecx
push ebx
mov ebx, dword [ebp - 0x28]
push ebx
push eax
push edi
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
lea ecx, [ebp - 0x28]
call fcn.004037f9
push eax
lea ecx, [ebp - 0x1c]
call fcn.00403881
mov ecx, dword [ebp - 0x28]
call fcn.004068b7
mov ecx, ebx
call fcn.004068b7
mov edi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x18]
push eax
push edi
call ecx
pop ecx
pop ecx
mov ecx, edi
mov ebx, eax
call fcn.004068b7
test ebx, ebx
je 0x40cf36
push ecx
mov edi, esp
xor ebx, ebx
mov dword [edi], ebx
test esi, esi
je 0x40cf10
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
push esi
push eax
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
call fcn.004150e5
pop ecx
mov eax, ebx
mov ebx, eax
mov dword [ebp - 0x28], ebx
mov ecx, esi
call fcn.004068b7
mov ecx, dword [ebp - 0x10]
call fcn.004068b7
mov eax, dword [ebp - 0x28]
pop edi
pop esi
pop ebx
leave
ret 0x10
mov edi, dword [ebp - 0x14]
lea ecx, [ebp - 4]
xor ebx, ebx
push ebx
push ecx
mov eax, dword [edi + 0x44]
push 0xffffffffffffffff
push str.SELECT_url__title__visit_count__last_visit_time_FROM_urls
push dword [ebp - 0x18]
call eax
add esp, 0x14
mov dword [ebp - 0x28], 1
test eax, eax
jne 0x40d1b7
mov ecx, 0x3a96c
call fcn.0040698f
mov ecx, 0x270f
test eax, eax
je 0x40cf90
lea edx, [eax + 4]
mov dword [eax], ecx
mov eax, edx
mov dword [eax], ebx
lea eax, [eax + 0x18]
mov dword [eax - 0x14], ebx
sub ecx, 1
jne 0x40cf7b
mov dword [0x420728], edx
jmp 0x40cf96
mov dword [0x420728], ebx
push dword [ebp - 4]
mov eax, dword [edi + 0x60]
mov dword [0x42072c], ebx
call eax
pop ecx
cmp eax, 0x64
jne 0x40d123
mov esi, edi
mov eax, dword [esi + 0x4c]
mov edi, ebx
push ebx
push dword [ebp - 4]
mov dword [ebp - 8], ebx
mov dword [ebp - 0x1c], edi
call eax
pop ecx
pop ecx
cmp byte [eax], bl
je 0x40cfe1
push eax
lea ecx, [ebp - 0x2c]
call fcn.004037f9
push eax
lea ecx, [ebp - 8]
call fcn.00403881
mov ecx, dword [ebp - 0x2c]
call fcn.004068b7
mov eax, dword [esi + 0x4c]
push 1
push dword [ebp - 4]
call eax
pop ecx
pop ecx
cmp byte [eax], bl
je 0x40d00e
push eax
lea ecx, [ebp - 0x30]
call fcn.004037f9
push eax
lea ecx, [ebp - 0x1c]
call fcn.00403881
mov ecx, dword [ebp - 0x30]
call fcn.004068b7
mov edi, dword [ebp - 0x1c]
mov eax, dword [esi + 0x50]
push 2
push dword [ebp - 4]
call eax
mov ecx, dword [esi + 0x54]
push 3
push dword [ebp - 4]
mov dword [ebp - 0x34], eax
call ecx
mov dword [ebp - 0x38], eax
add esp, 0x10
mov eax, dword [ebp - 8]
mov dword [ebp - 0x3c], edx
test eax, eax
je 0x40d040
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jg 0x40d057
test edi, edi
je 0x40d0fc
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x40d0fc
mov eax, dword [ebp - 8]
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
test eax, eax
je 0x40d08f
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x40d08f
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 8]
call fcn.004038f5
push eax
lea ecx, [ebp - 0x58]
call fcn.004035de
mov ecx, dword [ebp - 0x20]
call fcn.004068b7
mov dword [ebp - 0x20], ebx
test edi, edi
je 0x40d0be
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x40d0be
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004038f5
push eax
lea ecx, [ebp - 0x54]
call fcn.004035de
mov ecx, dword [ebp - 0x24]
call fcn.004068b7
mov dword [ebp - 0x24], ebx
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x44], eax
mov eax, dword [0x42072c]
cmp eax, 0x270f
je 0x40d0f4
lea ecx, [ebp - 0x58]
push ecx
imul ecx, eax, 0x18
add ecx, dword [0x420728]
call fcn.0040d226
inc dword [0x42072c]
lea ecx, [ebp - 0x58]
call fcn.004026fc
mov ecx, edi
call fcn.004068b7
mov ecx, dword [ebp - 8]
call fcn.004068b7
push dword [ebp - 4]
mov eax, dword [esi + 0x60]
call eax
pop ecx
cmp eax, 0x64
je 0x40cfb0
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x14]
cmp eax, 0x65
jne 0x40d16b
push dword [ebp - 4]
call dword [edi + 0x7c]
push dword [ebp - 0x18]
call dword [0x420944]
pop ecx
mov edi, esp
mov dword [edi], ebx
test esi, esi
je 0x40d15d
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
push esi
push eax
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
call fcn.004150e5
xor eax, eax
pop ecx
inc eax
jmp 0x40cf18
test eax, eax
je 0x40d1b7
push ecx
mov eax, esp
mov dword [ebp - 0x3c], eax
mov dword [eax], ebx
test esi, esi
je 0x40d19b
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
mov ecx, dword [ebp - 0x3c]
push esi
push eax
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
call fcn.004150e5
push dword [ebp - 4]
call dword [edi + 0x7c]
push dword [ebp - 0x18]
call dword [0x420944]
add esp, 0xc
jmp 0x40cf1a
push dword [ebp - 4]
call dword [edi + 0x7c]
push dword [ebp - 0x18]
call dword [0x420944]
pop ecx
mov edi, esp
mov dword [edi], ebx
test esi, esi
je 0x40d1ec
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
push esi
push eax
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
call fcn.004150e5
pop ecx
jmp 0x40cf1d