Function at 0x140021e40
Capabilities:
Check for peb beingdebugged flag

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xb0
mov rax, qword [0x14003f0b8]
xor rax, rsp
mov qword [rbp + 0x3f], rax
xor r15d, r15d
mov r14, rcx
mov qword [rbp - 0x31], r15
mov esi, r15d
call fcn.14001a7fc
lea rdi, str.ArcNamemulti_0_disk_0_rdisk_0_
test al, al
je 0x140021fa1
lea rdx, [rbp - 0x19]
lea rcx, str.FirmwareBootDevice
call fcn.14001a784
test eax, eax
js 0x140021fa1
mov rcx, qword [rbp - 0x19]
or rdx, 0xffffffffffffffff
inc rdx
cmp word [rcx + rdx*2], r15w
jne 0x140021eae
lea rax, [rbp - 0x21]
inc rdx
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x29]
lea rax, [rbp - 0x25]
lea r8, str.multi__d_disk__d_rdisk__d_
mov qword [rsp + 0x20], rax
call qword [sym.imp.msvcrt.dll__snwscanf_s]
nop dword [rax + rax]
cmp eax, 3
jne 0x140021fa1
cmp dword [rbp - 0x29], r15d
jne 0x140021fa1
cmp dword [rbp - 0x25], r15d
jne 0x140021fa1
cmp dword [rbp - 0x21], r15d
jne 0x140021fa1
lea rdx, [rbp - 1]
mov rcx, rdi
call fcn.14001acc8
test eax, eax
js 0x140021fa1
mov rcx, qword gs:[0x60]
xor edx, edx
mov r8, qword [rbp - 0x19]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
nop dword [rax + rax]
xor eax, eax
lea rcx, [rbp + 0x17]
mov qword [rbp + 7], rax
xor edx, edx
mov qword [rbp + 0xb], rax
lea ebx, [rax + 0x28]
mov r8d, ebx
call sub.msvcrt.dll_memset
mov rcx, qword [rbp - 1]
lea rax, [rbp + 0x17]
mov dword [rsp + 0x28], ebx
lea r8, [rbp + 7]
mov qword [rsp + 0x20], rax
mov dword [rbp + 7], r15d
call fcn.14001b3c4
test eax, eax
jns 0x140021f82
cmp eax, 0xc000003a
jmp 0x140021f86
cmp dword [rbp + 0x33], 7
jne 0x140021fa1
lea rdx, [rbp - 0x31]
lea rcx, str.ArcNamemulti_0_disk_0_rdisk_1_
call fcn.140022288
mov ebx, eax
cmp eax, 0xc0000452
jne 0x140021faf
lea rdx, [rbp - 0x31]
mov rcx, rdi
call fcn.140022288
mov ebx, eax
test ebx, ebx
js 0x14002206b
xor edx, edx
mov dword [rbp - 0x39], r15d
lea rcx, [rbp - 0x11]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
nop dword [rax + rax]
mov rdi, qword [rbp - 0x31]
lea r8, [rbp - 0x39]
mov rcx, rdi
lea rdx, [rbp - 0x11]
call qword [sym.imp.ntdll.dll_NtQuerySymbolicLinkObject]
nop dword [rax + rax]
mov ebx, eax
cmp eax, 0xc0000023
je 0x140021ffc
test eax, eax
js 0x14002206f
mov ebx, 0xc0000001
jmp 0x14002206f
mov rcx, qword gs:[0x60]
xor edx, edx
mov r8d, dword [rbp - 0x39]
add r8, 2
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
nop dword [rax + rax]
mov rdi, qword [rbp - 0x31]
mov rsi, rax
test rax, rax
jne 0x140022032
mov ebx, 0xc000009a
jmp 0x14002206f
movzx eax, word [rbp - 0x39]
lea rdx, [rbp - 0x11]
xor r8d, r8d
mov word [rbp - 0xf], ax
mov rcx, rdi
mov qword [rbp - 9], rsi
call qword [sym.imp.ntdll.dll_NtQuerySymbolicLinkObject]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x14002206f
movzx eax, word [rbp - 0x11]
shr rax, 1
mov word [rsi + rax*2], r15w
mov qword [r14], rsi
jmp 0x14002206f
mov rdi, qword [rbp - 0x31]
test rdi, rdi
je 0x140022083
mov rcx, rdi
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
test ebx, ebx
jns 0x1400220aa
test rsi, rsi
je 0x1400220aa
mov rcx, qword gs:[0x60]
mov r8, rsi
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 0x3f]
xor rcx, rsp
call fcn.140026f10
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret