Function at 0x40b640
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4eeced
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x535a40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 2
call fcn.004c8d7a
mov edi, eax
xor eax, eax
mov word [edi], ax
mov dword [ebp - 4], eax
mov ecx, 0x4f9d20
mov eax, dword [ebp + 0x14]
test eax, eax
cmovne ecx, eax
push ecx
mov dword [ebp - 0x18], ecx
call fcn.004c8d00
mov ebx, eax
push 0
mov dword [ebp - 0x14], ebx
call fcn.004c8d5f
push str.SoftwareClassesCLSID_
call fcn.004c8d00
push 0
mov esi, eax
call fcn.004c8d5f
test esi, esi
mov ecx, 0x4f9d20
cmovne ecx, esi
push ecx
call fcn.004c8d00
push 0
mov dword [ebp - 0x10], eax
call fcn.004c8d5f
add esp, 0x1c
lea ecx, [ebp - 0x10]
push ebx
call fcn.004050e0
push esi
call fcn.004c8d5f
push str.Instance
call fcn.004c8d00
push 0
mov esi, eax
call fcn.004c8d5f
mov ecx, dword [ebp - 0x10]
mov eax, 0x4f9d20
test ecx, ecx
cmovne eax, ecx
push eax
call fcn.004c8d00
push 0
mov dword [ebp + 0x14], eax
call fcn.004c8d5f
add esp, 0x14
lea ecx, [ebp + 0x14]
push esi
call fcn.004050e0
push esi
call fcn.004c8d5f
mov ebx, dword [ebp + 0x14]
mov eax, 0x4f9d20
test ebx, ebx
cmovne eax, ebx
push eax
call fcn.004c8d00
mov esi, eax
push edi
mov dword [ebp + 0x14], esi
call fcn.004c8d5f
push ebx
call fcn.004c8d5f
push dword [ebp - 0x10]
call fcn.004c8d5f
push dword [ebp - 0x14]
call fcn.004c8d5f
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040aa40
add esp, 0x24
cmp dword [ebp + 8], 0
je 0x40b885
mov eax, dword [0x539fdc]
test eax, eax
je 0x40b78a
push 1
call eax
push 0x200
push dword [0x539fd0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [ebp - 0x18]
call fcn.004c8d00
mov ebx, eax
push 0
mov dword [ebp - 0x18], ebx
call fcn.004c8d5f
push str.SoftwareWow6432NodeClassesCLSID_
call fcn.004c8d00
push 0
mov esi, eax
call fcn.004c8d5f
mov edi, 0x4f9d20
test esi, esi
mov ecx, edi
cmovne ecx, esi
push ecx
call fcn.004c8d00
push 0
mov dword [ebp + 8], eax
call fcn.004c8d5f
add esp, 0x18
lea ecx, [ebp + 8]
push ebx
call fcn.004050e0
push esi
call fcn.004c8d5f
push str.Instance
call fcn.004c8d00
push 0
mov esi, eax
call fcn.004c8d5f
mov ecx, dword [ebp + 8]
mov eax, edi
test ecx, ecx
cmovne eax, ecx
push eax
call fcn.004c8d00
push 0
mov dword [ebp - 0x10], eax
call fcn.004c8d5f
add esp, 0x14
lea ecx, [ebp - 0x10]
push esi
call fcn.004050e0
push esi
call fcn.004c8d5f
mov ebx, dword [ebp - 0x10]
mov eax, 0x4f9d20
mov edi, dword [ebp + 0x14]
test ebx, ebx
cmovne eax, ebx
push eax
call fcn.004c8d00
mov esi, eax
push edi
mov dword [ebp + 0x14], esi
call fcn.004c8d5f
push ebx
call fcn.004c8d5f
push dword [ebp + 8]
call fcn.004c8d5f
push dword [ebp - 0x18]
call fcn.004c8d5f
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040aa40
mov eax, dword [0x539fdc]
add esp, 0x24
test eax, eax
je 0x40b885
push 0
call eax
push 0x100
push dword [0x539fd0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call fcn.004c8d5f
add esp, 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