Function at 0x14001ff28
Capabilities:
Check if file exists
Get common file path
Read file on windows
Write file on windows

Disassembly:
push rdi
sub rsp, 0x450
mov qword [rsp + 0xf0], 0xfffffffffffffffe
mov rax, qword [0x1403c86e8]
xor rax, rsp
mov qword [rsp + 0x440], rax
mov qword [rsp + 0x70], 0
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov dword [rsp + 0x88], eax
mov byte [rsp + 0x110], 0
lea rax, [rsp + 0x111]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov r8d, 0x104
xor edx, edx
lea rcx, [rsp + 0x110]
call fcn.14028bc50
lea rdx, [rsp + 0x70]
mov ecx, dword [rsp + 0x88]
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
je 0x14001ffe3
cmp qword [rsp + 0x70], 0
je 0x14001ffe3
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [rsp + 0x70]
mov edx, reloc.WLDAP32.dll_Ordinal_26
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14001fffc
xor r9d, r9d
mov r8d, reloc.WLDAP32.dll_Ordinal_26
lea rdx, [rsp + 0x110]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea rdx, [0x1403dced0]
lea rcx, [rsp + 0x110]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
mov byte [rsp + 0x330], 0
lea rax, [rsp + 0x331]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov qword [rsp + 0x60], 0
lea r8, [rsp + 0x110]
mov edx, 0x104
lea rcx, [rsp + 0x330]
call fcn.1402a2c14
lea rdx, str.profiles.ini
lea rcx, [rsp + 0x330]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x330]
call fcn.140020638
mov dword [rsp + 0x8c], eax
cmp dword [rsp + 0x8c], 0
jge 0x140020097
mov rcx, qword [rsp + 0x60]
call fcn.1402996a8
jmp 0x14002061d
mov eax, 1
imul rax, rax, 5
mov qword [rsp + 0xa8], rax
cmp qword [rsp + 0xa8], 6
jae 0x1400200b5
jmp 0x1400200ba
call fcn.14028613c
mov rax, qword [rsp + 0xa8]
mov byte [rsp + rax + 0xf8], 0
mov eax, 1
imul rax, rax, 3
mov byte [rsp + rax + 0xf8], WSAGetLastError
mov eax, 1
imul rax, rax, 0
mov byte [rsp + rax + 0xf8], 0x50
mov eax, 1
imul rax, rax, 2
mov byte [rsp + rax + 0xf8], reloc.WS2_32.dll_WSACleanup
mov eax, 1
imul rax, rax, 1
mov byte [rsp + rax + 0xf8], 0x61
mov eax, 1
imul rax, rax, 4
mov byte [rsp + rax + 0xf8], 0x3d
mov eax, 1
imul rax, rax, 1
mov byte [rsp + rax + 0x100], 0x64
mov eax, 1
imul rax, rax, 2
mov byte [rsp + rax + 0x100], 0x65
mov eax, 1
imul rax, rax, 8
mov qword [rsp + 0xb0], rax
cmp qword [rsp + 0xb0], 9
jae 0x14002015f
jmp 0x140020164
call fcn.14028613c
mov rax, qword [rsp + 0xb0]
mov byte [rsp + rax + 0x100], 0
mov eax, 1
imul rax, rax, 0
mov byte [rsp + rax + 0x100], reloc.WLDAP32.dll_Ordinal_46
mov eax, 1
imul rax, rax, 3
mov byte [rsp + rax + 0x100], 0x66
mov eax, 1
imul rax, rax, 5
mov byte [rsp + rax + 0x100], 0x75
mov eax, 1
imul rax, rax, 4
mov byte [rsp + rax + 0x100], 0x61
mov eax, 1
imul rax, rax, 7
mov byte [rsp + rax + 0x100], reloc.WS2_32.dll_WSACleanup
mov eax, 1
imul rax, rax, 6
mov byte [rsp + rax + 0x100], WSASetLastError
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xc8], rax
lea rdx, [rsp + 0xf8]
mov rcx, qword [rsp + 0xc8]
call fcn.14028d434
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
jne 0x140020218
mov rcx, qword [rsp + 0x60]
call fcn.1402996a8
jmp 0x14002061d
lea rcx, [rsp + 0xf8]
call fcn.1402958f0
mov rcx, qword [rsp + 0x68]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x68], rax
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x68]
call fcn.14028d434
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
jne 0x140020263
mov rcx, qword [rsp + 0x60]
call fcn.1402996a8
jmp 0x14002061d
lea rcx, [rsp + 0x100]
call fcn.1402958f0
mov rcx, qword [rsp + 0x78]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov byte [rax], 0
mov qword [rsp + 0xb8], 0
lea r8, [rsp + 0xb8]
lea rdx, [0x140364054]
mov rcx, qword [rsp + 0x68]
call fcn.1402a2d7c
mov qword [rsp + 0xa0], rax
cmp qword [rsp + 0xa0], 0
je 0x1400202f6
mov rdx, qword [rsp + 0xa0]
lea rcx, [rsp + 0x110]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
lea r8, [rsp + 0xb8]
lea rdx, [0x140364074]
xor ecx, ecx
call fcn.1402a2d7c
mov qword [rsp + 0xa0], rax
jmp 0x1400202b5
mov rcx, qword [rsp + 0x60]
call fcn.1402996a8
mov byte [rsp + 0x220], 0
lea rax, [rsp + 0x221]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
lea r8, [rsp + 0x110]
mov edx, 0x104
lea rcx, [rsp + 0x220]
call fcn.1402a2c14
lea rdx, str.prefs.js
lea rcx, [rsp + 0x220]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
lea rcx, [rsp + 0x220]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x14002061d
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
lea rcx, [rsp + 0x220]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x14002061d
mov dword [rsp + 0x90], 0
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x50], eax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [rsp + 0x50]
inc eax
mov eax, eax
mov ecx, eax
call fcn.1400ed9e0
mov qword [rsp + 0xd0], rax
mov rax, qword [rsp + 0xd0]
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x50]
inc eax
mov eax, eax
mov r8d, eax
xor edx, edx
mov rcx, qword [rsp + 0x80]
call fcn.14028bc50
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x90]
mov r8d, dword [rsp + 0x50]
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
je 0x140020464
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14002061d
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, qword [rsp + 0x80]
lea rcx, [rsp + 0x58]
call fcn.140045774
nop
xor r8d, r8d
lea rdx, str.network.proxy.type
lea rcx, [rsp + 0x58]
call fcn.140027674
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0xffffffff
je 0x1400205e1
mov r8d, dword [rsp + 0x40]
lea rdx, [0x140364084]
lea rcx, [rsp + 0x58]
call fcn.140027674
mov dword [rsp + 0x54], eax
cmp dword [rsp + 0x54], 0xffffffff
je 0x1400205e1
mov r9d, dword [rsp + 0x54]
xor r8d, r8d
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0x58]
call fcn.140027414
nop
mov dl, 0xa
lea rcx, [rsp + 0xc0]
call fcn.140027608
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 1
jle 0x1400205c0
mov eax, dword [rsp + 0x40]
dec eax
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x54]
sub ecx, eax
mov eax, ecx
mov r8d, eax
mov edx, dword [rsp + 0x40]
lea rcx, [rsp + 0x58]
call fcn.140027a78
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0x220]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x1400205c0
mov dword [rsp + 0x94], 0
mov rax, qword [rsp + 0x58]
mov eax, dword [rax - 0x10]
mov dword [rsp + 0x98], eax
lea rcx, [rsp + 0x58]
call fcn.140027cd0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x94]
mov r8d, dword [rsp + 0x98]
mov rdx, rax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rax, qword [rsp + 0xc0]
sub rax, 0x18
mov qword [rsp + 0xd8], rax
mov rcx, qword [rsp + 0xd8]
call fcn.140045ed4
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xe0], rax
mov rcx, qword [rsp + 0xe0]
call fcn.1400ed9d8
nop
mov rax, qword [rsp + 0x58]
sub rax, 0x18
mov qword [rsp + 0xe8], rax
mov rcx, qword [rsp + 0xe8]
call fcn.140045ed4
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.140286010
add rsp, 0x450
pop rdi
ret