Function at 0x140001610
Capabilities:
Read file on windows
Terminate process

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov rcx, qword [rdx + 8]
mov rbx, rdx
test rcx, rcx
je 0x1400017ff
xor edx, edx
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__access]
test eax, eax
jne 0x1400017da
mov rcx, qword [rbx + 8]
lea edx, [rax + 0x2e]
mov qword [rsp + 0x40], rdi
call qword [sym.imp.VCRUNTIME140.dll_strchr]
test rax, rax
je 0x1400017b8
xor edx, edx
lea r8, [0x1400033c0]
nop dword [rax]
movzx ecx, byte [rax + rdx]
inc rdx
cmp cl, byte [r8 + rdx - 1]
jne 0x1400017b8
cmp rdx, 4
jne 0x140001670
mov rdx, qword [rbx + 8]
lea r8, [0x1400033c4]
lea rcx, [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x20]
test eax, eax
je 0x1400016d7
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea rcx, str._nERROR_FOR_READING_THE_FILE_n
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov eax, 1
mov rdi, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140001850
add rsp, 0x30
pop rbx
ret
xor edx, edx
lea r8d, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov rcx, qword [rsp + 0x20]
movsxd rdi, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
mov rax, 0xffffffffffffffff
mov edx, edi
add edx, 1
cmovb rdx, rax
lea ecx, [rax + 2]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov rbx, rax
test rax, rax
jne 0x14000174b
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea ecx, [rbx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rdx, rax
lea rcx, str._nmemory_alloc_fails_n
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
lea ecx, [rbx + 1]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov r9, qword [rsp + 0x20]
mov rdx, rdi
mov r8d, 1
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, qword [rsp + 0x20]
cmp rax, 1
je 0x1400017a3
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rdx, rax
lea rcx, str._nentire_read_fails_n
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, rbx
call fcn.1400010d0
xor eax, eax
jmp 0x1400016bf
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rdx, rax
lea rcx, str._nThe_file_you_provided_doesnt_have_the_correct_extension__.bf__n
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
xor eax, eax
jmp 0x1400016bf
lea rcx, str._nPlease_enter_a_valid_file_n
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov eax, 1
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140001850
add rsp, 0x30
pop rbx
ret
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rdx, rax
lea rcx, str._nPlease_enter_a_file_name_n
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
mov eax, 1
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140001850
add rsp, 0x30
pop rbx
ret