Function at 0x140018190
Capabilities:
Query environment variable

Disassembly:
push rbp
push rbx
push rsi
push r12
push r13
push r14
lea rbp, [rsp - 0x202c8]
mov eax, 0x203c8
call fcn.140023a50
sub rsp, rax
mov rax, qword [0x1400ae088]
xor rax, rsp
mov qword [rbp + 0x202b0], rax
mov r13, rdx
mov ebx, ecx
xor r14d, r14d
lea rcx, [rbp + 0x294]
xor edx, edx
mov dword [rsp + 0x30], r14d
mov r8d, 0x20018
mov qword [rsp + 0x38], r14
mov r12d, 1
call fcn.140026290
xor edx, edx
lea rcx, [rbp - 0x40]
mov r8d, 0x2c8
call fcn.140026290
xor edx, edx
lea r8d, [r12 + 0x7f]
lea rcx, [rsp + 0x40]
call fcn.140026290
mov r8d, ebx
mov dword [rbp + 0x290], ebx
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_1.dll_OpenProcess]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140018234
xor eax, eax
jmp 0x140018514
mov qword [rsp + 0x20410], rdi
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
mov rdi, rax
lea r8d, [rdx + 0x28]
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x140018501
lea rax, [rsp + 0x30]
mov r9d, 0x30
mov r8, rbx
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rsi
call qword [0x1400af280]
test eax, eax
js 0x1400184d0
cmp dword [rsp + 0x30], 0x30
jbe 0x1400182da
mov r8, rbx
xor edx, edx
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov r8d, dword [rsp + 0x30]
mov edx, 8
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x140018501
mov r9d, dword [rsp + 0x30]
lea rax, [rsp + 0x30]
mov r8, rbx
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rsi
call qword [0x1400af280]
test eax, eax
js 0x1400184d0
mov eax, dword [rbx + 0x28]
mov dword [rbp + 0x294], eax
mov eax, dword [rbx + 0x18]
mov dword [rbp + 0x2a4], eax
mov eax, dword [rbx]
mov dword [rbp + 0x2a8], eax
mov eax, dword [rbx + 0x10]
mov dword [rbp + 0x2a0], eax
mov eax, 0xfffe
mov rdx, qword [rbx + 8]
mov qword [rsp + 0x203c0], r15
test rdx, rdx
je 0x1400184a8
lea rax, [rsp + 0x38]
mov r9d, 0x2c8
lea r8, [rbp - 0x40]
mov qword [rsp + 0x20], rax
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_ReadProcessMemory]
test eax, eax
je 0x1400184a3
mov eax, dword [rbp + 0x280]
lea r8, [rsp + 0x40]
mov rdx, qword [rbp - 0x20]
mov r9d, 0x80
mov dword [rbp + 0x298], eax
mov rcx, rsi
movzx eax, byte [rbp - 0x3e]
mov byte [rbp + 0x2ac], al
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x38], r14
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_ReadProcessMemory]
test eax, eax
je 0x1400184a3
movzx eax, word [rbp - 0x50]
mov r15d, 0xfffc
test ax, ax
je 0x140018416
movzx r8d, ax
mov edx, 8
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x140018413
movzx r9d, word [rbp - 0x50]
lea rax, [rsp + 0x38]
mov rdx, qword [rbp - 0x48]
mov r8, r14
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_ReadProcessMemory]
test eax, eax
je 0x1400183fd
movzx eax, word [rbp - 0x50]
mov edx, 0xfffe
cmp ax, dx
jb 0x1400183e8
mov eax, r15d
jmp 0x1400183eb
movzx eax, ax
mov r9d, eax
lea rcx, [rbp + 0x102ac]
mov r8, r14
call fcn.140018000
mov r8, r14
xor edx, edx
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
test eax, eax
je 0x14001849e
xor r14d, r14d
movzx eax, word [rbp - 0x60]
test ax, ax
je 0x1400184a3
movzx r8d, ax
mov edx, 8
mov rcx, rdi
mov qword [rsp + 0x38], r14
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x1400184a3
movzx r9d, word [rbp - 0x60]
lea rax, [rsp + 0x38]
mov rdx, qword [rbp - 0x58]
mov r8, r14
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_ReadProcessMemory]
test eax, eax
je 0x14001848c
movzx eax, word [rbp - 0x60]
mov ecx, 0xfffe
cmp ax, cx
jae 0x140018477
movzx r15d, ax
mov rdx, rcx
mov r9d, r15d
lea rcx, [rbp + 0x2ae]
mov r8, r14
call fcn.140018000
mov r8, r14
xor edx, edx
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
test eax, eax
jne 0x1400184a3
xor r12d, r12d
jmp 0x1400184c8
mov eax, 0xfffe
cmp dword [rbp + 0x290], 4
jne 0x1400184c8
mov r8d, eax
lea rdx, [rbp + 0x2ae]
lea rcx, str._SystemRoot_System32_ntoskrnl.exe
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
mov r15, qword [rsp + 0x203c0]
mov r8, rbx
xor edx, edx
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov r8d, 0x2001c
lea rdx, [rbp + 0x290]
mov rcx, r13
call fcn.140025e20
mov eax, r12d
jmp 0x14001850c
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
xor eax, eax
mov rdi, qword [rsp + 0x20410]
mov rcx, qword [rbp + 0x202b0]
xor rcx, rsp
call fcn.140023950
add rsp, 0x203c8
pop r14
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret