Function at 0x1014d1d
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x1035030]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
xor eax, eax
push edi
mov edi, dword [ebp + 0xc]
push 0x206
push eax
mov dword [ebp - 0x210], eax
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x20a]
xor ecx, ecx
push eax
mov esi, 0x80070057
mov word [ebp - 0x20c], cx
call sub.msvcrt.dll_memset
add esp, 0xc
test ebx, ebx
jne 0x1014da8
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x101502d
test byte [eax + 0x1c], 1
je 0x101502d
push 0x10035d0
push 0x55
jmp 0x1014eb7
test edi, edi
jne 0x1014dd2
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x101502d
test byte [eax + 0x1c], 1
je 0x101502d
push 0x10035d0
push 0x56
jmp 0x1014eb7
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
push 0x10039f8
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1014fd4
cmp eax, esi
ja 0x1014fd4
push ebx
lea eax, [ebp - 0x20c]
push eax
push 0x10025e8
push esi
push edi
call fcn.01006a35
mov esi, eax
xor ebx, ebx
add esp, 0x14
cmp esi, ebx
jge 0x1014e40
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x1015018
test byte [eax + 0x1c], 1
je 0x1015018
push esi
push 0x10035d0
push 0x58
jmp 0x101500d
push ebx
push edi
call fcn.0101fddd
mov esi, eax
cmp esi, ebx
jge 0x1014e74
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x1015018
test byte [eax + 0x1c], 1
je 0x1015018
push esi
push 0x10035d0
push 0x59
jmp 0x101500d
cmp dword [ebp + 0x10], ebx
je 0x1014f98
lea eax, [ebp - 0x210]
push eax
push dword [ebp + 0x14]
mov esi, 0x8007000c
push ebx
call fcn.01014af1
test eax, eax
jne 0x1014ec7
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x1015018
test byte [eax + 0x1c], 1
je 0x1015018
push 0x10035d0
push 0x5a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01004e8e
jmp 0x1015018
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x1014f9c
cmp dword [ebp - 0x214], ebx
je 0x1014f9c
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
test eax, eax
jne 0x1014f4c
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x1015018
test byte [eax + 0x1c], 1
je 0x1015018
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1035014]
push 0x10035d0
push 0x5c
jmp 0x101500d
push ebx
push dword [ebp - 0x220]
push ebx
push dword [ebp - 0x21c]
push 0x80000005
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
cmp eax, ebx
je 0x1014f98
mov ecx, dword [0x1035014]
cmp ecx, 0x1035014
je 0x1015018
test byte [ecx + 0x1c], 1
je 0x1015018
push eax
push 0x10035d0
push 0x5d
push dword [ecx + 0x14]
push dword [ecx + 0x10]
jmp 0x1015013
xor esi, esi
jmp 0x1015018
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x1015018
test byte [eax + 0x1c], 1
je 0x1015018
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x214]
mov eax, dword [0x1035014]
push 0x10035d0
push 0x5b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100bd5c
jmp 0x1015018
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1014fe8
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x1014ff3
mov esi, 0x80004005
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x1015018
test byte [eax + 0x1c], 1
je 0x1015018
push esi
push 0x10035d0
push 0x57
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01004eb4
cmp dword [ebp - 0x210], 0
je 0x101502d
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.01011f27
leave
ret 0x10