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

Disassembly:
push 0xffffffffffffffff
push 0x4bc1df
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.0043bf60
push SysReAllocString
mov ecx, edi
mov byte [esp + 0x24], 1
call fcn.0043d650
push 0x5310d4
mov ecx, edi
call fcn.0043c2d0
mov dword [esi + 0x30b0], 0x4c6dbc
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], 0x4dc118
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 0x53c5d0
lea ecx, [edi + 0x20]
mov byte [esp + 0x24], 6
mov dword [edi + 0x28], eax
call fcn.00460f9e
mov dword [edi + 0x24], ebp
mov dword [esi + 0x3140], 0x4dc104
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.0042e750
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.0041a250
lea ecx, [edi + 0xe4]
mov byte [esp + 0x20], 0xc
call sub.MFC42.DLL_CStringArray::CStringArray
lea ecx, [edi + 0xf8]
mov byte [esp + 0x20], 0xd
call fcn.0041a2d0
lea ecx, [edi + 0x14c]
mov byte [esp + 0x20], 0xe
call sub.MFC42.DLL_CStringArray::CStringArray
lea ecx, [edi + 0x160]
mov byte [esp + 0x20], 0xf
call sub.MFC42.DLL_CStringArray::CStringArray
lea ecx, [edi + 0x174]
mov byte [esp + 0x20], 0x10
call fcn.0041a3c0
mov dword [edi], 0x4c5664
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], 0x4dc100
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 0x451a5a
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.00451b60
mov edx, dword [esi + 0x3130]
mov eax, dword [esi + 0x315c]
lea ecx, [esi + 0x315c]
push edx
call dword [eax + 0x28]
cmp dword [0x554090], ebp
jne 0x451b1c
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
lea ecx, [esp + 0x28]
mov dword [0x554090], eax
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [0x554090]
lea ecx, [esp + 0x28]
push eax
push 0x5301dc
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 [0x554090]
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