Function at 0x5b7e94
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [esp + 8], 0x20
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x5b7f4a
mov dword [eax], vtable.detail17sp_counted_impl_pI10ConnectionEE.0
mov dword [eax + 4], 0
mov dword [eax + 8], 0xffffffff
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
test eax, eax
je 0x5b7f74
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx], 0x7f2c20
inc dword [ebx + 4]
mov byte [ebx + 0x18], 0
call fcn.005b7c50
mov dword [esp + 4], ebx
mov eax, dword [0x8e4d70]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsSetValue
sub esp, 8
mov ebx, dword [ebp - 4]
leave
ret
mov dword [esp], 4
call fcn.00767ac4
mov dword [eax], 0x8396f8
mov dword [esp + 8], 0x751730
mov dword [esp + 4], 0x80ec78
mov dword [esp], eax
call fcn.007682d4
mov dword [esp], 8
call fcn.00767ac4
mov dword [eax + 4], 0
mov dword [eax], 0x826598
mov dword [esp + 8], 0x634ab4
mov dword [esp + 4], 0x80be40
mov dword [esp], eax
call fcn.007682d4
lea edx, [ebx + 8]
mov dword [esp], edx
mov dword [ebp - 0xc], eax
call fcn.00647ea4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00767c68
mov dword [esp], ebx
call fcn.0064759c
call fcn.0076827c
mov dword [ebp - 0xc], eax
call fcn.00767e34
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.libgcc_s_dw2_1.dll__Unwind_Resume
nop
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov bl, byte [ebp + 0x14]
mov eax, dword [0x8e4d70]
test eax, eax
jne 0x5b8074
call fcn.005b7e94
mov eax, dword [0x8e4d70]
test eax, eax
jne 0x5b813f
mov dword [ebp - 0x2c], 0
mov dword [esp], 0x14
call fcn.006475e8
mov ebx, eax
mov eax, dword [edi]
mov dword [ebp - 0x20], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x5b8035
lock inc dword [eax + 4]
test ebx, ebx
je 0x5b805e
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax + 0x14]
mov dword [ebx], esi
mov eax, dword [ebp - 0x20]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 8], eax
test eax, eax
je 0x5b8055
lock inc dword [eax + 4]
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], edx
lea eax, [ebp - 0x20]
mov dword [esp], eax
call fcn.0062d770
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x14], ebx
jmp 0x5b80ea
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
push ecx
test eax, eax
je 0x5b80f4
mov eax, dword [eax + 0x14]
test eax, eax
jne 0x5b8093
jmp 0x5b80f4
mov eax, dword [eax + 0x10]
test eax, eax
je 0x5b80f4
cmp esi, dword [eax]
jne 0x5b808c
test bl, bl
je 0x5b80bb
mov edx, dword [eax + 4]
test edx, edx
je 0x5b80bb
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x5b80bb
mov ebx, dword [edx]
mov dword [esp + 4], ecx
mov dword [esp], edx
mov dword [ebp - 0x30], eax
call dword [ebx + 8]
mov eax, dword [ebp - 0x30]
mov ecx, dword [edi]
mov edx, dword [edi + 4]
test edx, edx
je 0x5b80c8
lock inc dword [edx + 4]
mov dword [eax + 4], ecx
mov ebx, dword [eax + 8]
mov dword [eax + 8], edx
test ebx, ebx
je 0x5b80e4
mov esi, 0xffffffff
mov edx, esi
lock xadd dword [ebx + 4], edx
dec edx
je 0x5b811c
mov edx, dword [ebp + 0x10]
mov dword [eax + 0xc], edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov eax, dword [0x8e4d70]
test eax, eax
je 0x5b7ffb
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
push edx
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x5b8014
jmp 0x5b7ffb
mov edx, dword [ebx]
mov dword [esp], ebx
mov dword [ebp - 0x30], eax
call dword [edx + 8]
lock xadd dword [ebx + 8], esi
dec esi
mov eax, dword [ebp - 0x30]
jne 0x5b80e4
mov edx, dword [ebx]
mov dword [esp], ebx
call dword [edx + 0xc]
mov eax, dword [ebp - 0x30]
jmp 0x5b80e4
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
push ebx
mov dword [ebp - 0x2c], eax
jmp 0x5b8014