Function at 0x180005090
Capabilities:
Query environment variable

Disassembly:
add rcx, 0x10
jmp 0x18000ba20
mov rax, rsp
mov qword [rax + 0x20], r9
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x100
mov qword [rsp + 0xf8], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov r14, r9
mov rsi, r8
mov rdi, rdx
mov r12, rcx
lea rcx, [rsp + 0x20]
call qword [sym.imp.OLEAUT32.dll_VariantClear]
nop
mov r13d, 8
mov rcx, r13
call fcn.1800bee60
test rax, rax
je 0x18000ba82
lea rcx, [rsp + 0x50]
mov qword [rax], rcx
xor ebx, ebx
jmp 0x18000ba87
xor ebx, ebx
mov rax, rbx
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbx
mov rdx, rdi
mov rcx, r12
call fcn.180010250
test al, al
jne 0x18000bae8
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x18000bab9
call fcn.1800bd964
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbx
mov rcx, qword [rsp + 0x50]
call fcn.1800bd964
nop
lea rcx, [rsp + 0x20]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, 0x80004005
jmp 0x18000c107
test rsi, rsi
je 0x18000c0ce
test r14, r14
je 0x18000c0ce
mov qword [rsp + 0xd8], 7
mov qword [rsp + 0xd0], rbx
mov word [rsp + 0xc0], bx
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rsi
lea rcx, [rsp + 0xb8]
call fcn.180012d90
nop
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0xb8]
call fcn.18006ddc0
mov edi, eax
cmp qword [rsp + 0xd8], 8
jb 0x18000bb66
mov rcx, qword [rsp + 0xc0]
call fcn.1800bd964
test edi, edi
je 0x18000c049
mov r12, qword [rsp + 0x70]
mov rax, r12
sub rax, qword [rsp + 0x68]
je 0x18000c049
test rax, rax
jne 0x18000bb90
call fcn.1800bf138
mov r12, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x68]
sub r12d, esi
dec edi
cmp edi, 0xa
ja case.0x18000bbb4.6
lea rdx, [0x180000000]
mov ecx, dword [rdx + rdi*4 + 0xc124]
add rcx, rdx
jmp rcx
lea rcx, [rsp + 0x20]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jns 0x18000bbcc
mov ecx, eax
call fcn.1800bd470
mov word [rsp + 0x20], r13w
test rsi, rsi
jne 0x18000bbe1
mov qword [rsp + 0x28], rbx
jmp 0x18000c049
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rsp + 0x28], rax
test rax, rax
jne 0x18000c049
mov ecx, 0x8007000e
call fcn.1800bd470
lea rcx, [rsp + 0x20]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jns 0x18000bc18
mov ecx, eax
call fcn.1800bd470
mov word [rsp + 0x20], r13w
test rsi, rsi
jne 0x18000bc2a
mov qword [rsp + 0x28], rbx
jmp 0x18000bc47
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rsp + 0x28], rax
test rax, rax
jne 0x18000bc47
mov ecx, 0x8007000e
call fcn.1800bd470
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
test eax, eax
je 0x18000c049
mov word [rsp + 0x38], bx
mov rcx, r13
call fcn.1800bee60
test rax, rax
je 0x18000bc7e
lea rcx, [rsp + 0x88]
mov qword [rax], rcx
jmp 0x18000bc81
mov rax, rbx
mov qword [rsp + 0x88], rax
lea edx, [rdi + 1]
lea r8, [rsp + 0x38]
lea rcx, [rsp + 0x88]
call fcn.180010d50
nop
mov rax, qword [rsp + 0xa8]
mov rdx, qword [rsp + 0xa0]
sub rax, rdx
sar rax, 1
jne 0x18000bcc4
call fcn.1800bf138
mov rdx, qword [rsp + 0xa0]
mov r8d, edi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x18000bd3f
mov rax, qword [rsp + 0xa8]
mov rdi, qword [rsp + 0xa0]
sub rax, rdi
sar rax, 1
jne 0x18000bcf9
call fcn.1800bf138
mov rdi, qword [rsp + 0xa0]
lea rcx, [rsp + 0x20]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jns 0x18000bd0f
mov ecx, eax
call fcn.1800bd470
mov word [rsp + 0x20], r13w
test rdi, rdi
jne 0x18000bd21
mov qword [rsp + 0x28], rbx
jmp 0x18000bd3f
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rsp + 0x28], rax
test rax, rax
jne 0x18000bd3f
mov ecx, 0x8007000e
call fcn.1800bd470
nop
mov rcx, qword [rsp + 0xa0]
test rcx, rcx
je 0x18000bd51
call fcn.1800bd964
mov qword [rsp + 0xa0], rbx
mov qword [rsp + 0xa8], rbx
mov qword [rsp + 0xb0], rbx
mov rcx, qword [rsp + 0x88]
call fcn.1800bd964
jmp 0x18000c049
mov rax, qword [rsp + 0x68]
mov edi, dword [rax]
cmp word [rsp + 0x20], 0x13
je 0x18000bdaa
lea rcx, [rsp + 0x20]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jns 0x18000bda0
mov ecx, eax
call fcn.1800bd470
mov eax, reloc.OLEAUT32.dll_SafeArrayGetLBound
mov word [rsp + 0x20], ax
mov dword [rsp + 0x28], edi
jmp 0x18000c049
mov rax, qword [rsp + 0x68]
mov rdi, qword [rax]
cmp word [rsp + 0x20], 0x15
je 0x18000bde3
lea rcx, [rsp + 0x20]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jns 0x18000bdd9
mov ecx, eax
call fcn.1800bd470
mov eax, reloc.OLEAUT32.dll_SafeArrayUnlock
mov word [rsp + 0x20], ax
mov qword [rsp + 0x28], rdi
jmp 0x18000c049
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x44], ebx
mov ecx, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
lea r8, [rsp + 0x40]
lea edx, [rcx - 0xb]
call qword [sym.imp.OLEAUT32.dll_SafeArrayDestroy]
mov r13, rax
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x18000be1d
mov eax, 0x8007000e
jmp 0x18000be2a
mov rcx, rax
call qword [sym.imp.OLEAUT32.dll_SafeArrayUnlock]
test eax, eax
jns 0x18000be32
mov ecx, eax
call fcn.180016c50
nop
mov edi, ebx
mov r15d, SafeArrayAccessData
nop word [rax + rax]
cmp edi, r12d
jae 0x18000bea4
mov esi, edi
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x68]
sub rax, rcx
cmp rsi, rax
jb 0x18000be63
call fcn.1800bf138
mov rcx, qword [rsp + 0x68]
movzx eax, byte [rcx + rsi]
mov word [rsp + 0xe0], r15w
mov byte [rsp + 0xe8], al
mov r9d, 1
lea r8, [rsp + 0xe0]
mov edx, edi
lea rcx, [rsp + 0x48]
call fcn.1800046b0
nop
lea rcx, [rsp + 0xe0]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
inc edi
jmp 0x18000be40
lea rcx, [rsp + 0x88]
call qword [sym.imp.OLEAUT32.dll_VariantClear]
mov r11d, 0x200c
mov word [rsp + 0x88], r11w
mov rcx, r13
call qword [sym.imp.OLEAUT32.dll_SafeArrayAccessData]
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x90], r13
lea rcx, [rsp + 0x20]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jns 0x18000beed
mov ecx, eax
call fcn.1800bd470
mov r9d, reloc.OLEAUT32.dll_SafeArrayGetElement
lea r8, [rsp + 0x88]
mov rdx, r9
lea rcx, [rsp + 0x20]
call fcn.1800bf158
nop
jmp 0x18000c049
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x4c], ebx
mov ecx, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
lea r8, [rsp + 0x48]
lea edx, [rcx - 0xb]
call qword [sym.imp.OLEAUT32.dll_SafeArrayDestroy]
mov rdi, rax
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x18000bf3d
mov eax, 0x8007000e
jmp 0x18000bf4a
mov rcx, rax
call qword [sym.imp.OLEAUT32.dll_SafeArrayUnlock]
test eax, eax
jns 0x18000bf52
mov ecx, eax
call fcn.180016c50
nop
cmp word [rsi], 0
je 0x18000bfc3
mov word [rsp + 0xb8], r13w
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rsp + 0xc0], rax
test rax, rax
jne 0x18000bf82
mov ecx, 0x8007000e
call fcn.1800bd470
nop
mov r8d, 1
lea rdx, [rsp + 0xb8]
lea rcx, [rsp + 0x40]
call fcn.18000fe30
nop
lea rcx, [rsp + 0xb8]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
lea rsi, [rsi + rcx*2]
mov rdi, qword [rsp + 0x40]
jmp 0x18000bf52
lea rcx, [rsp + 0x88]
call qword [sym.imp.OLEAUT32.dll_VariantClear]
mov r11d, 0x200c
mov word [rsp + 0x88], r11w
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SafeArrayAccessData]
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x90], rdi
lea rcx, [rsp + 0x20]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jns 0x18000c00c
mov ecx, eax
call fcn.1800bd470
mov r9d, reloc.OLEAUT32.dll_SafeArrayGetElement
lea r8, [rsp + 0x88]
mov rdx, r9
lea rcx, [rsp + 0x20]
call fcn.1800bf158
nop
jmp 0x18000c049
mov dword [rsp + 0x80], 0xffffffff
lea rdx, [0x180136c18]
lea rcx, [rsp + 0x80]
call fcn.1800c1ef0
lea rdx, [rsp + 0xb8]
lea rcx, [rsp + 0x20]
mov rax, qword [rcx]
mov qword [rdx], rax
mov rax, qword [rcx + 8]
mov qword [rdx + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdx + 0x10], rax
mov word [rsp + 0x20], bx
lea rcx, [rsp + 0xb8]
mov rax, qword [rcx]
mov qword [r14], rax
mov rax, qword [rcx + 8]
mov qword [r14 + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [r14 + 0x10], rax
jmp 0x18000c093
mov rsi, qword [rsp + 0x68]
test rsi, rsi
je 0x18000c0a5
mov rcx, rsi
call fcn.1800bd964
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbx
mov rcx, qword [rsp + 0x50]
call fcn.1800bd964
nop
lea rcx, [rsp + 0x20]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
xor eax, eax
jmp 0x18000c107
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x18000c0dd
call fcn.1800bd964
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbx
mov rcx, qword [rsp + 0x50]
call fcn.1800bd964
nop
lea rcx, [rsp + 0x20]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, 0x80004003
lea r11, [rsp + 0x100]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret