Function at 0x4faf30
Capabilities:
Check if file exists
Get common file path
Read .ini file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50a998
mov eax, dword fs:[0]
push eax
sub esp, 0x528
mov eax, dword [0x531304]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0x2bd], 0
mov dword [ebp - 0x2bc], 0
mov byte [ebp - 0x11c], 0
push 0x103
push 0
lea eax, [ebp - 0x11b]
push eax
call fcn.00415fc0
add esp, 0xc
lea ecx, [ebp - 0x25c]
call fcn.004011e0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x240]
call fcn.004011e0
mov byte [ebp - 4], 1
cmp dword [0x55b9f4], 0
jne 0x4faff7
push 0x5243a8
call fcn.004e4170
add esp, 4
mov dword [ebp - 0x464], 0xfffffffc
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x240]
call fcn.00401260
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x25c]
call fcn.00401260
mov eax, dword [ebp - 0x464]
jmp 0x4fba1d
mov ecx, dword [ebp + 8]
push ecx
call fcn.004f9c00
add esp, 4
mov dword [ebp - 0x2e4], eax
mov edx, dword [ebp - 0x2e4]
push edx
call fcn.00415e20
add esp, 4
test eax, eax
jne 0x4fb052
mov dword [ebp - 0x468], 0xfffffffd
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x240]
call fcn.00401260
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x25c]
call fcn.00401260
mov eax, dword [ebp - 0x468]
jmp 0x4fba1d
push 0x5243cc
call fcn.004f49c0
add esp, 4
test eax, eax
je 0x4fb070
push str.firefox.exe
call fcn.004349e0
add esp, 4
mov eax, dword [ebp - 0x2e4]
push eax
push str._DEBUGINFO__LOCK__SET_LockFirefox_url___s_n
call fcn.004e4170
add esp, 8
push 0x104
push 0
lea ecx, [ebp - 0x11c]
push ecx
call fcn.00415fc0
add esp, 0xc
push 0
push 0x1a
lea edx, [ebp - 0x11c]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x25c]
call fcn.004012a0
push str.MozillaFirefoxprofiles.ini
lea ecx, [ebp - 0x25c]
call fcn.0040bb70
lea ecx, [ebp - 0x25c]
call fcn.004012e0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4fb270
lea ecx, [ebp - 0x25c]
call fcn.004012e0
push eax
push str._DEBUGINFO__LOCK__SET_LockFirefox_profiles_ini_path___s_n
call fcn.004e4170
add esp, 8
mov byte [ebp - 0x40c], 0
push 0x103
push 0
lea ecx, [ebp - 0x40b]
push ecx
call fcn.00415fc0
add esp, 0xc
lea ecx, [ebp - 0x25c]
call fcn.004012e0
push eax
push 0x104
lea edx, [ebp - 0x40c]
push edx
push 0
push str.Path
push str.Profile0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x40c]
push eax
lea ecx, [ebp - 0x300]
call fcn.00401e20
mov byte [ebp - 4], 2
push 0x524480
lea ecx, [ebp - 0x484]
call fcn.00401e20
mov byte [ebp - 4], 3
push 0x524484
lea ecx, [ebp - 0x4a0]
call fcn.00401e20
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x484]
push ecx
lea edx, [ebp - 0x4a0]
push edx
lea eax, [ebp - 0x300]
push eax
call fcn.004f8d60
add esp, 0xc
push eax
lea ecx, [ebp - 0x300]
call fcn.00401280
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4a0]
call fcn.00401260
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x484]
call fcn.00401260
lea ecx, [ebp - 0x300]
call fcn.004012e0
push eax
push str._DEBUGINFO__LOCK__SET_LockFirefox_user_path___s_n
call fcn.004e4170
add esp, 8
lea ecx, [ebp - 0x11c]
push ecx
lea ecx, [ebp - 0x240]
call fcn.004012a0
push str.MozillaFirefox_
lea ecx, [ebp - 0x240]
call fcn.0040bb70
lea edx, [ebp - 0x300]
push edx
lea ecx, [ebp - 0x240]
call fcn.004013e0
push str.prefs.js
lea ecx, [ebp - 0x240]
call fcn.0040bb70
lea ecx, [ebp - 0x240]
call fcn.004012e0
push eax
push str._DEBUGINFO__LOCK__SET_LockFirefox_prefs_path___s_n
call fcn.004e4170
add esp, 8
lea ecx, [ebp - 0x240]
call fcn.004012e0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4fb261
mov byte [ebp - 0x2bd], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x300]
call fcn.00401260
movzx eax, byte [ebp - 0x2bd]
test eax, eax
jne 0x4fb2b1
mov dword [ebp - 0x4a4], 0xffffffff
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x240]
call fcn.00401260
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x25c]
call fcn.00401260
mov eax, dword [ebp - 0x4a4]
jmp 0x4fba1d
mov byte [ebp - 0x224], 0
push 0x103
push 0
lea ecx, [ebp - 0x223]
push ecx
call fcn.00415fc0
add esp, 0xc
lea ecx, [ebp - 0x240]
call fcn.004012e0
push eax
push 0x104
lea edx, [ebp - 0x224]
push edx
call fcn.004188fa
add esp, 0xc
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea ecx, [ebp - 0x224]
push ecx
call fcn.004f4b10
add esp, 4
test eax, eax
je 0x4fb344
mov dword [ebp - 0x4a8], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x240]
call fcn.00401260
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x25c]
call fcn.00401260
mov eax, dword [ebp - 0x4a8]
jmp 0x4fba1d
push 0x524510
lea ecx, [ebp - 0x240]
call fcn.004012e0
push eax
call fcn.0041625a
add esp, 8
mov dword [ebp - 0x27c], eax
push 2
push 0
mov edx, dword [ebp - 0x27c]
push edx
call fcn.00416afd
add esp, 0xc
mov eax, dword [ebp - 0x27c]
push eax
call fcn.004169d3
add esp, 4
mov dword [ebp - 0x280], eax
push 0
push 0
mov ecx, dword [ebp - 0x27c]
push ecx
call fcn.00416afd
add esp, 0xc
mov edx, dword [ebp - 0x280]
add edx, 1
push edx
call fcn.00415d52
add esp, 4
mov dword [ebp - 0x2e0], eax
mov eax, dword [ebp - 0x280]
add eax, 1
push eax
push 0
mov ecx, dword [ebp - 0x2e0]
push ecx
call fcn.00415fc0
add esp, 0xc
mov edx, dword [ebp - 0x27c]
push edx
mov eax, dword [ebp - 0x280]
push eax
push 1
mov ecx, dword [ebp - 0x2e0]
push ecx
call fcn.0041651a
add esp, 0x10
mov edx, dword [ebp - 0x2e0]
add edx, dword [ebp - 0x280]
mov byte [edx], 0
mov eax, dword [ebp - 0x27c]
push eax
call fcn.00416bf5
add esp, 4
push 0x80
lea ecx, [ebp - 0x240]
call fcn.004012e0
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, dword [ebp - 0x2e0]
push ecx
lea ecx, [ebp - 0x2dc]
call fcn.00401e20
mov byte [ebp - 4], 5
push str.user_pref__browser.startup.homepage_
lea ecx, [ebp - 0x278]
call fcn.00401e20
mov byte [ebp - 4], 6
lea edx, [ebp - 0x278]
push edx
lea ecx, [ebp - 0x2b8]
call fcn.00401210
mov byte [ebp - 4], 7
push 0x52453c
lea ecx, [ebp - 0x2b8]
call fcn.0040bb70
mov eax, dword [ebp - 0x2e4]
push eax
lea ecx, [ebp - 0x2b8]
call fcn.0040bb70
push 0x524540
lea ecx, [ebp - 0x2b8]
call fcn.0040bb70
lea ecx, [ebp - 0x2b8]
call fcn.004012e0
push eax
push str._DEBUGINFO__LOCK__SET_LockFirefox_strUrl___s_n
call fcn.004e4170
add esp, 8
push 0
lea ecx, [ebp - 0x278]
push ecx
lea ecx, [ebp - 0x2dc]
call fcn.00413640
cmp dword [0x528cdc], eax
je 0x4fb5e0
lea ecx, [ebp - 0x2dc]
call fcn.00401300
mov esi, eax
push 0
lea edx, [ebp - 0x278]
push edx
lea ecx, [ebp - 0x2dc]
call fcn.00413640
sub esi, eax
push esi
push 0
lea eax, [ebp - 0x278]
push eax
lea ecx, [ebp - 0x2dc]
call fcn.00413640
push eax
lea ecx, [ebp - 0x428]
push ecx
lea ecx, [ebp - 0x2dc]
call fcn.00401320
mov byte [ebp - 4], 8
push 0
push 0x524574
lea ecx, [ebp - 0x428]
call fcn.00413780
push eax
push 0
lea edx, [ebp - 0x4c4]
push edx
lea ecx, [ebp - 0x428]
call fcn.00401320
mov dword [ebp - 0x520], eax
mov eax, dword [ebp - 0x520]
mov dword [ebp - 0x524], eax
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x524]
push ecx
lea ecx, [ebp - 0x428]
call fcn.00401280
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x4c4]
call fcn.00401260
push 0x524578
lea ecx, [ebp - 0x428]
call fcn.0040bb70
lea ecx, [ebp - 0x428]
call fcn.004012e0
push eax
push str._DEBUGINFO__LOCK__SET_LockFirefox_str_browser_startup_homepage___s_n
call fcn.004e4170
add esp, 8
lea edx, [ebp - 0x2b8]
push edx
lea eax, [ebp - 0x428]
push eax
lea ecx, [ebp - 0x2dc]
push ecx
call fcn.004f8d60
add esp, 0xc
push eax
lea ecx, [ebp - 0x2dc]
call fcn.00401280
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x428]
call fcn.00401260
jmp 0x4fb602
push 0x5245c8
lea ecx, [ebp - 0x2dc]
call fcn.0040bb70
lea edx, [ebp - 0x2b8]
push edx
lea ecx, [ebp - 0x2dc]
call fcn.004013e0
push str.user_pref__browser.startup.page_
lea ecx, [ebp - 0x278]
call fcn.004012a0
push 0
lea eax, [ebp - 0x278]
push eax
lea ecx, [ebp - 0x2dc]
call fcn.00413640
cmp dword [0x528cdc], eax
je 0x4fb763
lea ecx, [ebp - 0x2dc]
call fcn.00401300
mov esi, eax
push 0
lea ecx, [ebp - 0x278]
push ecx
lea ecx, [ebp - 0x2dc]
call fcn.00413640
sub esi, eax
push esi
push 0
lea edx, [ebp - 0x278]
push edx
lea ecx, [ebp - 0x2dc]
call fcn.00413640
push eax
lea eax, [ebp - 0x444]
push eax
lea ecx, [ebp - 0x2dc]
call fcn.00401320
mov byte [ebp - 4], 0xa
push 0
push 0x5245f0
lea ecx, [ebp - 0x444]
call fcn.00413780
push eax
push 0
lea ecx, [ebp - 0x4e0]
push ecx
lea ecx, [ebp - 0x444]
call fcn.00401320
mov dword [ebp - 0x528], eax
mov edx, dword [ebp - 0x528]
mov dword [ebp - 0x52c], edx
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x52c]
push eax
lea ecx, [ebp - 0x444]
call fcn.00401280
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x4e0]
call fcn.00401260
push 0x5245f4
lea ecx, [ebp - 0x444]
call fcn.0040bb70
lea ecx, [ebp - 0x444]
call fcn.004012e0
push eax
push str._DEBUGINFO__LOCK__SET_LockFirefox_str_browser_startup_page___s_n
call fcn.004e4170
add esp, 8
push 0x51402f
lea ecx, [ebp - 0x4fc]
call fcn.00401e20
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x4fc]
push ecx
lea edx, [ebp - 0x444]
push edx
lea eax, [ebp - 0x2dc]
push eax
call fcn.004f8d60
add esp, 0xc
push eax
lea ecx, [ebp - 0x2dc]
call fcn.00401280
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x4fc]
call fcn.00401260
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x444]
call fcn.00401260
push str.user_pref__moa.ntab.web.alturl_
lea ecx, [ebp - 0x278]
call fcn.004012a0
lea ecx, [ebp - 0x278]
push ecx
lea ecx, [ebp - 0x29c]
call fcn.00401210
mov byte [ebp - 4], 0xd
push 0x52465c
lea ecx, [ebp - 0x29c]
call fcn.0040bb70
mov edx, dword [ebp - 0x2e4]
push edx
lea ecx, [ebp - 0x29c]
call fcn.0040bb70
push 0x524660
lea ecx, [ebp - 0x29c]
call fcn.0040bb70
lea ecx, [ebp - 0x29c]
call fcn.004012e0
push eax
push str._DEBUGINFO__LOCK__SET_LockFirefox_strTab___s_n
call fcn.004e4170
add esp, 8
push 0
lea eax, [ebp - 0x278]
push eax
lea ecx, [ebp - 0x2dc]
call fcn.00413640
cmp dword [0x528cdc], eax
je 0x4fb904
lea ecx, [ebp - 0x2dc]
call fcn.00401300
mov esi, eax
push 0
lea ecx, [ebp - 0x278]
push ecx
lea ecx, [ebp - 0x2dc]
call fcn.00413640
sub esi, eax
push esi
push 0
lea edx, [ebp - 0x278]
push edx
lea ecx, [ebp - 0x2dc]
call fcn.00413640
push eax
lea eax, [ebp - 0x460]
push eax
lea ecx, [ebp - 0x2dc]
call fcn.00401320
mov byte [ebp - 4], 0xe
push 0
push 0x524694
lea ecx, [ebp - 0x460]
call fcn.00413780
push eax
push 0
lea ecx, [ebp - 0x518]
push ecx
lea ecx, [ebp - 0x460]
call fcn.00401320
mov dword [ebp - 0x530], eax
mov edx, dword [ebp - 0x530]
mov dword [ebp - 0x534], edx
mov byte [ebp - 4], 0xf
mov eax, dword [ebp - 0x534]
push eax
lea ecx, [ebp - 0x460]
call fcn.00401280
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x518]
call fcn.00401260
push 0x524698
lea ecx, [ebp - 0x460]
call fcn.0040bb70
lea ecx, [ebp - 0x460]
call fcn.004012e0
push eax
push str._DEBUGINFO__LOCK__SET_LockFirefox_str_moa_ntab_web_alturl___s_n
call fcn.004e4170
add esp, 8
lea ecx, [ebp - 0x29c]
push ecx
lea edx, [ebp - 0x460]
push edx
lea eax, [ebp - 0x2dc]
push eax
call fcn.004f8d60
add esp, 0xc
push eax
lea ecx, [ebp - 0x2dc]
call fcn.00401280
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x460]
call fcn.00401260
jmp 0x4fb926
push 0x5246e0
lea ecx, [ebp - 0x2dc]
call fcn.0040bb70
lea ecx, [ebp - 0x29c]
push ecx
lea ecx, [ebp - 0x2dc]
call fcn.004013e0
push 0x5246e4
lea ecx, [ebp - 0x240]
call fcn.004012e0
push eax
call fcn.0041625a
add esp, 8
mov dword [ebp - 0x27c], eax
mov edx, dword [ebp - 0x27c]
push edx
push 1
lea ecx, [ebp - 0x2dc]
call fcn.004012e0
push eax
call fcn.00415e20
add esp, 4
push eax
lea ecx, [ebp - 0x2dc]
call fcn.004012e0
push eax
call fcn.004167ae
add esp, 0x10
mov eax, dword [ebp - 0x27c]
push eax
call fcn.00416bf5
add esp, 4
mov ecx, dword [ebp - 0x2e0]
push ecx
call fcn.00415c75
add esp, 4
mov edx, dword [ebp - 0x2e4]
push edx
call fcn.00415c75
add esp, 4
mov dword [ebp - 0x2bc], 1
mov eax, dword [ebp - 0x2bc]
mov dword [ebp - 0x51c], eax
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x29c]
call fcn.00401260
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x2b8]
call fcn.00401260
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x278]
call fcn.00401260
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2dc]
call fcn.00401260
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x240]
call fcn.00401260
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x25c]
call fcn.00401260
mov eax, dword [ebp - 0x51c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004158f4
mov esp, ebp
pop ebp
ret 4