Function at 0x10817f0
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 0x1081821
push 0x1007cfc
push 0x6e5
push 0x1007ab0
call fcn.0107b4be
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 0x1081841
mov dword [ebp - 8], 0x8007000e
jmp 0x1081a2a
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, 0x1007cdc
push esi
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x1081995
mov ecx, 0x1007cc8
mov eax, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1081890
test dx, dx
je 0x108188c
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1081890
add eax, 4
add ecx, 4
test dx, dx
jne 0x108186a
xor eax, eax
jmp 0x1081895
sbb eax, eax
sbb eax, 0xffffffff
mov ebx, 0x10079b8
mov edi, 0x111124c
test eax, eax
jne 0x10818ca
mov byte [ebp - 1], 1
mov eax, dword [0x111124c]
cmp eax, edi
je 0x10818ca
test byte [eax + 0x1c], 1
je 0x10818ca
cmp byte [eax + 0x19], 4
jb 0x10818ca
push ebx
push 0x58
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189d0
push 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x1007cb0
push 0x1007c50
push 0x80000002
call fcn.01080d4d
mov dword [ebp - 8], eax
test eax, eax
jl 0x1081a11
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x1007c38
push dword [ebp - 0xc]
call esi
pop ecx
pop ecx
test eax, eax
je 0x1081919
push 0x1007c24
push dword [ebp - 0xc]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x108191d
mov byte [ebp - 2], 1
mov eax, dword [0x111124c]
cmp eax, edi
je 0x108194a
test byte [eax + 0x1c], 1
je 0x108194a
cmp byte [eax + 0x19], 4
jb 0x108194a
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.0109ba57
cmp byte [ebp - 1], 0
je 0x1081a11
cmp byte [ebp - 2], 0
je 0x1081a11
mov eax, dword [ebp + 8]
mov byte [eax], 1
mov eax, dword [0x111124c]
cmp eax, edi
je 0x1081a11
test byte [eax + 0x1c], 1
je 0x1081a11
cmp byte [eax + 0x19], 4
jb 0x1081a11
push ebx
push 0x5c
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189d0
jmp 0x1081a11
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10819a9
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 8], eax
cmp eax, 0x800700cb
je 0x10819e2
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x1081a20
test byte [eax + 0x1c], 1
je 0x1081a20
cmp byte [eax + 0x19], 2
jb 0x1081a20
push dword [ebp - 8]
push 0x10079b8
push 0x5a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189f6
jmp 0x1081a20
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x1081a0d
test byte [eax + 0x1c], 1
je 0x1081a0d
cmp byte [eax + 0x19], 4
jb 0x1081a0d
push esi
push 0x10079b8
push 0x59
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01019680
and dword [ebp - 8], 0
cmp dword [ebp - 0xc], 0
je 0x1081a20
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