Function at 0x14004c780
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbx
mov eax, 0x260
call fcn.14005d7e0
sub rsp, rax
mov rax, qword [0x1400ac2c8]
xor rax, rsp
mov qword [rsp + 0x250], rax
movsxd r8, dword [0x1400ad484]
xor ebx, ebx
mov rax, qword [0x1400ad478]
mov qword [0x1400ad488], rbx
mov rdx, qword [rax + r8*8]
test rdx, rdx
je 0x14004cc77
cmp byte [rdx], 0x2d
jne 0x14004cc77
inc r8d
cmp byte [rdx], 0x2d
mov dword [0x1400ad484], r8d
jne 0x14004c7ec
cmp byte [rdx + 1], 0x2d
jne 0x14004c7ec
cmp byte [rdx + 2], bl
je 0x14004cc77
cmp byte [rdx + 1], 0x2d
mov rax, rbx
mov qword [rsp + 0x270], rbp
lea rbp, [rdx + 1]
sete al
mov qword [rsp + 0x278], rsi
add rbp, rax
mov qword [rsp + 0x280], rdi
mov edx, 0x3d
mov rcx, rbp
lea rax, [rbp - 1]
mov qword [0x1400ad490], rax
call sub.VCRUNTIME140.dll_strchr
mov qword [0x1400ad488], rax
mov rdi, rax
test rax, rax
je 0x14004c848
inc rdi
mov byte [rax], bl
mov qword [0x1400ad488], rdi
mov rsi, qword [0x1400ad4a8]
cmp qword [rsi], rbx
je 0x14004c908
lea r10, str.help
nop
cmp byte [rbp], 0x68
jne 0x14004c8d8
cmp byte [rbp + 1], bl
jne 0x14004c8d8
mov r9, qword [rsi]
mov rax, rbx
movzx ecx, byte [r9 + rax]
inc rax
cmp cl, byte [r10 + rax - 1]
jne 0x14004c8d8
cmp rax, 5
jne 0x14004c871
mov edx, dword [rsi + 0xc]
test edx, edx
je 0x14004cc2a
cmp edx, 0x2d
je 0x14004cc2a
test rdi, rdi
jne 0x14004c938
movsxd r8, dword [0x1400ad484]
mov rax, qword [0x1400ad478]
mov rdi, qword [rax + r8*8]
test rdi, rdi
jne 0x14004c927
mov r8, r9
lea rdx, [0x1400ad4b0]
lea rcx, str._s:_Option___s_needs_a_value_n
call fcn.1400528f0
lea eax, [rdi - 1]
jmp 0x14004cb47
mov r9, qword [rsi]
mov rax, rbp
mov r8, r9
sub r8, rbp
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x14004c8f7
inc rax
test ecx, ecx
jne 0x14004c8e4
test edx, edx
je 0x14004c886
add rsi, 0x18
cmp qword [rsi], rbx
jne 0x14004c860
mov rax, qword [0x1400ad4a0]
test rax, rax
je 0x14004cc57
mov eax, dword [rax + 8]
mov qword [0x1400ad498], rbp
jmp 0x14004cb47
inc r8d
mov qword [0x1400ad488], rdi
mov dword [0x1400ad484], r8d
lea eax, [rdx - 0x2f]
mov qword [rsp + 0x288], r14
cmp eax, 0x46
ja case.0x14004c969.48
lea r8, [0x140000000]
cdqe
movzx eax, byte [r8 + rax + 0x4cc9c]
mov ecx, dword [r8 + rax*4 + 0x4cc80]
add rcx, r8
jmp rcx
mov r14, 0xffffffffffffffff
cmp byte [rdi + r14 + 1], bl
lea r14, [r14 + 1]
jne 0x14004c972
lea rbp, [r14 + 1]
cmp rbp, 0x104
ja 0x14004cae0
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 0x104
mov r9d, ebp
mov qword [rsp + 0x20], rax
mov r8, rdi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x14004cac1
test rbp, rbp
je 0x14004ca9d
cmp rbp, 4
jb 0x14004cab0
lea rax, [r14 + rdi]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x40]
lea rcx, [rcx + r14*2]
cmp rdx, rax
ja 0x14004c9eb
cmp rcx, rdi
jae 0x14004cab0
cmp rbp, 0x20
jb 0x14004ca73
mov rax, rbp
mov rcx, rbp
and eax, 0x1f
sub rcx, rax
lea rdx, [rdi + 0x10]
nop word [rax + rax]
movq xmm0, qword [rdx - 0x10]
movq xmm1, qword [rdx - 8]
lea rdx, [rdx + 0x20]
punpcklbw xmm0, xmm0
punpcklbw xmm1, xmm1
psraw xmm0, 8
movdqu xmmword [rsp + rbx*2 + 0x40], xmm0
movq xmm0, qword [rdx - 0x20]
psraw xmm1, 8
movdqu xmmword [rsp + rbx*2 + 0x50], xmm1
movq xmm1, qword [rdx - 0x18]
punpcklbw xmm0, xmm0
punpcklbw xmm1, xmm1
psraw xmm0, 8
movdqu xmmword [rsp + rbx*2 + 0x60], xmm0
psraw xmm1, 8
movdqu xmmword [rsp + rbx*2 + 0x70], xmm1
add rbx, 0x20
cmp rbx, rcx
jb 0x14004ca10
cmp rax, 4
jb 0x14004ca9d
mov rax, rbp
and rax, 0xfffffffffffffffc
nop word [rax + rax]
movd xmm0, dword [rbx + rdi]
punpcklbw xmm0, xmm0
psraw xmm0, 8
movq qword [rsp + rbx*2 + 0x40], xmm0
add rbx, 4
cmp rbx, rax
jb 0x14004ca80
cmp rbx, rbp
jae 0x14004cac1
nop dword [rax]
nop word [rax + rax]
movsx eax, byte [rbx + rdi]
mov word [rsp + rbx*2 + 0x40], ax
inc rbx
cmp rbx, rbp
jb 0x14004cab0
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14004cad9
test al, 0x10
ja case.0x14004c969.48
mov rdi, qword [0x1400ad488]
mov r8, rdi
lea rdx, [0x1400ad4b0]
lea rcx, str._s:_Not_a_directory:__s_n
call fcn.1400528f0
jmp 0x14004cb3a
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.14004c540
test eax, eax
je 0x14004cb3a
mov ecx, dword [rsi + 0xc]
mov eax, dword [rsp + 0x30]
cmp ecx, 0x70
jne 0x14004cb78
test eax, eax
jg case.0x14004c969.48
mov r9, qword [rsi]
lea rdx, [0x1400ad4b0]
mov r8, qword [0x1400ad488]
lea rcx, str._s:_Non_positive_number___s__for_option___s_n
call fcn.1400528f0
mov eax, 0xffffffff
mov r14, qword [rsp + 0x288]
mov rsi, qword [rsp + 0x278]
mov rbp, qword [rsp + 0x270]
mov rdi, qword [rsp + 0x280]
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.14005d840
add rsp, 0x260
pop rbx
ret
cmp ecx, 0x4e
jne case.0x14004c969.48
test eax, eax
jns case.0x14004c969.48
mov r9, qword [rsi]
lea rdx, [0x1400ad4b0]
mov r8, qword [0x1400ad488]
lea rcx, str._s:_Negative_number___s__for_option___s_n
jmp 0x14004cb35
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.14004c540
test eax, eax
je 0x14004cb3a
mov eax, dword [rsi + 8]
jmp 0x14004cb3f
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.14004d310
jmp 0x14004cba8
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.14004d310
test eax, eax
jne case.0x14004c969.48
jmp 0x14004cb3a
cmp edx, 0x63
jne 0x14004cbe0
lea eax, [rdx - 0x59]
jmp 0x14004cbfa
cmp edx, 0x45
jne 0x14004cbea
lea eax, [rdx - 0x33]
jmp 0x14004cbfa
cmp edx, 0x46
mov eax, 0x7be
mov ecx, 2
cmove eax, ecx
lea r8, [rsp + 0x30]
mov edx, eax
mov rcx, rdi
call fcn.14004bb60
test eax, eax
jne case.0x14004c969.48
mov r9, qword [rsi]
lea rdx, [0x1400ad4b0]
mov r8, qword [0x1400ad488]
lea rcx, str._s:_Invalid_format___s__for_option___s_n
jmp 0x14004cb35
test rdi, rdi
je 0x14004cc4f
mov r8, rbp
lea rdx, [0x1400ad4b0]
lea rcx, str._s:_Option___s_does_not_take_a_value_n
call fcn.1400528f0
mov eax, 0xffffffff
jmp 0x14004cb47
mov eax, dword [rsi + 8]
jmp 0x14004cb47
mov r8, rbp
lea rdx, [0x1400ad4b0]
lea rcx, str._s:_Unknown_option:___s_n
call fcn.1400528f0
mov eax, 0xffffffff
jmp 0x14004cb47
xor eax, eax
jmp 0x14004cb5f