Function at 0x10818a3
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
and dword [ebp - 0xc], 0
push ebx
push esi
mov esi, dword [ebp + 8]
mov byte [ebp - 2], 0
mov byte [ebp - 1], 0
test esi, esi
jne 0x10818d4
push 0x1007d0c
push 0x6e5
push 0x1007ac0
call fcn.0107b644
push 0x12
mov byte [esi], 0
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov ebx, eax
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x10818f4
mov dword [ebp - 8], 0x8007000e
jmp 0x1081add
push edi
xor eax, eax
mov edi, ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 9
stosd dword es:[edi], eax
push ebx
mov esi, 0x1007cec
push esi
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x1081a48
mov ecx, 0x1007cd8
mov eax, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1081943
test dx, dx
je 0x108193f
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1081943
add eax, 4
add ecx, 4
test dx, dx
jne 0x108191d
xor eax, eax
jmp 0x1081948
sbb eax, eax
sbb eax, 0xffffffff
mov ebx, 0x10079c8
mov edi, 0x111024c
test eax, eax
jne 0x108197d
mov byte [ebp - 1], 1
mov eax, dword [0x111024c]
cmp eax, edi
je 0x108197d
test byte [eax + 0x1c], 1
je 0x108197d
cmp byte [eax + 0x19], 4
jb 0x108197d
push ebx
push 0x58
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101894a
push 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x1007cc0
push 0x1007c60
push 0x80000002
call fcn.01080e00
mov dword [ebp - 8], eax
test eax, eax
jl 0x1081ac4
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x1007c48
push dword [ebp - 0xc]
call esi
pop ecx
pop ecx
test eax, eax
je 0x10819cc
push 0x1007c34
push dword [ebp - 0xc]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10819d0
mov byte [ebp - 2], 1
mov eax, dword [0x111024c]
cmp eax, edi
je 0x10819fd
test byte [eax + 0x1c], 1
je 0x10819fd
cmp byte [eax + 0x19], 4
jb 0x10819fd
movzx ecx, byte [ebp - 2]
push ecx
movzx ecx, byte [ebp - 1]
push ecx
push ebx
push 0x5b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01083f04
cmp byte [ebp - 1], 0
je 0x1081ac4
cmp byte [ebp - 2], 0
je 0x1081ac4
mov eax, dword [ebp + 8]
mov byte [eax], 1
mov eax, dword [0x111024c]
cmp eax, edi
je 0x1081ac4
test byte [eax + 0x1c], 1
je 0x1081ac4
cmp byte [eax + 0x19], 4
jb 0x1081ac4
push ebx
push 0x5c
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101894a
jmp 0x1081ac4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1081a5c
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 8], eax
cmp eax, 0x800700cb
je 0x1081a95
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x1081ad3
test byte [eax + 0x1c], 1
je 0x1081ad3
cmp byte [eax + 0x19], 2
jb 0x1081ad3
push dword [ebp - 8]
push 0x10079c8
push 0x5a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01019fa8
jmp 0x1081ad3
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x1081ac0
test byte [eax + 0x1c], 1
je 0x1081ac0
cmp byte [eax + 0x19], 4
jb 0x1081ac0
push esi
push 0x10079c8
push 0x59
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01019633
and dword [ebp - 8], 0
cmp dword [ebp - 0xc], 0
je 0x1081ad3
push dword [ebp - 0xc]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push dword [ebp - 0x10]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
pop edi
mov eax, dword [ebp - 8]
pop esi
pop ebx
leave
ret 4