Function at 0x100004534
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x270
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x1000da5c8]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rbp, rdx
mov rbx, rcx
lea rdi, [0x1000da190]
mov qword [rsp + 0x48], rdi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
and qword [rsp + 0x20], 0
and dword [rsp + 0x28], 0
and dword [rsp + 0x2c], 0
add rbx, 8
mov qword [rsp + 0x38], rbx
lea rdx, [rsp + 0x20]
mov rcx, rbx
call fcn.100004620
mov esi, eax
test eax, eax
js 0x1000045d6
mov rcx, qword [rbp]
test rcx, rcx
jne 0x100021296
and dword [rbp + 8], 0
and dword [rbp + 0xc], 0
xor r14d, r14d
xor r15d, r15d
cmp dword [rsp + 0x28], r14d
jg 0x1000212a6
mov rax, qword [rsp + 0x20]
test rax, rax
jne 0x10002154a
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1000031d0
mov rbx, qword [rsp + 0x2c0]
add rsp, 0x270
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.msvcrt.dll_free]
and qword [rbp], 0
jmp 0x1000045bd
lea r12d, [r14 + 1]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov edx, 8
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1000212dd
and dword [rax], 0
and qword [rax + 8], 0
and qword [rax + 0x10], 0
mov byte [rax + 0x1c], 0
jmp 0x1000212df
xor edi, edi
test rdi, rdi
je 0x100021509
test r15, r15
js 0x1000214f4
cmp r14d, dword [rsp + 0x28]
jge 0x1000214f4
mov rax, qword [rsp + 0x20]
mov edx, dword [rax + r15*4]
mov dword [rdi], edx
lea r9, [rdi + 8]
lea r8, str.InstanceName
mov rcx, rbx
call fcn.100004700
mov esi, eax
test eax, eax
js 0x100021532
lea r9, [rdi + 0x10]
lea r8, [0x1000b182c]
mov edx, dword [rdi]
mov rcx, rbx
call fcn.100004700
mov esi, eax
test eax, eax
js 0x100021526
mov rbx, qword [rdi + 0x10]
mov qword [rsp + 0x30], rbx
and qword [rdi + 0x10], 0
mov r8d, 0x104
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x100021370
mov esi, 0x80004005
jmp 0x100021397
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x30]
call fcn.100007e60
mov esi, eax
test eax, eax
js 0x100021392
mov rax, qword [rsp + 0x30]
mov qword [rdi + 0x10], rax
xor ebx, ebx
jmp 0x100021397
mov rbx, qword [rsp + 0x30]
test rbx, rbx
je 0x1000213a5
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
test esi, esi
js 0x10002151a
lea rdx, [rdi + 0x18]
mov rcx, qword [rdi + 0x10]
call fcn.100018500
xor edx, edx
cmp eax, edx
jl 0x10002148b
cmp byte [0x1000da70e], dl
jne 0x100021412
cmp dword [rdi + 0x18], 2
jne 0x100021412
mov rcx, qword [rdi + 0x10]
cmp rcx, rdx
je 0x1000213e5
mov qword [rdi + 0x10], rdx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1000213f9
and qword [rdi + 8], 0
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1000214c6
movsxd rbx, dword [rbp + 8]
lea r12d, [rbx + 1]
cmp r12d, edx
jle 0x1000214e3
cmp ebx, dword [rbp + 0xc]
jne 0x100021475
cmp ebx, 0x3fffffff
jg 0x1000214e3
movabs rcx, 0xfffffffffffffff
cmp rbx, rcx
ja 0x1000214e3
lea r13d, [rbx + rbx]
cmp dword [rbp + 0xc], edx
mov eax, 1
cmove r13d, eax
movsxd rdx, r13d
shl rdx, 3
mov rcx, qword [rbp]
call qword [sym.imp.msvcrt.dll_realloc]
test rax, rax
je 0x1000214e3
mov dword [rbp + 0xc], r13d
mov qword [rbp], rax
mov dword [rbp + 8], r12d
mov rax, qword [rbp]
lea rdx, [rax + rbx*8]
test rdx, rdx
je 0x1000214c6
mov qword [rdx], rdi
jmp 0x1000214c6
mov rcx, qword [rdi + 0x10]
cmp rcx, rdx
je 0x10002149e
mov qword [rdi + 0x10], rdx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1000214b2
and qword [rdi + 8], 0
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r12d, 1
add r14d, r12d
add r15, r12
cmp r14d, dword [rsp + 0x28]
jge 0x10002153e
mov rbx, qword [rsp + 0x38]
jmp 0x1000212aa
mov esi, 0x80004005
lea rdi, [0x1000da190]
jmp 0x1000045d6
xor r9d, r9d
xor r8d, r8d
mov edx, r12d
mov ecx, 0xc000008c
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov esi, 0x8007000e
lea rdi, [0x1000da190]
jmp 0x1000045d6
lea rdi, [0x1000da190]
jmp 0x1000045d6
lea rdi, [0x1000da190]
jmp 0x1000045d6
lea rdi, [0x1000da190]
jmp 0x1000045d6
lea rdi, [0x1000da190]
jmp 0x1000045d6
mov rcx, rax
call qword [sym.imp.msvcrt.dll_free]
nop
jmp 0x1000045e4