Function at 0x21013d9c0
Capabilities:
Get file size
Read file via mapping

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0xf8
lea rbp, [rsp + 0xf0]
mov eax, 0x2e
lea r12, [0x2102aa140]
mov r11d, dword [rbp + 0x70]
movzx esi, byte [rbp + 0x80]
mov qword [rbp + 0x50], rcx
mov rbx, rdx
mov rdi, r9
mov rcx, r9
mov qword [rbp + 0x60], r8
lea r8, [0x2102a9274]
mov qword [rbp + 0x68], r9
jmp 0x21013da3a
movzx r9d, dl
movzx r10d, dl
movsx r9d, byte [r12 + r9]
xor r9d, r10d
cmp r9d, eax
jne 0x21013db70
test dl, dl
je 0x21013da45
movzx eax, byte [r8 + 1]
add r8, 1
add rcx, 1
movzx edx, byte [rcx]
cmp dl, al
jne 0x21013da10
test al, al
jne 0x21013da2d
mov r12d, 1
mov rax, qword [rbp + 0x50]
lea edx, [r11 + 5]
mov ecx, 0xd
movsxd rdx, edx
mov dword [rax + 8], 0
shl rdx, 3
mov dword [rax + 0xc], r11d
mov byte [rax + 0x10], 0
call sym.cmalloc_abort
mov rdx, qword [rbp + 0x78]
mov rcx, rax
mov rax, qword [rbp + 0x50]
mov qword [rax], rcx
mov eax, dword [rax + 0xc]
lea r8d, [rax + 1]
mov dword [rbp - 0x94], eax
movsxd r8, r8d
shl r8, 3
call sym.msys_2.0.dll_memcpy
test r12d, r12d
je 0x21013daac
mov rax, qword [rbp + 0x60]
test byte [rax + 0x98], 0x40
jne 0x21013db20
mov rcx, rdi
mov eax, 0x2e
lea r8, [0x2102a9279]
lea r11, [0x2102aa140]
jmp 0x21013daf2
movzx r9d, dl
movzx r10d, dl
movsx r9d, byte [r11 + r9]
xor r9d, r10d
cmp r9d, eax
jne 0x21013db80
test dl, dl
je 0x21013dafd
movzx eax, byte [r8 + 1]
add r8, 1
add rcx, 1
movzx edx, byte [rcx]
cmp dl, al
jne 0x21013dac8
test al, al
jne 0x21013dae5
mov rax, qword [rbp + 0x60]
mov eax, dword [rax + 0x98]
and eax, 0x40
jne 0x21013db20
lea rsp, [rbp + 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rax, qword [rbp + 0x50]
mov ebx, dword [rax + 8]
mov eax, dword [rax + 0xc]
cmp eax, ebx
jle 0x21013db5f
movsxd rsi, ebx
shl rsi, 3
nop dword [rax]
mov rax, qword [rbp + 0x50]
add ebx, 1
mov rdi, qword [rax]
add rdi, rsi
add rsi, 8
mov rcx, qword [rdi]
call sym.cstrdup1
mov qword [rdi], rax
mov rax, qword [rbp + 0x50]
mov eax, dword [rax + 0xc]
cmp ebx, eax
jl 0x21013db38
mov rsi, qword [rbp + 0x50]
mov dword [rsi + 8], eax
xor eax, eax
jmp 0x21013db0c
xor r12d, r12d
jmp 0x21013da4b
cmp byte [rdi], 0
je 0x21013df18
lea rdi, [0x2102d1cc0]
lea r12, [0x2102aa140]
mov rcx, qword [rbp + 0x60]
xor edx, edx
call method.path_conv.get_nt_native_path__UNICODE_STRING_
mov r8, rax
test rax, rax
je 0x21013dbee
mov ecx, dword [rdi + 0x10]
xor eax, eax
mov dword [rbp - 0x30], 0x30
lea r8, [rbp - 0x30]
mov qword [rbp - 0x28], 0
test ecx, ecx
mov rcx, qword [rbp + 0x60]
mov qword [rbp - 8], 0
setne al
add eax, eax
or eax, dword [rcx + 4]
mov dword [rbp - 0x18], eax
mov rax, rcx
add rax, 0x78
mov qword [rbp - 0x20], rax
mov rax, qword [rdi + 8]
mov qword [rbp - 0x10], rax
mov dword [rsp + 0x28], 0x4060
lea rcx, [rbp - 0x70]
lea r9, [rbp - 0x60]
mov edx, 0x80100000
mov dword [rsp + 0x20], 7
call sym.NtOpenFile
mov r13d, eax
cmp eax, 0xc0000279
je 0x21013e2b5
test eax, eax
js 0x21013e2d7
mov rcx, qword [rbp - 0x70]
lea rdx, [rbp - 0x68]
call sym.GetFileSizeEx
test eax, eax
je 0x21013e174
mov edx, dword [0x21034b048]
cmp qword [rbp - 0x68], rdx
jle 0x21013dc4a
mov dword [rbp - 0x68], edx
mov rcx, qword [rbp - 0x70]
xor r9d, r9d
mov r8d, 2
mov rdx, rdi
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call sym.CreateFileMappingA
mov rcx, qword [rbp - 0x70]
mov r15, rax
mov qword [rbp - 0x90], rax
call sym.NtClose
test r15, r15
je 0x21013de60
mov eax, dword [rbp - 0x68]
mov rcx, qword [rbp - 0x90]
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov qword [rsp + 0x20], rax
call sym.MapViewOfFile
mov qword [rbp - 0x88], rax
test rax, rax
je 0x21013e344
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
lea rdx, [rbp - 0x50]
mov rax, qword [rax - 0x1bf8]
mov qword [rbp - 0x50], rax
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
mov qword [rax - 0x1bf8], rdx
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
mov rax, qword [rax - 0x2cc8]
mov qword [rbp - 0x48], rax
lea rax, [0x21013de00]
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rsp
mov rax, qword [rbp - 0x88]
cmp byte [rax], 0x4d
jne 0x21013dd30
cmp byte [rax + 1], 0x5a
je 0x21013e1a0
nop dword [rax + rax]
mov rax, qword gs:[0x30]
mov rdx, qword [rbp - 0x50]
mov rax, qword [rax + 8]
mov rcx, qword [rbp - 0x90]
mov qword [rax - 0x1bf8], rdx
call sym.CloseHandle
test byte [0x210273880], 1
jne 0x21013e140
mov rax, qword [rbp - 0x88]
xor r14d, r14d
xor r13d, r13d
cmp byte [rax], 0x23
je 0x21013e020
mov rcx, qword [rbp - 0x88]
call sym.UnmapViewOfFile
mov rax, qword [rbp + 0x60]
test byte [rax + 0x99], 0x20
jne 0x21013dd9a
test byte [rax + 0x18], 2
jne 0x21013dea2
test r13, r13
je 0x21013dfc0
mov rax, qword [rbp + 0x50]
mov edx, dword [rax + 8]
test edx, edx
je 0x21013def0
test r14, r14
je 0x21013ddc3
mov rcx, qword [rbp + 0x50]
mov rdx, r14
call method.av.unshift_char_const_
lea rax, [rbp + 0x68]
mov rdx, qword [rbp + 0x60]
mov rcx, r13
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea r8, [0x2102a934e]
call sym.find_exec_char_const__path_conv__char_const__unsigned_int__char_const_
mov rax, qword [rbp + 0x60]
mov rcx, qword [rbp + 0x50]
mov rdx, qword [rax + 0xa8]
call method.av.unshift_char_const_
jmp 0x21013db97
call sym.GetLastError
cmp eax, 0x3ee
jne 0x21013e17d
test byte [0x210273880], 1
jne 0x21013df90
mov rax, qword [rbp + 0x60]
test byte [rax + 0x99], 0x20
jne 0x21013dfc0
mov rax, qword [rbp + 0x60]
test byte [rax + 0x18], 2
je 0x21013dfc0
xor r14d, r14d
xor r13d, r13d
mov rcx, qword [rbp + 0x60]
mov r8d, 1
mov edx, 1
call sym.check_file_access_path_conv__int__bool_
test eax, eax
jns 0x21013dd9a
mov eax, 0xffffffff
jmp 0x21013db0c
mov rax, qword [rbp + 0x50]
lea r13, [0x2102a928d]
mov eax, dword [rax + 8]
test eax, eax
jne 0x21013ddc3
xor r14d, r14d
lea r13, [0x2102a928d]
mov rax, qword [rbp + 0x50]
mov rcx, rbx
mov r15, qword [rax]
call sym.cstrdup1
mov qword [r15], rax
mov rax, qword [rbp + 0x50]
mov dword [rax + 8], 1
jmp 0x21013ddb2
mov rax, qword [rbp + 0x60]
sub rdi, 4
cmp rdi, qword [rax + 0x90]
jbe 0x21013db89
mov rcx, rdi
mov eax, 0x2e
lea r8, [0x2102a9279]
lea r11, [0x2102aa140]
jmp 0x21013df76
movzx r9d, dl
movzx r10d, dl
movsx r9d, byte [r11 + r9]
xor r9d, r10d
cmp r9d, eax
jne 0x21013e210
test dl, dl
je 0x21013dafd
movzx eax, byte [r8 + 1]
add r8, 1
add rcx, 1
movzx edx, byte [rcx]
cmp dl, al
jne 0x21013df48
test al, al
jne 0x21013df69
jmp 0x21013dafd
lea r9, str.zero_length_file__treat_as_script.
mov edx, 0x40
xor r14d, r14d
xor r13d, r13d
lea r8, str.int_av::setup_const_char__path_conv__const_char__int__const_char_const__bool_
lea rcx, [0x210273880]
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x21013dd83
test sil, sil
je 0x21013e355
mov rcx, qword [rbp + 0x68]
mov eax, 0x2e
lea r8, str..com
jmp 0x21013e00e
movzx r9d, dl
movzx r10d, dl
movsx r9d, byte [r12 + r9]
xor r9d, r10d
cmp r9d, eax
jne 0x21013ded0
test dl, dl
je 0x21013dafd
movzx eax, byte [r8 + 1]
add r8, 1
add rcx, 1
movzx edx, byte [rcx]
cmp dl, al
jne 0x21013dfe0
test al, al
jne 0x21013e001
jmp 0x21013dafd
mov rax, qword [rbp - 0x88]
cmp byte [rax + 1], 0x21
jne 0x21013dd77
lea r15, [rax + 2]
lea rdx, [0x2102a932b]
mov rcx, r15
call sym.msys_2.0.dll_strspn
lea rdx, [0x2102a932e]
add r15, rax
mov rcx, r15
call sym.msys_2.0.dll_strcspn
nop word cs:[rax + rax]
mov r8, rax
sub rax, 1
movzx edx, byte [r15 + rax]
cmp dl, 0x20
je 0x21013e060
cmp dl, 9
je 0x21013e060
xor r14d, r14d
xor r13d, r13d
test r8, r8
je 0x21013dd77
lea rax, [r8 + 0x10]
and rax, 0xfffffffffffffff0
call fcn.21021b550
sub rsp, rax
mov rdx, r15
mov qword [rbp - 0xb0], r8
lea r13, [rsp + 0x40]
mov rcx, r13
call sym.msys_2.0.dll_memcpy
mov r8, qword [rbp - 0xb0]
mov byte [r13 + r8], 0
movzx eax, byte [r13]
test al, al
je 0x21013dd77
mov rcx, r13
lea r8, [0x2102a932b]
jmp 0x21013e0e7
movzx eax, byte [rcx + 1]
test al, al
je 0x21013dd77
mov rcx, rdx
lea rdx, [rcx + 1]
test r14, r14
jne 0x21013e0d8
lea r15, [rcx + 1]
cmp al, 0x20
je 0x21013e113
cmp al, 9
je 0x21013e113
movzx eax, byte [r15]
test al, al
je 0x21013dd77
mov rcx, r15
lea r15, [rcx + 1]
cmp al, 0x20
jne 0x21013e0f8
mov byte [rcx], 0
mov rdx, r8
mov rcx, r15
call sym.msys_2.0.dll_strspn
lea rdx, [r15 + rax]
movzx eax, byte [rdx]
test al, al
je 0x21013dd77
mov r14, rdx
lea r8, [0x2102a932b]
jmp 0x21013e0e4
mov rax, qword [rbp + 0x60]
lea r9, str._s_is_possibly_a_script
lea r8, str.int_av::setup_const_char__path_conv__const_char__int__const_char_const__bool_
mov edx, 0x40
lea rcx, [0x210273880]
mov rax, qword [rax + 0x90]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x21013dd61
mov rcx, qword [rbp - 0x70]
call sym.NtClose
call sym.GetLastError
mov edx, 0x59b
lea rcx, str._usr_src_MSYS2_packages_msys2_runtime_src_msys2_runtime_winsup_cygwin_spawn.cc
mov r8d, eax
call sym.seterrno_from_win_error_char_const__int__unsigned_int_
mov eax, 0xffffffff
jmp 0x21013db0c
cmp word [rax + 0x18], 0x3f
mov rax, qword [rbp + 0x50]
setbe byte [rax + 0x10]
ja 0x21013e3ed
mov rax, qword [rbp + 0x60]
mov eax, dword [rax + 0x98]
mov dword [rbp - 0xa4], eax
and eax, 0xffffffbf
mov rsi, qword [rbp + 0x60]
mov rcx, qword [rbp - 0x88]
mov dword [rsi + 0x98], eax
call sym.UnmapViewOfFile
mov rcx, qword [rbp - 0x90]
call sym.CloseHandle
mov rax, qword [rbp + 0x60]
mov rcx, qword [rbp - 0x50]
mov rdx, qword gs:[0x30]
mov rdx, qword [rdx + 8]
mov eax, dword [rax + 0x98]
mov qword [rdx - 0x1bf8], rcx
jmp 0x21013db07
mov rcx, rdi
mov edx, 0x2e
lea r8, [0x2102a927e]
lea r11, [0x2102aa140]
jmp 0x21013e23d
movzx edx, byte [r8 + 1]
add r8, 1
add rcx, 1
movzx eax, byte [rcx]
cmp al, dl
je 0x21013e259
movzx r9d, al
movzx r10d, al
movsx r9d, byte [r11 + r9]
xor r9d, r10d
cmp r9d, edx
jne 0x21013e262
test al, al
jne 0x21013e230
jmp 0x21013dafd
mov edx, 0x2e
lea rcx, str..btm
lea r10, [0x2102aa140]
jmp 0x21013e28c
movzx edx, byte [rcx + 1]
add rcx, 1
add rdi, 1
movzx eax, byte [rdi]
cmp al, dl
je 0x21013e2ac
movzx r8d, al
movzx r9d, al
movsx r8d, byte [r10 + r8]
xor r8d, r9d
cmp r8d, edx
jne 0x21013db89
test al, al
jne 0x21013e280
jmp 0x21013dafd
mov rax, qword [rbp + 0x60]
mov rsi, qword [rbp + 0x60]
mov eax, dword [rax + 0x98]
mov dword [rbp - 0x9c], eax
and eax, 0xffffffbf
mov dword [rsi + 0x98], eax
jmp 0x21013db07
cmp eax, 0xc0000022
jne 0x21013e330
mov rax, qword [rbp + 0x60]
test byte [rax + 0x99], 0x20
jne 0x21013e330
test byte [rax + 0x18], 2
je 0x21013e330
mov r8d, 1
mov edx, 1
mov rcx, rax
call sym.check_file_access_path_conv__int__bool_
test eax, eax
jne 0x21013e330
mov rax, qword [rbp + 0x60]
mov rbx, qword [rbp + 0x60]
mov eax, dword [rax + 0x98]
mov dword [rbp - 0xa0], eax
or eax, 0x40
mov dword [rbx + 0x98], eax
jmp 0x21013db07
mov ecx, r13d
call sym.RtlNtStatusToDosError
mov ecx, eax
call sym.SetLastError
jmp 0x21013e17d
mov rcx, qword [rbp - 0x90]
call sym.CloseHandle
jmp 0x21013e17d
lea r12, [0x210273880]
test byte [0x210273880], 1
je 0x21013e3d0
mov rax, qword [rbp + 0x60]
lea r9, str._s_is_not_a_valid_executable
mov edx, 0x40
mov rcx, r12
lea r8, str.int_av::setup_const_char__path_conv__const_char__int__const_char_const__bool_
mov rax, qword [rax + 0x90]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
test byte [0x210273880], 1
je 0x21013e3d0
mov dword [rsp + 0x30], 8
mov edx, 0x40
mov rcx, r12
lea rax, str.int_av::setup_const_char__path_conv__const_char__int__const_char_const__bool_
mov dword [rsp + 0x28], 0x57f
lea r9, [0x2102a9162]
lea r8, [0x2102a9180]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
mov rax, qword [sym.msys_2.0.dll__impure_ptr]
mov dword [rax], 8
call sym.msys_2.0.dll___errno
mov dword [rax], 8
jmp 0x21013debe
mov r9, qword [rbp - 0x90]
mov rcx, qword [rbp - 0x88]
lea r8, [rbp - 0x72]
xor edx, edx
call sym.hook_or_detect_cygwin_char_const__void_const__unsigned_short__void_
mov r8, rax
mov rax, qword [rbp + 0x60]
mov eax, dword [rax + 0x98]
test r8, r8
je 0x21013e1c3
or eax, 0x40
jmp 0x21013e1c6