Function at 0x40a420
Capabilities:
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43a15f
mov eax, dword fs:[0]
push eax
sub esp, 0x380
mov eax, dword [0x449570]
xor eax, esp
mov dword [esp + 0x378], eax
push ebx
push esi
push edi
mov eax, dword [0x449570]
xor eax, esp
push eax
lea eax, [esp + 0x390]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x2c], ebx
lea esi, [ebx + 0x34]
call fcn.00406b10
cmp dword [esi + 0x14], 8
mov ecx, dword [esi + 0x10]
jb 0x40a479
mov esi, dword [esi]
push ecx
push ecx
push esi
mov ecx, eax
call fcn.0040f510
cmp eax, 0xffffffff
setne al
mov byte [ebx + 0x94], al
push 0xd
xor eax, eax
push str.GacelaAppPath
lea ecx, [esp + 0x1c]
mov bh, 1
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
call fcn.00404220
xor eax, eax
mov dword [esp + 0x398], 0
xor ecx, ecx
cmp word [str.SOFTWARE_nuragoGacela2Config], cx
mov word [esp + 0x34], ax
mov eax, 0x1e
cmove eax, ecx
push eax
push str.SOFTWARE_nuragoGacela2Config
lea ecx, [esp + 0x3c]
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], 0
call fcn.00404220
lea eax, [esp + 0x14]
push eax
lea edx, [esp + 0x38]
lea ecx, [esp + 0x150]
mov byte [esp + 0x39c], bh
call fcn.00415050
add esp, 4
cmp dword [esp + 0x48], 8
jb 0x40a52c
push dword [esp + 0x34]
call fcn.0041df62
add esp, 4
xor eax, eax
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], 0
mov word [esp + 0x34], ax
mov byte [esp + 0x398], 4
cmp dword [esp + 0x28], 8
jb 0x40a55e
push dword [esp + 0x14]
call fcn.0041df62
add esp, 4
mov esi, dword [esp + 0x160]
mov edi, dword [esp + 0x14c]
mov edx, dword [esp + 0x15c]
xor eax, eax
mov word [esp + 0x14], ax
cmp esi, 8
lea eax, [esp + 0x14c]
cmovae eax, edi
mov dword [esp + 0x28], 7
cmp word [eax + edx*2 - 2], 0x5c
mov dword [esp + 0x24], 0
jne 0x40a5ca
lea ecx, [edx - 1]
cmp edx, ecx
jae 0x40a5b0
push str.invalid_string_position
call fcn.0041da4c
cmp esi, 8
lea eax, [esp + 0x14c]
cmovae eax, edi
xor edx, edx
mov dword [esp + 0x15c], ecx
mov word [eax + ecx*2], dx
xor eax, eax
push 0x206
push eax
mov word [esp + 0x184], ax
lea eax, [esp + 0x186]
push eax
call fcn.004219e0
add esp, 0xc
lea eax, [esp + 0x17c]
push eax
push 0
push dword [0x44af18]
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
xor eax, eax
mov dword [esp + 0x148], 7
mov dword [esp + 0x144], 0
mov word [esp + 0x134], ax
cmp word [esp + 0x17c], ax
jne 0x40a632
xor ecx, ecx
jmp 0x40a64f
lea ecx, [esp + 0x17c]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a640
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0x180]
push eax
lea ecx, [esp + 0x13c]
call fcn.00404220
push 0x1d
push str.MozillaFirefoxprofiles.ini
lea ecx, [esp + 0x13c]
mov byte [esp + 0x3a0], 5
call fcn.00411b00
push ecx
lea ecx, [esp + 0x60]
mov dword [esp + 0x50], 0x443150
mov dword [esp + 0xe8], 0
mov dword [esp + 0xec], 0
mov dword [esp + 0xf0], 0
mov dword [esp + 0xf8], 0
mov dword [esp + 0xfc], 0
call fcn.00406520
sub esp, 0xc
lea eax, [esp + 0x140]
push eax
lea ecx, [esp + 0x5c]
call fcn.0040ddb0
mov byte [esp + 0x398], 6
cmp dword [esp + 0xac], 0
je 0x40aae7
xor eax, eax
mov dword [esp + 0x178], 7
mov dword [esp + 0x174], 0
mov word [esp + 0x164], ax
mov dword [esp + 0x118], 7
mov dword [esp + 0x114], eax
mov word [esp + 0x104], ax
xor al, al
mov byte [esp + 0x398], 8
mov ecx, dword [esp + 0x4c]
add ecx, 4
xor bl, bl
mov byte [esp + 0x10], 1
mov dword [esp + 0x30], eax
mov eax, dword [ecx]
cmp dword [esp + eax + 0x58], 0
jne 0x40aa66
mov edi, dword [esp + 0x2c]
lea esp, [esp]
xor eax, eax
mov dword [esp + 0x130], 7
mov dword [esp + 0x12c], 0
mov word [esp + 0x11c], ax
mov eax, dword [ecx]
lea ecx, [esp + 0x4c]
add ecx, eax
lea eax, [esp + 0x2c]
push eax
call fcn.00401b10
push eax
mov byte [esp + 0x39c], 0xa
call fcn.00404b60
mov byte [esp + 0x39c], 9
mov ecx, dword [esp + 0x30]
add esp, 4
mov esi, eax
test ecx, ecx
je 0x40a7c6
mov edx, dword [ecx]
call dword [edx + 8]
test eax, eax
je 0x40a7c6
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
mov eax, dword [esi]
push 0xa
mov ecx, esi
call dword [eax + 0x30]
movzx eax, ax
push eax
lea edx, [esp + 0x120]
lea ecx, [esp + 0x50]
call fcn.00414e10
add esp, 4
push 8
push ecx
push str._Profile
lea ecx, [esp + 0x128]
call fcn.0040f510
test eax, eax
jne 0x40a8ae
cmp dword [esp + 0x174], eax
je 0x40a863
test bl, bl
je 0x40a863
lea eax, [esp + 0x17c]
push eax
lea ecx, [esp + 0x18]
call fcn.00402eb0
lea eax, [esp + 0x14c]
push eax
push dword [esp + 0x14]
lea eax, [esp + 0x10c]
push eax
lea eax, [esp + 0x20]
push eax
mov ecx, edi
mov byte [esp + 0x3a8], 0xb
call fcn.0040aca0
mov byte [esp + 0x398], 9
cmp dword [esp + 0x28], 8
jb 0x40a863
push dword [esp + 0x14]
call fcn.0041df62
add esp, 4
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x124]
push eax
lea ecx, [esp + 0x170]
call fcn.00403ba0
cmp dword [esp + 0x118], 8
lea eax, [esp + 0x104]
cmovae eax, dword [esp + 0x104]
xor ecx, ecx
mov dword [esp + 0x114], 0
mov word [eax], cx
mov byte [esp + 0x10], 1
xor bl, bl
jmp 0x40a9c7
push 5
push ecx
push str.Path
lea ecx, [esp + 0x128]
call fcn.0040f510
test eax, eax
jne 0x40a94b
push 0xffffffffffffffff
push 5
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x128]
call fcn.0040c9e0
mov esi, eax
lea eax, [esp + 0x104]
cmp eax, esi
je 0x40a932
cmp dword [esp + 0x118], 8
jb 0x40a905
push dword [esp + 0x104]
call fcn.0041df62
add esp, 4
xor eax, eax
push esi
lea ecx, [esp + 0x108]
mov dword [esp + 0x11c], 7
mov dword [esp + 0x118], 0
mov word [esp + 0x108], ax
call fcn.00403b40
cmp dword [esp + 0x28], 8
jb 0x40a9c7
push dword [esp + 0x14]
call fcn.0041df62
add esp, 4
jmp 0x40a9c7
push 0xa
push ecx
push str.IsRelative
lea ecx, [esp + 0x128]
call fcn.0040f510
test eax, eax
jne 0x40a987
push 0xc
push str.IsRelative1
push dword [esp + 0x134]
push ecx
lea ecx, [esp + 0x12c]
call fcn.0040f5f0
test eax, eax
sete byte [esp + 0x10]
jmp 0x40a9c7
push 8
push ecx
push str.Default
lea ecx, [esp + 0x128]
call fcn.0040f510
test eax, eax
jne 0x40a9c7
mov edx, str.Default1
lea ecx, [esp + 0x11c]
call fcn.00413a80
mov bl, al
mov eax, dword [esp + 0x30]
movzx eax, al
test bl, bl
mov ecx, 1
cmovne eax, ecx
mov dword [esp + 0x30], eax
mov byte [esp + 0x398], 8
cmp dword [esp + 0x130], 8
jb 0x40a9e8
push dword [esp + 0x11c]
call fcn.0041df62
add esp, 4
mov ecx, dword [esp + 0x4c]
add ecx, 4
mov eax, dword [ecx]
cmp dword [esp + eax + 0x58], 0
je 0x40a760
cmp dword [esp + 0x174], 0
je 0x40aa66
test bl, bl
jne 0x40aa12
mov eax, dword [esp + 0x30]
test al, al
jne 0x40aa66
lea eax, [esp + 0x17c]
push eax
lea ecx, [esp + 0x18]
call fcn.00402eb0
lea eax, [esp + 0x14c]
push eax
push dword [esp + 0x14]
lea eax, [esp + 0x10c]
push eax
lea eax, [esp + 0x20]
push eax
mov ecx, edi
mov byte [esp + 0x3a8], 0xc
call fcn.0040aca0
mov byte [esp + 0x398], 8
cmp dword [esp + 0x28], 8
jb 0x40aa66
push dword [esp + 0x14]
call fcn.0041df62
add esp, 4
lea ecx, [esp + 0x5c]
call fcn.0040fef0
test eax, eax
jne 0x40aa97
mov eax, dword [esp + 0x4c]
lea ecx, [esp + 0x4c]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x40aa8f
or eax, 4
push 0
push eax
call fcn.00401a60
cmp dword [esp + 0x118], 8
jb 0x40aab0
push dword [esp + 0x104]
call fcn.0041df62
add esp, 4
xor eax, eax
cmp dword [esp + 0x178], 8
mov dword [esp + 0x118], 7
mov dword [esp + 0x114], 0
mov word [esp + 0x104], ax
jb 0x40ab5f
push dword [esp + 0x164]
jmp 0x40ab57
push str.profiles.ini_could_not_be_opened_
lea ecx, [esp + 0x38]
xor bh, bh
call fcn.00402eb0
push str.ERROR
lea ecx, [esp + 0x18]
mov byte [esp + 0x39c], 0xd
call fcn.00402eb0
lea edx, [esp + 0x34]
lea ecx, [esp + 0x14]
mov byte [esp + 0x398], 0xe
call fcn.004157f0
cmp dword [esp + 0x28], 8
jb 0x40ab35
push dword [esp + 0x14]
call fcn.0041df62
add esp, 4
xor eax, eax
cmp dword [esp + 0x48], 8
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], 0
mov word [esp + 0x14], ax
jb 0x40ab5f
push dword [esp + 0x34]
call fcn.0041df62
add esp, 4
mov byte [esp + 0x398], 5
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x4c], vtable.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [esp + ecx + 0x48], eax
lea ecx, [esp + 0x5c]
call fcn.0040deb0
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x4c], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [esp + ecx + 0x48], eax
lea eax, [esp + 0xbc]
push eax
mov dword [esp + 0xc0], vtable.std::ios_base.0
call fcn.0041d8ae
add esp, 4
cmp dword [esp + 0x148], 8
jb 0x40abde
push dword [esp + 0x134]
call fcn.0041df62
add esp, 4
xor eax, eax
cmp dword [esp + 0x160], 8
mov dword [esp + 0x148], 7
mov dword [esp + 0x144], 0
mov word [esp + 0x134], ax
jb 0x40ac17
push dword [esp + 0x14c]
call fcn.0041df62
add esp, 4
mov al, bh
mov ecx, dword [esp + 0x390]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x378]
xor ecx, esp
call fcn.0041ddb7
mov esp, ebp
pop ebp
ret