Function at 0x14003c790
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 [0x140097c60], r8d
mov r9, qword [rdx]
lea rdi, [0x140089bc8]
add r9, 0xc
xor r12d, r12d
mov eax, r12d
sub eax, dword [r9]
movsxd r10, dword [r9]
add r10, r9
mov r9d, dword [rsi + 0x228]
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.14003c330
cmp byte [r14 + 0x10], r12b
je 0x14003ccb9
mov r9, qword [r14 + 8]
test r9, r9
je 0x14003c83b
mov r8, rdi
lea rdx, str.CommandLine
mov rcx, r15
call fcn.14003bd00
mov rax, qword [r14]
cmp dword [rax + 0x58], r12d
je 0x14003c9c2
xor esi, esi
mov qword [rsp + 0x50], rsi
nop
mov rcx, qword [r14]
lea r8, str.Contents_of__s
xor eax, eax
add rcx, 0x5c
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.140003390
lea rdx, [0x14008abcc]
mov rcx, rdi
call fcn.1400147d0
mov qword [rsp + 0x58], rax
mov rbx, rax
test rax, rax
jne 0x14003c8f6
mov rax, qword [rbp + 0x3d0]
mov ecx, 0x208
mov rbx, qword [rax + 0x110]
call fcn.140058a4c
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.140003390
jmp 0x14003c963
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 2]
call fcn.14005de68
mov rcx, rbx
call fcn.14005db60
mov rcx, rbx
movsxd rsi, eax
call fcn.14005dff0
mov rax, qword [rbp + 0x3d0]
lea rdi, [rsi + 1]
lea rcx, [rdi + 8]
mov rbx, qword [rax + 0x110]
call fcn.140058a4c
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.140058984
mov rcx, qword [rsp + 0x58]
mov byte [rax + rbx], 0
call fcn.140056cc4
mov rsi, qword [rsp + 0x50]
lea rdi, [0x140089bc8]
test rbx, rbx
je 0x14003c9a2
mov r9, rbx
lea rdx, [rbp - 0x80]
mov r8, rdi
mov rcx, r15
call fcn.14003bd00
mov rax, qword [rbp + 0x3d0]
lea rcx, [rbx - 8]
mov rdx, qword [rcx]
neg rdx
mov rax, qword [rax + 0x110]
lock add qword [rax], rdx
call fcn.140058710
mov rax, qword [r14]
add rsi, 8
inc r12d
mov qword [rsp + 0x50], rsi
cmp r12d, dword [rax + 0x58]
jne 0x14003c850
mov rsi, qword [rbp + 0x3d0]
mov rax, qword [r14]
cmp dword [rax + 0x70], 0
jle 0x14003caa7
cmp byte [0x1400cf0e8], 0
je 0x14003ca30
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 0x14003ca1e
mov edx, dword [rbp + 0x3c8]
or edx, 4
cmp edx, dword [rbp + 0x3c8]
je 0x14003ca1e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_33m
mov rdx, rdi
mov rcx, r15
call fcn.14003bb80
lea r8, str.Custom_Environment_Variables
mov rcx, r15
lea rdx, str.__s_n
call fcn.14003bb80
cmp byte [0x1400cf0e8], 0
je 0x14003caa7
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 0x14003ca95
mov edx, dword [rbp + 0x3d8]
or edx, 4
cmp edx, dword [rbp + 0x3d8]
je 0x14003ca95
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_0m
mov rdx, rdi
mov rcx, r15
call fcn.14003bb80
mov rax, qword [r14]
xor r12d, r12d
mov ebx, r12d
cmp dword [rax + 0x70], ebx
je 0x14003cb23
mov edi, r12d
nop dword [rax + rax]
movsxd rdx, dword [rax + 0x74]
lea rcx, [rax + 0x74]
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.14003bb80
mov rax, qword [r14]
inc ebx
add rdi, 8
cmp ebx, dword [rax + 0x70]
jne 0x14003cac0
cmp dword [r14 + 0x3c], r12d
jne 0x14003cc91
cmp dword [r14 + 0x18], 2
je 0x14003cb3f
cmp dword [r14 + 0x18], 3
jne 0x14003cc91
mov r8, qword [rsi + 0x110]
lea rdx, [rsp + 0x60]
mov rcx, r14
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
call fcn.14003c5d0
cmp byte [0x1400cf0e8], 0
mov r12, qword [rsp + 0x60]
mov rdi, qword [r12]
je 0x14003cbc8
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 0x14003cbb2
mov edx, dword [rsp + 0x40]
or edx, 4
cmp edx, dword [rsp + 0x40]
je 0x14003cbb2
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_91m
mov rcx, r15
lea rdx, [0x140089bc8]
call fcn.14003bb80
mov r8, rdi
lea rdx, str.__s_n
mov rcx, r15
call fcn.14003bb80
cmp byte [0x1400cf0e8], 0
je 0x14003cc37
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 0x14003cc21
mov edx, dword [rsp + 0x44]
or edx, 4
cmp edx, dword [rsp + 0x44]
je 0x14003cc21
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_0m
mov rcx, r15
lea rdx, [0x140089bc8]
call fcn.14003bb80
mov rdi, qword [rsp + 0x68]
cmp rdi, r13
je 0x14003cc71
lea rbx, [r12 + 8]
nop word [rax + rax]
mov r8, qword [rbx]
lea rdx, [0x140089d54]
mov rcx, r15
call fcn.14003bb80
inc r13d
lea rbx, [rbx + 8]
movsxd rax, r13d
cmp rax, rdi
jne 0x14003cc50
mov rdx, qword [r12 - 8]
lea rcx, [r12 - 8]
mov rax, qword [rsi + 0x110]
neg rdx
lock add qword [rax], rdx
call fcn.140058710
xor r12d, r12d
cmp dword [r14 + 0x3c], 0
je 0x14003ccb2
mov r9d, dword [r14 + 0x3c]
lea r8, [0x14008d2ec]
lea rdx, str.ExitCode
mov rcx, r15
call fcn.14003bd00
lea rdi, [0x140089bc8]
cmp qword [r14 + 0x28], 0
mov r13, qword [rsp + 0x480]
mov rsi, qword [rsp + 0x4c0]
je 0x14003cdbd
cmp byte [r14 + 0x10], 0
je 0x14003cda3
cmp byte [0x1400cf0e8], 0
je 0x14003cd35
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 0x14003cd23
mov edx, dword [rsp + 0x48]
or edx, 4
cmp edx, dword [rsp + 0x48]
je 0x14003cd23
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_33m
mov rdx, rdi
mov rcx, r15
call fcn.14003bb80
lea r8, str.Output
mov rcx, r15
lea rdx, str.__s_n
call fcn.14003bb80
cmp byte [0x1400cf0e8], 0
je 0x14003cdaa
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 0x14003cd8f
mov edx, dword [rsp + 0x4c]
or edx, 4
cmp edx, dword [rsp + 0x4c]
je 0x14003cd8f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea r8, str.e_0m
mov rdx, rdi
mov rcx, r15
call fcn.14003bb80
jmp 0x14003cdaa
cmp dword [r14 + 0x18], 1
je 0x14003cdbd
mov r8, qword [r14 + 0x28]
lea rdx, [0x140089d54]
mov rcx, r15
call fcn.14003bb80
add rsp, 0x488
pop r15
pop r14
pop r12
pop rdi
pop rbx
pop rbp
ret