Function at 0x1400082d0
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2d8
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x2c0], rax
mov r14d, r9d
mov rdi, r8
mov r12, rdx
mov rbx, rcx
mov qword [rsp + 0x88], rdx
mov rcx, r8
call qword [sym.imp.KERNEL32.dll_GetFileType]
mov ebp, eax
test eax, eax
jne 0x140008327
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14000867b
lea rsi, [rbx + 0x40]
mov rcx, qword [rsi]
xor r13d, r13d
mov qword [rsi], r13
test rcx, rcx
je 0x14000833f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x48], r13
mov dword [rbx + 0x50], 0xfde9
mov word [rbx + 0x54], r13w
mov byte [rbx + 0x56], r13b
mov qword [rbx + 0x58], r13
mov qword [rbx + 0x60], r13
mov edx, r14d
mov rcx, rbx
call fcn.140007e20
mov byte [rbx + 0x54], 3
movzx eax, byte [rsp + 0x340]
mov byte [rbx + 0x55], al
cmp rsi, r12
je 0x140008393
mov rax, qword [r12]
mov qword [r12], r13
mov rcx, qword [rsi]
mov qword [rsi], rax
test rcx, rcx
je 0x140008393
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x48], rdi
test byte [rbx + 0x55], 0x10
je 0x140008436
cmp ebp, 2
jne 0x140008436
lea rdx, [rsp + 0x90]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140008436
lea rsi, [rbx + 0x20]
lea r14, [rsi + 0x10]
mov rdi, qword [r14]
mov edx, 0x800
cmp rdi, rdx
jae 0x140008426
cmp qword [rsi + 0x18], rdx
jae 0x1400083e8
sub rdx, rdi
mov rcx, rsi
call fcn.140008da0
mov qword [r14], rdi
mov rdx, qword [rsi + 0x18]
cmp rdx, rdi
ja 0x1400083ff
cmp rdx, 8
jb 0x1400083fa
mov rsi, qword [rsi]
mov qword [r14], rdx
jmp 0x140008421
mov rcx, rdx
sub rcx, rdi
mov qword [r14], rdx
cmp rdx, 8
jb 0x140008411
mov rsi, qword [rsi]
lea rdi, [rsi + rdi*2]
test rcx, rcx
je 0x140008421
movzx eax, r13w
rep stosw word [rdi], ax
mov word [rsi + rdx*2], r13w
mov dword [rbx + 0x50], 0x4b0
mov byte [rbx + 0x54], 4
jmp 0x1400085fe
mov rdi, qword [rbx + 0x10]
mov edx, 0x1000
cmp rdi, rdx
jae 0x14000849b
cmp qword [rbx + 0x18], rdx
jae 0x140008455
sub rdx, rdi
mov rcx, rbx
call fcn.140008f10
mov rax, qword [rbx + 0x18]
mov rcx, rbx
cmp rax, rdi
ja 0x140008474
cmp rax, 0x10
jb 0x14000846a
mov rcx, qword [rbx]
mov qword [rbx + 0x10], rax
mov byte [rcx + rax], r13b
jmp 0x14000849b
mov rbp, rax
sub rbp, rdi
mov qword [rbx + 0x10], rax
cmp rax, 0x10
jb 0x140008487
mov rcx, qword [rbx]
add rdi, rcx
mov r8, rbp
xor edx, edx
mov rcx, rdi
call fcn.14000cb80
mov byte [rdi + rbp], r13b
test byte [rbx + 0x55], 2
je 0x1400085fe
mov dword [rsp + 0x90], r13d
mov rcx, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x1400084ba
mov rcx, qword [rbx]
mov rdx, qword [rbx + 0x58]
add rdx, rcx
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x90]
mov r8d, 4
mov rcx, qword [rbx + 0x48]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400084f1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jne 0x14000863a
mov ecx, dword [rsp + 0x90]
add qword [rbx + 0x58], rcx
test ecx, ecx
jne 0x140008515
mov rcx, qword [rsi]
mov qword [rsi], r13
test rcx, rcx
je 0x140008511
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x48], r13
lea rdi, [0x14002d920]
nop dword [rax]
mov rdx, rbx
mov r14, qword [rbx + 0x18]
cmp r14, 0x10
jb 0x140008530
mov rdx, qword [rbx]
mov rbp, qword [rbx + 0x58]
movzx esi, byte [rdi + 2]
mov ecx, esi
movzx eax, bpl
cmp rsi, rbp
cmova ecx, eax
movzx r15d, cl
mov r8d, r15d
mov rcx, qword [rdi + 8]
call fcn.140022d90
test eax, eax
jne 0x140008571
cmp r15b, sil
je 0x140008583
cmp qword [rbx + 0x48], r13
je 0x140008571
mov edx, esi
sub edx, ebp
mov rcx, rbx
call fcn.1400081e0
jmp 0x140008520
add rdi, 0x10
lea rax, str.string_too_long
cmp rdi, rax
je 0x1400085fe
jmp 0x140008520
cmp rsi, rbp
jb 0x14000858e
mov qword [rbx + 0x58], r13
jmp 0x1400085ba
test rsi, rsi
je 0x1400085ba
sub rbp, rsi
mov qword [rbx + 0x58], rbp
mov rax, rbx
cmp r14, 0x10
jb 0x1400085ab
mov rax, qword [rbx]
mov rcx, rax
jmp 0x1400085ae
mov rcx, rbx
lea rdx, [rax + rsi]
mov r8, rbp
call fcn.140010620
movzx edi, word [rdi]
cmp edi, 3
ja 0x1400085fb
test edi, edi
jne 0x1400085d0
call qword [sym.imp.KERNEL32.dll_GetACP]
mov edi, eax
jmp 0x1400085fb
cmp edi, 1
jne 0x1400085df
call qword [sym.imp.KERNEL32.dll_GetOEMCP]
mov edi, eax
jmp 0x1400085fb
lea r8, [rsp + 0xa0]
xor edx, edx
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetCPInfoExW]
test eax, eax
cmovne edi, dword [rsp + 0xb4]
mov dword [rbx + 0x50], edi
mov rcx, rbx
call fcn.140008840
nop
mov rcx, qword [r12]
test rcx, rcx
je 0x140008616
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x2c0]
xor rcx, rsp
call fcn.14000ad20
add rsp, 0x2d8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov edx, eax
lea rcx, [rsp + 0x68]
call fcn.1400096c0
nop
mov r8, rax
lea rdx, str.ReadFile_error
lea rcx, [rsp + 0x48]
call fcn.140008ac0
nop
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.140009840
lea rdx, [0x140031940]
lea rcx, [rsp + 0x30]
call fcn.14000c84c
nop
mov edx, eax
lea rcx, [rsp + 0x48]
call fcn.1400096c0
nop
mov r8, rax
lea rdx, str.GetFileType_error
lea rcx, [rsp + 0x68]
call fcn.140008ac0
nop
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.140009840
lea rdx, [0x140031940]
lea rcx, [rsp + 0x30]
call fcn.14000c84c
int3