Function at 0x46bcc4
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x496ea8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ecx
mov edx, dword [0x4b5ff0]
lea eax, [edx + 1]
mov dword [0x4b5ff0], eax
test edx, edx
je 0x46bd10
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x4b5fe0], eax
cmp eax, 0xffffffff
je 0x46bf54
mov dword [ebp - 0x40], 0
push 0x18
call fcn.00485d1c
pop ecx
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x46bd69
mov dword [ebp - 0x24], eax
mov edx, 1
mov dword [ebp - 0x40], edx
mov ecx, eax
mov dword [ebp - 0x38], edx
call fcn.0046bc60
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x40], 0
jmp 0x46bd6b
xor eax, eax
mov dword [0x4b5ff4], eax
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x34], 0
push 0x60
call fcn.00485d1c
mov dword [ebp - 0x24], eax
add esp, 4
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x46be56
mov edx, eax
mov dword [ebp - 0x4c], edx
mov eax, 1
lea ecx, [edx + 4]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], eax
mov dword [edx], 0x4c7e28
call fcn.0046bc60
mov dword [ebp - 4], 2
push dword [0x4b5ff4]
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x1c], 0
mov dword [eax + 0x20], 1
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [0x4b5ff4]
mov edx, dword [0x4b5ff8]
lea eax, [edx + 1]
mov ecx, dword [ebp - 0x24]
mov dword [0x4b5ff8], eax
mov dword [ecx + 0x24], edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x34], 1
xor edx, edx
mov dword [eax + 0x30], edx
push edx
push accept
push edx
push edx
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x50], eax
test eax, eax
je 0x46beea
mov eax, dword [ebp - 0x24]
xor edx, edx
mov dword [eax + 0x58], edx
mov dword [eax + 0x54], edx
mov dword [eax + 0x5c], edx
mov dword [eax + 0x44], edx
mov dword [eax + 0x38], edx
mov dword [eax + 0x3c], edx
mov dword [eax + 0x40], edx
mov dword [eax + 0x28], edx
mov dword [eax + 0x2c], edx
mov dword [ebp - 0x34], edx
jmp 0x46be5b
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 0xffffffff
mov dword [eax + 0x1c], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
push 2
lea esi, [edx + 0x44]
xor ecx, ecx
push ecx
push ecx
push esi
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x46bf38
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [ebp - 0x24]
push edx
push dword [0x4b5fe0]
mov dword [edx + 0x48], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x46bf1f
mov eax, dword [ebp - 0x24]
push 0
push dword [eax + 0x44]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
je 0x46bf06
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x4a0378
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x60]
push eax
call fcn.00485ce2
jmp 0x46be31
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x4a0378
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x50]
push eax
call fcn.00485ce2
jmp 0x46bed0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x4a0378
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x54]
push eax
call fcn.00485ce2
jmp 0x46bebe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x4a0378
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x58]
push eax
call fcn.00485ce2
jmp 0x46bea1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x4a0378
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00485ce2
jmp 0x46bd24