Function at 0x14004d560
Capabilities:
Get comspec environment variable
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
sub rsp, 0x20
mov rax, qword [rcx + 0x18]
mov r12, rdx
mov rsi, rdx
mov rdi, qword [rax + 0x78]
mov rbp, rcx
mov edx, 0x2f
mov rcx, r12
mov dword [r8 + 0x1208], 0
mov dword [r8 + 0x1000], 0
mov rbx, r8
call fcn.1400a2a10
test rax, rax
je 0x14004d5ba
lea r12, [rax + 1]
lea r8, str.GATEWAY_INTERFACECGI_1.1
lea rdx, [0x1400f66e8]
mov rcx, rbx
call fcn.14004d2a0
lea r8, str.SERVER_PROTOCOLHTTP_1.1
lea rdx, [0x1400f66e8]
mov rcx, rbx
call fcn.14004d2a0
lea r8, str.REDIRECT_STATUS200
lea rdx, [0x1400f66e8]
mov rcx, rbx
call fcn.14004d2a0
mov r8d, dword [rbp + 0x48]
lea rdx, str.SERVER_PORT_d
mov rcx, rbx
call fcn.14004d2a0
mov r8, qword [rbp + 0x18]
lea rdx, str.SERVER_NAME_s
mov r8, qword [r8 + 0xb8]
mov rcx, rbx
call fcn.14004d2a0
lea rdx, str.SERVER_ROOT_s
mov r8, rdi
mov rcx, rbx
call fcn.14004d2a0
lea rdx, str.DOCUMENT_ROOT_s
mov r8, rdi
mov rcx, rbx
call fcn.14004d2a0
movsxd r8, dword [rbp + 0x50]
lea rax, [0x1400eeb00]
add r8, r8
lea rdx, str.REQUEST_METHOD_s
mov rcx, rbx
mov r8, qword [rax + r8*8]
call fcn.14004d2a0
mov ecx, dword [rbp + 0x28]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
lea rdx, str.REMOTE_ADDR_s
mov rcx, rbx
mov r8, rax
call fcn.14004d2a0
movzx ecx, word [rbp + 0x26]
call qword [sym.imp.WS2_32.dll_ntohs]
lea rdx, str.REMOTE_PORT_hu
mov rcx, rbx
movzx r8d, ax
call fcn.14004d2a0
mov r8, qword [rbp + 0x58]
lea rdx, str.REQUEST_URI_s
mov rcx, rbx
call fcn.14004d2a0
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
lea rdx, str.SCRIPT_NAME_s
not rcx
lea r8, [rcx - 1]
mov rcx, rbx
add r8, rsi
call fcn.14004d2a0
lea rdx, str.SCRIPT_FILENAME_s
mov r8, r12
mov rcx, rbx
call fcn.14004d2a0
lea rdx, str.PATH_TRANSLATED_s
mov r8, rsi
mov rcx, rbx
call fcn.14004d2a0
mov r8d, dword [rbp + 0xb0]
test r8d, r8d
jle 0x14004d720
mov r9, qword [rbp + 0xa8]
lea rdx, str.CONTENT_TYPE_.s
mov rcx, rbx
call fcn.14004d2a0
mov r8, qword [rbp + 0x78]
test r8, r8
je 0x14004d738
lea rdx, str.QUERY_STRING_s
mov rcx, rbx
call fcn.14004d2a0
mov r8, qword [rbp + 0x80]
test r8, r8
je 0x14004d753
lea rdx, str.PATH_INFO__s
mov rcx, rbx
call fcn.14004d2a0
mov r8d, dword [rbp + 0x98]
test r8d, r8d
je 0x14004d76e
lea rdx, str.CONTENT_LENGTH_lu
mov rcx, rbx
call fcn.14004d2a0
lea rcx, str.PATH
call fcn.1400a7a50
test rax, rax
je 0x14004d791
lea rdx, str.PATH_s
mov r8, rax
mov rcx, rbx
call fcn.14004d2a0
lea rcx, str.COMSPEC
call fcn.1400a7a50
test rax, rax
je 0x14004d7b4
lea rdx, str.COMSPEC_s
mov r8, rax
mov rcx, rbx
call fcn.14004d2a0
lea rcx, str.SYSTEMROOT
call fcn.1400a7a50
test rax, rax
je 0x14004d7d7
lea rdx, str.SYSTEMROOT_s
mov r8, rax
mov rcx, rbx
call fcn.14004d2a0
lea rcx, str.SystemDrive
call fcn.1400a7a50
test rax, rax
je 0x14004d7fa
lea rdx, str.SystemDrive_s
mov r8, rax
mov rcx, rbx
call fcn.14004d2a0
lea rcx, str.PERLLIB
call fcn.1400a7a50
test rax, rax
je 0x14004d81d
lea rdx, str.PERLLIB_s
mov r8, rax
mov rcx, rbx
call fcn.14004d2a0
mov r8d, dword [rbp + 0xe0]
test r8d, r8d
jle 0x14004d855
mov r9, qword [rbp + 0xd8]
lea rdx, str.REMOTE_USER_.s
mov rcx, rbx
call fcn.14004d2a0
lea r8, str.AUTH_TYPEDigest
lea rdx, [0x1400f66e8]
mov rcx, rbx
call fcn.14004d2a0
mov rax, qword [rbp + 0x18]
mov rdi, qword [rax + 0xa8]
test rdi, rdi
je 0x14004d8b3
nop
nop
nop
lea rdx, [0x1400f60c4]
mov rcx, rdi
call fcn.1400a2dd0
test rax, rax
mov rsi, rax
je 0x14004d8b3
lea rdx, [0x1400f7b1c]
mov r9, rdi
mov r8, rax
mov rcx, rbx
call fcn.14004d2a0
add rdi, rsi
lea rdx, [0x1400f60c4]
mov rcx, rdi
call fcn.1400a2a40
add rdi, rax
jne 0x14004d870
mov r8d, dword [rbp + 0x228]
mov rdx, qword [rbp + 0x70]
mov rcx, rbx
add r8d, dword [rbp + 0x68]
sub r8d, dword [rbp + 0x70]
call fcn.14004d340
movsxd rdx, dword [rbx + 0x1208]
mov qword [rbx + rdx*8 + 0x1008], 0
movsxd rax, dword [rbx + 0x1000]
add dword [rbx + 0x1208], 1
mov byte [rax + rbx], 0
add dword [rbx + 0x1000], 1
cmp dword [rbx + 0x1208], 0x40
jl 0x14004d91c
lea rdx, str..cgi.c
lea rcx, str.blk__nvars___CGI_ENV_VARS
mov r8d, 0xbf
call fcn.1400a32e0
cmp dword [rbx + 0x1000], 0
jg 0x14004d93e
lea rdx, str..cgi.c
lea rcx, str.blk__len___0
mov r8d, 0xc0
call fcn.1400a32e0
cmp dword [rbx + 0x1000], 0x1000
jl 0x14004d963
lea rdx, str..cgi.c
lea rcx, str.blk__len____int__sizeof_blk__buf_
mov r8d, 0xc1
call fcn.1400a32e0
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r12
ret