Function at 0x1027ca0
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 0x1027cd1
push 0x1004244
push 0x6e5
push 0x1003fd0
call fcn.01028938
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 0x1027cf1
mov dword [ebp - 8], 0x8007000e
jmp 0x1027eda
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, 0x1004224
push esi
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x1027e45
mov ecx, 0x1004210
mov eax, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1027d40
test dx, dx
je 0x1027d3c
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1027d40
add eax, 4
add ecx, 4
test dx, dx
jne 0x1027d1a
xor eax, eax
jmp 0x1027d45
sbb eax, eax
sbb eax, 0xffffffff
mov ebx, 0x1003ed8
mov edi, 0x1032370
test eax, eax
jne 0x1027d7a
mov byte [ebp - 1], 1
mov eax, dword [0x1032370]
cmp eax, edi
je 0x1027d7a
test byte [eax + 0x1c], 1
je 0x1027d7a
cmp byte [eax + 0x19], 4
jb 0x1027d7a
push ebx
push 0x58
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01005393
push 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x10041f8
push 0x1004198
push 0x80000002
call fcn.0102714b
mov dword [ebp - 8], eax
test eax, eax
jl 0x1027ec1
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x1004184
push dword [ebp - 0xc]
call esi
pop ecx
pop ecx
test eax, eax
je 0x1027dc9
push 0x1004170
push dword [ebp - 0xc]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1027dcd
mov byte [ebp - 2], 1
mov eax, dword [0x1032370]
cmp eax, edi
je 0x1027dfa
test byte [eax + 0x1c], 1
je 0x1027dfa
cmp byte [eax + 0x19], 4
jb 0x1027dfa
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.01015529
cmp byte [ebp - 1], 0
je 0x1027ec1
cmp byte [ebp - 2], 0
je 0x1027ec1
mov eax, dword [ebp + 8]
mov byte [eax], 1
mov eax, dword [0x1032370]
cmp eax, edi
je 0x1027ec1
test byte [eax + 0x1c], 1
je 0x1027ec1
cmp byte [eax + 0x19], 4
jb 0x1027ec1
push ebx
push 0x5c
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01005393
jmp 0x1027ec1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1027e59
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 8], eax
cmp eax, 0x800700cb
je 0x1027e92
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1027ed0
test byte [eax + 0x1c], 1
je 0x1027ed0
cmp byte [eax + 0x19], 2
jb 0x1027ed0
push dword [ebp - 8]
push 0x1003ed8
push 0x5a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010053b9
jmp 0x1027ed0
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1027ebd
test byte [eax + 0x1c], 1
je 0x1027ebd
cmp byte [eax + 0x19], 4
jb 0x1027ebd
push esi
push 0x1003ed8
push 0x59
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01007db4
and dword [ebp - 8], 0
cmp dword [ebp - 0xc], 0
je 0x1027ed0
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