Function at 0x140001070
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov rbx, rdx
cmp ecx, 2
jge 0x1400010c1
test ecx, ecx
jne 0x14000109a
lea rdx, str.zerochecksum.exe
jmp 0x14000109d
mov rdx, qword [rdx]
lea rcx, str.Usage:__s_savedata.dat_nUncompressed_savedata_is_assumed__decompress_with_zstd_first._n
call fcn.140001010
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140001390
add rsp, 0x60
pop rbx
ret
mov rdx, qword [rdx + 8]
lea r8, [0x1400032f8]
lea rcx, [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
test eax, eax
je 0x140001103
mov rdx, qword [rbx + 8]
lea rcx, str.Failed_opening_file_at__s._n
call fcn.140001010
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140001390
add rsp, 0x60
pop rbx
ret
mov rcx, qword [rsp + 0x20]
xor edx, edx
mov qword [rsp + 0x70], rbp
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x58], rdi
lea r8d, [rdx + 2]
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x48], r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
test eax, eax
jne 0x140001339
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__ftelli64]
mov rbx, rax
test rax, rax
jns 0x140001157
lea rcx, str.ftell_failed._n
jmp 0x140001340
mov rcx, qword [rsp + 0x20]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
test eax, eax
jne 0x140001339
cmp rbx, 0x50
je 0x14000118a
cmp rbx, 0x25fe8
je 0x14000118a
lea rcx, str.Filesize_does_not_match_expected_filesize_for_Trails_from_Zero_save__aborting._nIf_the_file_is_still_compressed_please_decompress_with_zstd_first._n
jmp 0x140001340
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
test rax, rax
jne 0x1400011a7
lea rcx, str.malloc_failed._n
jmp 0x140001340
mov r9, qword [rsp + 0x20]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, rbx
je 0x1400011ce
lea rcx, str.fread_failed._n
jmp 0x140001340
mov r12d, dword [r14 + rbx - 8]
mov ebp, dword [r14 + rbx - 4]
cmp rbx, 8
jb 0x140001330
xor edx, edx
mov qword [rsp + 0x40], r15
mov r11d, edx
mov r15d, edx
mov ecx, edx
mov esi, edx
mov edi, edx
cmp rbx, 0xb
jb 0x14000126c
je 0x14000126c
lea rax, [rbx - 8]
mov r8d, edx
and rax, 0xfffffffffffffffc
mov r10d, edx
mov r9d, edx
cmp rax, 8
jb 0x140001254
lea rdi, [rbx - 0xf]
nop dword [rax + rax]
mov ecx, dword [r14 + r8]
lea rax, [r8 + 4]
mov eax, dword [r8 + r14 + 4]
add r11d, ecx
add r15d, eax
not ecx
not eax
add r9d, ecx
add r10d, eax
add r8, 8
cmp r8, rdi
jb 0x140001220
lea rax, [rbx - 0xb]
mov edi, edx
mov rcx, r8
cmp r8, rax
jae 0x140001260
mov esi, dword [r8 + r14]
lea rcx, [r8 + 4]
mov edi, esi
not edi
lea eax, [r15 + r11]
add esi, eax
lea eax, [r9 + r10]
add edi, eax
mov r15, qword [rsp + 0x40]
add rbx, 0xfffffffffffffff8
cmp rcx, rbx
je 0x140001297
jae 0x140001291
mov eax, edx
nop
shl eax, 8
add eax, dword [r14 + rcx*4]
inc rcx
mov edx, eax
cmp rcx, rbx
jb 0x140001280
add esi, edx
not edx
add edi, edx
mov r8d, ebp
lea rcx, str.Old_checksum:__08x_08x_n
mov edx, r12d
bswap r8d
bswap edx
call fcn.140001010
mov r8d, edi
lea rcx, str.New_checksum:__08x_08x_n
mov edx, esi
bswap r8d
bswap edx
call fcn.140001010
cmp r12d, esi
jne 0x1400012dd
cmp ebp, edi
jne 0x1400012dd
lea rcx, str.Checksum_hasnt_changed__no_need_to_do_anything._n
call fcn.140001010
xor eax, eax
jmp 0x14000134a
mov rcx, qword [rsp + 0x20]
xor r8d, r8d
mov rdx, rbx
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x2c], edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
test eax, eax
jne 0x140001339
mov r9, qword [rsp + 0x20]
lea edx, [rax + 1]
lea r8d, [rax + 8]
lea rcx, [rsp + 0x28]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, 8
je 0x140001320
lea rcx, str.fwrite_failed._n
jmp 0x140001340
lea rcx, str.Checksum_updated_in_file._n
call fcn.140001010
xor eax, eax
jmp 0x14000134a
lea rcx, str.checksum_calculation_failed._n
jmp 0x140001340
lea rcx, str.fseek_failed._n
call fcn.140001010
mov eax, 0xffffffff
mov r12, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x70]
mov r14, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140001390
add rsp, 0x60
pop rbx
ret