Function at 0x4924a0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x6aee00], 0
je 0x49299c
cmp dword [0x6aedc0], 0
jne 0x49299c
push ebx
push esi
push edi
mov dword [0x6aedc0], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x6a82c0]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
push dword [0x6a82c0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, edi
call fcn.004923c0
mov esi, dword [0x6aee10]
test esi, esi
je 0x492517
mov eax, dword [esi]
call eax
push esi
mov esi, dword [esi + 4]
call fcn.005e4cbe
add esp, 4
test esi, esi
jne 0x492503
mov esi, dword [0x6aee28]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [0x6aee10], 0
test esi, esi
je 0x49253d
push esi
call ebx
push esi
call fcn.005e4cbe
add esp, 4
cmp dword [0x6aee20], 0
mov edi, dword [sym.imp.KERNEL32.dll_TlsFree]
mov dword [0x6aee28], 0
je 0x492566
push dword [0x6af0e8]
call edi
push dword [0x6af0ec]
call edi
mov eax, dword [0x6a82c0]
push eax
mov dword [0x6a82c0], 0xffffffff
call edi
cmp dword [0x6ac8d0], 0
je 0x492606
mov eax, dword [0x6ac8bc]
test eax, eax
je 0x492597
mov eax, dword [eax + 8]
test eax, eax
je 0x492597
call eax
call fcn.00487ea0
mov esi, dword [0x6ac8c4]
test esi, esi
je 0x4925b2
push esi
call ebx
push esi
call fcn.005e4cbe
add esp, 4
mov esi, dword [0x6ac8c8]
mov dword [0x6ac8c4], 0
test esi, esi
je 0x4925d2
push esi
call ebx
push esi
call fcn.005e4cbe
add esp, 4
mov esi, dword [0x6ac8c0]
mov dword [0x6ac8c8], 0
test esi, esi
je 0x4925f2
push esi
call ebx
push esi
call fcn.005e4cbe
add esp, 4
mov dword [0x6ac8c0], 0
mov dword [0x6ac8d0], 0
mov ecx, dword [0x6af0c4]
test ecx, ecx
je 0x49262f
call fcn.004b8260
push dword [0x6af0bc]
mov dword [0x6af0c4], 0
call edi
push dword [0x6af0c0]
call edi
call fcn.004c02e0
call fcn.004c02e0
mov esi, dword [0x6af0d8]
test esi, esi
je 0x4926ea
mov edi, dword [esi]
sub edi, 1
js 0x4926c0
nop
test esi, esi
je 0x492660
cmp edi, dword [esi]
jge 0x492660
mov eax, dword [esi + 4]
mov ebx, dword [eax + edi*4]
jmp 0x492662
xor ebx, ebx
test esi, esi
je 0x492697
mov edx, dword [esi]
cmp edi, edx
jge 0x492697
lea eax, [edx - 1]
cmp edi, eax
je 0x492692
mov eax, dword [esi + 4]
sub edx, edi
lea ecx, [eax + edi*4]
lea eax, [edx*4 - 4]
push eax
lea eax, [ecx + 4]
push eax
push ecx
call fcn.005e1be0
mov edx, dword [esi]
add esp, 0xc
lea eax, [edx - 1]
mov dword [esi], eax
mov ecx, dword [ebx]
call fcn.004f1f40
push dword [ebx + 4]
call fcn.005e4cbe
push ebx
call fcn.005e4cbe
mov esi, dword [0x6af0d8]
add esp, 8
sub edi, 1
jns 0x492650
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edi, dword [sym.imp.KERNEL32.dll_TlsFree]
test esi, esi
je 0x4926ea
cmp dword [esi], 0
jne 0x4926ea
push dword [esi + 4]
call fcn.005e4cbe
push esi
call fcn.005e4cbe
add esp, 8
mov dword [0x6af0d8], 0
mov eax, dword [0x6aeda8]
test eax, eax
je 0x49270b
push 0x48f270
push eax
call fcn.00479cb0
add esp, 8
mov dword [0x6aeda8], 0
mov esi, dword [0x6af628]
test esi, esi
je 0x492721
push esi
call ebx
push esi
call fcn.005e4cbe
add esp, 4
mov ecx, dword [0x6af200]
mov dword [0x6af628], 0
call fcn.004bb2a0
mov esi, dword [0x6af1fc]
mov dword [0x6af200], 0
test esi, esi
je 0x492756
push esi
call ebx
push esi
call fcn.005e4cbe
add esp, 4
mov dword [0x6af1fc], 0
mov esi, 0x6ac858
nop word [eax + eax]
push fcn.0045eb00
push dword [esi]
call fcn.00479cb0
mov dword [esi], 0
add esp, 8
add esi, 4
cmp esi, 0x6ac898
jl 0x492770
mov esi, dword [0x6ac89c]
test esi, esi
je 0x4927a6
push esi
call ebx
push esi
call fcn.005e4cbe
add esp, 4
cmp dword [0x6aee40], 0
mov dword [0x6ac89c], 0
je 0x4927c9
mov dword [0x6aee40], 0
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov esi, dword [0x6af624]
test esi, esi
je 0x4927df
push esi
call ebx
push esi
call fcn.005e4cbe
add esp, 4
mov esi, dword [0x6ac81c]
mov dword [0x6af624], 0
test esi, esi
je 0x4927ff
push esi
call ebx
push esi
call fcn.005e4cbe
add esp, 4
mov ecx, dword [0x6af148]
mov dword [0x6ac81c], 0
test ecx, ecx
je 0x492869
mov esi, dword [ecx + 0x20]
xor edx, edx
push 0
push 0
push 0x4e76c0
mov dword [0x6af14c], 2
mov dword [ecx + 0x20], 0
call fcn.004bb5c0
mov ecx, dword [0x6af148]
xor edx, edx
push 0
push 0
push 0x4e76c0
mov dword [0x6af14c], 1
mov dword [ecx + 0x20], 0
call fcn.004bb5c0
mov eax, dword [0x6af148]
add esp, 0x18
mov dword [eax + 0x20], esi
or ecx, 0xffffffff
call fcn.004e77a0
push fcn.0045eb00
push dword [0x6af154]
call fcn.00479cb0
push fcn.0045eb00
push dword [0x6af0b4]
mov dword [0x6af154], 0
call fcn.00479cb0
mov esi, dword [0x6af0b0]
add esp, 0x10
mov dword [0x6af0b4], 0
test esi, esi
je 0x4928c3
push dword [esi + 4]
call fcn.005e4cbe
push esi
call fcn.005e4cbe
add esp, 8
mov eax, dword [0x6ac824]
mov dword [0x6af0b0], 0
test eax, eax
je 0x4928e4
push 0x49b910
push eax
call fcn.00479cb0
add esp, 8
mov ecx, dword [0x6aedac]
test ecx, ecx
je 0x492949
push 0
push 0
push 0x490bf0
xor edx, edx
mov dword [ecx + 0x20], 0
call fcn.004bb5c0
mov ecx, dword [0x6aedac]
xor edx, edx
push 0
push 0
push 0x490c10
call fcn.004bb5c0
mov ecx, dword [0x6aedac]
xor edx, edx
push 0
push 0
push 0x490c20
call fcn.004bb5c0
mov ecx, dword [0x6aedac]
add esp, 0x24
call fcn.004bb2a0
mov dword [0x6aedac], 0
cmp dword [0x6ae8ec], 0
je 0x49295a
push dword [0x6aecf4]
call edi
mov esi, dword [0x6aecf0]
test esi, esi
je 0x492970
push esi
call ebx
push esi
call fcn.005e4cbe
add esp, 4
mov ecx, dword [0x6ae8e4]
mov dword [0x6aecf0], 0
call fcn.004bb2a0
pop edi
pop esi
mov dword [0x6ae8e4], 0
mov dword [0x6aee00], 0
pop ebx
ret