Function at 0x51fa70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0xa1c3c8]
sub esp, 0x2c
cmp dword [eax + 0x10], 0
push ebx
push edi
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
je 0x51fa9e
push str.BEGIN_Checkpoint_Read_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 8
push 0x5c0db8
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov ebx, eax
add esp, 8
mov dword [ebp - 8], ebx
test ebx, ebx
jne 0x51fb0f
mov dword [0x801438], 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
push eax
push str.Cannot_open_checkpoint_file:__.200s
push str.No_error
call fcn.004f9620
mov eax, dword [0xa1c3c8]
add esp, 0x10
cmp dword [eax + 0x10], ebx
je 0x51fb07
push str.No_error
push 0x5a02a8
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0xc
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
call sym.FLAMESLauncher.exe_MXGateClassIsEnabled
test eax, eax
je 0x51fb1d
call sym.FLAMESLauncher.exe_MXGateClassDisableGates
push esi
call fcn.0043f040
mov eax, dword [0xa1c3c8]
push ebx
push 8
push 1
mov esi, dword [eax + 0x14]
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 4], 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, 8
jb 0x51fd31
mov eax, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
test esi, esi
je 0x51fba7
mov eax, dword [ebp - 0x18]
cmp eax, dword [esi]
jne 0x51fd93
mov eax, dword [ebp - 0x14]
cmp eax, dword [esi + 4]
jne 0x51fd93
mov eax, dword [esi + 0x10]
movups xmm0, xmmword [esi]
mov dword [ebp - 0xc], eax
mov eax, dword [0xa1c3c8]
movups xmmword [ebp - 0x2c], xmm0
cmp dword [eax + 0x10], 0
je 0x51fba2
push esi
push dword [ebp - 4]
push str.Arena__3zu_at__p_already_allocated._n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0x10
mov ebx, dword [ebp - 0x20]
jmp 0x51fbbd
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call fcn.0052a650
add esp, 8
test eax, eax
je 0x51fdf9
push dword [ebp - 8]
push dword [ebp - 0x14]
push 1
push dword [ebp - 0x18]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, dword [ebp - 0x14]
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp eax, ecx
jb 0x51fe00
mov eax, dword [0xa1c3c8]
cmp dword [eax + 0x10], 0
je 0x51fc06
push ecx
push dword [ebp - 0x18]
push dword [ebp - 4]
push str.Arena__3zu_recovered:_Address__p___Size__10zu_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0x14
test esi, esi
je 0x51fd09
mov eax, dword [ebp - 0x2c]
cmp eax, dword [esi]
jne 0x51fc3a
mov eax, dword [ebp - 0x28]
cmp eax, dword [esi + 4]
jne 0x51fc3a
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x51fc29
cmp eax, dword [esi + 0x10]
jne 0x51fc3a
test ebx, ebx
je 0x51fd0c
cmp ebx, dword [esi + 0xc]
je 0x51fd0c
push str.The_checkpoint_file_does_not_match_this_executable._Either_the_file_is_not_a_valid_checkpoint_file_or_it_was_created_with_a_different_executable.
push str.No_error
mov dword [0x801438], 5
call fcn.004f9620
mov eax, dword [0xa1c3c8]
add esp, 8
cmp dword [eax + 0x10], 0
je 0x51fd02
push str.Arena_mismatch_es_:_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
mov eax, dword [esi]
add esp, 8
mov ecx, dword [ebp - 0x2c]
cmp ecx, eax
je 0x51fc9a
push eax
push ecx
push str.___Pool_address_mismatch____p_and__p_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0x10
mov eax, dword [esi + 4]
mov ecx, dword [ebp - 0x28]
cmp ecx, eax
je 0x51fcbb
push eax
push ecx
push str.___Size_mismatch____zu_and__zu_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0x10
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x51fce0
mov ecx, dword [esi + 0x10]
cmp eax, ecx
je 0x51fce0
push ecx
push eax
push str.___Next_arena_mismatch____p_and__p_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0x10
test ebx, ebx
je 0x51fd02
mov eax, dword [esi + 0xc]
cmp ebx, eax
je 0x51fd02
push eax
push ebx
push str.___Previous_arena_mismatch____p_and__p_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0x10
xor ebx, ebx
jmp 0x51fef0
mov eax, dword [ebp - 0xc]
push dword [ebp - 8]
inc dword [ebp - 4]
mov esi, eax
push 8
lea eax, [ebp - 0x18]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, 8
jae 0x51fb56
mov ebx, dword [ebp - 8]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
add esp, 4
test eax, eax
je 0x51fe95
test esi, esi
je 0x51feeb
push str.The_checkpoint_file_does_not_match_this_executable._Either_the_file_is_not_a_valid_checkpoint_file_or_it_was_created_with_a_different_executable.
push str.No_error
mov dword [0x801438], 5
call fcn.004f9620
mov eax, dword [0xa1c3c8]
add esp, 8
cmp dword [eax + 0x10], 0
je 0x51fd8c
push str.No_error
push str._s_n___Should_have_more_arenas._n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0xc
xor ebx, ebx
jmp 0x51fef0
push str.The_checkpoint_file_does_not_match_this_executable._Either_the_file_is_not_a_valid_checkpoint_file_or_it_was_created_with_a_different_executable.
push str.No_error
mov dword [0x801438], 5
call fcn.004f9620
mov eax, dword [0xa1c3c8]
add esp, 8
cmp dword [eax + 0x10], 0
je 0x51fdf9
push dword [esi]
mov ebx, dword [ebp - 4]
push dword [ebp - 0x18]
push ebx
push str.No_error
push str._s_n___arena__zu_addresses:_file__p_and_process__p_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0x18
push dword [esi + 4]
push dword [ebp - 0x14]
push ebx
push str.___arena__zu_sizes:_file__zu_and_process__zu_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0x14
xor ebx, ebx
jmp 0x51fef0
mov ebx, dword [ebp - 8]
push ebx
mov dword [0x801438], 4
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
mov esi, eax
push esi
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
push eax
push str.Error_reading_from_checkpoint_file:__.200s
push str.No_error
call fcn.004f9620
mov eax, dword [0xa1c3c8]
add esp, 0x14
cmp dword [eax + 0x10], 0
je 0x51fe91
push str.No_error
push esi
push dword [ebp - 4]
push str.CPR_arena__zu_read_error:__d___s
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0x14
push dword [ebp - 0x10]
push str.Restart:_NumRead___d_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
add esp, 0x10
test eax, eax
je 0x51fe91
push str.Restart:_EOF_occurred_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 8
xor ebx, ebx
jmp 0x51fef0
push ebx
mov dword [0x801438], 4
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
push eax
call esi
push eax
push str.Error_reading_from_checkpoint_file:__.200s
push str.No_error
call fcn.004f9620
mov eax, dword [0xa1c3c8]
add esp, 0x14
cmp dword [eax + 0x10], 0
je 0x51fee7
push str.No_error
push str.CPRHeader__s_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 0xc
xor ebx, ebx
jmp 0x51fef6
mov ebx, 2
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
call fcn.0043f040
push dword [ebp - 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
test eax, eax
je 0x51ff54
mov dword [0x801438], 3
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call esi
push eax
push str.Cannot_close_checkpoint_file:__.200s
push str.No_error
call fcn.004f9620
mov eax, dword [0xa1c3c8]
add esp, 0x10
cmp dword [eax + 0x10], 0
je 0x51ff52
push str.No_error
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 8
xor ebx, ebx
mov eax, dword [0xa1c3c8]
pop esi
cmp dword [eax + 0x10], 0
je 0x51ff81
cmp ebx, 2
jne 0x51ff6c
push str.END_SUCCESSFUL_Checkpoint_Read_n
jmp 0x51ff71
push str.END_FAILED_Checkpoint_Read_n
push 1
call edi
add esp, 4
push eax
call fcn.0049cc60
add esp, 8
call sym.FLAMESLauncher.exe_MXGateClassIsEnabled
test eax, eax
je 0x51ff8f
call sym.FLAMESLauncher.exe_MXGateClassEnableGates
pop edi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret