Function at 0x140057530
Capabilities:
Delete file

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x438
mov rdi, qword [0x140120e80]
cmp byte [rdi], 0
je 0x14005795c
mov rbx, qword [0x140121240]
xor eax, eax
xor edx, edx
mov r12, qword [0x140121540]
mov rsi, qword [0x140121500]
mov word [rbx], ax
mov rax, qword [0x140121480]
cmp byte [r12 + 0x201], 0
mov word [r12 + 0x224], 0
mov dword [rsi], 0
mov dword [r12 + 0x228], 0
mov dword [rax], 0
mov rax, qword [0x140121290]
mov byte [r12 + 0x22c], 0
mov dword [r12 + 0x15b4], 0
mov word [r12 + 0x202], dx
mov dword [rax], 0
je 0x1400578f0
mov rbp, qword [0x1401211f0]
lea rdi, [r12 + 0x204]
mov byte [r12 + 0x222], 0
mov eax, dword [0x1400ecf6c]
lea r15, [r12 + 0x213]
mov dword [rbp], 0x186a0
mov dword [r12 + 0x21e], eax
call fcn.140057060
mov edx, dword [rsi]
mov r8d, dword [rbp]
mov r13, qword [0x1401210e0]
jmp 0x14005762c
mov byte [rdi], r14b
add rdi, 1
cmp r15, rdi
je 0x14005766a
cmp r8d, edx
mov r14d, 8
jb 0x140057620
movzx eax, word [rbx]
add edx, 1
mov dword [rsi], edx
lea ecx, [rax + 1]
movzx r14d, byte [r13 + rax]
cmp cx, 0x3e7
mov word [rbx], cx
jbe 0x140057620
call fcn.140057060
add rdi, 1
mov byte [rdi - 1], r14b
mov edx, dword [rsi]
cmp r15, rdi
mov r8d, dword [rbp]
jne 0x14005762c
cmp r8d, edx
mov edi, 8
jb 0x140057699
movzx eax, word [rbx]
add edx, 1
mov r8, qword [0x1401210e0]
mov dword [rsi], edx
lea ecx, [rax + 1]
cmp cx, 0x3e7
movzx edi, byte [r8 + rax]
mov word [rbx], cx
ja 0x140057990
mov r14, qword [0x140121040]
lea r8, [rsp + 0x3e]
lea rcx, [r12 + 0x204]
mov rax, qword [r14]
mov rdx, qword [rax + 0x28]
call fcn.14006df70
cmp eax, 1
je 0x140057970
mov r14, qword [r14]
mov rdx, qword [r14 + 0x30]
lea r15, [r12 + 0x204]
mov rcx, r15
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x140057764
mov byte [r12 + 0x201], 0
mov rax, qword [0x1401213b0]
mov byte [r12 + 0x223], 0
mov r8, qword [r14 + 0x18]
cmp byte [rax], 0
jne 0x140057c10
lea r14, [rsp + 0x40]
mov qword [rsp + 0x20], r8
mov r9, r15
mov edx, 0x3e8
lea r8, str.This_file_is_from_version__s_and_cannot_be_opened_in_version__s.
mov rcx, r14
call fcn.14006e000
mov rcx, r14
call fcn.140034210
movzx eax, word [0x1400ecf68]
mov byte [r12 + 8], 1
mov byte [r12 + 0x201], 1
mov byte [r12 + 0x224], 0
mov dword [r12 + 0x15b8], 1
mov word [r12 + 0x222], ax
cmp byte [r12], dil
je 0x140057887
mov rax, qword [0x1401213b0]
test dil, dil
mov byte [r12 + 0x201], 0
mov byte [r12 + 0x223], 0
movzx eax, byte [rax]
je 0x140057b48
test al, al
jne 0x140057c28
movabs rax, 0x6d61672073696854
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x40]
movabs rax, 0x6c70207361772065
mov qword [rsp + 0x48], rax
movabs rax, 0x206e692064657961
mov qword [rsp + 0x50], rax
movabs rax, 0x6d206472617a6977
mov qword [rsp + 0x58], rax
movabs rax, 0x756f59202e65646f
mov qword [rsp + 0x60], rax
movabs rax, 0x7473207473756d20
mov qword [rsp + 0x68], rax
movabs rax, 0x676f724220747261
mov qword [rsp + 0x70], rax
movabs rax, 0x6977206e69206575
mov qword [rsp + 0x78], rax
movabs rax, 0x646f6d206472617a
mov qword [rsp + 0x80], rax
movabs rax, 0x706572206f742065
mov qword [rsp + 0x88], rax
movabs rax, 0x2e74692079616c
mov qword [rsp + 0x90], rax
call fcn.140034210
movzx eax, word [0x1400ecf68]
mov byte [r12 + 8], 1
mov byte [r12 + 0x201], 1
mov byte [r12 + 0x224], 0
mov dword [r12 + 0x15b8], 1
mov word [r12 + 0x222], ax
mov r13, qword [0x1401210e0]
mov r15d, 8
xor eax, eax
jmp 0x1400578b3
movzx edx, r14b
lea rax, [rdi + rdx]
sub r15w, 1
je 0x1400579a0
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x1400578a4
movzx edx, word [rbx]
add eax, 1
mov dword [rsi], eax
lea r8d, [rdx + 1]
movzx r14d, byte [r13 + rdx]
cmp r8w, 0x3e7
mov word [rbx], r8w
jbe 0x1400578a0
call fcn.140057060
jmp 0x1400578a0
mov rax, qword [0x140121040]
lea rcx, [r12 + 0x204]
mov rax, qword [rax]
mov rdx, qword [rax + 0x30]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
mov rax, qword [0x1401211f0]
mov rcx, rdi
mov dword [rax], 1
call sub.api_ms_win_crt_filesystem_l1_1_0.dll_remove
lea rdx, [0x1400ec621]
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
cmp byte [r12 + 0x201], 0
jne 0x140057947
call fcn.140056cd0
mov byte [r12 + 0x200], 1
mov dword [r12 + 0x214], 0
add rsp, 0x438
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r14, qword [r14]
movzx edx, word [rsp + 0x3e]
cmp edx, dword [r14 + 8]
jg 0x1400576c5
mov word [r12 + 0x202], dx
jmp 0x140057764
call fcn.140057060
jmp 0x140057699
mov qword [r12 + 0x20], rax
mov r13, qword [0x1401210e0]
mov r15d, 4
xor eax, eax
jmp 0x1400579cf
movzx edx, r14b
lea rax, [rdi + rdx]
sub r15w, 1
je 0x140057a10
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x1400579c4
movzx edx, word [rbx]
add eax, 1
mov dword [rsi], eax
lea r8d, [rdx + 1]
movzx r14d, byte [r13 + rdx]
cmp r8w, 0x3e7
mov word [rbx], r8w
jbe 0x1400579c0
call fcn.140057060
jmp 0x1400579c0
mov dword [r12 + 0x218], eax
mov r13, qword [0x1401210e0]
mov r15d, 4
xor eax, eax
jmp 0x140057a3f
movzx edx, r14b
lea rax, [rdi + rdx]
sub r15w, 1
je 0x140057a80
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x140057a34
movzx edx, word [rbx]
add eax, 1
mov dword [rsi], eax
lea r8d, [rdx + 1]
movzx r14d, byte [r13 + rdx]
cmp r8w, 0x3e7
mov word [rbx], r8w
jbe 0x140057a30
call fcn.140057060
jmp 0x140057a30
mov rcx, qword [0x140121290]
mov r14d, 4
mov r15, qword [0x1401210e0]
mov dword [rcx], eax
xor eax, eax
jmp 0x140057aaf
movzx edx, r13b
lea rax, [rdi + rdx]
sub r14w, 1
je 0x140057ae8
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x140057aa4
movzx edx, word [rbx]
add eax, 1
mov dword [rsi], eax
lea ecx, [rdx + 1]
movzx r13d, byte [r15 + rdx]
cmp cx, 0x3e7
mov word [rbx], cx
jbe 0x140057aa0
call fcn.140057060
jmp 0x140057aa0
mov rcx, qword [r12 + 0x20]
mov dword [rbp], eax
call fcn.140064d10
mov rdx, qword [r12 + 0x20]
mov rax, qword [0x1401214a0]
mov rcx, qword [0x140120d00]
mov qword [rax], rdx
call fcn.1400598e0
test al, al
je 0x140057b30
cmp dword [r12 + 0x228], 0xffffffff
je 0x140057950
call fcn.140056ac0
jmp 0x140057950
mov dword [r12 + 0x228], 0xffffffff
jmp 0x140057950
test al, al
jne 0x140057c40
movabs rax, 0x2079616c70206f54
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x40]
movabs rax, 0x6765722073696874
mov qword [rsp + 0x48], rax
movabs rax, 0x6365722072616c75
mov qword [rsp + 0x50], rax
movabs rax, 0x202c676e6964726f
mov qword [rsp + 0x58], rax
movabs rax, 0x7220657361656c70
mov qword [rsp + 0x60], rax
movabs rax, 0x4220747261747365
mov qword [rsp + 0x68], rax
movabs rax, 0x6977206575676f72
mov qword [rsp + 0x70], rax
movabs rax, 0x68742074756f6874
mov qword [rsp + 0x78], rax
movabs rax, 0x6472617a69772065
mov qword [rsp + 0x80], rax
movabs rax, 0x706f2065646f6d20
mov qword [rsp + 0x88], rax
movabs rax, 0x2e6e6f6974706f
mov qword [rsp + 0x8e], rax
call fcn.140034210
jmp 0x140057853
lea rcx, str.This_file_is_from_version__s_and_cannot_be_opened_in_version__s.
mov rdx, r15
call fcn.14006e040
jmp 0x140057730
lea rcx, str.This_game_was_played_in_wizard_mode._You_must_start_Brogue_in_wizard_mode_to_replay_it.
call fcn.14006e040
jmp 0x140057853
lea rcx, str.To_play_this_regular_recording__please_restart_Brogue_without_the_wizard_mode_option.
call fcn.14006e040
jmp 0x140057853