Function at 0x7dd7dd3e
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 0x7dd7ddb4
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 0x7dd9dfd2
mov eax, dword [0x7de40028]
test eax, eax
je 0x7dd81a46
mov eax, dword [0x7de4002c]
lea ecx, [eax + 1]
cmp dword [edi], ecx
jb 0x7dd9dfea
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 0x7dd9dffb
mov esi, dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
push 0x7dd81b20
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 0x7dd9e01d
cmp eax, ebx
jl 0x7dd9e130
push edi
push dword [ebp + 8]
mov ebx, 0x7dd81af8
push ebx
push dword [ebp - 4]
call fcn.7dd81e49
cmp eax, 0x80000005
je 0x7dd9e03b
test eax, eax
jl 0x7dd9e04c
mov eax, dword [ebp + 8]
test eax, eax
je 0x7dd81bb0
cmp dword [edi], 0
je 0x7dd81bb0
lea edx, [eax + 2]
jmp 0x7dd81ba0
and dword [0x7de40c84], 0
jmp 0x7dd81c89
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x7dd81ba0
sub eax, edx
sar eax, 1
mov dword [edi], eax
cmp dword [0x7de40c84], 0
mov dword [ebp + 0xc], 1
je 0x7dd81c94
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 0x7dd81cb8
mov esi, 0x7dd81a08
push esi
mov dword [ebp - 0x10], ebx
call fcn.7dd81cdb
xor ecx, ecx
cmp eax, ecx
jl 0x7dd81bf8
cmp dword [ebp - 8], ecx
jne 0x7dd81c10
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push 0x7dd819dc
push esi
mov dword [ebp - 0x10], ebx
call fcn.7dd81cdb
xor ecx, ecx
cmp eax, ecx
jl 0x7dd81c1d
cmp dword [ebp - 8], ecx
jne 0x7dd9e030
cmp dword [0x7de40c84], ecx
je 0x7dd81c89
mov eax, dword [0x7de40028]
test eax, eax
jne 0x7dd81c89
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 0x7dd81aea
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 0x7dd81c70
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 0x7dd81ca5
push dword [ebp - 4]
call esi
cmp dword [ebp - 0xc], 0
jne 0x7dd9e13b
mov eax, dword [ebp + 0xc]
jmp 0x7dd7ddad
cmp dword [edi], ebx
sbb esi, esi
inc esi
jne 0x7dd9dfe1
push 0x6f
call dword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
mov dword [edi], ebx
mov eax, esi
jmp 0x7dd7ddad
push 0x6f
mov dword [edi], ecx
call dword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
xor eax, eax
jmp 0x7dd7ddad
push edi
push dword [ebp + 8]
call eax
cmp eax, 0x4d5
je 0x7dd81a53
cmp eax, 0x6f
jne 0x7dd81ace
mov dword [ebp + 0xc], esi
jmp 0x7dd81c94
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x7dd9e029
xor ecx, ecx
mov word [eax], cx
mov dword [edi], ebx
jmp 0x7dd81ace
mov dword [0x7de40c84], ecx
jmp 0x7dd81c1d
push 0x6f
call dword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
and dword [ebp + 0xc], 0
jmp 0x7dd81c94
push edi
push dword [ebp + 8]
push 0x7dd81f90
push dword [ebp - 4]
call fcn.7dd81e49
cmp eax, 0xc0000034
jne 0x7dd9e073
mov ecx, dword [ebp + 8]
xor eax, eax
mov word [ecx], ax
and dword [edi], eax
jmp 0x7dd81ace
test eax, eax
jl 0x7dd9e130
push 0x7dd9e148
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 0x7dd9e130
cmp dword [ebp - 0x14], 2
jne 0x7dd9e0f0
push edi
push dword [ebp + 8]
push ebx
push dword [ebp - 4]
call fcn.7dd81e49
cmp eax, 0xc0000034
jne 0x7dd9e0f0
add eax, 0xffffffcd
jmp 0x7dd9e130
push 0x7dd81f90
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 0x7dd9e101
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 0x7dd81ace
push eax
call sym.KERNEL32.dll_BaseSetLastNTError
jmp 0x7dd9e043
push dword [ebp - 0xc]
call esi
jmp 0x7dd81caf