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

Disassembly:
push 0xffffffffffffffff
push 0x80f01f
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.006e6f80
push bind
mov ecx, edi
mov byte [esp + 0x24], 1
call fcn.006e8810
push 0x8ac5d8
mov ecx, edi
call fcn.006e7300
mov dword [esi + 0x30b0], 0x81fe04
mov dword [esi + 0x30b4], ebp
mov dword [esi + 0x30c0], ebp
mov dword [esi + 0x30bc], ebp
mov dword [esi + 0x30b8], ebp
push 0xa
lea ecx, [esi + 0x30c4]
mov byte [esp + 0x24], 3
call sub.MFC42.DLL_CMapStringToPtr::CMapStringToPtr
mov dword [esi + 0x30e0], 0x8352b0
mov dword [esi + 0x30ec], ebp
mov dword [esi + 0x30f0], ebp
mov dword [esi + 0x30e8], ebp
mov dword [esi + 0x30e4], ebp
mov dword [esi + 0x30f4], ebp
mov dword [esi + 0x30f8], 0xa
lea edi, [esi + 0x3100]
mov byte [esp + 0x20], 5
mov dword [esp + 0x14], edi
lea ecx, [edi + 0x20]
call sub.MFC42.DLL_CString::CString_3
mov eax, ebp
mov dword [edi + 4], ebp
mov dword [edi], ebp
mov dword [edi + 0x1c], ebp
mov dword [edi + 0x2c], ebp
mov dword [edi + 0x18], ebp
or al, 0xf0
mov dword [edi + 0x28], ebp
push 0x8bd670
lea ecx, [edi + 0x20]
mov byte [esp + 0x24], 6
mov dword [edi + 0x28], eax
call sub.MFC42.DLL_CString::operator_3
mov dword [edi + 0x24], ebp
mov dword [esi + 0x3140], 0x83529c
mov dword [esi + 0x3144], ebp
mov dword [esi + 0x3148], 0x11
mov dword [esi + 0x314c], ebp
mov dword [esi + 0x3150], ebp
mov dword [esi + 0x3154], ebp
mov dword [esi + 0x3158], 0xa
lea edi, [esi + 0x315c]
mov byte [esp + 0x20], 8
mov ecx, edi
mov dword [esp + 0x14], edi
call fcn.006d1b70
mov byte [esp + 0x20], 9
lea ecx, [edi + 0xc4]
call sub.MFC42.DLL_CString::CString_3
lea ecx, [edi + 0xc8]
mov byte [esp + 0x20], 0xa
call sub.MFC42.DLL_CString::CString_3
lea ecx, [edi + 0xcc]
mov byte [esp + 0x20], 0xb
call fcn.006d4a30
lea ecx, [edi + 0xe4]
mov byte [esp + 0x20], 0xc
call fcn.0072b31a
lea ecx, [edi + 0xf8]
mov byte [esp + 0x20], 0xd
call fcn.006d4a50
lea ecx, [edi + 0x14c]
mov byte [esp + 0x20], 0xe
call fcn.0072b31a
lea ecx, [edi + 0x160]
mov byte [esp + 0x20], 0xf
call fcn.0072b31a
lea ecx, [edi + 0x174]
mov byte [esp + 0x20], 0x10
call fcn.006d4a70
mov dword [edi], 0x81ddd0
mov dword [edi + 0xc0], ebp
mov dword [edi + 0x14], 1
mov ecx, 0x10
xor eax, eax
add edi, 0x10c
rep stosd dword es:[edi], eax
lea eax, [esi + 0x32ec]
mov byte [esp + 0x20], 0x11
push eax
mov dword [esi], 0x835298
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 + 0x3144]
cmp eax, ebp
je 0x71331a
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi + 0x3144], ebp
push 0x1000
call sub.MFC42.DLL_operatornew
mov edi, eax
mov ecx, 0x400
xor eax, eax
mov dword [esi + 0x3144], edi
rep stosd dword es:[edi], eax
add esp, 4
mov dword [esi + 0x3148], 0x400
mov dword [esi + 0x3304], ebp
mov dword [esi + 0x313c], ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [esp + 0x28]
lea ecx, [esi + 4]
mov dword [esi + 0x30fc], eax
push edx
mov dword [ecx], ebp
lea ecx, [esi + 0x3100]
call fcn.00713420
mov edx, dword [esi + 0x3130]
mov eax, dword [esi + 0x315c]
lea ecx, [esi + 0x315c]
push edx
call dword [eax + 0x28]
cmp dword [0x165c2a8], ebp
jne 0x7133dc
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
lea ecx, [esp + 0x28]
mov dword [0x165c2a8], eax
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [0x165c2a8]
lea ecx, [esp + 0x28]
push eax
push 0x8aa848
push ecx
mov byte [esp + 0x2c], 0x12
call sub.MFC42.DLL_CString::Format_1
mov edx, dword [esp + 0x34]
add esp, 0xc
push edx
push str.QVMInstanceTlsIndex
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea ecx, [esp + 0x28]
mov byte [esp + 0x20], 0x11
call sub.MFC42.DLL_CString::CString
mov eax, dword [0x165c2a8]
push esi
push eax
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