Function at 0x128ad40
Capabilities:
Set environment variable
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x820
mov eax, dword [0x12fceb0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x804]
push edi
mov edi, dword [ebp + 0xc]
push 0x800
push ecx
push eax
call fcn.0128a390
add esp, 0xc
test eax, eax
jne 0x128adb0
push 2
call fcn.01294390
add esp, 4
test eax, eax
je 0x128afc0
push str.Failed_to_get_Volatile_Environment_registry_key_n
push str.void___cdecl_laOnClientLocationInfo_struct__VBOXLACONTEXT__char____2__
push str._Rfn:__M
push 0
push 2
push eax
call fcn.012952b0
add esp, 0x18
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01271180
mov esp, ebp
pop ebp
ret
push esi
lea eax, [ebp - 0x81c]
push eax
push 2
push 0
lea eax, [ebp - 0x804]
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
je 0x128ae1a
push 2
call fcn.01294390
add esp, 4
test eax, eax
je 0x128afbf
push esi
lea ecx, [ebp - 0x804]
push ecx
push str.Failed_to_open_key___ls___error__lu_n
push str.void___cdecl_laOnClientLocationInfo_struct__VBOXLACONTEXT__char____2__
push str._Rfn:__M
push 0
push 2
push eax
call fcn.012952b0
add esp, 0x20
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01271180
mov esp, ebp
pop ebp
ret
xor eax, eax
add edi, 4
mov dword [ebp - 0x814], eax
xor esi, esi
mov dword [ebp - 0x810], eax
mov dword [ebp - 0x80c], eax
mov dword [ebp - 0x808], eax
push ebx
lea ebx, [ebx]
mov eax, dword [edi]
test eax, eax
je 0x128af21
push str.D:_tinderbox_add_7.0_srcVBoxAdditionsWINNTVBoxTrayVBoxLA.cpp
lea ecx, [ebp - 0x818]
mov dword [ebp - 0x818], 0
push ecx
lea ebx, [ebp - 0x814]
push 0
add ebx, esi
push ebx
push 0x400
push eax
call fcn.012982b0
add esp, 0x18
mov dword [ebp - 0x820], eax
test eax, eax
js 0x128aef1
mov eax, dword [ebp - 0x818]
lea eax, [eax*2 + 2]
push eax
push dword [ebx]
push 1
push 0
push dword [esi + 0x12ca5e8]
push dword [ebp - 0x81c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test ebx, ebx
je 0x128aee0
push 2
call fcn.01294390
add esp, 4
test eax, eax
je 0x128aee0
push dword [esi + 0x12ca5e8]
push ebx
push str.RegSetValueExW_failed_error__lu_for__s__n
push str.void___cdecl_laOnClientLocationInfo_struct__VBOXLACONTEXT__char____2__
push str._Rfn:__M
push 0
push 2
push eax
call fcn.012952b0
add esp, 0x20
add esi, 4
add edi, 8
cmp esi, 0xc
jbe 0x128ae40
jmp 0x128af21
push 2
call fcn.01294390
add esp, 4
test eax, eax
je 0x128af21
push dword [ebp - 0x820]
push str.RTStrToUniEx_failed__Rrc_n
push str.void___cdecl_laOnClientLocationInfo_struct__VBOXLACONTEXT__char____2__
push str._Rfn:__M
push 0
push 2
push eax
call fcn.012952b0
add esp, 0x1c
push dword [ebp - 0x81c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x820]
push eax
push 0x1388
push 2
push str.Environment
push 0
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutA]
pop ebx
test eax, eax
jne 0x128af87
push 2
call fcn.01294390
mov esi, eax
add esp, 4
test esi, esi
je 0x128af87
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SendMessageTimeout_failed__error__ld_n
push str.void___cdecl_laBroadcastSettingChange_void_
push str._Rfn:__M
push 0
push 2
push esi
call fcn.012952b0
add esp, 0x1c
xor esi, esi
lea esp, [esp]
mov eax, dword [ebp + esi - 0x814]
test eax, eax
je 0x128afbf
push eax
push dword [esi + 0x12ca5e8]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp + esi - 0x814]
call fcn.0128cf90
add esi, 4
add esp, 4
cmp esi, 0xc
jbe 0x128af90
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.01271180
mov esp, ebp
pop ebp
ret