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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41e8a1
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 0x405da5
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 0x405da5
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 0x405bd0
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 0x405c00
sub eax, edx
push eax
lea edx, [esp + 0x74]
push edx
lea ecx, [esp + 0x5c]
call fcn.00401d30
push 0xc
push str.profiles.ini
lea ecx, [esp + 0x5c]
mov dword [esp + 0x18c], ebx
call fcn.00404830
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 0x405c42
sub eax, edx
push eax
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x20]
call fcn.00401d30
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 0x405c83
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, ebp
call fcn.00405140
test eax, eax
jne 0x405cee
cmp dword [esp + 0x50], esi
jb 0x405ca7
mov edx, dword [esp + 0x3c]
push edx
call fcn.00418537
add esp, 4
cmp dword [esp + 0x30], esi
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
jb 0x405cc6
mov eax, dword [esp + 0x1c]
push eax
call fcn.00418537
add esp, 4
cmp dword [esp + 0x6c], esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
jb 0x405da5
mov ecx, dword [esp + 0x58]
push ecx
call fcn.00418537
add esp, 4
jmp 0x405da5
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x24]
call fcn.00404740
push 0xc
push str.extensions_
lea ecx, [esp + 0x20]
call fcn.00404830
push 0x26
push str.1B33E42F_EF14_4cd3_B6DC_174571C4349C
lea ecx, [esp + 0x20]
call fcn.00404830
cmp dword [esp + 0x30], esi
mov eax, dword [esp + 0x1c]
jae 0x405d2d
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405d8a
test al, 0x10
je 0x405d8a
cmp dword [esp + 0x30], esi
mov eax, dword [esp + 0x1c]
jae 0x405d4b
lea eax, [esp + 0x1c]
push eax
mov ecx, ebp
call fcn.00404570
test al, al
je 0x405d8a
lea ecx, [esp + 0x38]
call fcn.00401550
lea ecx, [esp + 0x18]
call fcn.00401550
lea ecx, [esp + 0x54]
call fcn.00401550
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.00401550
lea ecx, [esp + 0x18]
call fcn.00401550
lea ecx, [esp + 0x54]
call fcn.00401550
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