Function at 0x1400219b0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbx
push rbp
push r13
push r15
sub rsp, 0xd8
mov rbx, r8
mov r13, rdx
mov ebp, ecx
test rdx, rdx
jne 0x140021a34
mov rcx, qword [0x1401ba620]
test rcx, rcx
je 0x140021a0c
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rcx]
mov qword [0x1401ba620], rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [0x1401ba620]
test rcx, rcx
jne 0x1400219f0
xor r15d, r15d
mov qword [0x1401ba628], r15
xor eax, eax
mov qword [0x1401ba630], r15
mov dword [0x1401ba638], r15d
add rsp, 0xd8
pop r15
pop r13
pop rbp
pop rbx
ret
mov qword [rsp + 0x110], rsi
xor r15d, r15d
cmp r13, qword [0x1401ba628]
mov qword [rsp + 0xd0], rdi
mov qword [rsp + 0xc8], r12
mov qword [rsp + 0xc0], r14
je 0x140021b9a
call fcn.14001ffb0
lea rax, str._unknown_program_
cmp qword [section..data], rax
jne 0x140021a82
mov rcx, qword [r13]
call fcn.140002690
mov ecx, 8
mov qword [0x1401ba628], r13
mov qword [0x1401ba630], r15
mov dword [0x1401ba638], r15d
call fcn.140001bb0
mov r14, qword [rsp + 0x128]
mov esi, r15d
mov qword [rsp + 0x30], r15
mov rdi, r15
mov qword [r14], rax
mov qword [rax], r15
mov rax, qword [rsp + 0x120]
mov dword [rax], r15d
test rbx, rbx
je 0x140021af5
mov rcx, rbx
call fcn.14001c820
test rax, rax
je 0x140021af5
mov rcx, rax
call fcn.140002810
mov rcx, rax
lea r8, [rsp + 0x30]
xor edx, edx
call fcn.1400221a0
mov rdi, qword [rsp + 0x30]
mov esi, eax
mov ecx, dword [0x14017f134]
lea rdx, [rsp + 0x46]
mov dword [rsp + 0x40], ecx
movzx ecx, word [0x14017f138]
mov word [rsp + 0x44], cx
movzx ecx, byte [0x14017f13a]
mov byte [rsp + 0x46], cl
mov rcx, qword [section..data]
sub rdx, rcx
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rcx + rdx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140021b30
lea rcx, [rsp + 0x46]
call fcn.14001d6b0
lea rcx, [rsp + 0x40]
call fcn.14001c820
test rax, rax
je 0x140021b75
mov rcx, rax
call fcn.140002810
mov rcx, rax
lea r8, [rsp + 0x30]
mov edx, esi
call fcn.1400221a0
mov rdi, qword [rsp + 0x30]
mov esi, eax
test rdi, rdi
je 0x140021ba2
mov edx, 0x18
lea ecx, [rdx - 0x17]
call fcn.140001250
mov rbx, rax
mov qword [0x1401ba620], rax
mov dword [rax + 0x10], esi
mov qword [rax + 8], rdi
jmp 0x140021ba9
mov r14, qword [rsp + 0x128]
mov rbx, qword [0x1401ba620]
mov r12, 0xffffffffffffffff
mov r9, qword [0x1401ba630]
mov rcx, qword [rsp + 0x138]
mov rax, qword [rsp + 0x130]
test rbx, rbx
je 0x140021bd3
mov ebp, dword [rbx + 0x10]
mov r13, qword [rbx + 8]
mov qword [rcx], r15
mov qword [rax], r15
nop dword [rax]
mov edi, r15d
mov rsi, r15
test r9, r9
jne 0x140021c79
nop
mov eax, dword [0x1401ba638]
inc eax
mov dword [0x1401ba638], eax
cmp eax, ebp
jge 0x140021de6
cdqe
mov rcx, qword [r13 + rax*8]
mov qword [0x1401ba630], rcx
test rcx, rcx
je 0x140021de6
test rsi, rsi
jne 0x140021c4a
movzx eax, byte [rcx]
cmp al, 0x2d
jne 0x140021c42
lea r9, [rcx + 1]
mov qword [0x1401ba630], r9
cmp byte [r9], al
jne 0x140021c79
inc edi
mov esi, 1
jmp 0x140021bf0
cmp al, 0x40
je 0x140021d0a
test rbx, rbx
je 0x140021c55
cmp dword [rbx + 0x14], r15d
je 0x140021bf0
mov r8, qword [rsp + 0x120]
mov rdx, r14
call fcn.1400216b0
test eax, eax
jne 0x140021e70
mov rbx, qword [0x1401ba620]
jmp 0x140021bf0
mov rcx, qword [rsp + 0x118]
cmp dword [rcx + 0x10], r15d
lea rsi, [rcx + 0x10]
je 0x140021ce0
nop dword [rax + rax]
movsxd r14, edi
mov r8, r12
lea rax, [r14 + r14*2]
lea rbx, [rcx + rax*8]
nop
inc r8
cmp byte [rbx + r8], r15b
jne 0x140021ca0
mov rdx, rbx
mov rcx, r9
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
je 0x140021e80
mov r9, qword [0x1401ba630]
add rsi, 0x18
inc edi
cmp dword [rsi], r15d
je 0x140021cd9
mov rcx, qword [rsp + 0x118]
jmp 0x140021c90
mov rbx, qword [0x1401ba620]
test rbx, rbx
je 0x14002212f
cmp dword [rbx + 0x14], r15d
jne 0x14002212f
mov r14, qword [rsp + 0x128]
mov r9, r15
mov qword [0x1401ba630], r15
jmp 0x140021be0
lea rsi, [rcx + 1]
mov rcx, rsi
lea rdx, [0x14017f108]
call fcn.14001ccc0
mov rdi, rax
test rax, rax
je 0x140021e57
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
lea ecx, [rbx + 1]
call fcn.140001bb0
mov r9, rdi
mov r8d, ebx
mov edx, 1
mov rcx, rax
mov rbp, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, rbx
jb 0x140021e2d
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov edx, 0x18
mov byte [rbx + rbp], r15b
lea ecx, [rdx - 0x17]
call fcn.140001250
xor edx, edx
mov rcx, rbp
mov rbx, rax
lea r8, [rax + 8]
call fcn.1400221a0
mov r13, qword [rsp + 0x108]
mov r9, r15
mov ebp, dword [rsp + 0x100]
mov dword [rbx + 0x10], eax
mov rax, qword [0x1401ba620]
mov qword [rbx], rax
mov eax, dword [0x1401ba638]
mov dword [rbx + 0x14], eax
mov dword [0x1401ba638], r15d
mov qword [0x1401ba620], rbx
mov qword [0x1401ba630], r15
jmp 0x140021bb7
test rbx, rbx
je 0x140021e78
mov rax, qword [rbx]
mov rcx, rbx
mov qword [0x1401ba620], rax
mov eax, dword [rbx + 0x14]
mov dword [0x1401ba638], eax
mov qword [0x1401ba630], r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [0x1401ba620]
mov r13, qword [rsp + 0x108]
mov ebp, dword [rsp + 0x100]
jmp 0x140021bb0
mov r9, rsi
lea r8, str.Failed_to_read___s__n
mov edx, 1
mov ecx, 0x3ea
call fcn.140001480
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, r12d
jmp 0x140022145
mov r9, rsi
lea r8, str.Failed_to_open___s__for_reading_n
mov edx, 1
mov ecx, 0x3e9
call fcn.140001480
mov eax, r12d
jmp 0x140022145
xor eax, eax
jmp 0x140022145
inc r12
cmp byte [rbx + r12], r15b
jne 0x140021e80
mov r9, qword [0x1401ba630]
add r9, r12
mov qword [0x1401ba630], r9
mov rdx, r9
cmp byte [r9], r15b
jne 0x140021eaf
mov r9, r15
mov qword [0x1401ba630], r15
mov rdx, r15
mov r11, qword [rsp + 0x118]
mov r10d, dword [0x1401ba638]
inc r10d
movsxd rax, r10d
mov r8, qword [r13 + rax*8]
lea rax, [r14 + r14*2]
lea rbx, [r11 + rax*8]
mov r11d, dword [r11 + rax*8 + 0x10]
lea eax, [r11 - 1]
cmp eax, 0xa
ja case.default.0x140021ef6
lea rdi, [0x140000000]
cdqe
mov ecx, dword [rdi + rax*4 + 0x22174]
add rcx, rdi
jmp rcx
test rdx, rdx
jne 0x140021f0c
test r8, r8
je 0x140021f1c
mov dword [0x1401ba638], r10d
mov rdx, r8
mov rdi, qword [rsp + 0x130]
mov qword [rdi], rdx
jmp 0x140022092
mov r9, rbx
lea r8, str.String_expected_joining_or_after_option__s_n
mov ecx, 0x3eb
jmp 0x14002213b
test rdx, rdx
je case.0x140021ef6.5
mov rdi, qword [rsp + 0x130]
mov qword [rdi], rdx
jmp 0x140022092
mov rdi, qword [rsp + 0x130]
mov rsi, qword [rsp + 0x138]
test r8, r8
je 0x14002209a
mov qword [rdi], r8
mov dword [0x1401ba638], r10d
jmp 0x14002209a
mov rdi, qword [rsp + 0x130]
mov rsi, qword [rsp + 0x138]
test rdx, rdx
je 0x14002209a
mov qword [rdi], rdx
jmp 0x14002209a
test rdx, rdx
jne 0x140021fa7
mov r9, rbx
lea r8, str.String_expected_joining_option__s_n
mov ecx, 0x3ec
jmp 0x14002213b
mov rdi, qword [rsp + 0x130]
mov rsi, qword [rsp + 0x138]
mov qword [rdi], rdx
cmp dword [rbx + 0x10], 7
jne 0x14002209a
test r8, r8
je 0x14002209a
mov qword [rsi], r8
mov dword [0x1401ba638], r10d
jmp 0x14002209a
test r8, r8
jne 0x140021ff5
mov r9, rbx
lea r8, str.String_expected_after_option__s_n
mov ecx, 0x3ed
jmp 0x14002213b
mov rdi, qword [rsp + 0x130]
mov rsi, qword [rsp + 0x138]
cmp r11d, 9
jne 0x140021f5e
mov qword [rdi], rdx
mov qword [rsi], r8
mov dword [0x1401ba638], r10d
jmp 0x14002209a
test rdx, rdx
je 0x140022047
test r8, r8
je 0x140022047
mov rdi, qword [rsp + 0x130]
mov rsi, qword [rsp + 0x138]
mov dword [0x1401ba638], r10d
mov qword [rdi], rdx
mov qword [rsi], r8
jmp 0x14002209a
mov r9, rbx
lea r8, str.String_expected_joining_and_after_option__s_n
mov ecx, 0x3ee
jmp 0x14002213b
mov rdi, qword [rsp + 0x130]
test r8, r8
je 0x140022072
mov qword [rdi], r8
mov dword [0x1401ba638], r10d
test rdx, rdx
je 0x140022092
mov rax, qword [rdi]
mov rsi, qword [rsp + 0x138]
mov qword [rsi], rax
mov qword [rdi], rdx
jmp 0x14002209a
mov rdi, qword [rsp + 0x130]
mov rsi, qword [rsp + 0x138]
cmp dword [rbx + 0x10], 1
movsxd rax, dword [0x1401ba2c0]
cmovne r9, r15
imul rcx, rax, 0x38
mov rax, qword [0x140175020]
mov qword [0x1401ba630], r9
test byte [rcx + rax + 0x18], 1
je 0x14002210a
mov r8, qword [rcx + rax]
lea rcx, str._s_MONITOR:_s:
mov rdx, qword [section..data]
call fcn.140002310
mov rax, qword [rsi]
lea r9, [0x1401ba619]
test rax, rax
lea r8, [0x1401ba61a]
mov rdx, rbx
lea rcx, str.Got_option__s__Arguments:__s__s_n
cmovne r9, rax
mov rax, qword [rdi]
test rax, rax
cmovne r8, rax
call fcn.140001fb0
mov eax, dword [rbx + 0x14]
jmp 0x140022145
mov r9, rbx
mov dword [rsp + 0x20], r11d
lea r8, str.Option__s_is_an_invalid_type___d__n
mov edx, 1
mov ecx, 0x3ef
call fcn.140001480
jmp 0x140022145
lea r8, str.unrecognised_parameter__s_n
mov ecx, 0x3f0
mov edx, 1
call fcn.140001480
mov r12, qword [rsp + 0xc8]
mov rdi, qword [rsp + 0xd0]
mov rsi, qword [rsp + 0x110]
mov r14, qword [rsp + 0xc0]
add rsp, 0xd8
pop r15
pop r13
pop rbp
pop rbx
ret