Function at 0x140022450
Capabilities:
Read file on windows

Disassembly:
push rbp
sub rsp, 0x140
lea rbp, [rsp + 0x80]
mov dword [rbp + 0xd0], ecx
mov qword [rbp + 0xd8], rdx
call sym.__main
cmp dword [rbp + 0xd0], 1
jg 0x140022499
lea rax, [0x1400299c9]
mov rcx, rax
call sym.puts
mov ecx, 0
call sym.QUIT
jmp 0x1400228ef
mov rax, qword [rbp + 0xd8]
add rax, 8
mov rax, qword [rax]
lea rdx, [0x1400299e2]
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x1400224db
mov rax, qword [rbp + 0xd8]
add rax, 8
mov rax, qword [rax]
lea rdx, str.__help
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x140022535
lea rax, str.Commands:
mov rcx, rax
call sym.puts
lea rax, str._t_h____help:_Show_this_help_message
mov rcx, rax
call sym.puts
lea rax, str._t_v____version:_Show_the_version_number
mov rcx, rax
call sym.puts
lea rax, str._t_PROGRAM_NAME_:_Run_a_file
mov rcx, rax
call sym.puts
lea rax, str._t_PROGRAM_NAME___d____debug:_Run_a_file_in_debug_mode
mov rcx, rax
call sym.puts
mov ecx, 0
call sym.QUIT
jmp 0x1400228ef
mov rax, qword [rbp + 0xd8]
add rax, 8
mov rax, qword [rax]
lea rdx, [0x140029a9e]
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x140022577
mov rax, qword [rbp + 0xd8]
add rax, 8
mov rax, qword [rax]
lea rdx, str.__version
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x1400225bf
lea r8, str.0.9.1.1
lea rax, str.Dosato
mov rdx, rax
lea rax, str._s_Version:__s_n
mov rcx, rax
call sym.printf
lea rax, str.Sebastiaan_Heins
mov rdx, rax
lea rax, str.2024__made_by__s_n
mov rcx, rax
call sym.printf
mov ecx, 0
call sym.QUIT
jmp 0x1400228ef
mov rax, qword [rbp + 0xd8]
add rax, 8
mov rax, qword [rax]
lea rdx, [0x1400299c3]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0xa8], rax
cmp qword [rbp + 0xa8], 0
jne 0x14002261c
mov rax, qword [rbp + 0xd8]
add rax, 8
mov rax, qword [rax]
mov rdx, rax
lea rax, str.Could_not_open_file__reading:__s_._n
mov rcx, rax
call sym.printf
mov ecx, 1
call sym.QUIT
jmp 0x1400228ef
mov rax, qword [rbp + 0xd8]
add rax, 0x10
mov rax, qword [rax]
test rax, rax
je 0x140022678
mov rax, qword [rbp + 0xd8]
add rax, 0x10
mov rax, qword [rax]
lea rdx, [0x140029b14]
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x140022671
mov rax, qword [rbp + 0xd8]
add rax, 0x10
mov rax, qword [rax]
lea rdx, str.__debug
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x140022678
mov eax, 1
jmp 0x14002267d
mov eax, 0
mov dword [0x14002f0a0], eax
mov qword [rbp + 0xb8], 0
jmp 0x140022698
add qword [rbp + 0xb8], 1
mov rax, qword [rbp + 0xa8]
mov rcx, rax
call sym.fgetc
cmp eax, 0xffffffff
jne 0x140022690
mov rax, qword [rbp + 0xa8]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp + 0xb8]
add rax, 1
mov rcx, rax
call sym.malloc
mov qword [rbp + 0xa0], rax
mov rdx, qword [rbp + 0xb8]
mov rcx, qword [rbp + 0xa8]
mov rax, qword [rbp + 0xa0]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov rdx, qword [rbp + 0xb8]
mov rax, qword [rbp + 0xa0]
add rax, rdx
mov byte [rax], 0
mov rax, qword [rbp + 0xa8]
mov rcx, rax
call sym.fclose
cmp qword [rbp + 0xb8], 0
jne 0x140022753
mov rax, qword [rbp + 0xa0]
mov rcx, rax
call sym.free
mov ecx, 0
call sym.QUIT
jmp 0x1400228ef
mov rax, qword [rbp + 0xd8]
add rax, 8
mov rdx, qword [rax]
lea rax, [rbp + 0x50]
mov rcx, qword [rbp + 0xa0]
mov r8, rcx
mov rcx, rax
call sym.loadAST
mov r10d, dword [0x14002f0a0]
lea rcx, [rbp - 0x10]
mov rax, qword [rbp + 0x50]
mov rdx, qword [rbp + 0x58]
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rdx
mov rax, qword [rbp + 0x60]
mov rdx, qword [rbp + 0x68]
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rdx
mov rax, qword [rbp + 0x70]
mov rdx, qword [rbp + 0x78]
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], rdx
mov rax, qword [rbp + 0x80]
mov rdx, qword [rbp + 0x88]
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rdx
lea rax, [rbp - 0x50]
mov r9, rax
mov r8d, 1
mov edx, r10d
call sym.createProcess
mov rax, qword [rbp + 0xa0]
mov rcx, rax
call sym.free
mov eax, dword [0x14002f0a0]
test eax, eax
je 0x1400228c4
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x38]
mov rdx, rax
lea rax, str.CONTENTS___s_:_n_n
mov rcx, rax
call sym.printf
mov dword [rbp + 0xb4], 0
jmp 0x140022846
mov rax, qword [rbp - 0x10]
mov rdx, qword [rax]
mov eax, dword [rbp + 0xb4]
cdqe
add rax, rdx
movzx eax, byte [rax]
movsx eax, al
mov ecx, eax
call sym.putchar
add dword [rbp + 0xb4], 1
mov eax, dword [rbp + 0xb4]
cdqe
cmp qword [rbp + 0xb8], rax
jg 0x140022820
lea rax, str._n_n_n_nTOKENS:_n
mov rcx, rax
call sym.puts
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 8]
mov rcx, rax
call sym.printTokens
lea rax, str._n_n_nAST:_n
mov rcx, rax
call sym.puts
mov rax, qword [rbp - 0x10]
lea rcx, [rax + 0x10]
mov rax, qword [rbp - 0x10]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rax, qword [rax]
mov dword [rsp + 0x20], 1
mov r9d, 1
mov r8, rcx
mov rcx, rax
call sym.printNode
lea rax, str._n_nRUNNING_PROGRAM:_n
mov rcx, rax
call sym.puts
lea rax, [rbp - 0x10]
mov rcx, rax
call sym.runProcess
mov dword [rbp + 0x9c], eax
lea rax, [rbp - 0x10]
mov rcx, rax
call sym.destroyProcess
mov eax, dword [rbp + 0x9c]
mov ecx, eax
call sym.QUIT
add rsp, 0x140
pop rbp
ret