Function at 0x140039b40
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
push rbp
push rbx
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x3b8]
sub rsp, 0x488
mov qword [rax + 8], rsi
mov r14, rdx
mov qword [rax - 0x38], r13
mov rsi, r8
mov r13d, 1
mov r15, rcx
mov r8d, r13d
lock xadd dword [0x14008cba0], r8d
mov r9, qword [rdx]
lea rdi, [0x140082074]
add r9, 4
xor r12d, r12d
mov eax, r12d
sub eax, dword [r9]
movsxd r10, dword [r9]
add r10, r9
mov r9d, dword [rsi + 0x1d8]
neg eax
sbb rax, rax
and r10, rax
mov eax, dword [rdx + 0x14]
mov edx, dword [rdx + 0x38]
mov qword [rsp + 0x30], r10
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], eax
call fcn.1400396e0
cmp byte [r14 + 0x10], r12b
je 0x14003a069
mov r9, qword [r14 + 8]
test r9, r9
je 0x140039beb
mov r8, rdi
lea rdx, str.CommandLine
mov rcx, r15
call fcn.1400390b0
mov rax, qword [r14]
cmp dword [rax + 0x44], r12d
je 0x140039d72
xor esi, esi
mov qword [rsp + 0x50], rsi
nop
mov rcx, qword [r14]
lea r8, str.Contents_of__s
xor eax, eax
add rcx, 0x48
sub eax, dword [rcx]
movsxd rdx, dword [rcx]
add rdx, rcx
lea rcx, [rbp - 0x80]
neg eax
sbb rax, rax
and rdx, rax
xor eax, eax
add rdx, rsi
sub eax, dword [rdx]
movsxd rdi, dword [rdx]
add rdi, rdx
mov edx, 0x400
neg eax
sbb rax, rax
and rdi, rax
mov r9, rdi
call fcn.1400031a0
lea rdx, [0x1400802bc]
mov rcx, rdi
call fcn.1400147a0
mov qword [rsp + 0x58], rax
mov rbx, rax
test rax, rax
jne 0x140039ca6
mov rax, qword [rbp + 0x3d0]
mov ecx, 0x208
mov rbx, qword [rax + 0xd0]
call fcn.140053cb4
mov qword [rax], 0x200
lock add qword [rbx], 0x200
lea rbx, [rax + 8]
mov r9, rdi
mov rcx, rbx
lea r8, str.couldnt_open__s_for_reading
mov edx, 0x200
call fcn.1400031a0
jmp 0x140039d13
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 2]
call fcn.140058ed0
mov rcx, rbx
call fcn.140058cc0
mov rcx, rbx
movsxd rsi, eax
call fcn.140058ed8
mov rax, qword [rbp + 0x3d0]
lea rdi, [rsi + 1]
lea rcx, [rdi + 8]
mov rbx, qword [rax + 0xd0]
call fcn.140053cb4
mov qword [rax], rdi
lock add qword [rbx], rdi
mov r9, qword [rsp + 0x58]
lea rbx, [rax + 8]
mov rcx, rbx
mov r8, rsi
mov rdx, r13
call fcn.140053bec
mov rcx, qword [rsp + 0x58]
mov byte [rax + rbx], 0
call fcn.140052714
mov rsi, qword [rsp + 0x50]
lea rdi, [0x140082074]
test rbx, rbx
je 0x140039d52
mov r9, rbx
lea rdx, [rbp - 0x80]
mov r8, rdi
mov rcx, r15
call fcn.1400390b0
mov rax, qword [rbp + 0x3d0]
lea rcx, [rbx - 8]
mov rdx, qword [rcx]
neg rdx
mov rax, qword [rax + 0xd0]
lock add qword [rax], rdx
call fcn.140053948
mov rax, qword [r14]
add rsi, 8
inc r12d
mov qword [rsp + 0x50], rsi
cmp r12d, dword [rax + 0x44]
jne 0x140039c00
mov rsi, qword [rbp + 0x3d0]
mov rax, qword [r14]
cmp dword [rax + 0x54], 0
jle 0x140039e57
cmp byte [0x1400c3c58], 0
je 0x140039de0
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea rdx, [rbp + 0x3c8]
mov dword [rbp + 0x3c8], 0
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140039dce
mov edx, dword [rbp + 0x3c8]
or edx, 4
cmp edx, dword [rbp + 0x3c8]
je 0x140039dce
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_33m
mov rdx, rdi
mov rcx, r15
call fcn.140038f30
lea r8, str.Custom_Environment_Variables
mov rcx, r15
lea rdx, str.__s_n
call fcn.140038f30
cmp byte [0x1400c3c58], 0
je 0x140039e57
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea rdx, [rbp + 0x3d8]
mov dword [rbp + 0x3d8], 0
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140039e45
mov edx, dword [rbp + 0x3d8]
or edx, 4
cmp edx, dword [rbp + 0x3d8]
je 0x140039e45
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_0m
mov rdx, rdi
mov rcx, r15
call fcn.140038f30
mov rax, qword [r14]
xor r12d, r12d
mov ebx, r12d
cmp dword [rax + 0x54], ebx
je 0x140039ed3
mov edi, r12d
nop dword [rax + rax]
movsxd rdx, dword [rax + 0x58]
lea rcx, [rax + 0x58]
add rdx, rcx
mov eax, r12d
sub eax, dword [rcx]
neg eax
sbb rax, rax
and rdx, rax
mov eax, r12d
add rdx, rdi
sub eax, dword [rdx + 4]
lea rcx, [rdx + 4]
movsxd r9, dword [rcx]
add r9, rcx
mov rcx, r15
movsxd r8, dword [rdx]
neg eax
sbb rax, rax
add r8, rdx
and r9, rax
mov eax, r12d
sub eax, dword [rdx]
lea rdx, str._s_s_n
neg eax
sbb rax, rax
and r8, rax
call fcn.140038f30
mov rax, qword [r14]
inc ebx
add rdi, 8
cmp ebx, dword [rax + 0x54]
jne 0x140039e70
cmp dword [r14 + 0x3c], r12d
jne 0x14003a041
cmp dword [r14 + 0x18], 2
je 0x140039eef
cmp dword [r14 + 0x18], 3
jne 0x14003a041
mov r8, qword [rsi + 0xd0]
lea rdx, [rsp + 0x60]
mov rcx, r14
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
call fcn.140039980
cmp byte [0x1400c3c58], 0
mov r12, qword [rsp + 0x60]
mov rdi, qword [r12]
je 0x140039f78
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x40], 0
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140039f62
mov edx, dword [rsp + 0x40]
or edx, 4
cmp edx, dword [rsp + 0x40]
je 0x140039f62
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_91m
mov rcx, r15
lea rdx, [0x140082074]
call fcn.140038f30
mov r8, rdi
lea rdx, str.__s_n
mov rcx, r15
call fcn.140038f30
cmp byte [0x1400c3c58], 0
je 0x140039fe7
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea rdx, [rsp + 0x44]
mov dword [rsp + 0x44], 0
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140039fd1
mov edx, dword [rsp + 0x44]
or edx, 4
cmp edx, dword [rsp + 0x44]
je 0x140039fd1
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_0m
mov rcx, r15
lea rdx, [0x140082074]
call fcn.140038f30
mov rdi, qword [rsp + 0x68]
cmp rdi, r13
je 0x14003a021
lea rbx, [r12 + 8]
nop word [rax + rax]
mov r8, qword [rbx]
lea rdx, [0x14007f584]
mov rcx, r15
call fcn.140038f30
inc r13d
lea rbx, [rbx + 8]
movsxd rax, r13d
cmp rax, rdi
jne 0x14003a000
mov rdx, qword [r12 - 8]
lea rcx, [r12 - 8]
mov rax, qword [rsi + 0xd0]
neg rdx
lock add qword [rax], rdx
call fcn.140053948
xor r12d, r12d
cmp dword [r14 + 0x3c], 0
je 0x14003a062
mov r9d, dword [r14 + 0x3c]
lea r8, [0x1400826cc]
lea rdx, str.ExitCode
mov rcx, r15
call fcn.1400390b0
lea rdi, [0x140082074]
cmp qword [r14 + 0x28], 0
mov r13, qword [rsp + 0x480]
mov rsi, qword [rsp + 0x4c0]
je 0x14003a16d
cmp byte [r14 + 0x10], 0
je 0x14003a153
cmp byte [0x1400c3c58], 0
je 0x14003a0e5
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x48], r12d
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x14003a0d3
mov edx, dword [rsp + 0x48]
or edx, 4
cmp edx, dword [rsp + 0x48]
je 0x14003a0d3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_33m
mov rdx, rdi
mov rcx, r15
call fcn.140038f30
lea r8, str.Output
mov rcx, r15
lea rdx, str.__s_n
call fcn.140038f30
cmp byte [0x1400c3c58], 0
je 0x14003a15a
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea rdx, [rsp + 0x4c]
mov dword [rsp + 0x4c], r12d
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x14003a13f
mov edx, dword [rsp + 0x4c]
or edx, 4
cmp edx, dword [rsp + 0x4c]
je 0x14003a13f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_0m
mov rdx, rdi
mov rcx, r15
call fcn.140038f30
jmp 0x14003a15a
cmp dword [r14 + 0x18], 1
je 0x14003a16d
mov r8, qword [r14 + 0x28]
lea rdx, [0x14007f584]
mov rcx, r15
call fcn.140038f30
add rsp, 0x488
pop r15
pop r14
pop r12
pop rdi
pop rbx
pop rbp
ret