Function at 0x7dd7dd0e
Capabilities:
Check for peb beingdebugged flag
Query environment variable
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push dword [edi]
xor esi, esi
push dword [ebp + 8]
mov dword [ebp - 4], esi
push 0x7dd7dd84
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
call sub.API_MS_Win_Core_ProcessEnvironment_L1_1_0.dll_GetEnvironmentVariableW
mov ebx, eax
cmp ebx, esi
jne 0x7dd9dfa2
mov eax, dword [0x7de40028]
test eax, eax
je 0x7dd81a16
mov eax, dword [0x7de4002c]
lea ecx, [eax + 1]
cmp dword [edi], ecx
jb 0x7dd9dfba
mov dword [edi], eax
mov eax, dword [0x7de4002c]
lea eax, [eax + eax + 2]
push eax
push dword [0x7de40028]
push dword [ebp + 8]
call sub.ntdll.dll_memcpy
xor eax, eax
add esp, 0xc
inc eax
pop edi
pop esi
pop ebx
leave
ret 8
mov eax, dword [0x7de403dc]
cmp eax, esi
jne 0x7dd9dfcb
mov esi, dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
push 0x7dd81af0
lea eax, [ebp - 0x1c]
push eax
call esi
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x44]
push eax
xor ebx, ebx
push 0x20019
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x44], 0x18
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x38], 0x40
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
call dword [sym.imp.ntdll.dll_NtOpenKey]
cmp eax, 0xc0000034
je 0x7dd9dfed
cmp eax, ebx
jl 0x7dd9e100
push edi
push dword [ebp + 8]
mov ebx, 0x7dd81ac8
push ebx
push dword [ebp - 4]
call fcn.7dd81e19
cmp eax, 0x80000005
je 0x7dd9e00b
test eax, eax
jl 0x7dd9e01c
mov eax, dword [ebp + 8]
test eax, eax
je 0x7dd81b80
cmp dword [edi], 0
je 0x7dd81b80
lea edx, [eax + 2]
jmp 0x7dd81b70
and dword [0x7de40c84], 0
jmp 0x7dd81c59
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x7dd81b70
sub eax, edx
sar eax, 1
mov dword [edi], eax
cmp dword [0x7de40c84], 0
mov dword [ebp + 0xc], 1
je 0x7dd81c64
push 0x7de400c0
call dword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
push 4
pop ebx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push 0x7dd81c88
mov esi, 0x7dd819d8
push esi
mov dword [ebp - 0x10], ebx
call fcn.7dd81cab
xor ecx, ecx
cmp eax, ecx
jl 0x7dd81bc8
cmp dword [ebp - 8], ecx
jne 0x7dd81be0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push 0x7dd819ac
push esi
mov dword [ebp - 0x10], ebx
call fcn.7dd81cab
xor ecx, ecx
cmp eax, ecx
jl 0x7dd81bed
cmp dword [ebp - 8], ecx
jne 0x7dd9e000
cmp dword [0x7de40c84], ecx
je 0x7dd81c59
mov eax, dword [0x7de40028]
test eax, eax
jne 0x7dd81c59
mov eax, dword fs:[0x18]
mov edx, dword [edi]
mov eax, dword [eax + 0x30]
lea edx, [edx + edx + 2]
push edx
push ecx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
test esi, esi
je 0x7dd81aba
mov eax, dword [edi]
add eax, eax
push eax
push dword [ebp + 8]
push esi
call sub.ntdll.dll_memcpy
mov eax, dword [edi]
add esp, 0xc
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x7dd81c40
sub eax, edx
sar eax, 1
mov dword [0x7de4002c], eax
mov dword [0x7de40028], esi
push 0x7de400c0
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
cmp dword [ebp - 4], 0
mov esi, dword [sym.imp.ntdll.dll_NtClose]
je 0x7dd81c75
push dword [ebp - 4]
call esi
cmp dword [ebp - 0xc], 0
jne 0x7dd9e10b
mov eax, dword [ebp + 0xc]
jmp 0x7dd7dd7d
cmp dword [edi], ebx
sbb esi, esi
inc esi
jne 0x7dd9dfb1
push 0x6f
call dword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
mov dword [edi], ebx
mov eax, esi
jmp 0x7dd7dd7d
push 0x6f
mov dword [edi], ecx
call dword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
xor eax, eax
jmp 0x7dd7dd7d
push edi
push dword [ebp + 8]
call eax
cmp eax, 0x4d5
je 0x7dd81a23
cmp eax, 0x6f
jne 0x7dd81a9e
mov dword [ebp + 0xc], esi
jmp 0x7dd81c64
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x7dd9dff9
xor ecx, ecx
mov word [eax], cx
mov dword [edi], ebx
jmp 0x7dd81a9e
mov dword [0x7de40c84], ecx
jmp 0x7dd81bed
push 0x6f
call dword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
and dword [ebp + 0xc], 0
jmp 0x7dd81c64
push edi
push dword [ebp + 8]
push 0x7dd81f60
push dword [ebp - 4]
call fcn.7dd81e19
cmp eax, 0xc0000034
jne 0x7dd9e043
mov ecx, dword [ebp + 8]
xor eax, eax
mov word [ecx], ax
and dword [edi], eax
jmp 0x7dd81a9e
test eax, eax
jl 0x7dd9e100
push 0x7dd9e118
lea eax, [ebp - 0x24]
push eax
call esi
push ebx
lea eax, [ebp - 0x1c]
push eax
call esi
mov eax, dword [ebp - 4]
mov dword [ebp - 0x40], eax
lea ecx, [ebp - 0x14]
push ecx
push 1
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x3c], eax
xor eax, eax
lea ecx, [ebp - 0x24]
push ecx
push eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x44]
push eax
push 0x2001f
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x44], 0x18
mov dword [ebp - 0x38], 0x40
call dword [sym.imp.ntdll.dll_NtCreateKey]
test eax, eax
jl 0x7dd9e100
cmp dword [ebp - 0x14], 2
jne 0x7dd9e0c0
push edi
push dword [ebp + 8]
push ebx
push dword [ebp - 4]
call fcn.7dd81e19
cmp eax, 0xc0000034
jne 0x7dd9e0c0
add eax, 0xffffffcd
jmp 0x7dd9e100
push 0x7dd81f60
lea eax, [ebp - 0x2c]
push eax
call esi
mov eax, dword [ebp + 8]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x7dd9e0d1
sub eax, ecx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x2c]
push 1
push 0
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_NtSetValueKey]
test eax, eax
jge 0x7dd81a9e
push eax
call sym.KERNEL32.dll_BaseSetLastNTError
jmp 0x7dd9e013
push dword [ebp - 0xc]
call esi
jmp 0x7dd81c7f