Function at 0x140057540
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 [0x140120ec0]
cmp byte [rdi], 0
je 0x14005797a
mov r12, qword [0x140121580]
xor edx, edx
xor ecx, ecx
mov rax, qword [0x1401214c0]
mov rbx, qword [0x140121280]
mov rsi, qword [0x140121540]
cmp byte [r12 + 0x201], 0
mov word [r12 + 0x224], 0
mov dword [rax], 0
mov rax, qword [0x1401212d0]
mov word [rbx], dx
mov dword [rsi], 0
mov dword [r12 + 0x228], 0
mov dword [rax], 0
mov byte [r12 + 0x22c], 0
mov dword [r12 + 0x15b4], 0
mov word [r12 + 0x202], cx
je 0x140057900
mov rbp, qword [0x140121230]
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.140057070
mov edx, dword [rsi]
mov r8d, dword [rbp]
mov r13, qword [0x140121120]
jmp 0x14005763c
mov byte [rdi], r14b
add rdi, 1
cmp r15, rdi
je 0x14005767a
cmp r8d, edx
mov r14d, 8
jb 0x140057630
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 0x140057630
call fcn.140057070
add rdi, 1
mov byte [rdi - 1], r14b
mov edx, dword [rsi]
cmp r15, rdi
mov r8d, dword [rbp]
jne 0x14005763c
cmp r8d, edx
mov edi, 8
jb 0x1400576a9
movzx eax, word [rbx]
add edx, 1
mov r8, qword [0x140121120]
mov dword [rsi], edx
lea ecx, [rax + 1]
cmp cx, 0x3e7
movzx edi, byte [r8 + rax]
mov word [rbx], cx
ja 0x1400579b0
mov r14, qword [0x140121080]
lea r8, [rsp + 0x3e]
lea rcx, [r12 + 0x204]
mov rax, qword [r14]
mov rdx, qword [rax + 0x28]
call fcn.14006df90
cmp eax, 1
je 0x140057990
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 0x140057774
mov byte [r12 + 0x201], 0
mov rax, qword [0x1401213f0]
mov byte [r12 + 0x223], 0
mov r8, qword [r14 + 0x18]
cmp byte [rax], 0
jne 0x140057c30
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.14006e020
mov rcx, r14
call fcn.140034220
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 0x140057897
mov rax, qword [0x1401213f0]
test dil, dil
mov byte [r12 + 0x201], 0
mov byte [r12 + 0x223], 0
movzx eax, byte [rax]
je 0x140057b68
test al, al
jne 0x140057c48
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.140034220
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 [0x140121120]
mov r15d, 8
xor eax, eax
jmp 0x1400578c3
movzx edx, r14b
lea rax, [rdi + rdx]
sub r15w, 1
je 0x1400579c0
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x1400578b4
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 0x1400578b0
call fcn.140057070
jmp 0x1400578b0
lea rcx, [r12 + 0x204]
mov eax, 1
mov word [r12 + 0x202], ax
mov rax, qword [0x140121080]
mov rax, qword [rax]
mov rdx, qword [rax + 0x30]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
mov rax, qword [0x140121230]
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 0x140057965
call fcn.140056ce0
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 0x1400576d5
mov word [r12 + 0x202], dx
jmp 0x140057774
call fcn.140057070
jmp 0x1400576a9
mov qword [r12 + 0x20], rax
mov r13, qword [0x140121120]
mov r15d, 4
xor eax, eax
jmp 0x1400579ef
movzx edx, r14b
lea rax, [rdi + rdx]
sub r15w, 1
je 0x140057a30
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x1400579e4
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 0x1400579e0
call fcn.140057070
jmp 0x1400579e0
mov dword [r12 + 0x218], eax
mov r13, qword [0x140121120]
mov r15d, 4
xor eax, eax
jmp 0x140057a5f
movzx edx, r14b
lea rax, [rdi + rdx]
sub r15w, 1
je 0x140057aa0
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x140057a54
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 0x140057a50
call fcn.140057070
jmp 0x140057a50
mov rcx, qword [0x1401212d0]
mov r14d, 4
mov r15, qword [0x140121120]
mov dword [rcx], eax
xor eax, eax
jmp 0x140057acf
movzx edx, r13b
lea rax, [rdi + rdx]
sub r14w, 1
je 0x140057b08
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x140057ac4
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 0x140057ac0
call fcn.140057070
jmp 0x140057ac0
mov rcx, qword [r12 + 0x20]
mov dword [rbp], eax
call fcn.140064d30
mov rdx, qword [r12 + 0x20]
mov rax, qword [0x1401214e0]
mov rcx, qword [0x140120d40]
mov qword [rax], rdx
call fcn.140059900
test al, al
je 0x140057b50
cmp dword [r12 + 0x228], 0xffffffff
je 0x14005796e
call fcn.140056ad0
jmp 0x14005796e
mov dword [r12 + 0x228], 0xffffffff
jmp 0x14005796e
test al, al
jne 0x140057c60
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.140034220
jmp 0x140057863
lea rcx, str.This_file_is_from_version__s_and_cannot_be_opened_in_version__s.
mov rdx, r15
call fcn.14006e060
jmp 0x140057740
lea rcx, str.This_game_was_played_in_wizard_mode._You_must_start_Brogue_in_wizard_mode_to_replay_it.
call fcn.14006e060
jmp 0x140057863
lea rcx, str.To_play_this_regular_recording__please_restart_Brogue_without_the_wizard_mode_option.
call fcn.14006e060
jmp 0x140057863