Function at 0x40dd30
Capabilities:
Read file on windows

Disassembly:
push r15
mov eax, 0x1058
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.0067cdd0
sub rsp, rax
mov rdi, rcx
mov rcx, qword [0x00826910]
mov rbx, rdx
mov r8, rdx
lea rdx, str.Loading_state_from__S...
call fcn.0041e020
lea rdx, [0x007f75c8]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wfopen]
test rax, rax
mov rbx, rax
je 0x40e0b0
xor edx, edx
mov r8d, 2
mov rcx, rax
call fcn.0067f720
lea rsi, [rsp + 0x50]
mov rcx, rbx
call fcn.0067f4d0
xor r8d, r8d
xor edx, edx
mov rcx, rbx
mov rbp, rax
call fcn.0067f720
mov r9, rbx
mov edx, 3
mov rcx, rsi
mov r8d, 1
call sub.msvcrt.dll_fread
lea rcx, [rsp + 0x44]
mov r9, rbx
mov r8d, 1
mov edx, 4
call sub.msvcrt.dll_fread
mov r8d, 3
mov rcx, rsi
lea rdx, [0x007f73ab]
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x40e090
mov r8d, dword [rsp + 0x44]
mov dword [rsp + 0x28], eax
cmp r8d, 0x102
je 0x40de40
mov rcx, qword [0x00826910]
lea rdx, str.ERROR_in_State::load__:_invalid_version__d__n
call fcn.0041db00
mov eax, dword [rsp + 0x28]
add rsp, 0x1058
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rsi, [rbp - 7]
mov rcx, rsi
call fcn.007da080
mov r9, rbx
mov r8d, 1
mov rdx, rsi
mov rcx, rax
mov r13, rax
call sub.msvcrt.dll_fread
lea r8, [rsp + 0x48]
mov rdx, rsi
mov rcx, r13
call fcn.0045f850
mov rbp, qword [rsp + 0x48]
mov rcx, rbp
call fcn.007da080
mov r9, rsi
mov r8, r13
mov rdx, rbp
mov rcx, rax
mov r12, rax
call fcn.00403f60
mov r8d, 0x7f4
mov rdx, r12
mov rcx, rdi
call sub.msvcrt.dll_memcpy
movsxd rdx, dword [r12 + 0x7f8]
movabs r8, 0xcccccccccccccccd
movsxd rbp, dword [r12 + 0x7f4]
lea rsi, [r12 + 0x7fc]
mov rcx, qword [rdi + 0x7f8]
mov rax, qword [rdi + 0x800]
test rdx, rdx
cmove rdx, rbp
sub rax, rcx
sar rax, 4
imul rax, r8
cmp rdx, rax
ja 0x40e1d0
jae 0x40df04
lea rax, [rdx + rdx*4]
shl rax, 4
add rax, rcx
mov qword [rdi + 0x800], rax
mov r8, rbp
mov rdx, rsi
add rsi, rbp
call sub.msvcrt.dll_memcpy
movsxd rdx, dword [rsi + 4]
add rsi, 8
movabs r8, 0x86bca1af286bca1b
movsxd rbp, dword [rsi - 8]
mov rcx, qword [rdi + 0x810]
mov rax, qword [rdi + 0x818]
test rdx, rdx
cmove rdx, rbp
sub rax, rcx
sar rax, 2
imul rax, r8
cmp rdx, rax
ja 0x40e1b0
jae 0x40df66
lea rax, [rdx + rdx*8]
lea rax, [rdx + rax*2]
lea rax, [rcx + rax*4]
mov qword [rdi + 0x818], rax
mov r8, rbp
mov rdx, rsi
add rsi, rbp
call sub.msvcrt.dll_memcpy
movsxd rbp, dword [rsi + 4]
add rsi, 8
movsxd r14, dword [rsi - 8]
mov r15, qword [rdi + 0x868]
mov r9, qword [rdi + 0x860]
test rbp, rbp
cmove rbp, r14
mov r10, r15
sub r10, r9
cmp rbp, r10
ja 0x40e0f0
jae 0x40dfb0
add rbp, r9
mov qword [rdi + 0x868], rbp
mov rdx, rsi
mov r8, r14
mov rcx, r9
call sub.msvcrt.dll_memcpy
mov rax, qword [0x00826960]
mov edx, dword [rax + 0x1c02c]
cmp edx, 0x20
je 0x40e080
cmp edx, 0x40
jne 0x40dfe3
mov dword [rdi + 0x120], 1
mov eax, dword [rax + 0x1c028]
test eax, eax
je 0x40e042
sub eax, 0x3e8
cmp eax, 0xf
ja 0x40e0d2
lea rdx, [0x007f8040]
cdqe
shl rax, 4
add rax, rdx
mov edx, 0x66666667
mov ecx, dword [rax]
movzx r8d, byte [rax + 4]
mov eax, ecx
imul edx
mov eax, ecx
sar eax, 0x1f
sar edx, 2
sub edx, eax
lea eax, [rdx + rdx*4]
mov dword [rdi + 4], edx
add eax, eax
sub ecx, eax
test r8b, r8b
mov dword [rdi + 8], ecx
je 0x40e0e0
mov byte [rdi + 0x11a], 3
mov rcx, rbx
call sub.msvcrt.dll_fclose
mov rcx, qword [0x00826910]
lea rdx, [0x007f73af]
call fcn.0041e020
mov rcx, r12
call fcn.007da030
mov rcx, r13
call fcn.007da030
mov eax, 1
jmp 0x40de22
mov dword [rdi + 0x120], 0
jmp 0x40dfe3
mov rcx, qword [0x00826910]
lea rdx, str.ERROR_in_State::load__:_invalid_snapshot_n
call fcn.0041db00
xor eax, eax
jmp 0x40de22
call fcn.0041e2a0
mov rcx, qword [0x00826910]
lea rdx, str.ERROR_in_State::load__:_failed__wfopen__S__n
mov r8, rax
call fcn.0041db00
xor eax, eax
jmp 0x40de22
mov dword [rdi + 4], 0
mov dword [rdi + 8], 0xffffffff
mov byte [rdi + 0x11a], 1
jmp 0x40e042
sub rbp, r10
je 0x40dfb0
mov rax, qword [rdi + 0x870]
sub rax, r15
cmp rbp, rax
jbe 0x40e1f0
mov rax, r10
not rax
cmp rbp, rax
ja 0x40e284
cmp r10, rbp
mov r15, rbp
cmovae r15, r10
add r15, r10
jb 0x40e213
test r15, r15
jne 0x40e217
mov qword [rsp + 0x28], 0
mov r11, r9
xor r9d, r9d
test r10, r10
jne 0x40e241
xor edx, edx
mov rcx, r9
mov r8, rbp
mov qword [rsp + 0x38], r11
lea r15, [r9 + rbp]
mov qword [rsp + 0x30], r9
call sub.msvcrt.dll_memset
mov r11, qword [rsp + 0x38]
mov r9, qword [rsp + 0x30]
test r11, r11
je 0x40e18b
mov rcx, r11
mov qword [rsp + 0x30], r9
call fcn.007da050
mov r9, qword [rsp + 0x30]
mov rax, qword [rsp + 0x28]
mov qword [rdi + 0x860], r9
mov qword [rdi + 0x868], r15
mov qword [rdi + 0x870], rax
jmp 0x40dfb0
lea rcx, [rdi + 0x810]
sub rdx, rax
call fcn.00787300
mov rcx, qword [rdi + 0x810]
jmp 0x40df66
lea rcx, [rdi + 0x7f8]
sub rdx, rax
call fcn.00786ba0
mov rcx, qword [rdi + 0x7f8]
jmp 0x40df04
mov r8, rbp
xor edx, edx
mov rcx, r15
call sub.msvcrt.dll_memset
add rbp, r15
mov r9, qword [rdi + 0x860]
mov qword [rdi + 0x868], rbp
jmp 0x40dfb0
or r15, 0xffffffffffffffff
mov rcx, r15
call fcn.007da0a0
mov r11, qword [rdi + 0x860]
mov r9, rax
mov r10, qword [rdi + 0x868]
lea rax, [rax + r15]
mov qword [rsp + 0x28], rax
sub r10, r11
jmp 0x40e146
mov rdx, r11
mov rcx, r9
mov r8, r10
mov qword [rsp + 0x38], r11
mov qword [rsp + 0x30], r10
call sub.msvcrt.dll_memmove
mov r10, qword [rsp + 0x30]
mov r8, rbp
xor edx, edx
mov qword [rsp + 0x30], rax
lea rcx, [rax + r10]
lea r15, [rcx + rbp]
call sub.msvcrt.dll_memset
mov r9, qword [rsp + 0x30]
mov r11, qword [rsp + 0x38]
jmp 0x40e179
lea rcx, [0x007f7d1e]
call fcn.007cd940
mov rbx, rax
mov rcx, r13
call fcn.007da030
mov rcx, rbx
call fcn.0067d310
mov rcx, r12
mov rbx, rax
call fcn.007da030
jmp 0x40e293