Function at 0x140001040
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xca0
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0xc90], rax
mov rsi, rcx
xor edx, edx
lea rcx, [rsp + 0x90]
mov r8d, 0x400
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x400
lea rdx, [rsp + 0x90]
lea rcx, str.TASKQUEUE_HMEMMAP
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
dec eax
cmp eax, 0x3fe
ja 0x1400010bb
lea rcx, [rsp + 0x90]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__atoi64]
mov rbx, rax
jmp 0x1400010bd
xor ebx, ebx
lea rcx, str.TASKQUEUE_HREQUEST
mov qword [rsp + 0xcd8], rbp
call fcn.1400018c0
lea rcx, str.TASKQUEUE_HCANCEL
mov r13, rax
call fcn.1400018c0
lea rcx, str.TASKQUEUE_HREPLY
mov qword [rsp + 0x30], rax
call fcn.1400018c0
lea rcx, str.TASKQUEUE_HKEEPALIVE
mov r15, rax
call fcn.1400018c0
xor edx, edx
mov qword [rsp + 0x38], rax
mov r8d, 0x400
lea rcx, [rsp + 0x490]
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x400
lea rdx, [rsp + 0x490]
lea rcx, str.TASKQUEUE_SIZE
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
dec eax
cmp eax, 0x3fe
ja 0x140001151
lea rcx, [rsp + 0x490]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__atoi64]
mov rbp, rax
jmp 0x140001153
xor ebp, ebp
xor edx, edx
lea rcx, [rsp + 0x890]
mov r8d, 0x400
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x400
lea rdx, [rsp + 0x890]
lea rcx, str.TASKQUEUE_PARENT
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
dec eax
cmp eax, 0x3fe
ja 0x14000119f
lea rcx, [rsp + 0x890]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__atoi64]
mov r14, rax
jmp 0x1400011a2
xor r14d, r14d
mov r8d, r14d
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
xor r9d, r9d
mov qword [rsp + 0x20], 0
xor r8d, r8d
mov rcx, rbx
mov r12, rax
lea edx, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rdi, rax
test rax, rax
je 0x14000132e
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
test rax, rax
je 0x14000132e
lea rdx, str.OnTaskQueueRequest
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
test rax, rax
je 0x14000132e
lea rdx, [rsp + 0x48]
mov rcx, r13
call fcn.140001a80
mov rbx, qword [rsp + 0x50]
mov rcx, qword [rax]
mov rax, qword [rcx]
mov qword [rsp + 0x78], rax
test rbx, rbx
je 0x140001261
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140001261
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140001261
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
mov rcx, qword [rsp + 0x30]
lea rdx, [rsp + 0x58]
mov qword [rsp + 0x80], r12
call fcn.140001a80
mov rbx, qword [rsp + 0x60]
mov rcx, qword [rax]
mov rax, qword [rcx]
mov qword [rsp + 0x88], rax
test rbx, rbx
je 0x1400012bf
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x1400012bf
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x1400012bf
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
xor r8d, r8d
lea rdx, [rsp + 0x78]
mov r9d, 0x7d0
lea ecx, [r8 + 3]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ecx, eax
test eax, eax
jne 0x14000131a
cmp dword [rdi], eax
je 0x14000132a
mov rcx, qword [rsp + 0x38]
lea rdx, [rsp + 0x68]
call fcn.140001a80
mov r9, rdi
mov qword [rsp + 0x20], rbp
mov r8, r14
mov rdx, rbp
mov rcx, rax
call rsi
test eax, eax
je 0x14000130d
mov dword [rdi], 0
mov rcx, r15
call fcn.140001ab0
jmp 0x140001210
dec eax
cmp eax, 1
jbe 0x14000132a
cmp ecx, 0xffffffff
jne 0x140001210
mov al, 1
jmp 0x140001330
xor al, al
mov rbp, qword [rsp + 0xcd8]
mov rcx, qword [rsp + 0xc90]
xor rcx, rsp
call fcn.140001b00
lea r11, [rsp + 0xca0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret