Function at 0x7ddf40ed
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 0x7ddf42e1
cmp edi, ebx
je 0x7ddf413e
cmp edi, 0xc0000130
je 0x7ddf413e
cmp edi, 0xc0000131
je 0x7ddf413e
cmp edi, esi
jne 0x7ddf42e1
push esi
push dword [ebp + 0x28]
call fcn.7ddf9a52
test eax, eax
je 0x7ddf42e1
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 0x7ddf4162
push eax
call sym.KERNEL32.dll_BaseSetLastNTError
jmp 0x7ddf44bb
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0x1d4]
je 0x7ddf42e1
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 0x7ddb34dc
mov dword [ebp + 0xc], eax
call sub.API_MS_Win_Core_ProcessEnvironment_L1_1_0.dll_GetEnvironmentVariableW
mov esi, eax
cmp esi, ebx
jae 0x7ddf42c0
test esi, esi
je 0x7ddf42c0
push 0x7ddf44e0
push 0x104
push dword [ebp + 0xc]
call fcn.7ddf3f0d
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 0x7ddf421e
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 0x7ddf4158
mov ebx, dword [ebp + 0x18]
push dword [ebx]
mov edi, dword [ebp + 0x20]
push dword [edi]
push dword [ebp + 0xc]
push 0x7ddf44c4
push esi
push eax
call fcn.7dded7b9
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 0x7ddf4277
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call esi
push dword [ebp + 0x28]
jmp 0x7ddf4158
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeStringEx]
mov dword [ebp + 0x28], eax
test eax, eax
jge 0x7ddf428d
push dword [ebp + 0x50]
jmp 0x7ddf425f
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 0x7ddf44bd
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 0x7ddf4158
cmp edi, ebx
je 0x7ddf44b3
cmp edi, esi
je 0x7ddf449c
cmp edi, 0xc0000130
je 0x7ddf44b3
cmp edi, 0xc0000131
je 0x7ddf4332
cmp edi, 0xc0000267
je 0x7ddf432b
cmp edi, 0xc0000428
je 0x7ddf431b
push edi
jmp 0x7ddf4158
push 0x241
call dword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
jmp 0x7ddf44bb
push 0x10fe
jmp 0x7ddf4320
mov esi, dword [ebp + 0x20]
test dword [esi], 0x2000
jne 0x7ddf449c
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 0x7ddf4369
push eax
jmp 0x7ddf4320
push dword [ebp + 0x48]
mov eax, dword [ebp + 0x30]
push dword [ebp + 0x44]
push dword [eax]
call fcn.7ddf9e6b
test eax, eax
je 0x7ddf44bb
mov ebx, dword [ebp + 0x18]
mov edi, 0x800
jmp 0x7ddf43bc
push dword [ebp + 0x28]
call sym.KERNEL32.dll_BaseSetLastNTError
cmp dword [ebp + 0x28], 0xc0000414
je 0x7ddf44bb
mov eax, dword [ebp + 0x50]
cmp dword [eax], 0x20
jne 0x7ddf44bb
call fcn.7dd711c7
cmp eax, 5
jne 0x7ddf44bb
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.7ddfb4bb
mov dword [ebp + 0x28], eax
test eax, eax
jl 0x7ddf438b
mov ecx, dword [ebp + 0x38]
movzx eax, word [ecx + 0x9a]
and eax, 7
dec eax
je 0x7ddf4428
dec eax
je 0x7ddf4421
dec eax
dec eax
jne 0x7ddf4475
mov eax, dword [ebp + 0x4c]
mov dword [eax], 4
mov eax, dword [ecx + 0x44]
mov ecx, dword [ebp + 0x58]
mov dword [ecx], eax
jmp 0x7ddf4475
push 0x15
jmp 0x7ddf4320
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.7ddfb574
test eax, eax
jne 0x7ddf4457
push 0xc0000131
jmp 0x7ddf4158
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 0x7ddf42b8
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 0x7ddf42b8
push edi
push dword [ebp + 0x28]
call fcn.7ddf9a52
test eax, eax
jne 0x7ddf44b3
push 0xc1
jmp 0x7ddf4320
push dword [ebp + 0x28]
call fcn.7ddf33a8
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x54