Function at 0x7ddf3eb5
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
and dword [ebp - 4], 0
cmp dword [ebp + 0xc], 0
push ebx
push esi
mov ebx, 0xc000011b
push edi
mov edi, dword [ebp + 8]
lea esi, [ebx + 0x14]
je 0x7ddf40a9
cmp edi, ebx
je 0x7ddf3f06
cmp edi, 0xc0000130
je 0x7ddf3f06
cmp edi, 0xc0000131
je 0x7ddf3f06
cmp edi, esi
jne 0x7ddf40a9
push esi
push dword [ebp + 0x28]
call fcn.7ddf981a
test eax, eax
je 0x7ddf40a9
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp + 8]
push eax
push 0xc
push dword [ebp + 0xc]
call dword [sym.imp.ntdll.dll_NtQueryInformationToken]
test eax, eax
jge 0x7ddf3f2a
push eax
call sym.KERNEL32.dll_BaseSetLastNTError
jmp 0x7ddf4283
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0x1d4]
je 0x7ddf40a9
call sub.KERNELBASE.dll_KernelBaseGetGlobalData
mov eax, dword [eax + 0x2c]
mov ecx, dword fs:[0x18]
mov edi, dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0x208
push eax
mov eax, dword [ecx + 0x30]
push dword [eax + 0x18]
call edi
mov ebx, 0xef
push ebx
push eax
push 0x7ddb34ac
mov dword [ebp + 0xc], eax
call sub.API_MS_Win_Core_ProcessEnvironment_L1_1_0.dll_GetEnvironmentVariableW
mov esi, eax
cmp esi, ebx
jae 0x7ddf4088
test esi, esi
je 0x7ddf4088
push 0x7ddf42a8
push 0x104
push dword [ebp + 0xc]
call fcn.7ddf3cd5
add esi, 0x119
call sub.KERNELBASE.dll_KernelBaseGetGlobalData
mov eax, dword [eax + 0x2c]
mov ecx, dword fs:[0x18]
lea edx, [esi + esi]
push edx
push eax
mov eax, dword [ecx + 0x30]
push dword [eax + 0x18]
call edi
mov dword [ebp + 0x50], eax
test eax, eax
jne 0x7ddf3fe6
push dword [ebp + 0xc]
push eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push 0xc0000017
jmp 0x7ddf3f20
mov ebx, dword [ebp + 0x18]
push dword [ebx]
mov edi, dword [ebp + 0x20]
push dword [edi]
push dword [ebp + 0xc]
push 0x7ddf428c
push esi
push eax
call fcn.7dded631
mov esi, dword [sym.imp.ntdll.dll_RtlFreeHeap]
add esp, 0x18
push dword [ebp + 0xc]
mov dword [ebp + 0x28], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call esi
cmp dword [ebp + 0x28], 0
push dword [ebp + 0x50]
jge 0x7ddf403f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call esi
push dword [ebp + 0x28]
jmp 0x7ddf3f20
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeStringEx]
mov dword [ebp + 0x28], eax
test eax, eax
jge 0x7ddf4055
push dword [ebp + 0x50]
jmp 0x7ddf4027
mov esi, dword [ebp + 0x40]
push esi
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
mov eax, dword [ebp - 0x18]
mov dword [esi], eax
mov eax, dword [ebp - 0x14]
mov dword [esi + 4], eax
mov dword [ebx], eax
mov eax, dword [ebp + 0x14]
and dword [eax], 0
mov eax, dword [edi]
and eax, 0x404
or eax, 0xc000000
mov dword [edi], eax
xor eax, eax
inc eax
jmp 0x7ddf4285
push dword [ebp + 0xc]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push 0xc0000103
jmp 0x7ddf3f20
cmp edi, ebx
je 0x7ddf427b
cmp edi, esi
je 0x7ddf4264
cmp edi, 0xc0000130
je 0x7ddf427b
cmp edi, 0xc0000131
je 0x7ddf40fa
cmp edi, 0xc0000267
je 0x7ddf40f3
cmp edi, 0xc0000428
je 0x7ddf40e3
push edi
jmp 0x7ddf3f20
push 0x241
call dword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
jmp 0x7ddf4283
push 0x10fe
jmp 0x7ddf40e8
mov esi, dword [ebp + 0x20]
test dword [esi], 0x2000
jne 0x7ddf4264
mov eax, dword [ebp + 0x2c]
or dword [ebp - 4], 1
mov byte [eax], 1
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
call sym.KERNEL32.dll_CheckElevation
test eax, eax
je 0x7ddf4131
push eax
jmp 0x7ddf40e8
push dword [ebp + 0x48]
mov eax, dword [ebp + 0x30]
push dword [ebp + 0x44]
push dword [eax]
call fcn.7ddf9c33
test eax, eax
je 0x7ddf4283
mov ebx, dword [ebp + 0x18]
mov edi, 0x800
jmp 0x7ddf4184
push dword [ebp + 0x28]
call sym.KERNEL32.dll_BaseSetLastNTError
cmp dword [ebp + 0x28], 0xc0000414
je 0x7ddf4283
mov eax, dword [ebp + 0x50]
cmp dword [eax], 0x20
jne 0x7ddf4283
call fcn.7dd711c7
cmp eax, 5
jne 0x7ddf4283
or dword [esi], edi
mov eax, dword [esi]
push dword [ebp + 0xc]
mov ecx, dword [ebp + 0x50]
push dword [ebp + 0x34]
and eax, edi
neg eax
sbb eax, eax
and eax, 0x20
add eax, 0x20
mov dword [ecx], eax
push dword [esi]
mov ecx, dword [ebp + 0x14]
push dword [ebp + 0x3c]
push dword [ebp + 0x38]
push dword [ebp + 0x44]
push dword [ebp + 0x1c]
push dword [ebx]
push dword [ecx]
push eax
call fcn.7ddfb283
mov dword [ebp + 0x28], eax
test eax, eax
jl 0x7ddf4153
mov ecx, dword [ebp + 0x38]
movzx eax, word [ecx + 0x9a]
and eax, 7
dec eax
je 0x7ddf41f0
dec eax
je 0x7ddf41e9
dec eax
dec eax
jne 0x7ddf423d
mov eax, dword [ebp + 0x4c]
mov dword [eax], 4
mov eax, dword [ecx + 0x44]
mov ecx, dword [ebp + 0x58]
mov dword [ecx], eax
jmp 0x7ddf423d
push 0x15
jmp 0x7ddf40e8
push dword [ebp + 0x54]
mov eax, dword [ebp + 0x4c]
mov edi, dword [ebp + 0x40]
mov dword [eax], 1
mov eax, dword [ebp + 0x50]
push edi
push dword [eax]
mov eax, dword [ebp + 0x3c]
push dword [eax]
push dword [ebx]
call fcn.7ddfb33c
test eax, eax
jne 0x7ddf421f
push 0xc0000131
jmp 0x7ddf3f20
mov eax, dword [edi + 4]
mov dword [ebx], eax
mov eax, dword [ebp + 0x14]
and dword [eax], 0
mov eax, dword [esi]
and eax, 0xffffffe7
or eax, 0x8000000
mov dword [esi], eax
mov eax, dword [ebp + 0x34]
or dword [eax + 0x2c], 0x40
mov eax, dword [ebp + 0x54]
dec dword [eax]
mov eax, dword [ebp + 0x58]
cmp dword [eax], 0
jne 0x7ddf4080
mov eax, dword [ebp + 0x24]
and dword [eax], 0
mov eax, dword [ebp + 0x48]
mov eax, dword [eax + 4]
mov ecx, dword [ebp + 0x30]
mov dword [ecx], eax
jmp 0x7ddf4080
push edi
push dword [ebp + 0x28]
call fcn.7ddf981a
test eax, eax
jne 0x7ddf427b
push 0xc1
jmp 0x7ddf40e8
push dword [ebp + 0x28]
call fcn.7ddf3170
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x54