Function at 0x180008380
Capabilities:
Query environment variable

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x2a8
mov rax, qword [0x1800ba740]
xor rax, rsp
mov qword [rsp + 0x290], rax
mov rdx, qword [rsp + 0x2c8]
lea rcx, [rsp + 0x70]
call fcn.1800046a0
mov dword [rsp + 0x68], 0
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x3c]
call fcn.180008690
mov ecx, eax
call fcn.180002d00
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x2c0]
call fcn.180012bf3
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0xc0000023
je 0x180008426
xor eax, eax
jmp 0x18000866b
mov eax, dword [rsp + 0x68]
mov qword [rsp + 0x48], rax
call fcn.180004750
mov qword [rsp + 0x50], rax
mov r8, qword [rsp + 0x48]
mov edx, 8
mov rcx, qword [rsp + 0x50]
call fcn.180004a60
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x180008461
xor eax, eax
jmp 0x18000866b
lea rcx, [rsp + 0x3d]
call fcn.180008690
mov ecx, eax
call fcn.180002d00
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x30]
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x2c0]
call fcn.180012bf3
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jge 0x1800084c7
call fcn.180004750
mov r8, qword [rsp + 0x30]
xor edx, edx
mov rcx, rax
call fcn.180004af0
xor eax, eax
jmp 0x18000866b
mov rax, qword [rsp + 0x30]
cmp dword [rax + 4], 1
je 0x1800084f8
mov rax, qword [rsp + 0x30]
cmp dword [rax + 4], 2
je 0x1800084f8
call fcn.180004750
mov r8, qword [rsp + 0x30]
xor edx, edx
mov rcx, rax
call fcn.180004af0
xor eax, eax
jmp 0x18000866b
mov eax, dword [rsp + 0x2d8]
mov qword [rsp + 0x58], rax
mov rcx, qword [rsp + 0x30]
mov ecx, dword [rcx + 8]
xor edx, edx
mov eax, ecx
mov ecx, 2
div rcx
mov rcx, qword [rsp + 0x58]
cmp rcx, rax
jae 0x18000853d
call fcn.180004750
mov r8, qword [rsp + 0x30]
xor edx, edx
mov rcx, rax
call fcn.180004af0
xor eax, eax
jmp 0x18000866b
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 8]
mov rcx, qword [rsp + 0x30]
add rcx, 0xc
mov rdi, qword [rsp + 0x2d0]
mov rsi, rcx
mov ecx, eax
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 8]
xor edx, edx
mov ecx, 2
div rcx
xor ecx, ecx
mov rdx, qword [rsp + 0x2d0]
mov word [rdx + rax*2], cx
cmp qword [rsp + 0x2e0], 0
je 0x18000859a
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rsp + 0x30]
mov ecx, dword [rcx + 8]
mov dword [rax], ecx
mov rax, qword [rsp + 0x30]
cmp dword [rax + 4], 2
jne 0x180008652
mov r8d, 0x104
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0
jbe 0x180008635
cmp dword [rsp + 0x38], 0x104
ja 0x180008635
mov eax, dword [rsp + 0x38]
mov qword [rsp + 0x60], rax
mov ecx, dword [rsp + 0x2d8]
xor edx, edx
mov eax, ecx
mov ecx, 2
div rcx
mov rcx, qword [rsp + 0x60]
mov r9, rcx
lea r8, [rsp + 0x80]
mov rdx, rax
mov rcx, qword [rsp + 0x2d0]
call fcn.180075b4c
nop
cmp qword [rsp + 0x2e0], 0
je 0x180008633
mov eax, dword [rsp + 0x38]
shl rax, 1
mov rcx, qword [rsp + 0x2e0]
mov dword [rcx], eax
jmp 0x180008652
cmp qword [rsp + 0x2e0], 0
je 0x180008652
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rsp + 0x30]
mov ecx, dword [rcx + 8]
mov dword [rax], ecx
call fcn.180004750
mov r8, qword [rsp + 0x30]
xor edx, edx
mov rcx, rax
call fcn.180004af0
mov eax, 1
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.18006e460
add rsp, 0x2a8
pop rdi
pop rsi
ret