Function at 0x76e2bf6f
Capabilities:
Query environment variable
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
xor ebx, ebx
lea eax, [ebp - 8]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
push ebx
mov edi, 0x76e133a0
push edi
push dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ebx
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x76e2c14f
push dword [ebp - 8]
call sym.adsldpc.dll_AllocADsMem
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x14], ebx
jne 0x76e2bfc4
push 8
pop eax
jmp 0x76e2c152
lea eax, [ebp - 8]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
push 0
push edi
push dword [ebp + 8]
call esi
test eax, eax
mov dword [ebp - 4], eax
jne 0x76e2c129
push 0x208
call sym.adsldpc.dll_AllocADsMem
test eax, eax
mov dword [ebp - 0xc], eax
jne 0x76e2bffd
mov dword [ebp - 4], 8
jmp 0x76e2c129
cmp word [ebx], 0
je 0x76e2c0b8
cmp dword [ebp + 0xc], 0
je 0x76e2c0b8
push 0x76e2c15c
push ebx
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
je 0x76e2c0b8
push dword [ebp + 0xc]
mov esi, dword [sym.imp.msvcrt.dll_wcslen]
mov edi, eax
sub edi, ebx
sar edi, 1
call esi
mov ebx, eax
mov dword [esp], 0x76e13394
call esi
add ebx, edi
lea eax, [eax + ebx + 1]
pop ecx
add eax, eax
push eax
call sym.adsldpc.dll_AllocADsMem
test eax, eax
mov dword [ebp - 0x10], eax
jne 0x76e2c06b
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 4], 8
jmp 0x76e2c129
push edi
push dword [ebp - 0x14]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
push dword [ebp + 0xc]
mov ebx, dword [ebp - 0x10]
mov edi, dword [sym.imp.msvcrt.dll_wcscat]
push ebx
call edi
push 0x76e13394
push ebx
call edi
add esp, 0x1c
push dword [ebp - 0x14]
call sym.adsldpc.dll_FreeADsMem
and dword [ebp - 0x10], 0
push ebx
call esi
pop ecx
lea eax, [eax + eax + 2]
push eax
push ebx
push 2
push 0
push 0x76e133a0
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, 0x104
push edi
push dword [ebp - 0xc]
push ebx
call esi
test eax, eax
mov dword [ebp - 8], eax
je 0x76e2c101
cmp eax, edi
jbe 0x76e2c109
push dword [ebp - 0xc]
call sym.adsldpc.dll_FreeADsMem
mov eax, dword [ebp - 8]
add eax, eax
push eax
call sym.adsldpc.dll_AllocADsMem
test eax, eax
mov dword [ebp - 0xc], eax
je 0x76e2bff1
push dword [ebp - 8]
push eax
push ebx
call esi
test eax, eax
mov dword [ebp - 8], eax
jne 0x76e2c109
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x76e2c126
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0xc]
call fcn.76e2bb41
mov dword [ebp - 4], eax
test ebx, ebx
je 0x76e2c133
push ebx
call sym.adsldpc.dll_FreeADsMem
cmp dword [ebp - 0xc], 0
je 0x76e2c141
push dword [ebp - 0xc]
call sym.adsldpc.dll_FreeADsMem
cmp dword [ebp - 0x10], 0
je 0x76e2c14f
push dword [ebp - 0x10]
call sym.adsldpc.dll_FreeADsMem
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x24