Function at 0x77d08a60
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
xor ebx, ebx
push 6
xor eax, eax
cmp dword [0x77d1f260], 0xffffffff
pop ecx
lea edi, [ebp - 0x34]
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
rep stosd dword es:[edi], eax
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
jne 0x77d08b3e
mov esi, 0x77d1a438
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x77d1f260], 0xffffffff
jne 0x77d08aca
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x77d1f260], eax
jne 0x77d08aca
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x77d08c3d
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 4
pop esi
lea eax, [ebp - 0x14]
push eax
push 0x20019
push ebx
push 0x77d08cb0
push 0x80000002
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], ebx
call sym.ADVAPI32.dll_RegOpenKeyExW
test eax, eax
jne 0x77d08b25
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push 0x77d08c84
push dword [ebp - 0x14]
call sym.ADVAPI32.dll_RegQueryValueExW
test eax, eax
jne 0x77d08b1d
cmp dword [ebp - 0x1c], esi
je 0x77d08b1d
mov dword [ebp - 4], ebx
push dword [ebp - 0x14]
call sym.ADVAPI32.dll_RegCloseKey
test dword [ebp - 4], 0x80000000
jne 0x77d08c5c
cmp dword [ebp - 4], ebx
jne 0x77d08b3e
mov dword [ebp - 4], 0x5208
push dword [0x77d1f260]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call edi
cmp esi, 0x62504354
je 0x77d08c5c
cmp eax, ebx
jne 0x77d08c5c
push dword [ebp + 8]
call fcn.77d089ba
test eax, eax
jne 0x77d08c5c
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push dword [ebp + 8]
push 0x77c835e4
push ebx
call dword [sym.imp.RPCRT4.dll_RpcStringBindingComposeW]
mov esi, eax
cmp esi, ebx
jne 0x77d08c61
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.RPCRT4.dll_RpcBindingFromStringBindingW]
mov esi, eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.RPCRT4.dll_RpcStringFreeW]
cmp esi, ebx
jne 0x77d08c61
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x77d08bbe
sub eax, edx
sar eax, 1
lea esi, [eax + eax + 0xc]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x77d08c3b
push 0x77ce1004
push esi
push eax
call fcn.77c8cb85
push dword [ebp + 8]
push esi
push dword [ebp - 0xc]
call fcn.77d08a1a
push 3
pop ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x2c], ecx
xor eax, eax
inc eax
lea ecx, [ebp - 0x38]
push ecx
push eax
push ebx
push 9
push 6
push dword [ebp - 0xc]
mov dword [ebp - 0x34], eax
push dword [ebp - 8]
mov dword [ebp - 0x30], eax
call dword [sym.imp.RPCRT4.dll_RpcBindingSetAuthInfoExW]
mov esi, eax
cmp esi, ebx
jne 0x77d08c61
push 0x62504354
push dword [0x77d1f260]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x77d08c41
call edi
mov esi, eax
jmp 0x77d08c61
push dword [ebp - 4]
push 0xc
push dword [ebp - 8]
call dword [sym.imp.RPCRT4.dll_RpcBindingSetOption]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov dword [ebp - 8], ebx
jmp 0x77d08c61
mov esi, 0x4d3
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 8], ebx
je 0x77d08c79
lea eax, [ebp - 8]
push eax
call dword [sym.imp.RPCRT4.dll_RpcBindingFree]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8