Function at 0x47e1b0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x47e3f6
push str.master
call fcn.00480760
add esp, 4
push 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x1c]
push eax
push dword [0x62dac8]
mov dword [ebp - 0x1c], 1
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [esi + 0x7cb4]
test eax, eax
je 0x47e21d
push 0
push esi
call eax
add esp, 8
mov dword [ebp - 0x14], eax
jmp 0x47e224
mov dword [ebp - 0x14], 0
push ebx
push edi
push 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov edi, dword [esi + 8]
lea ebx, [esi + 0x14]
add esp, 4
mov dword [esi + 0x7c58], eax
cmp dword [ebx], 0
mov dword [esi + 0x7c5c], edx
mov dword [ebp - 4], edi
jne 0x47e2dc
nop
mov eax, dword [esi + 0xc]
xor ecx, ecx
test eax, eax
je 0x47e27d
xor edx, edx
mov ebx, 1
mov eax, dword [esi + 4]
lea edx, [edx + 0x28]
mov eax, dword [edx + eax - 0x28]
mov dword [edi + ecx*8], eax
mov word [edi + ecx*8 + 4], bx
inc ecx
mov eax, dword [esi + 0xc]
cmp ecx, eax
jb 0x47e260
lea ebx, [esi + 0x14]
push ebx
push 0x7d0
push eax
push edi
call fcn.0047f650
add esp, 0x10
test eax, eax
jle 0x47e2d2
xor eax, eax
mov dword [ebp + 8], eax
cmp dword [esi + 0xc], eax
jbe 0x47e2d2
xor ebx, ebx
add edi, 6
cmp dword [esi + 0x14], 0
jne 0x47e2bd
test byte [edi], 1
je 0x47e2bd
mov eax, dword [esi + 4]
add eax, ebx
push esi
push eax
call fcn.0047b4f0
mov eax, dword [ebp + 8]
add esp, 8
inc eax
add edi, 8
add ebx, 0x28
mov dword [ebp + 8], eax
cmp eax, dword [esi + 0xc]
jb 0x47e2a0
mov edi, dword [ebp - 4]
lea ebx, [esi + 0x14]
cmp dword [esi + 0x14], 0
je 0x47e250
xor ebx, ebx
cmp dword [esi + 0xc], ebx
jbe 0x47e310
xor edi, edi
nop word [eax + eax]
mov eax, dword [esi + 4]
push dword [eax + edi]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esi + 4]
lea edi, [edi + 0x28]
inc ebx
mov dword [edi + eax - 0x28], 0xffffffff
cmp ebx, dword [esi + 0xc]
jb 0x47e2f0
push dword [esi + 4]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call edi
push dword [esi + 8]
mov dword [esi + 4], 0
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esi + 0x18]
add esp, 8
mov dword [esi + 8], 0
push eax
call ebx
lea edi, [esi + 0x4c]
push edi
call ebx
cmp dword [edi + 0x18], 0
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
je 0x47e377
nop
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x18]
test eax, eax
je 0x47e36e
mov ecx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
push ecx
mov dword [edi + 0x18], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push edi
call ebx
cmp dword [edi + 0x18], 0
jne 0x47e350
push edi
call ebx
lea eax, [esi + 0x18]
push eax
call ebx
mov eax, dword [esi + 0x34]
xor edi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 8], eax
test eax, eax
je 0x47e3c5
mov eax, dword [esi + 0x38]
mov ebx, dword [eax + edi*4]
test ebx, ebx
je 0x47e3b9
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x47e3b9
test eax, eax
jne 0x47e3b9
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
jmp 0x47e3bf
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, dword [ebp + 8]
jb 0x47e392
mov eax, dword [esi + 0x7cb8]
test eax, eax
je 0x47e3da
push dword [ebp - 0x14]
push 0
push esi
call eax
add esp, 0xc
push dword [ebp - 0x10]
call ebx
push 0
push dword [0x62dac8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
mov dword [esi + 0x14], 2
pop ebx
pop esi
mov esp, ebp
pop ebp
ret