Function at 0x101167a
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
xor eax, eax
push edi
mov edi, dword [sym.imp.msvcrt.dll_wcslen]
mov ebx, 0x100fe64
push ebx
mov dword [ebp - 8], eax
mov word [ebp - 0x20], ax
mov word [ebp - 0x1e], ax
mov dword [ebp - 0x1c], eax
call edi
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], eax
call edi
mov esi, eax
cmp esi, dword [ebp - 0xc]
pop ecx
pop ecx
jbe 0x10116f3
push dword [ebp - 0xc]
push dword [ebp + 8]
push ebx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x10116f3
lea eax, [esi + esi + 2]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
je 0x1011783
push dword [ebp + 8]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x101174d
mov ebx, 0x100fe48
push ebx
call edi
mov edi, eax
cmp esi, edi
pop ecx
jbe 0x1011754
push edi
push dword [ebp + 8]
push ebx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x1011754
sub esi, edi
add esi, dword [ebp - 0x14]
lea eax, [esi + esi + 2]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
mov esi, dword [ebp + 0xc]
mov dword [esi], eax
je 0x1011783
push 0x100fe64
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
mov eax, dword [ebp + 8]
lea eax, [eax + edi*2]
push eax
push dword [esi]
call dword [sym.imp.msvcrt.dll_wcscat]
add esp, 0x10
xor eax, eax
jmp 0x1011975
push 1
lea eax, [ebp - 4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, 1
mov dword [ebp - 0x18], eax
jbe 0x1011970
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
lea eax, [eax + eax + 2]
push eax
push 0x40
call edi
test eax, eax
mov dword [ebp - 0xc], eax
jne 0x101178b
push 8
pop eax
jmp 0x1011975
push dword [ebp - 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, dword [ebp - 0x18]
jbe 0x10117a3
push 8
pop esi
jmp 0x1011963
push 0
push 0
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
test al, al
jne 0x10117c2
mov esi, 0x70d
jmp 0x1011963
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
movzx eax, word [ebp - 0x28]
mov ebx, eax
add eax, 2
push eax
push 0x40
shr ebx, 1
call edi
test eax, eax
mov dword [ebp - 0xc], eax
je 0x101191c
push ebx
push dword [ebp - 0x24]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
cmp esi, ebx
jbe 0x101184c
push ebx
push dword [ebp + 8]
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x101184c
sub esi, ebx
add esi, dword [ebp - 0x14]
lea eax, [esi + esi + 2]
push eax
push 0x40
call edi
test eax, eax
mov esi, dword [ebp + 0xc]
mov dword [esi], eax
je 0x101191c
push 0x100fe64
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
mov eax, dword [ebp + 8]
lea eax, [eax + ebx*2]
push eax
push dword [esi]
call dword [sym.imp.msvcrt.dll_wcscat]
add esp, 0x10
xor esi, esi
jmp 0x1011941
push 0x101197c
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x48]
push eax
push 1
lea eax, [ebp - 8]
lea ecx, [ebp - 0x30]
push eax
mov dword [ebp - 0x48], 0x18
mov dword [ebp - 0x3c], 0x40
mov dword [ebp - 0x40], ecx
call dword [sym.imp.ntdll.dll_NtOpenSymbolicLinkObject]
test eax, eax
jge 0x1011898
mov esi, 0x70d
jmp 0x101193b
mov ebx, dword [sym.imp.ntdll.dll_NtQuerySymbolicLinkObject]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 8]
call ebx
test eax, eax
jge 0x10118b6
cmp eax, 0xc0000023
jne 0x101188e
mov eax, dword [ebp - 0x10]
add eax, 2
push eax
push 0x40
call edi
test eax, eax
mov dword [ebp - 0x1c], eax
je 0x101191c
mov eax, dword [ebp - 0x10]
mov word [ebp - 0x20], ax
add eax, 2
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 8]
call ebx
test eax, eax
jl 0x101188e
movzx ebx, word [ebp - 0x20]
shr ebx, 1
cmp esi, ebx
jbe 0x1011938
push ebx
push dword [ebp + 8]
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x1011938
sub esi, ebx
add esi, dword [ebp - 0x14]
lea eax, [esi + esi + 2]
push eax
push 0x40
call edi
test eax, eax
mov esi, dword [ebp + 0xc]
mov dword [esi], eax
jne 0x1011920
push 8
jmp 0x101193a
push 0x100fe64
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
mov eax, dword [ebp + 8]
lea eax, [eax + ebx*2 + 2]
jmp 0x1011839
push 0x57
pop esi
mov eax, dword [ebp + 0xc]
and dword [eax], 0
cmp dword [ebp - 8], 0
je 0x1011950
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtClose]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, esi
jmp 0x1011975
mov eax, 0x70d
pop edi
pop esi
pop ebx
leave
ret 8