Function at 0x40d25c
Capabilities:
Check if file exists
Copy file
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x27c
push ebx
push esi
push edi
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x18]
push 0x1a
pop edx
call fcn.00414891
push str.MozillaFirefox_
lea ecx, [ebp - 0x18]
call fcn.004034f3
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00403611
push str.profiles.ini
lea ecx, [ebp - 0x2c]
call fcn.004034f3
push str.Profile
lea ecx, [ebp - 0x24]
call fcn.0040346a
xor ebx, ebx
lea ecx, [ebp - 0x24]
push ebx
mov esi, ebx
call fcn.00403591
push 0x208
lea eax, [ebp - 0x278]
push ebx
push eax
call fcn.004012cf
add esp, 0xc
mov ecx, 0x3a96c
call fcn.0040698f
mov ecx, 0x270f
test eax, eax
je 0x40d2fa
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 0x40d2e5
mov dword [0x420728], edx
jmp 0x40d300
mov dword [0x420728], ebx
push dword [ebp - 0x2c]
lea eax, [ebp - 0x278]
mov dword [0x42072c], ebx
push 0x104
push eax
push ebx
push str.Path
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edi, dword [ebp - 0x18]
test eax, eax
je 0x40d7a4
inc esi
lea ecx, [ebp - 0x38]
push str.Profile
mov dword [ebp - 0x1c], esi
call fcn.0040346a
push eax
lea ecx, [ebp - 0x24]
call fcn.004035de
mov ecx, dword [ebp - 0x38]
call fcn.004068b7
push esi
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x38], ebx
call fcn.00403591
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
call fcn.00403611
lea eax, [ebp - 0x278]
push eax
lea ecx, [ebp - 0x14]
call fcn.004034f3
push str.places.sqlite
mov ecx, eax
call fcn.00403551
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d800
push 0x1a
pop edx
lea ecx, [ebp - 0x20]
call fcn.00414891
push 0x41a58c
lea ecx, [ebp - 0x20]
call fcn.004034f3
push 8
pop edx
lea ecx, [ebp - 0x3c]
call fcn.00403700
push eax
lea ecx, [ebp - 0x20]
call fcn.004034b6
mov ecx, dword [ebp - 0x3c]
call fcn.004068b7
push str..tmp
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x3c], ebx
call fcn.004034f3
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [ebp - 0x20]
test eax, eax
je 0x40d7f9
push ebx
push esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40d7f9
mov edi, ebx
mov dword [ebp - 0x18], edi
test esi, esi
je 0x40d427
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406886
mov edi, eax
push esi
push edi
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x40]
mov dword [ebp - 0x30], eax
mov eax, ebx
mov dword [ebp - 8], eax
test edi, edi
je 0x40d4a0
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 - 0xc], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
push ecx
push ecx
push ebx
mov ebx, dword [ebp - 0xc]
push ebx
push eax
push edi
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
lea ecx, [ebp - 0x48]
call fcn.004037f9
push eax
lea ecx, [ebp - 8]
call fcn.00403881
mov ecx, dword [ebp - 0x48]
call fcn.004068b7
mov ecx, ebx
call fcn.004068b7
mov eax, dword [ebp - 8]
lea ecx, [ebp - 0x28]
push ecx
push eax
call dword [ebp - 0x30]
pop ecx
pop ecx
mov ecx, dword [ebp - 8]
mov ebx, eax
call fcn.004068b7
test ebx, ebx
jne 0x40d7c5
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 4]
push ebx
push ecx
push 0xffffffffffffffff
mov eax, dword [eax + 0x44]
push str.SELECT_url__title__visit_count__last_visit_date_FROM_moz_places
push dword [ebp - 0x28]
call eax
add esp, 0x14
test eax, eax
jne 0x40d67f
mov eax, dword [ebp - 0x10]
push dword [ebp - 4]
mov eax, dword [eax + 0x60]
call eax
pop ecx
cmp eax, 0x64
jne 0x40d66e
mov esi, dword [ebp - 0x10]
mov eax, dword [esi + 0x4c]
push ebx
push dword [ebp - 4]
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
call eax
pop ecx
pop ecx
cmp byte [eax], bl
je 0x40d525
push eax
lea ecx, [ebp - 0x4c]
call fcn.004037f9
push eax
lea ecx, [ebp - 8]
call fcn.00403881
mov ecx, dword [ebp - 0x4c]
call fcn.004068b7
mov eax, dword [esi + 0x4c]
push 1
push dword [ebp - 4]
call eax
pop ecx
pop ecx
test eax, eax
je 0x40d553
cmp byte [eax], bl
je 0x40d553
push eax
lea ecx, [ebp - 0x50]
call fcn.004037f9
push eax
lea ecx, [ebp - 0xc]
call fcn.00403881
mov ecx, dword [ebp - 0x50]
call fcn.004068b7
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 - 0x30], eax
call ecx
mov dword [ebp - 0x54], eax
add esp, 0x10
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], edx
test eax, eax
je 0x40d585
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jg 0x40d59f
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x40d64a
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x40d647
mov eax, dword [ebp - 8]
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x6c], ebx
test eax, eax
je 0x40d5d7
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x40d5d7
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 8]
call fcn.004038f5
push eax
lea ecx, [ebp - 0x70]
call fcn.004035de
mov ecx, dword [ebp - 0x40]
call fcn.004068b7
mov dword [ebp - 0x40], ebx
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x40d609
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x40d609
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0xc]
call fcn.004038f5
push eax
lea ecx, [ebp - 0x6c]
call fcn.004035de
mov ecx, dword [ebp - 0x44]
call fcn.004068b7
mov dword [ebp - 0x44], ebx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x5c], eax
mov eax, dword [0x42072c]
cmp eax, 0x270f
je 0x40d63f
lea ecx, [ebp - 0x70]
push ecx
imul ecx, eax, 0x18
add ecx, dword [0x420728]
call fcn.0040d226
inc dword [0x42072c]
lea ecx, [ebp - 0x70]
call fcn.004026fc
mov eax, dword [ebp - 0xc]
mov ecx, eax
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 0x40d4f6
mov esi, dword [ebp - 0x20]
cmp eax, 0x65
je 0x40d751
test eax, eax
jne 0x40d706
mov eax, dword [ebp - 0x10]
push dword [ebp - 4]
call dword [eax + 0x7c]
push dword [ebp - 0x28]
call dword [0x420944]
pop ecx
mov eax, esp
mov dword [ebp - 0x34], eax
mov dword [eax], ebx
test esi, esi
je 0x40d6bd
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
mov ecx, dword [ebp - 0x34]
push esi
push eax
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
call fcn.004150e5
pop ecx
mov ecx, esi
call fcn.004068b7
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x20], ebx
call fcn.004068b7
push dword [ebp - 0x2c]
lea eax, [ebp - 0x278]
mov dword [ebp - 0x14], ebx
push 0x104
push eax
push ebx
push str.Path
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x40d7a4
mov esi, dword [ebp - 0x1c]
jmp 0x40d32f
push ecx
mov eax, esp
mov dword [ebp - 0x1c], eax
mov dword [eax], ebx
test esi, esi
je 0x40d732
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
mov ecx, dword [ebp - 0x1c]
push esi
push eax
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
call fcn.004150e5
mov eax, dword [ebp - 0x10]
push dword [ebp - 4]
call dword [eax + 0x7c]
push dword [ebp - 0x28]
call dword [0x420944]
add esp, 0xc
jmp 0x40d7f9
mov eax, dword [ebp - 0x10]
push dword [ebp - 4]
call dword [eax + 0x7c]
push dword [ebp - 0x28]
call dword [0x420944]
pop ecx
mov eax, esp
mov dword [ebp - 0x1c], eax
mov dword [eax], ebx
test esi, esi
je 0x40d78f
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
mov ecx, dword [ebp - 0x1c]
push esi
push eax
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
call fcn.004150e5
pop ecx
mov ecx, esi
call fcn.004068b7
mov ecx, dword [ebp - 0x14]
call fcn.004068b7
xor ebx, ebx
inc ebx
mov ecx, dword [ebp - 0x24]
call fcn.004068b7
mov ecx, dword [ebp - 0x2c]
call fcn.004068b7
mov ecx, edi
call fcn.004068b7
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret
push ecx
mov eax, esp
xor ebx, ebx
mov dword [ebp - 0x1c], eax
mov dword [eax], ebx
test esi, esi
je 0x40d7f3
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
mov ecx, dword [ebp - 0x1c]
push esi
push eax
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
call fcn.004150e5
pop ecx
mov ecx, esi
call fcn.004068b7
mov ecx, dword [ebp - 0x14]
call fcn.004068b7
jmp 0x40d7a7