Function at 0x405ce0
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41ea51
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x16c
push ebx
push ebp
push esi
push edi
mov ebp, ecx
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x70]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push eax
xor ebx, ebx
push 0xf01ff
mov dword [esp + 0x3c], 0x104
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x405f45
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x74]
push edx
push eax
call dword [sym.imp.USERENV.dll_GetUserProfileDirectoryA]
test eax, eax
je 0x405f45
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esp + 0x70]
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x405d70
mov ecx, 8
mov esi, str.Application_DataMozillaFirefox_
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov edi, 0xf
lea eax, [esp + 0x70]
mov dword [esp + 0x6c], edi
mov dword [esp + 0x68], ebx
mov byte [esp + 0x58], bl
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405da0
sub eax, edx
push eax
lea edx, [esp + 0x74]
push edx
lea ecx, [esp + 0x5c]
call fcn.00401d80
push 0xc
push str.profiles.ini
lea ecx, [esp + 0x5c]
mov dword [esp + 0x18c], ebx
call fcn.004049d0
lea eax, [esp + 0x70]
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405de2
sub eax, edx
push eax
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x20]
call fcn.00401d80
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
mov eax, dword [esp + 0x6c]
mov esi, 0x10
cmp eax, esi
mov eax, dword [esp + 0x58]
mov byte [esp + 0x184], 2
jae 0x405e23
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, ebp
call fcn.004052e0
test eax, eax
jne 0x405e8e
cmp dword [esp + 0x50], esi
jb 0x405e47
mov edx, dword [esp + 0x3c]
push edx
call fcn.004186e7
add esp, 4
cmp dword [esp + 0x30], esi
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
jb 0x405e66
mov eax, dword [esp + 0x1c]
push eax
call fcn.004186e7
add esp, 4
cmp dword [esp + 0x6c], esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
jb 0x405f45
mov ecx, dword [esp + 0x58]
push ecx
call fcn.004186e7
add esp, 4
jmp 0x405f45
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x24]
call fcn.004048e0
push 0xc
push str.extensions_
lea ecx, [esp + 0x20]
call fcn.004049d0
push 0x26
push str.1B33E42F_EF14_4cd3_B6DC_174571C4349C
lea ecx, [esp + 0x20]
call fcn.004049d0
cmp dword [esp + 0x30], esi
mov eax, dword [esp + 0x1c]
jae 0x405ecd
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405f2a
test al, 0x10
je 0x405f2a
cmp dword [esp + 0x30], esi
mov eax, dword [esp + 0x1c]
jae 0x405eeb
lea eax, [esp + 0x1c]
push eax
mov ecx, ebp
call fcn.00404710
test al, al
je 0x405f2a
lea ecx, [esp + 0x38]
call fcn.004015a0
lea ecx, [esp + 0x18]
call fcn.004015a0
lea ecx, [esp + 0x54]
call fcn.004015a0
xor eax, eax
mov ecx, dword [esp + 0x17c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x38]
call fcn.004015a0
lea ecx, [esp + 0x18]
call fcn.004015a0
lea ecx, [esp + 0x54]
call fcn.004015a0
mov ecx, dword [esp + 0x17c]
pop edi
mov eax, 1
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret