Function at 0x77d150fc
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 [0x77d2b2a8], 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 0x77d151da
mov esi, 0x77d26438
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x77d2b2a8], 0xffffffff
jne 0x77d15166
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x77d2b2a8], eax
jne 0x77d15166
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x77d152d9
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 4
pop esi
lea eax, [ebp - 0x14]
push eax
push 0x20019
push ebx
push 0x77d15350
push 0x80000002
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], ebx
call sym.ADVAPI32.dll_RegOpenKeyExW
test eax, eax
jne 0x77d151c1
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push 0x77d15320
push dword [ebp - 0x14]
call sym.ADVAPI32.dll_RegQueryValueExW
test eax, eax
jne 0x77d151b9
cmp dword [ebp - 0x1c], esi
je 0x77d151b9
mov dword [ebp - 4], ebx
push dword [ebp - 0x14]
call sym.ADVAPI32.dll_RegCloseKey
test dword [ebp - 4], 0x80000000
jne 0x77d152f8
cmp dword [ebp - 4], ebx
jne 0x77d151da
mov dword [ebp - 4], 0x5208
push dword [0x77d2b2a8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call edi
cmp esi, 0x62504354
je 0x77d152f8
cmp eax, ebx
jne 0x77d152f8
push dword [ebp + 8]
call fcn.77d15056
test eax, eax
jne 0x77d152f8
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push dword [ebp + 8]
push 0x77c9ac48
push ebx
call dword [sym.imp.RPCRT4.dll_RpcStringBindingComposeW]
mov esi, eax
cmp esi, ebx
jne 0x77d152fd
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 0x77d152fd
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x77d1525a
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 0x77d152d7
push 0x77cef804
push esi
push eax
call fcn.77c99960
push dword [ebp + 8]
push esi
push dword [ebp - 0xc]
call fcn.77d150b6
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 0x77d152fd
push 0x62504354
push dword [0x77d2b2a8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x77d152dd
call edi
mov esi, eax
jmp 0x77d152fd
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 0x77d152fd
mov esi, 0x4d3
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 8], ebx
je 0x77d15315
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