Function at 0x10016cb0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0xc00
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xc14]
test edi, edi
je 0x10016d27
mov ebx, dword [esp + 0xc18]
test ebx, ebx
je 0x10016d27
lea eax, [esp + 0x810]
push 0x400
push eax
call fcn.10028cf0
push 0x5c
push edi
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 0x10
test eax, eax
jne 0x10016d08
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
jmp 0x10017102
mov eax, dword [0x107ab9e8]
push 0x400
test eax, eax
je 0x10016d34
lea ecx, [esp + 0x14]
push ecx
push edi
push eax
call dword [sym.imp.USERENV.dll_ExpandEnvironmentStringsForUserA]
test eax, eax
jne 0x10016d44
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc00
ret
lea edx, [esp + 0x14]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x10016d27
mov ebp, dword [sym.imp.MSVCRT.dll__access]
lea eax, [esp + 0x10]
push 0
push eax
call ebp
add esp, 8
test eax, eax
jne 0x10016d60
lea edi, [esp + 0x10]
jmp 0x10016cf2
mov edi, 0x10232c9c
or ecx, 0xffffffff
xor eax, eax
mov ebx, dword [sym.imp.MSVCRT.dll__strnicmp]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x10]
push ecx
push 0x10232c9c
push eax
call ebx
add esp, 0xc
test eax, eax
jne 0x10016db9
mov edi, 0x10232c9c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x10]
lea edi, [esp + ecx + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._systemroot
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x14]
push str._systemroot
push ecx
call ebx
add esp, 0xc
test eax, eax
jne 0x10016e6c
or ecx, 0xffffffff
lea edi, [esp + 0x810]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x410]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x410]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._systemroot
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + ecx + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x410]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp byte [esp + 0x11], 0x3a
je 0x10016f31
lea edi, [esp + 0x810]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x410]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [esp + 0x10]
and ecx, 3
cmp al, 0x5c
rep movsb byte es:[edi], byte [esi]
je 0x10016edb
mov edi, 0x1022722c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x410]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x410]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x410]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push 0
push ecx
call ebp
add esp, 8
test eax, eax
jne 0x10016f75
lea edi, [esp + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, 1
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0xc18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc00
ret
cmp dword [0x107ab9e4], 1
jne 0x10016fd9
mov esi, dword [sym.imp.MSVCRT.dll_strrchr]
lea eax, [esp + 0x10]
push 0x5c
push eax
call esi
add esp, 8
test eax, eax
je 0x10016fa3
push 0x20
push eax
call esi
add esp, 8
test eax, eax
je 0x10016fa3
mov byte [eax], 0
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, 1
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0xc18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc00
ret
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x410]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, dword [sym.imp.MSVCRT.dll_strrchr]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x20
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
call ebx
add esp, 8
test eax, eax
je 0x1001707f
lea edx, [esp + 0x10]
push 0
push edx
mov byte [eax], 0
call ebp
add esp, 8
test eax, eax
je 0x100170e8
mov edi, 0x102325e4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
add esp, 8
test eax, eax
je 0x1001711e
lea ecx, [esp + 0x10]
push 0x20
push ecx
call ebx
add esp, 8
test eax, eax
jne 0x10017017
lea edi, [esp + 0x410]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x102325e4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
add esp, 8
test eax, eax
jne 0x10016d27
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0xc18]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc00
ret
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0xc18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc00
ret