Function at 0x140069b80
Capabilities:
Read file on windows
Terminate process
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x2d8
movaps xmmword [rsp + 0x280], xmm6
movaps xmmword [rsp + 0x290], xmm7
movaps xmmword [rsp + 0x2a0], xmm8
movaps xmmword [rsp + 0x2b0], xmm9
movaps xmmword [rsp + 0x2c0], xmm10
mov r8, qword [0x140120f30]
lea rdx, str._s_assets_tiles.png
lea rdi, [rsp + 0x170]
mov rcx, rdi
call fcn.14006dfd0
mov rcx, rdi
call fcn.140059900
test al, al
je 0x14006a526
mov rcx, rdi
call sub.SDL2_image.dll_IMG_Load
test rax, rax
mov rbx, rax
je 0x14006a598
xor r8d, r8d
mov edx, 0x16362004
mov rcx, rax
call sub.SDL2.dll_SDL_ConvertSurfaceFormat
test rax, rax
mov qword [0x140209ce0], rax
je 0x14006a58e
lea rsi, [0x140209b20]
mov rcx, rbx
call sub.SDL2.dll_SDL_FreeSurface
xor r10d, r10d
xor ecx, ecx
mov r9, rdi
mov rax, qword [0x140209ce0]
lea rbx, [0x140120340]
lea r11, [0x1402099a0]
mov rax, qword [rax + 0x20]
lea r8, [rax + 0x200]
lea edi, [rcx + 1]
mov qword [rsp + 0x38], rcx
mov rax, r8
xor edx, edx
imul r13d, ecx, 0x74000
imul r14, rcx, 0x74000
mov qword [rsp + 0x40], r8
mov rcx, r9
imul r15d, edi, 0x74000
add r13d, 0x73800
nop dword [rax + rax]
mov edi, r10d
mov r9, rax
lea r8, [r9 - 0x200]
jmp 0x140069cad
add r8, 4
cmp r8, r9
je 0x140069e20
test dword [r8], 0xffffff
je 0x140069ca0
xor r8d, r8d
xor edi, edi
cmp byte [rbx + rdx], 0x66
mov byte [r11 + rdx], r8b
je 0x140069db0
mov byte [rsi + rdx], dil
add rdx, 1
add rax, 0x200
cmp rdx, 0x10
jne 0x140069c90
mov r9, rcx
mov rcx, qword [rsp + 0x38]
add rsi, 0x10
add r11, 0x10
mov r8, qword [rsp + 0x40]
add rbx, 0x11
add r10, 0x74000
add rcx, 1
add r8, 0x1d0000
cmp rcx, 0x18
jne 0x140069c57
mov r8, qword [0x140120f30]
mov rdi, r9
mov rcx, r9
lea rdx, str._s_assets_tiles.bin
call fcn.14006dfd0
lea rdx, [0x140120258]
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
test rax, rax
mov rbx, rax
je 0x140069e41
lea rcx, [0x1401e59a0]
mov r9, rax
mov r8d, 0x24000
mov edx, 1
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
nop
movaps xmm6, xmmword [rsp + 0x280]
movaps xmm7, xmmword [rsp + 0x290]
movaps xmm8, xmmword [rsp + 0x2a0]
movaps xmm9, xmmword [rsp + 0x2b0]
movaps xmm10, xmmword [rsp + 0x2c0]
add rsp, 0x2d8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r12, r14
mov r9, rax
xor edi, edi
mov dword [rsp + 0x34], r13d
movsxd rbp, dword [rsp + 0x34]
lea r8, [r9 - 0x200]
sub rbp, r12
nop dword [rax]
test dword [r8], 0xffffff
jne 0x140069cc9
test dword [r8 + rbp*4], 0xffffff
jne 0x140069cc9
add r8, 4
cmp r8, r9
jne 0x140069dd0
add edi, 1
add r12, 0x800
sub dword [rsp + 0x34], 0x800
cmp edi, 0x3a
lea r9, [r8 + 0x2000]
jne 0x140069dbd
mov edi, 0x3a
jmp 0x140069cc9
lea r9, [r8 + 0x2000]
add edi, 0x800
cmp edi, r15d
jne 0x140069c96
mov r8d, 1
jmp 0x140069cb9
mov rbx, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
xor r13d, r13d
xor r12d, r12d
xor esi, esi
mov ecx, 2
mov rbp, rsi
call rbx
lea rdx, str.__s__not_found._Re_generating_it..._n
mov r8, rdi
mov rcx, rax
call fcn.14006e0f0
mov edx, 0x2fff0000
mov dword [rsp + 0x28], 0
mov r9d, 0x190
mov dword [rsp + 0x20], 0x12c
mov r8d, 0x2fff0000
lea rcx, str.Brogue
call sub.SDL2.dll_SDL_CreateWindow
mov edx, r13d
mov qword [rsp + 0x78], rdi
mov r13, r12
movdqa xmm9, xmmword [0x140120600]
mov r12, rax
movsd xmm8, qword [0x1401205f8]
mov eax, ebp
mov rcx, rbp
mov r14, r13
mov dword [rsp + 0x34], ebp
shl eax, 4
shl rcx, 4
mov r13, r12
mov dword [rsp + 0x70], edx
movq xmm10, qword [0x140120608]
mov dword [rsp + 0x74], eax
lea rax, [0x1402099a0]
lea rdi, [rcx + rax]
add rcx, rbp
mov qword [rsp + 0x60], rbx
lea rax, [0x140120340]
mov r15, rdi
mov qword [rsp + 0x80], rbp
add rax, rcx
mov qword [rsp + 0x68], rax
xor eax, eax
mov r12, rax
jmp 0x140069f22
add r12, 1
cmp r12, 0x10
je 0x14006a45c
cmp byte [r15 + r12], 0
jne 0x140069f14
mov rax, qword [rsp + 0x68]
lea rbx, [rsp + 0x100]
mov r9d, 0x180
lea rdx, str.Brogue___Optimizing_tile__d____d_..._n
mov rcx, rbx
movzx eax, byte [rax + r12]
mov byte [rsp + 0x4b], al
mov eax, dword [rsp + 0x74]
lea r8d, [rax + r12 + 1]
call fcn.14006dfd0
mov rdx, rbx
mov rcx, r13
call sub.SDL2.dll_SDL_SetWindowTitle
mov rcx, r13
call sub.SDL2.dll_SDL_GetWindowSurface
test rax, rax
mov r8, rax
je 0x14006a54d
mov rcx, qword [0x140209ce0]
mov eax, r12d
movaps xmmword [rsp + 0xb0], xmm9
shl eax, 7
movd xmm1, dword [rsp + 0x70]
movq qword [rsp + 0xc8], xmm10
lea rbx, [rsp + 0xc0]
movd xmm0, eax
lea r9, [rsp + 0xb0]
mov rdx, rbx
punpckldq xmm0, xmm1
movq qword [rsp + 0xc0], xmm0
call sub.SDL2.dll_SDL_UpperBlit
test eax, eax
js 0x14006a557
mov rcx, r13
call sub.SDL2.dll_SDL_UpdateWindowSurface
test eax, eax
jns 0x140069ff9
jmp 0x14006a561
cmp dword [rsp + 0xc0], 0x100
je 0x14006a4f1
mov rcx, rbx
call sub.SDL2.dll_SDL_PollEvent
test eax, eax
jne 0x140069fe8
lea rax, [r12 + r12*2]
mov ecx, 0x40
mov dword [0x1400bb208], 0x40
shl rax, 7
mov qword [rsp + 0x88], r13
mov rsi, rax
mov qword [rsp + 0x90], r12
mov eax, 5
lea rbp, [rsi + r14]
mov qword [rsp + 0x98], r15
mov dword [0x1400bb20c], 5
mov qword [rsp + 0xa0], r14
mov dword [rsp + 0x4c], r12d
mov qword [rsp + 0xa8], rsi
mov qword [rsp + 0x58], rbp
nop dword [rax]
mov rsi, qword [rsp + 0x58]
lea edx, [rax - 1]
shl eax, 4
mov dword [rsp + 0x20], 0x16362004
lea ecx, [rcx + rcx*2]
movsxd rdx, edx
mov r9d, 0x20
lea r15, [rdx + rdx*2]
mov edx, eax
lea r8d, [rcx*8]
xor ecx, ecx
call sub.SDL2.dll_SDL_CreateRGBSurfaceWithFormat
add r15, rsi
lea rsi, [0x1401e59a0]
mov r14, rax
add r15, rsi
test rax, rax
je 0x14006a4e7
movzx eax, byte [rsp + 0x4b]
mov dword [rsp + 0x50], 3
mov rbp, r15
cmp al, 0x74
sete dil
cmp al, 0x23
sete al
or edi, eax
xor esi, esi
test dil, dil
je 0x14006a1b4
cmp esi, 1
mov r12d, 5
mov r13d, 0xfffffffb
jg 0x14006a210
mov ebx, dword [0x1400bb20c]
xor r15d, r15d
mov eax, dword [0x1400bb208]
movsd xmm6, qword [0x1401205f8]
mov dword [rsp + 0x40], ebx
mov rbx, rbp
mov ebp, r13d
mov r13d, dword [rsp + 0x4c]
mov dword [rsp + 0x38], eax
nop dword [rax]
test dil, dil
mov byte [rbx + rsi], bpl
je 0x14006a13e
movsx edx, byte [rbx + 1]
movsx ecx, byte [rbx]
add ecx, edx
mov edx, ecx
shr edx, 0x1f
add edx, ecx
sar edx, 1
mov byte [rbx + 2], dl
mov edx, dword [rsp + 0x40]
mov dword [rsp + 0x20], r13d
mov rcx, r14
mov r9d, dword [rsp + 0x34]
mov dword [rsp + 0x28], 1
mov r8d, dword [rsp + 0x38]
call fcn.140068b60
comisd xmm6, xmm0
minsd xmm0, xmm6
cmova r15d, ebp
add ebp, 1
movsx edx, bpl
movapd xmm6, xmm0
cmp edx, r12d
jle 0x14006a120
test dil, dil
mov rbp, rbx
mov byte [rbx + rsi], r15b
je 0x14006a1b0
movsx eax, byte [rbx + 1]
add rsi, 1
movsx edx, byte [rbx]
add edx, eax
mov eax, edx
shr eax, 0x1f
add eax, edx
sar eax, 1
mov byte [rbx + 2], al
jmp 0x14006a0dd
add rsi, 1
cmp esi, 3
je 0x14006a210
cmp esi, 2
mov r13d, 0xfffffffb
mov r12d, 5
jne 0x14006a0f2
movsx eax, byte [rbp]
movsx edx, byte [rbp + 1]
add eax, edx
mov r12d, eax
shr r12d, 0x1f
add r12d, eax
sar r12d, 1
lea r13d, [r12 - 5]
add r12d, 5
movsx eax, r13b
cmp r12d, eax
jge 0x14006a0f2
mov byte [rbp + rsi], 0
add rsi, 1
cmp esi, 3
jne 0x14006a1b9
nop dword [rax]
sub dword [rsp + 0x50], 1
jne 0x14006a0d2
mov rcx, r14
call sub.SDL2.dll_SDL_FreeSurface
mov eax, dword [0x1400bb20c]
add eax, 1
cmp eax, 0x40
mov dword [0x1400bb20c], eax
jg 0x14006a242
mov ecx, dword [0x1400bb208]
jmp 0x14006a068
mov ebx, dword [rsp + 0x4c]
mov r8d, 0x40
mov dword [0x1400bb20c], 0x40
mov eax, 7
mov r14, qword [rsp + 0xa0]
mov dword [0x1400bb208], 7
mov rsi, qword [rsp + 0xa8]
lea rcx, [r14 + 0xc0]
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x58], rsi
nop word cs:[rax + rax]
mov rsi, qword [rsp + 0x50]
lea edx, [rax - 1]
mov dword [rsp + 0x20], 0x16362004
mov r9d, 0x20
mov rcx, qword [rsp + 0x58]
lea eax, [rax + rax*2]
movsxd rdx, edx
lea rdx, [rdx + rdx*2]
lea r15, [rsi + rcx]
xor ecx, ecx
lea rsi, [0x1401e59a0]
add r15, rdx
mov edx, r8d
lea r8d, [rax*8]
add rsi, r15
shl edx, 4
mov qword [rsp + 0x40], rsi
call sub.SDL2.dll_SDL_CreateRGBSurfaceWithFormat
test rax, rax
mov rbp, rax
je 0x14006a4dd
xor ecx, ecx
cmp byte [rsp + 0x4b], 0x74
mov esi, 3
mov r12d, dword [0x1400bb208]
mov r13d, dword [0x1400bb20c]
je 0x14006a41d
movapd xmm7, xmm8
mov dword [rsp + 0x4c], esi
nop dword [rax]
xor edx, edx
mov r15d, 0xfffffffb
mov rax, qword [rsp + 0x40]
movsx edi, dl
movsxd r14, ecx
xor esi, esi
add edi, 5
movapd xmm6, xmm7
mov dword [rsp + 0x38], ecx
add r14, rax
mov eax, edi
mov edi, r15d
mov r15d, eax
nop dword [rax + rax]
mov r9d, dword [rsp + 0x34]
mov byte [r14], dil
mov edx, r13d
mov r8d, r12d
mov dword [rsp + 0x28], 1
mov rcx, rbp
mov dword [rsp + 0x20], ebx
call fcn.140068b60
comisd xmm6, xmm0
minsd xmm0, xmm6
cmova esi, edi
add edi, 1
movsx edx, dil
movapd xmm6, xmm0
cmp edx, r15d
jle 0x14006a348
cmp byte [rsp + 0x4b], 0x74
mov byte [r14], sil
mov ecx, dword [rsp + 0x38]
je 0x14006a3e7
add ecx, 1
cmp ecx, 3
je 0x14006a3e7
cmp ecx, 2
je 0x14006a3b0
mov ecx, 1
jmp 0x14006a318
mov rsi, qword [rsp + 0x40]
movsx edx, byte [rsi + 1]
movsx eax, byte [rsi]
add eax, edx
mov r8d, eax
shr r8d, 0x1f
add r8d, eax
sar r8d, 1
lea r15d, [r8 - 5]
mov edx, r8d
add r8d, 5
movsx r9d, r15b
cmp r8d, r9d
jge 0x14006a320
mov byte [rsi + 2], 0
sub dword [rsp + 0x4c], 1
je 0x14006a3f5
xor ecx, ecx
jmp 0x14006a318
mov rcx, rbp
call sub.SDL2.dll_SDL_FreeSurface
mov eax, dword [0x1400bb208]
add eax, 1
cmp eax, 0x40
mov dword [0x1400bb208], eax
jg 0x14006a42e
mov r8d, dword [0x1400bb20c]
jmp 0x14006a290
movsd xmm7, qword [0x1401205f8]
mov dword [rsp + 0x4c], esi
jmp 0x14006a318
mov r12, qword [rsp + 0x90]
mov r13, qword [rsp + 0x88]
mov r15, qword [rsp + 0x98]
mov r14, qword [rsp + 0xa0]
add r12, 1
cmp r12, 0x10
jne 0x140069f22
mov rbp, qword [rsp + 0x80]
mov r12, r13
mov r13, r14
mov edx, dword [rsp + 0x70]
add r13, 0x1800
mov rbx, qword [rsp + 0x60]
add rbp, 1
add edx, 0xe8
cmp rbp, 0x18
jne 0x140069eb9
mov rdi, qword [rsp + 0x78]
mov rcx, r12
call sub.SDL2.dll_SDL_DestroyWindow
lea rdx, [0x1401202c0]
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
test rax, rax
mov rsi, rax
je 0x14006a56b
mov r9, rax
mov r8d, 0x24000
mov edx, 1
lea rcx, [0x1401e59a0]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
jmp 0x140069d69
mov ecx, 0x1a2
call fcn.140069b30
mov ecx, 0x181
call fcn.140069b30
mov rbx, qword [rsp + 0x60]
call sub.SDL2.dll_SDL_Quit
mov ecx, 2
call rbx
lea rcx, str.Aborted._n
mov r8d, 9
mov edx, 1
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 3
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.Error:___s__not_found__n
mov r8, rdi
mov rcx, rax
call fcn.14006e0f0
mov ecx, 3
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
mov ecx, 0x16d
call fcn.140069b30
mov ecx, 0x16f
call fcn.140069b30
mov ecx, 0x170
call fcn.140069b30
mov ecx, 2
call rbx
lea rdx, str.Error:_could_not_write_to___s__n
mov r8, rdi
mov rcx, rax
call fcn.14006e0f0
mov ecx, 3
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
mov ecx, 0x1cc
call fcn.140069b30
mov ecx, 0x1ca
call fcn.140069ae0
nop
nop word cs:[rax + rax]
nop
lea r10, [0x1401d8520]
movzx eax, word [rsp + 0x38]
movsxd rcx, ecx
movsxd rdx, edx
shl rax, 0x10
imul rcx, rcx, 0x64
movzx r9d, r9w
add rdx, rcx
movzx ecx, word [rsp + 0x30]
shl rdx, 4
or rax, rcx
movzx ecx, word [rsp + 0x28]
shl rax, 0x10
or rax, rcx
movzx ecx, word [rsp + 0x48]
shl rax, 0x10
or rax, r9
mov qword [r10 + rdx], rax
movzx eax, word [rsp + 0x40]
shl ecx, 0x10
or ecx, eax
mov dword [rdx + r10 + 8], ecx
lea rax, [r10 + rdx]
mov edx, 1
mov word [rax + 0xc], r8w
mov word [rax + 0xe], dx
ret