Function at 0x14006d290
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 [0x14011de90]
lea rdx, str._s_assets_tiles.png
lea rdi, [rsp + 0x170]
mov rcx, rdi
call fcn.1400716e0
mov rcx, rdi
call fcn.14005bb20
test al, al
je 0x14006dc36
mov rcx, rdi
call sub.SDL2_image.dll_IMG_Load
test rax, rax
mov rbx, rax
je 0x14006dca8
xor r8d, r8d
mov edx, 0x16362004
mov rcx, rax
call sub.SDL2.dll_SDL_ConvertSurfaceFormat
test rax, rax
mov qword [0x140207cc0], rax
je 0x14006dc9e
lea rsi, [0x140207b00]
mov rcx, rbx
call sub.SDL2.dll_SDL_FreeSurface
xor r10d, r10d
xor ecx, ecx
mov r9, rdi
mov rax, qword [0x140207cc0]
lea rbx, [0x14011d2a0]
lea r11, [0x140207980]
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 0x14006d3bd
add r8, 4
cmp r8, r9
je 0x14006d530
test dword [r8], 0xffffff
je 0x14006d3b0
xor r8d, r8d
xor edi, edi
cmp byte [rbx + rdx], 0x66
mov byte [r11 + rdx], r8b
je 0x14006d4c0
mov byte [rsi + rdx], dil
add rdx, 1
add rax, 0x200
cmp rdx, 0x10
jne 0x14006d3a0
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 0x14006d367
mov r8, qword [0x14011de90]
mov rdi, r9
mov rcx, r9
lea rdx, str._s_assets_tiles.bin
call fcn.1400716e0
lea rdx, [0x14011d1b8]
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
test rax, rax
mov rbx, rax
je 0x14006d551
lea rcx, [0x1401e3980]
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 0x14006d3d9
test dword [r8 + rbp*4], 0xffffff
jne 0x14006d3d9
add r8, 4
cmp r8, r9
jne 0x14006d4e0
add edi, 1
add r12, 0x800
sub dword [rsp + 0x34], 0x800
cmp edi, 0x3a
lea r9, [r8 + 0x2000]
jne 0x14006d4cd
mov edi, 0x3a
jmp 0x14006d3d9
lea r9, [r8 + 0x2000]
add edi, 0x800
cmp edi, r15d
jne 0x14006d3a6
mov r8d, 1
jmp 0x14006d3c9
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.140071800
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 [0x14011d560]
mov r12, rax
movsd xmm8, qword [0x14011d558]
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 [0x14011d568]
mov dword [rsp + 0x74], eax
lea rax, [0x140207980]
lea rdi, [rcx + rax]
add rcx, rbp
mov qword [rsp + 0x60], rbx
lea rax, [0x14011d2a0]
mov r15, rdi
mov qword [rsp + 0x80], rbp
add rax, rcx
mov qword [rsp + 0x68], rax
xor eax, eax
mov r12, rax
jmp 0x14006d632
add r12, 1
cmp r12, 0x10
je 0x14006db6c
cmp byte [r15 + r12], 0
jne 0x14006d624
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.1400716e0
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 0x14006dc5d
mov rcx, qword [0x140207cc0]
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 0x14006dc67
mov rcx, r13
call sub.SDL2.dll_SDL_UpdateWindowSurface
test eax, eax
jns 0x14006d709
jmp 0x14006dc71
cmp dword [rsp + 0xc0], 0x100
je 0x14006dc01
mov rcx, rbx
call sub.SDL2.dll_SDL_PollEvent
test eax, eax
jne 0x14006d6f8
lea rax, [r12 + r12*2]
mov ecx, 0x40
mov dword [0x1400be208], 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 [0x1400be20c], 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, [0x1401e3980]
mov r14, rax
add r15, rsi
test rax, rax
je 0x14006dbf7
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 0x14006d8c4
cmp esi, 1
mov r12d, 5
mov r13d, 0xfffffffb
jg 0x14006d920
mov ebx, dword [0x1400be20c]
xor r15d, r15d
mov eax, dword [0x1400be208]
movsd xmm6, qword [0x14011d558]
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 0x14006d84e
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.14006c270
comisd xmm6, xmm0
minsd xmm0, xmm6
cmova r15d, ebp
add ebp, 1
movsx edx, bpl
movapd xmm6, xmm0
cmp edx, r12d
jle 0x14006d830
test dil, dil
mov rbp, rbx
mov byte [rbx + rsi], r15b
je 0x14006d8c0
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 0x14006d7ed
add rsi, 1
cmp esi, 3
je 0x14006d920
cmp esi, 2
mov r13d, 0xfffffffb
mov r12d, 5
jne 0x14006d802
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 0x14006d802
mov byte [rbp + rsi], 0
add rsi, 1
cmp esi, 3
jne 0x14006d8c9
nop dword [rax]
sub dword [rsp + 0x50], 1
jne 0x14006d7e2
mov rcx, r14
call sub.SDL2.dll_SDL_FreeSurface
mov eax, dword [0x1400be20c]
add eax, 1
cmp eax, 0x40
mov dword [0x1400be20c], eax
jg 0x14006d952
mov ecx, dword [0x1400be208]
jmp 0x14006d778
mov ebx, dword [rsp + 0x4c]
mov r8d, 0x40
mov dword [0x1400be20c], 0x40
mov eax, 7
mov r14, qword [rsp + 0xa0]
mov dword [0x1400be208], 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, [0x1401e3980]
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 0x14006dbed
xor ecx, ecx
cmp byte [rsp + 0x4b], 0x74
mov esi, 3
mov r12d, dword [0x1400be208]
mov r13d, dword [0x1400be20c]
je 0x14006db2d
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.14006c270
comisd xmm6, xmm0
minsd xmm0, xmm6
cmova esi, edi
add edi, 1
movsx edx, dil
movapd xmm6, xmm0
cmp edx, r15d
jle 0x14006da58
cmp byte [rsp + 0x4b], 0x74
mov byte [r14], sil
mov ecx, dword [rsp + 0x38]
je 0x14006daf7
add ecx, 1
cmp ecx, 3
je 0x14006daf7
cmp ecx, 2
je 0x14006dac0
mov ecx, 1
jmp 0x14006da28
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 0x14006da30
mov byte [rsi + 2], 0
sub dword [rsp + 0x4c], 1
je 0x14006db05
xor ecx, ecx
jmp 0x14006da28
mov rcx, rbp
call sub.SDL2.dll_SDL_FreeSurface
mov eax, dword [0x1400be208]
add eax, 1
cmp eax, 0x40
mov dword [0x1400be208], eax
jg 0x14006db3e
mov r8d, dword [0x1400be20c]
jmp 0x14006d9a0
movsd xmm7, qword [0x14011d558]
mov dword [rsp + 0x4c], esi
jmp 0x14006da28
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 0x14006d632
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 0x14006d5c9
mov rdi, qword [rsp + 0x78]
mov rcx, r12
call sub.SDL2.dll_SDL_DestroyWindow
lea rdx, [0x14011d220]
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
test rax, rax
mov rsi, rax
je 0x14006dc7b
mov r9, rax
mov r8d, 0x24000
mov edx, 1
lea rcx, [0x1401e3980]
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 0x14006d479
mov ecx, 0x1a2
call fcn.14006d240
mov ecx, 0x181
call fcn.14006d240
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.140071800
mov ecx, 3
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
mov ecx, 0x16d
call fcn.14006d240
mov ecx, 0x16f
call fcn.14006d240
mov ecx, 0x170
call fcn.14006d240
mov ecx, 2
call rbx
lea rdx, str.Error:_could_not_write_to___s__n
mov r8, rdi
mov rcx, rax
call fcn.140071800
mov ecx, 3
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
mov ecx, 0x1cc
call fcn.14006d240
mov ecx, 0x1ca
call fcn.14006d1f0
nop
nop word cs:[rax + rax]
nop
lea r10, [0x1401d6500]
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