Function at 0x26f493a15
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rbx, rcx
mov rbp, rdx
mov rsi, r8
test rcx, rcx
je 0x26f493ac7
test r8, r8
je 0x26f493afa
cmp qword [rdx], 0
je 0x26f493a50
cmp qword [r8], 0
je 0x26f493b2d
lea rdx, [0x26f4a179e]
mov rcx, rbx
call sub.msvcrt.dll_fopen
mov r12, rax
test rax, rax
je 0x26f493b60
mov r8d, 2
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_fseek
test eax, eax
je 0x26f493c78
mov rdi, qword [sym.imp.msvcrt.dll__errno]
call rdi
mov r9d, dword [rax]
mov r8, rbx
lea rdx, str.fs_file_read
lea rcx, str._E____s_____fseek_SEEK_END__failed_path_s_errno_d__n
call fcn.26f49a202
call rdi
mov eax, dword [rax]
cmp eax, 0x29
ja case.0x26f493ac5.3
mov eax, eax
lea rdx, [0x26f4a1940]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
mov dword [rsp + 0x20], 0x2bd
lea r9, str.H:_Projects_rdp_bot_codebase_fs.c
lea r8, [0x26f4a0ff2]
lea rdx, str.fs_file_read
lea rcx, [0x26f4a1010]
call fcn.26f49a202
mov edi, 0x40000004
jmp 0x26f493c22
mov dword [rsp + 0x20], 0x2be
lea r9, str.H:_Projects_rdp_bot_codebase_fs.c
lea r8, [0x26f4a1765]
lea rdx, str.fs_file_read
lea rcx, [0x26f4a1010]
call fcn.26f49a202
mov edi, 0x40000004
jmp 0x26f493c22
mov dword [rsp + 0x20], 0x2bf
lea r9, str.H:_Projects_rdp_bot_codebase_fs.c
lea r8, str.___buf___NULL_____buf_sz____0__
lea rdx, str.fs_file_read
lea rcx, [0x26f4a1010]
call fcn.26f49a202
mov edi, 0x40000004
jmp 0x26f493c22
mov rdi, qword [sym.imp.msvcrt.dll__errno]
call rdi
mov r9d, dword [rax]
mov r8, rbx
lea rdx, str.fs_file_read
lea rcx, str._E____s_____fopen_failed_path_s_errno_d__n
call fcn.26f49a202
call rdi
mov eax, dword [rax]
cmp eax, 0x29
ja case.0x26f493b9b.3
mov eax, eax
lea rdx, [0x26f4a19e8]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
mov edi, 0
jmp 0x26f493c0d
mov edi, 0x40000009
jmp 0x26f493c0d
mov edi, 0x40000002
jmp 0x26f493c0d
mov edi, 0x40000007
jmp 0x26f493c0d
mov edi, 0x4000000d
jmp 0x26f493c0d
call qword [sym.imp.msvcrt.dll__errno]
mov edi, dword [rax]
and edi, 0x1fffffff
or edi, 0x60000000
jmp 0x26f493c0d
mov edi, 0
jmp 0x26f493c0d
mov edi, 0x40000009
jmp 0x26f493c0d
mov edi, 0x40000002
jmp 0x26f493c0d
mov edi, 0x40000007
jmp 0x26f493c0d
mov edi, 0x4000000d
jmp 0x26f493c0d
call qword [sym.imp.msvcrt.dll__errno]
mov edi, dword [rax]
and edi, 0x1fffffff
or edi, 0x60000000
test r12, r12
je 0x26f493c1a
mov rcx, r12
call sub.msvcrt.dll_fclose
test edi, edi
je 0x26f493fc7
cmp edi, 0x4000000b
setne al
test rsi, rsi
setne dl
test dl, al
je 0x26f493c3c
mov qword [rsi], 0
mov r9d, edi
and r9d, 0x3fffffff
test rbx, rbx
je 0x26f493fbb
mov r8, rbx
lea rdx, str.fs_file_read
lea rcx, [0x26f4a1090]
call fcn.26f49a202
mov eax, edi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, r12
call sub.msvcrt.dll_ftell
mov r13d, eax
test eax, eax
js 0x26f493cb0
je 0x26f493f9d
cmp qword [rbp], 0
je 0x26f493d38
cdqe
cmp qword [rsi], rax
jae 0x26f493d38
mov qword [rsi], rax
mov edi, 0x4000000b
jmp 0x26f493c0d
mov rdi, qword [sym.imp.msvcrt.dll__errno]
call rdi
mov r9d, dword [rax]
mov r8, rbx
lea rdx, str.fs_file_read
lea rcx, str._E____s_____ftell_failed_path_s_errno_d__n
call fcn.26f49a202
call rdi
mov eax, dword [rax]
cmp eax, 0x29
ja case.0x26f493ceb.3
mov eax, eax
lea rdx, [0x26f4a1a90]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
mov edi, 0
jmp 0x26f493c0d
mov edi, 0x40000009
jmp 0x26f493c0d
mov edi, 0x40000002
jmp 0x26f493c0d
mov edi, 0x40000007
jmp 0x26f493c0d
mov edi, 0x4000000d
jmp 0x26f493c0d
call qword [sym.imp.msvcrt.dll__errno]
mov edi, dword [rax]
and edi, 0x1fffffff
or edi, 0x60000000
jmp 0x26f493c0d
mov r8d, 0
mov edx, 0
mov rcx, r12
call sub.msvcrt.dll_fseek
mov r14d, eax
test eax, eax
jne 0x26f493d7a
mov rax, qword [rbp]
mov qword [rsp + 0x38], rax
test rax, rax
je 0x26f493e02
cmp qword [rsp + 0x38], 0
je 0x26f493fb1
mov edi, 0
jmp 0x26f493eb9
mov rdi, qword [sym.imp.msvcrt.dll__errno]
call rdi
mov r9d, dword [rax]
mov r8, rbx
lea rdx, str.fs_file_read
lea rcx, str._E____s_____fseek_SEEK_SET__failed_path_s_errno_d__n
call fcn.26f49a202
call rdi
mov eax, dword [rax]
cmp eax, 0x29
ja case.0x26f493db5.3
mov eax, eax
lea rdx, [0x26f4a1b38]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
mov edi, 0
jmp 0x26f493c0d
mov edi, 0x40000009
jmp 0x26f493c0d
mov edi, 0x40000002
jmp 0x26f493c0d
mov edi, 0x40000007
jmp 0x26f493c0d
mov edi, 0x4000000d
jmp 0x26f493c0d
call qword [sym.imp.msvcrt.dll__errno]
mov edi, dword [rax]
and edi, 0x1fffffff
or edi, 0x60000000
jmp 0x26f493c0d
movsxd rdi, r13d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rdi
mov edx, 8
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x26f493d64
mov r8, rdi
lea rdx, [0x26f4a1876]
lea rcx, [0x26f4a1880]
call fcn.26f49a202
jmp 0x26f493d64
mov rdi, qword [sym.imp.msvcrt.dll__errno]
call rdi
mov r9d, dword [rax]
mov r8, rbx
lea rdx, str.fs_file_read
lea rcx, str._E____s_____fread_failed_path_s_errno_d__n
call fcn.26f49a202
call rdi
mov eax, dword [rax]
cmp eax, 0x29
ja case.0x26f493e80.3
mov eax, eax
lea rdx, [0x26f4a1be0]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
mov edi, 0
jmp 0x26f493eb9
mov edi, 0x40000009
jmp 0x26f493eb9
mov edi, 0x40000002
jmp 0x26f493eb9
mov edi, 0x40000007
jmp 0x26f493eb9
mov edi, 0x4000000d
jmp 0x26f493eb9
call qword [sym.imp.msvcrt.dll__errno]
mov edi, dword [rax]
and edi, 0x1fffffff
or edi, 0x60000000
test edi, edi
sete r15b
cmp r14d, r13d
setl al
test r15b, r15b
je 0x26f493f05
test al, al
je 0x26f493f05
mov r8d, r13d
sub r8d, r14d
movsxd rcx, r14d
mov rax, qword [rsp + 0x38]
add rcx, rax
mov r9, r12
movsxd r8, r8d
mov edx, 1
call sub.msvcrt.dll_fread
test eax, eax
je 0x26f493f05
js 0x26f493e45
add r14d, eax
jmp 0x26f493eb9
mov edi, 0x40000003
jmp 0x26f493eb9
cmp r14d, r13d
setne al
test r15b, al
jne 0x26f493f3d
test edi, edi
je 0x26f493f62
cmp qword [rbp], 0
jne 0x26f493c0d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, qword [rsp + 0x38]
mov edx, 0
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x26f493c0d
mov dword [rsp + 0x20], r14d
mov r9d, r13d
mov r8, rbx
lea rdx, str.fs_file_read
lea rcx, str._E____s_____fread_undone_path_s_l_ld_n_ld__n
call fcn.26f49a202
mov edi, 0x40000001
jmp 0x26f493f14
cmp qword [rbp], 0
je 0x26f493f74
movsxd r13, r13d
mov qword [rsi], r13
jmp 0x26f493c0d
mov rax, qword [rsp + 0x38]
mov qword [rbp], rax
jmp 0x26f493f69
mov edi, 0x40000003
jmp 0x26f493c0d
mov edi, 0x40000003
jmp 0x26f493c0d
mov edi, 0x40000003
jmp 0x26f493c0d
mov edi, 0
jmp 0x26f493c0d
mov edi, 0x40000003
jmp 0x26f493c0d
mov edi, 0x40000002
jmp 0x26f493c0d
lea rbx, [0x26f4a0fcb]
jmp 0x26f493c4f
mov r9, qword [rsi]
mov r8, rbx
lea rdx, str.fs_file_read
lea rcx, str._I____s_____Done_path_s_buf_sz_llu__n
call fcn.26f49a202
jmp 0x26f493c65