Function at 0x140004ca0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x100
mov rax, qword [0x140009008]
xor rax, rsp
mov qword [rsp + 0xf0], rax
xor r14d, r14d
mov r15, rdx
mov rdi, rcx
xor esi, esi
lea r12d, [r14 + 1]
mov ebx, r12d
mov dword [rsp + 0x40], ebx
call qword [sym.imp.msvcrt.dll_fflush]
nop dword [rax + rax]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__fileno]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.msvcrt.dll__get_osfhandle]
nop dword [rax + rax]
cmp rax, 0xffffffffffffffff
je 0x140004d29
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140004b54
mov ebx, dword [rsp + 0x40]
test eax, eax
jne 0x140004d29
test ebx, ebx
je 0x140004d4e
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__fileno]
nop dword [rax + rax]
mov ecx, eax
mov edx, 0x20000
call qword [sym.imp.msvcrt.dll__setmode]
nop dword [rax + rax]
mov r14d, eax
mov r8d, 0x50
lea rdx, [rsp + 0x50]
lea rcx, str.OutputEncoding
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetEnvironmentVariableW]
nop dword [rax + rax]
mov dword [rsp + 0x40], r12d
test eax, eax
je 0x140004d90
mov r8d, eax
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x40]
call fcn.140004bfc
mov r12d, dword [rsp + 0x40]
mov ebp, eax
jmp 0x140004d92
xor ebp, ebp
test ebx, ebx
jne 0x140004ea1
lea edx, [rbx + 0xd]
mov rcx, r15
call qword [sym.imp.msvcrt.dll_wcschr]
nop dword [rax + rax]
mov rcx, rdi
test rax, rax
je 0x140004dc7
call qword [sym.imp.msvcrt.dll__fileno]
nop dword [rax + rax]
mov edx, DhcpHandlePnPEvent
jmp 0x140004de5
mov eax, ebp
neg eax
sbb ebx, ebx
and ebx, 0x1c000
call qword [sym.imp.msvcrt.dll__fileno]
nop dword [rax + rax]
lea edx, [rbx + 0x4000]
mov ecx, eax
call qword [sym.imp.msvcrt.dll__setmode]
nop dword [rax + rax]
mov r14d, eax
test ebp, ebp
jne 0x140004ea1
and qword [rsp + 0x38], rsi
or r9d, 0xffffffff
and qword [rsp + 0x30], rsi
mov r8, r15
and dword [rsp + 0x28], esi
xor edx, edx
and qword [rsp + 0x20], rsi
mov ecx, r12d
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
nop dword [rax + rax]
movsxd rbx, eax
test eax, eax
je 0x140004eba
mov rdx, rbx
lea ecx, [rbp + 0x40]
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
je 0x140004eba
and qword [rsp + 0x38], 0
or r9d, 0xffffffff
and qword [rsp + 0x30], 0
mov r8, r15
mov dword [rsp + 0x28], ebx
xor edx, edx
mov ecx, r12d
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
nop dword [rax + rax]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__fileno]
nop dword [rax + rax]
lea r8d, [rbx - 1]
mov rdx, rsi
mov ecx, eax
call qword [sym.imp.msvcrt.dll__write]
nop dword [rax + rax]
jmp 0x140004eba
mov r8, r15
lea rdx, [0x1400070f8]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_fwprintf]
nop dword [rax + rax]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_fflush]
nop dword [rax + rax]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__fileno]
nop dword [rax + rax]
mov ecx, eax
mov edx, r14d
call qword [sym.imp.msvcrt.dll__setmode]
nop dword [rax + rax]
test rsi, rsi
je 0x140004efd
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
mov rcx, qword [rsp + 0xf0]
xor rcx, rsp
call fcn.1400052f0
lea r11, [rsp + 0x100]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret