Function at 0x4500f0
Capabilities:
Allocate thread local storage
Set environment variable
Set thread local storage value

Disassembly:
push 0xffffffffffffffff
push 0x4af3e1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
lea ebx, [esi + 8]
mov ecx, ebx
call sub.MFC42.DLL_CDWordArray::CDWordArray
lea edi, [esi + 0x28]
xor ebp, ebp
mov ecx, edi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x14], edi
call fcn.0043bfc0
push SysReAllocString
mov ecx, edi
mov byte [esp + 0x24], 1
call fcn.0043d6b0
push 0x5210b8
mov ecx, edi
call fcn.0043c330
mov dword [esi + 0x30b0], 0x4b9d54
mov dword [esi + 0x30b4], ebp
mov dword [esi + 0x30c0], ebp
mov dword [esi + 0x30bc], ebp
mov dword [esi + 0x30b8], ebp
mov dword [esi + 0x30c4], 0x4ce7f8
mov dword [esi + 0x30d0], ebp
mov dword [esi + 0x30d4], ebp
mov dword [esi + 0x30cc], ebp
mov dword [esi + 0x30c8], ebp
mov dword [esi + 0x30d8], ebp
mov dword [esi + 0x30dc], 0xa
lea edi, [esi + 0x30e4]
mov byte [esp + 0x20], 4
mov dword [esp + 0x14], edi
lea ecx, [edi + 0x20]
call sub.MFC42.DLL_CString::CString_3
lea eax, [edi + 0x28]
mov dword [edi + 4], ebp
mov dword [edi], ebp
mov dword [edi + 0x1c], ebp
mov dword [edi + 0x2c], ebp
mov dword [edi + 0x18], ebp
push 0x52b4f0
lea ecx, [edi + 0x20]
mov byte [esp + 0x24], 5
mov dword [eax], ebp
call fcn.0045e9de
mov dword [edi + 0x24], ebp
mov dword [esi + 0x3124], 0x4ce7e4
mov dword [esi + 0x3128], ebp
mov dword [esi + 0x312c], 0x11
mov dword [esi + 0x3130], ebp
mov dword [esi + 0x3134], ebp
mov dword [esi + 0x3138], ebp
mov dword [esi + 0x313c], 0xa
lea edi, [esi + 0x3140]
mov byte [esp + 0x20], 7
mov ecx, edi
mov dword [esp + 0x14], edi
call fcn.0042e750
lea ecx, [edi + 0xc4]
mov byte [esp + 0x20], 8
call sub.MFC42.DLL_CString::CString_3
lea ecx, [edi + 0xc8]
mov byte [esp + 0x20], 9
call sub.MFC42.DLL_CString::CString_3
mov byte [esp + 0x20], 0xa
lea ecx, [edi + 0xcc]
call fcn.0041a160
lea ecx, [edi + 0xe4]
mov byte [esp + 0x20], 0xb
call sub.MFC42.DLL_CStringArray::CStringArray
lea ecx, [edi + 0xf8]
mov byte [esp + 0x20], 0xc
call fcn.00418780
mov dword [edi + 0xf8], 0x4b8648
lea ecx, [edi + 0x11c]
mov byte [esp + 0x20], 0xd
call sub.MFC42.DLL_CStringArray::CStringArray
lea ecx, [edi + 0x130]
mov byte [esp + 0x20], 0xe
call sub.MFC42.DLL_CStringArray::CStringArray
lea ecx, [edi + 0x144]
mov byte [esp + 0x20], 0xf
call fcn.0041a2c0
mov dword [edi], 0x4b85fc
mov dword [edi + 0xc0], ebp
mov dword [edi + 0x14], 1
add edi, 0x10c
xor ecx, ecx
mov dword [edi], ecx
mov dword [edi + 4], ecx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], ecx
lea edx, [esi + 0x32a0]
mov byte [esp + 0x20], 0x10
push edx
mov dword [esi], 0x4ce7e0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0xffffffffffffffff
push 0x2000
mov ecx, ebx
call sub.MFC42.DLL_CDWordArray::SetSize
mov dword [esi + 0x1c], ebp
mov dword [esi + 0x24], ebp
mov eax, dword [esi + 0x3128]
cmp eax, ebp
je 0x450321
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi + 0x3128], ebp
push 0x1000
call sub.MFC42.DLL_operatornew
mov edi, eax
mov ecx, 0x400
xor eax, eax
mov dword [esi + 0x3128], edi
rep stosd dword es:[edi], eax
add esp, 4
mov dword [esi + 0x312c], 0x400
mov dword [esi + 0x32b8], ebp
mov dword [esi + 0x3120], ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [esp + 0x28]
mov dword [esi + 0x30e0], eax
lea eax, [esi + 4]
push ecx
lea ecx, [esi + 0x30e4]
mov dword [eax], ebp
call fcn.00450430
mov eax, dword [esi + 0x3114]
mov edx, dword [esi + 0x3140]
lea ecx, [esi + 0x3140]
push eax
call dword [edx + 0x28]
cmp dword [0x54288c], ebp
jne 0x4503e4
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
lea ecx, [esp + 0x28]
mov dword [0x54288c], eax
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [0x54288c]
lea edx, [esp + 0x28]
push ecx
push 0x5201cc
push edx
mov byte [esp + 0x2c], 0x11
call sub.MFC42.DLL_CString::Format_1
mov eax, dword [esp + 0x34]
add esp, 0xc
push eax
push str.QVMInstanceTlsIndex
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea ecx, [esp + 0x28]
mov byte [esp + 0x20], 0x10
call sub.MFC42.DLL_CString::CString
mov ecx, dword [0x54288c]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [esp + 0x18]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret 4