Function at 0x1400592a0
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 [0x14011de20]
cmp byte [rdi], 0
je 0x1400596c1
mov rbx, qword [0x14011e1e0]
xor eax, eax
xor edx, edx
mov r12, qword [0x14011e4e0]
mov rsi, qword [0x14011e4a0]
mov word [rbx], ax
mov rax, qword [0x14011e420]
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 [0x14011e230]
mov byte [r12 + 0x22c], 0
mov dword [r12 + 0x15b4], 0
mov word [r12 + 0x202], dx
mov dword [rax], 0
je 0x140059660
mov rbp, qword [0x14011e190]
lea rdi, [r12 + 0x204]
mov byte [r12 + 0x222], 0
mov eax, dword [0x1400ee4cc]
lea r15, [r12 + 0x213]
mov dword [rbp], 0x186a0
mov dword [r12 + 0x21e], eax
call fcn.140058d00
mov edx, dword [rsi]
mov r8d, dword [rbp]
mov r13, qword [0x14011e080]
jmp 0x14005939c
mov byte [rdi], r14b
add rdi, 1
cmp r15, rdi
je 0x1400593da
cmp r8d, edx
mov r14d, 8
jb 0x140059390
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 0x140059390
call fcn.140058d00
add rdi, 1
mov byte [rdi - 1], r14b
mov edx, dword [rsi]
cmp r15, rdi
mov r8d, dword [rbp]
jne 0x14005939c
cmp r8d, edx
mov edi, 8
jb 0x140059409
movzx eax, word [rbx]
add edx, 1
mov r8, qword [0x14011e080]
mov dword [rsi], edx
lea ecx, [rax + 1]
cmp cx, 0x3e7
movzx edi, byte [r8 + rax]
mov word [rbx], cx
ja 0x140059700
mov r14, qword [0x14011dfe0]
lea r8, [rsp + 0x3e]
lea rcx, [r12 + 0x204]
mov rax, qword [r14]
mov rdx, qword [rax + 0x28]
call fcn.1400716a0
cmp eax, 1
je 0x1400596d8
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 0x1400594d4
mov byte [r12 + 0x201], 0
mov rax, qword [0x14011e350]
mov byte [r12 + 0x223], 0
mov r8, qword [r14 + 0x18]
cmp byte [rax], 0
jne 0x140059980
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.140071730
mov rcx, r14
call fcn.140035040
movzx eax, word [0x1400ee4c8]
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 0x1400595f7
mov rax, qword [0x14011e350]
test dil, dil
mov byte [r12 + 0x201], 0
mov byte [r12 + 0x223], 0
movzx eax, byte [rax]
je 0x1400598b8
test al, al
jne 0x140059998
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.140035040
movzx eax, word [0x1400ee4c8]
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 [0x14011e080]
mov r15d, 8
xor eax, eax
jmp 0x140059623
movzx edx, r14b
lea rax, [rdi + rdx]
sub r15w, 1
je 0x140059710
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x140059614
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 0x140059610
call fcn.140058d00
jmp 0x140059610
mov rax, qword [0x14011dfe0]
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 [0x14011e190]
mov rcx, rdi
mov dword [rax], 1
call sub.api_ms_win_crt_filesystem_l1_1_0.dll_remove
lea rdx, [0x1400edae1]
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
call fcn.140058c20
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 0x140059435
mov word [r12 + 0x202], dx
jmp 0x1400594d4
call fcn.140058d00
jmp 0x140059409
mov qword [r12 + 0x20], rax
mov r13, qword [0x14011e080]
mov r15d, 4
xor eax, eax
jmp 0x14005973f
movzx edx, r14b
lea rax, [rdi + rdx]
sub r15w, 1
je 0x140059780
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x140059734
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 0x140059730
call fcn.140058d00
jmp 0x140059730
mov dword [r12 + 0x218], eax
mov r13, qword [0x14011e080]
mov r15d, 4
xor eax, eax
jmp 0x1400597af
movzx edx, r14b
lea rax, [rdi + rdx]
sub r15w, 1
je 0x1400597f0
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x1400597a4
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 0x1400597a0
call fcn.140058d00
jmp 0x1400597a0
mov rcx, qword [0x14011e230]
mov r14d, 4
mov r15, qword [0x14011e080]
mov dword [rcx], eax
xor eax, eax
jmp 0x14005981f
movzx edx, r13b
lea rax, [rdi + rdx]
sub r14w, 1
je 0x140059858
shl rax, 8
mov edx, 8
mov rdi, rax
mov eax, dword [rsi]
cmp dword [rbp], eax
jb 0x140059814
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 0x140059810
call fcn.140058d00
jmp 0x140059810
mov rcx, qword [r12 + 0x20]
mov dword [rbp], eax
call fcn.140068720
mov rdx, qword [r12 + 0x20]
mov rax, qword [0x14011e440]
mov rcx, qword [0x14011dca0]
mov qword [rax], rdx
call fcn.14005bb20
test al, al
je 0x1400598a0
cmp dword [r12 + 0x228], 0xffffffff
je 0x1400596b5
call fcn.1400585d0
jmp 0x1400596b5
mov dword [r12 + 0x228], 0xffffffff
jmp 0x1400596b5
test al, al
jne 0x1400599b0
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.140035040
jmp 0x1400595c3
lea rcx, str.This_file_is_from_version__s_and_cannot_be_opened_in_version__s.
mov rdx, r15
call fcn.140071770
jmp 0x1400594a0
lea rcx, str.This_game_was_played_in_wizard_mode._You_must_start_Brogue_in_wizard_mode_to_replay_it.
call fcn.140071770
jmp 0x1400595c3
lea rcx, str.To_play_this_regular_recording__please_restart_Brogue_without_the_wizard_mode_option.
call fcn.140071770
jmp 0x1400595c3