Function at 0x100fb950
Capabilities:
Get thread local storage value
Set environment variable
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101267f8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x1016e750]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
push dword [0x1016f5d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ebx, eax
mov ecx, ebx
mov dword [ebp - 0x18], 0
or ecx, 1
push ecx
push dword [0x1016f5d0]
call edi
push 0x20019
lea edx, [ebp - 0x18]
mov ecx, str.RegistryMACHINESystemCurrentControlSetControlSession_ManagerEnvironment
call fcn.100e4da0
add esp, 4
mov esi, eax
push ebx
push dword [0x1016f5d0]
call edi
or edi, 0xffffffff
test esi, esi
jne 0x100fbd2f
push dword [ebp + 8]
lea eax, [ebp - 0x14]
push str.ApplyGlobalVirtEnvVars:_in___s_
push eax
call fcn.10044f30
add esp, 0xc
mov byte [ebp - 4], 1
mov ecx, str.DllMain
mov edx, dword [ebp - 0x14]
call fcn.10043b30
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100fba18
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 0x1c], 0
call fcn.10022690
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
je 0x100fbcda
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
push ecx
mov byte [ebp - 4], 2
mov ecx, esp
mov dword [ebp - 0x30], esp
push 0x1012ee38
call fcn.10023fc0
mov byte [ebp - 4], 3
mov ebx, dword [ebp + 8]
add ebx, 0xfffffff0
push ecx
mov dword [ebp - 0x2c], esp
mov ecx, dword [ebx]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [ebx + 0xc], 0
lea edx, [ebx + 0xc]
mov ecx, eax
jl 0x100fba85
cmp ecx, dword [ebx]
jne 0x100fba85
mov eax, 1
lock xadd dword [edx], eax
jmp 0x100fbac7
mov eax, dword [ecx]
push 2
push dword [ebx + 4]
call dword [eax]
mov edx, eax
mov dword [ebp - 0x28], edx
test edx, edx
je 0x100fbce4
mov ecx, dword [ebx + 4]
mov dword [edx + 4], ecx
mov ecx, dword [ebx + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebx + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edx + 0x10]
push eax
call fcn.10103d20
mov ebx, dword [ebp - 0x28]
add esp, 0x10
mov ecx, dword [ebp - 0x2c]
lea eax, [ebx + 0x10]
lea edx, [ebp - 0x1c]
mov dword [ecx], eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.10047a40
add esp, 8
mov byte [ebp - 4], 4
cmp dword [ebp - 0x1c], 0xffffffff
je 0x100fbce9
mov esi, dword [ebp - 0x10]
push 0
push 1
push 1
push ecx
mov ecx, dword [esi - 0x10]
mov dword [ebp - 0x30], esp
mov dword [ebp - 0x2c], esp
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
lea edx, [esi - 4]
mov ecx, eax
jl 0x100fbb25
cmp ecx, dword [esi - 0x10]
jne 0x100fbb25
lea ebx, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x100fbb5e
mov eax, dword [ecx]
push 2
push dword [esi - 0xc]
call dword [eax]
mov ebx, eax
test ebx, ebx
je 0x100fbce4
mov ecx, dword [esi - 0xc]
mov dword [ebx + 4], ecx
mov ecx, dword [esi - 0xc]
lea eax, [ecx*2 + 2]
push eax
lea eax, [ecx*2 + 2]
push esi
push eax
lea eax, [ebx + 0x10]
push eax
call fcn.10103d20
add esp, 0x10
mov ecx, dword [ebp - 0x2c]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
push ecx
mov byte [ebp - 4], 5
mov ebx, esp
call fcn.10022690
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x100fbcda
mov esi, dword [eax]
mov ecx, eax
call dword [esi + 0xc]
add eax, 0x10
mov dword [ebx], eax
mov ecx, ebx
call fcn.10024960
mov byte [ebp - 4], 5
lea edx, [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.10045b00
add esp, 0x14
test eax, eax
jne 0x100fbc3b
push dword [ebp - 0x10]
lea eax, [ebp - 0x20]
push str.ApplyGlobalVirtEnvVars:___s__empty_
push eax
call fcn.10044f30
add esp, 0xc
mov byte [ebp - 4], 7
mov ecx, str.DllMain
mov edx, dword [ebp - 0x20]
call fcn.10043b30
mov byte [ebp - 4], 4
mov ecx, edi
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100fbbf7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov ecx, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100fbc17
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100fbccb
mov ecx, dword [edx]
push edx
jmp 0x100fbcc6
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x24]
push esi
push dword [ebp - 0x10]
push str.ApplyGlobalVirtEnvVars:___s___s_
push eax
call fcn.10044f30
add esp, 0x10
mov byte [ebp - 4], 8
mov ecx, str.DllMain
mov edx, dword [ebp - 0x24]
call fcn.10043b30
mov byte [ebp - 4], 4
mov ecx, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100fbc84
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov byte [ebp - 4], 2
mov ecx, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100fbcae
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, edi
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100fbccb
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.10022690
mov edx, eax
test edx, edx
jne 0x100fba35
push 0x80004005
call fcn.100223c0
call fcn.10024740
mov byte [ebp - 4], 2
mov ecx, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100fbd09
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, edi
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100fbd26
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x100fbd50
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret