Function at 0x40fa23
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.0040346a
push 0x208
xor ebx, ebx
lea eax, [ebp - 0x4cc]
push ebx
push eax
call fcn.004012cf
push 0x104
lea eax, [ebp - 0x2c4]
mov dword [ebp - 0x9c], ebx
push ebx
push eax
mov edi, ebx
call fcn.004012cf
add esp, 0x14
lea edx, [ebp - 0x2c4]
mov ecx, str.thunderbird.exe
call fcn.0040e1df
pop ecx
lea eax, [ebp - 0x2c4]
push eax
lea ecx, [ebp - 0x34]
call fcn.0040346a
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.00403611
mov ecx, esi
call fcn.0040eb2d
test eax, eax
jne 0x40fadc
push ecx
lea eax, [ebp - 0x34]
mov ecx, esp
push eax
call fcn.00403611
mov ecx, esi
call fcn.0040eb2d
test eax, eax
jne 0x40fadc
mov esi, dword [ebp - 0x10]
jmp 0x41007b
push str.Thunderbird_
lea ecx, [ebp + 8]
call fcn.004034f3
mov dword [ebp - 0x1c], ebx
cmp dword [ebp + 8], ebx
je 0x40fb13
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
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.004034f3
push str.Profile
lea ecx, [ebp - 0x28]
call fcn.0040346a
push eax
lea ecx, [ebp - 0x10]
call fcn.004035de
mov ecx, dword [ebp - 0x28]
call fcn.004068b7
push ebx
lea ecx, [ebp - 0x10]
call fcn.00403591
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 0x410060
inc edi
lea ecx, [ebp - 0x38]
push str.Profile
mov dword [ebp - 0x98], edi
call fcn.0040346a
push eax
lea ecx, [ebp - 0x10]
call fcn.004035de
mov ecx, dword [ebp - 0x38]
call fcn.004068b7
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x38], ebx
call fcn.00403591
cmp dword [ebp + 8], 0
mov dword [ebp - 0x24], ebx
je 0x40fbc7
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
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.004034f3
mov esi, dword [ebp - 0x24]
mov edi, ebx
mov dword [ebp - 0x20], edi
test esi, esi
je 0x40fc4d
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.00406875
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.004037f9
push eax
lea ecx, [ebp - 0x20]
call fcn.00403881
mov ecx, dword [ebp - 0xa0]
call fcn.004068b7
mov ecx, ebx
call fcn.004068b7
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 0x41002d
mov eax, dword [ebp - 0x14]
call dword [eax + 0x9c]
mov ecx, eax
mov dword [ebp - 0x94], ecx
test ecx, ecx
je 0x41002d
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 0x41002d
mov dword [ebp - 0xc], ebx
test esi, esi
je 0x40fcba
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
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.004034f3
push 0x1a
pop edx
lea ecx, [ebp - 8]
call fcn.00414891
push 0x41a58c
lea ecx, [ebp - 8]
call fcn.004034f3
push 8
pop edx
lea ecx, [ebp - 0x3c]
call fcn.00403700
push eax
lea ecx, [ebp - 8]
call fcn.004034b6
mov ecx, dword [ebp - 0x3c]
call fcn.004068b7
push str..tmp
lea ecx, [ebp - 8]
mov dword [ebp - 0x3c], ebx
call fcn.004034f3
push ebx
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40fd28
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0xc]
call fcn.004035de
lea ecx, [ebp - 0xb8]
call fcn.00414e14
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0xb4], ebx
test eax, eax
je 0x40fd63
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406886
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.00415134
lea ecx, [ebp - 0xb8]
test eax, eax
je 0x410015
push ebx
push dword [ebp - 0xa4]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], ebx
push eax
mov dword [ebp - 0x2c], ebx
call fcn.004151c9
push str.encryptedUsername
lea ecx, [ebp - 0x68]
call fcn.004037f9
mov ebx, eax
lea ecx, [ebp - 0x30]
lea eax, [ebp - 0x64]
push eax
call fcn.00403307
mov edx, ebx
mov ecx, eax
call fcn.00410a75
mov ecx, dword [ebp - 0x64]
mov ebx, eax
mov dword [ebp - 0x18], eax
call fcn.004068b7
mov ecx, dword [ebp - 0x68]
call fcn.004068b7
test ebx, ebx
je 0x40ffa1
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.004037f9
mov ebx, eax
lea ecx, [ebp - 0x30]
lea eax, [ebp - 0x6c]
push eax
call fcn.00403307
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x28]
push ebx
call fcn.004109f6
pop ecx
pop ecx
mov ecx, dword [ebp - 0x6c]
call fcn.004068b7
mov ecx, dword [ebp - 0x70]
call fcn.004068b7
push str.encryptedUsername
lea ecx, [ebp - 0x78]
call fcn.004037f9
mov ebx, eax
lea ecx, [ebp - 0x30]
lea eax, [ebp - 0x74]
push eax
call fcn.00403307
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x50]
push ebx
call fcn.004109f6
pop ecx
pop ecx
mov ecx, dword [ebp - 0x74]
call fcn.004068b7
mov ecx, dword [ebp - 0x78]
call fcn.004068b7
push str.encryptedPassword
lea ecx, [ebp - 0x80]
call fcn.004037f9
mov ebx, eax
lea ecx, [ebp - 0x30]
lea eax, [ebp - 0x7c]
push eax
call fcn.00403307
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x4c]
push ebx
call fcn.004109f6
pop ecx
pop ecx
mov ecx, dword [ebp - 0x7c]
call fcn.004068b7
mov ecx, dword [ebp - 0x80]
call fcn.004068b7
lea eax, [ebp - 0x84]
mov ecx, edi
push eax
push dword [ebp - 0x50]
call fcn.0040f28a
lea eax, [ebp - 0x8c]
mov ecx, edi
push eax
push dword [ebp - 0x4c]
call fcn.0040f28a
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x28]
call fcn.004038f5
push eax
lea ecx, [ebp - 0x60]
call fcn.004035de
mov ecx, dword [ebp - 0x40]
call fcn.004068b7
push dword [ebp - 0x84]
mov dword [ebp - 0x40], esi
lea ecx, [ebp - 0x88]
call fcn.004037f9
lea ecx, [ebp - 0x44]
push ecx
mov ecx, eax
call fcn.004038f5
push eax
lea ecx, [ebp - 0x5c]
call fcn.004035de
mov ecx, dword [ebp - 0x44]
call fcn.004068b7
mov ecx, dword [ebp - 0x88]
mov dword [ebp - 0x44], esi
call fcn.004068b7
push dword [ebp - 0x8c]
lea ecx, [ebp - 0x90]
call fcn.004037f9
lea ecx, [ebp - 0x48]
push ecx
mov ecx, eax
call fcn.004038f5
push eax
lea ecx, [ebp - 0x58]
call fcn.004035de
mov ecx, dword [ebp - 0x48]
call fcn.004068b7
mov ecx, dword [ebp - 0x90]
mov dword [ebp - 0x48], esi
call fcn.004068b7
sub esp, 0x10
mov dword [ebp - 0x54], 4
lea eax, [ebp - 0x60]
mov ecx, esp
push eax
call fcn.0040c5c4
mov ecx, edi
call fcn.00410e2d
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x4c]
dec ebx
mov dword [ebp - 0x18], ebx
call fcn.004068b7
mov ecx, dword [ebp - 0x50]
call fcn.004068b7
mov ecx, dword [ebp - 0x28]
call fcn.004068b7
lea ecx, [ebp - 0x60]
call fcn.00402933
test ebx, ebx
jne 0x40fdde
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 0x40ffe7
push ecx
mov eax, esp
mov dword [ebp - 0x20], eax
mov dword [eax], ebx
cmp dword [ebp - 8], ebx
je 0x40ffe1
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
mov ecx, dword [ebp - 0x20]
push dword [ebp - 8]
push eax
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
call fcn.004150e5
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 0x41000c
call fcn.00406955
mov dword [ebp - 0x30], ebx
lea ecx, [ebp - 0xb8]
call fcn.00414e30
mov ecx, dword [ebp - 8]
call fcn.004068b7
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 8], ebx
call fcn.004068b7
mov ecx, edi
call fcn.004068b7
mov ecx, esi
call fcn.004068b7
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 0x40fb6b
mov ecx, dword [ebp - 0x14]
call fcn.0040ead6
mov ecx, dword [ebp - 0x1c]
xor ebx, ebx
inc ebx
call fcn.004068b7
mov ecx, dword [ebp - 0x34]
call fcn.004068b7
mov ecx, esi
call fcn.004068b7
mov ecx, dword [ebp + 8]
call fcn.004068b7
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 4