Function at 0x140017c58
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov rax, qword [0x1400b8288]
xor rax, rsp
mov qword [rbp - 8], rax
xor esi, esi
mov r13, r8
mov r15d, edx
mov rdi, rcx
test rcx, rcx
je 0x140017f2e
cmp qword [rcx + 0x48], rsi
mov rax, rcx
cmovne rax, qword [rcx + 0x48]
mov eax, dword [rax + 0x24]
mov dword [rbp - 0x2c], eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
lea edx, [rsi + 8]
lea r8d, [rsi + 0x38]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
jne 0x140017cf1
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
mov ebx, 0x80070000
movzx eax, ax
or eax, ebx
test ecx, ecx
cmovle eax, ecx
test eax, eax
jmp 0x140017f4b
mov qword [rax], rdi
lea rcx, [rax + 0x24]
cmp qword [rdi + 0x48], rsi
mov rax, rdi
cmovne rax, qword [rdi + 0x48]
test rcx, rcx
je 0x140017d0e
mov eax, dword [rax + 0x24]
mov dword [rcx], eax
mov r14d, 1
cmp r15d, r14d
ja 0x140017d29
mov rcx, rdi
call fcn.14002e25c
test eax, eax
je 0x140017f12
xorps xmm0, xmm0
mov dword [rbx + 0x28], r15d
mov esi, 0x80
lea rdx, [rbp - 0x28]
lea rcx, str.WIM_MetaData_Queue_Length
movups xmmword [rbp - 0x28], xmm0
lea r12d, [rsi - 0x70]
mov r8d, r12d
movups xmmword [rbp - 0x18], xmm0
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
nop dword [rax + rax]
mov dword [rbp - 0x30], eax
dec eax
cmp eax, 0xf
ja 0x140017d86
lea r8, [rbp - 0x30]
lea rdx, [0x14009e38c]
lea rcx, [rbp - 0x28]
call qword [sym.imp.msvcrt.dll_swscanf_s]
nop dword [rax + rax]
test eax, eax
cmovg esi, dword [rbp - 0x30]
lea rax, [rbx + 8]
mov r9d, esi
mov r8d, r14d
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rdi
call fcn.14004ddb0
mov esi, eax
test eax, eax
jns 0x140017db0
mov r8d, 0xeee
jmp 0x140017ee9
xorps xmm0, xmm0
lea rdx, [rbp - 0x28]
mov r8d, r12d
lea rcx, str.WIM_FileData_Queue_Length
movups xmmword [rbp - 0x28], xmm0
mov esi, 0x400
movups xmmword [rbp - 0x18], xmm0
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
nop dword [rax + rax]
mov dword [rbp - 0x30], eax
dec eax
cmp eax, 0xf
ja 0x140017e05
lea r8, [rbp - 0x30]
lea rdx, [0x14009e38c]
lea rcx, [rbp - 0x28]
call qword [sym.imp.msvcrt.dll_swscanf_s]
nop dword [rax + rax]
test eax, eax
cmovg esi, dword [rbp - 0x30]
mov r8d, r12d
lea rdx, [rbp - 0x28]
lea rcx, str.WIM_FileData_Number_Workers
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
nop dword [rax + rax]
mov dword [rbp - 0x30], eax
dec eax
cmp eax, 0xf
ja 0x140017e4b
lea r8, [rbp - 0x30]
lea rdx, [0x14009e38c]
lea rcx, [rbp - 0x28]
call qword [sym.imp.msvcrt.dll_swscanf_s]
nop dword [rax + rax]
test eax, eax
cmovg r14d, dword [rbp - 0x30]
mov edx, dword [rbp - 0x2c]
lea r12, [rbx + 0x10]
shr edx, 0xc
mov r9d, esi
and edx, 4
mov qword [rsp + 0x20], r12
mov r8d, r14d
mov rcx, rdi
call fcn.14004ddb0
mov esi, eax
test eax, eax
jns 0x140017e79
mov r8d, 0xf10
jmp 0x140017ee9
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
nop dword [rax + rax]
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetThreadIdealProcessor]
nop dword [rax + rax]
mov rcx, qword [r12]
lea edx, [r15 - 1]
mov rcx, qword [rcx + 0x38]
call qword [sym.imp.KERNEL32.dll_SetThreadIdealProcessor]
nop dword [rax + rax]
test dword [rbp - 0x2c], 0x1000
je 0x140017f12
mov ecx, 4
lea rax, [rbx + 0x18]
cmp r15d, ecx
mov qword [rsp + 0x20], rax
cmova r15d, ecx
xor edx, edx
lea r9d, [rcx + 6]
mov r8d, r15d
mov rcx, rdi
call fcn.14004ddb0
mov esi, eax
test eax, eax
jns 0x140017f12
mov r8d, 0xf21
and qword [rsp + 0x20], 0
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibmain_restore.c
mov r9d, eax
lea rcx, str.CreateRestoreInfo
call fcn.140046874
mov rdx, rbx
mov rcx, rdi
call fcn.140017bec
jmp 0x140017f2a
and dword [rbx + 0x30], 0
mov eax, dword [0x1400bacd8]
mov dword [rbx + 0x2c], eax
mov qword [r13], rbx
mov qword [rdi + 0xf8], rbx
mov eax, esi
jmp 0x140017f6c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
mov ebx, 0x80070000
or ecx, ebx
test eax, eax
cmovle ecx, eax
test ecx, ecx
jns 0x140017f65
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, ebx
test eax, eax
cmovle ecx, eax
jmp 0x140017f6a
mov ecx, 0x80004005
mov eax, ecx
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140096bd0
mov rbx, qword [rsp + 0xb8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret