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

Disassembly:
cmp dword [0x7150b0], 0
je 0x49393f
cmp dword [0x715070], 0
jne 0x49393f
push ebx
push esi
push edi
mov dword [0x715070], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x70c59c]
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 [0x70c59c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, edi
call fcn.00493240
mov esi, dword [0x7150c0]
test esi, esi
je 0x493397
mov eax, dword [esi]
call eax
push esi
mov esi, dword [esi + 4]
call fcn.0062eaa7
add esp, 4
test esi, esi
jne 0x493383
mov esi, dword [0x7150d8]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [0x7150c0], 0
test esi, esi
je 0x4933bd
push esi
call ebx
push esi
call fcn.0062eaa7
add esp, 4
cmp dword [0x7150d0], 0
mov esi, dword [sym.imp.KERNEL32.dll_TlsFree]
mov dword [0x7150d8], 0
je 0x4933e6
push dword [0x71514c]
call esi
push dword [0x715150]
call esi
mov eax, dword [0x70c59c]
push eax
mov dword [0x70c59c], 0xffffffff
call esi
cmp dword [0x7128d0], 0
je 0x49348c
mov eax, dword [0x7128bc]
test eax, eax
je 0x493417
mov eax, dword [eax + 8]
test eax, eax
je 0x493417
call eax
call fcn.0047f4e0
mov esi, dword [0x7128c4]
test esi, esi
je 0x493432
push esi
call ebx
push esi
call fcn.0062eaa7
add esp, 4
mov esi, dword [0x7128c8]
mov dword [0x7128c4], 0
test esi, esi
je 0x493452
push esi
call ebx
push esi
call fcn.0062eaa7
add esp, 4
mov esi, dword [0x7128c0]
mov dword [0x7128c8], 0
test esi, esi
je 0x493472
push esi
call ebx
push esi
call fcn.0062eaa7
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_TlsFree]
mov dword [0x7128c0], 0
mov dword [0x7128d0], 0
mov ecx, dword [0x715114]
test ecx, ecx
je 0x4934b5
call fcn.004b64f0
push dword [0x71510c]
mov dword [0x715114], 0
call esi
push dword [0x715110]
call esi
call fcn.004bd670
call fcn.004bd670
mov esi, dword [0x715128]
test esi, esi
je 0x493562
mov edi, dword [esi]
sub edi, 1
js 0x49353e
test esi, esi
je 0x4934e4
cmp edi, dword [esi]
jge 0x4934e4
mov eax, dword [esi + 4]
mov ebx, dword [eax + edi*4]
jmp 0x4934e6
xor ebx, ebx
test esi, esi
je 0x49351b
mov edx, dword [esi]
cmp edi, edx
jge 0x49351b
lea eax, [edx - 1]
cmp edi, eax
je 0x493516
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.0062ab80
mov edx, dword [esi]
add esp, 0xc
lea eax, [edx - 1]
mov dword [esi], eax
mov ecx, dword [ebx]
call fcn.004ede50
push dword [ebx + 4]
call fcn.0062eaa7
push ebx
call fcn.0062eaa7
mov esi, dword [0x715128]
add esp, 8
sub edi, 1
jns 0x4934d4
test esi, esi
je 0x493562
cmp dword [esi], 0
jne 0x493562
push dword [esi + 4]
call fcn.0062eaa7
push esi
call fcn.0062eaa7
add esp, 8
mov dword [0x715128], 0
mov ebx, dword [0x714da8]
test ebx, ebx
je 0x4935a9
xor esi, esi
cmp dword [ebx], esi
jle 0x49358e
mov eax, dword [ebx + 4]
mov edi, dword [eax + esi*4]
test edi, edi
je 0x493589
mov eax, dword [edi]
call eax
push edi
call fcn.0062eaa7
add esp, 4
inc esi
cmp esi, dword [ebx]
jl 0x493572
push dword [ebx + 4]
call fcn.0062eaa7
push ebx
call fcn.0062eaa7
add esp, 8
mov dword [0x714da8], 0
mov esi, dword [0x715378]
test esi, esi
je 0x4935c3
push esi
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push esi
call fcn.0062eaa7
add esp, 4
mov ebx, dword [0x715208]
mov dword [0x715378], 0
test ebx, ebx
je 0x493618
xor edi, edi
cmp dword [ebx + 0xc], edi
jbe 0x493608
nop
mov eax, dword [ebx]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x493602
nop dword [eax]
mov esi, dword [eax + 4]
push eax
call fcn.0062eaa7
add esp, 4
mov eax, esi
test esi, esi
jne 0x4935f0
inc edi
cmp edi, dword [ebx + 0xc]
jb 0x4935e0
push dword [ebx]
call fcn.0062eaa7
push ebx
call fcn.0062eaa7
add esp, 8
mov esi, dword [0x715204]
mov dword [0x715208], 0
test esi, esi
je 0x49363c
push esi
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push esi
call fcn.0062eaa7
add esp, 4
mov dword [0x715204], 0
mov ebx, 0x712860
nop dword [eax + eax]
mov edi, dword [ebx]
test edi, edi
je 0x493689
xor esi, esi
cmp dword [edi], esi
jle 0x493678
nop dword [eax]
mov eax, dword [edi + 4]
mov eax, dword [eax + esi*4]
test eax, eax
je 0x493673
push eax
call fcn.0062eaa7
add esp, 4
inc esi
cmp esi, dword [edi]
jl 0x493660
push dword [edi + 4]
call fcn.0062eaa7
push edi
call fcn.0062eaa7
add esp, 8
mov dword [ebx], 0
add ebx, 4
cmp ebx, 0x7128a0
jl 0x493650
mov esi, dword [0x71285c]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
test esi, esi
je 0x4936b6
push esi
call ebx
push esi
call fcn.0062eaa7
add esp, 4
cmp dword [0x714db0], 0
mov dword [0x71285c], 0
je 0x4936d9
mov dword [0x714db0], 0
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov esi, dword [0x715374]
test esi, esi
je 0x4936ef
push esi
call ebx
push esi
call fcn.0062eaa7
add esp, 4
mov esi, dword [0x712824]
mov dword [0x715374], 0
test esi, esi
je 0x49370f
push esi
call ebx
push esi
call fcn.0062eaa7
add esp, 4
mov ecx, 2
mov dword [0x712824], 0
call fcn.004c8bd0
mov ecx, 1
call fcn.004c8bd0
or ecx, 0xffffffff
call fcn.004c8bd0
mov edi, dword [0x714fbc]
test edi, edi
je 0x49376e
xor esi, esi
cmp dword [edi], esi
jle 0x49375d
mov eax, dword [edi + 4]
mov eax, dword [eax + esi*4]
test eax, eax
je 0x493758
push eax
call fcn.0062eaa7
add esp, 4
inc esi
cmp esi, dword [edi]
jl 0x493745
push dword [edi + 4]
call fcn.0062eaa7
push edi
call fcn.0062eaa7
add esp, 8
mov edi, dword [0x715104]
mov dword [0x714fbc], 0
test edi, edi
je 0x4937b1
xor esi, esi
cmp dword [edi], esi
jle 0x4937a0
mov eax, dword [edi + 4]
mov eax, dword [eax + esi*4]
test eax, eax
je 0x49379b
push eax
call fcn.0062eaa7
add esp, 4
inc esi
cmp esi, dword [edi]
jl 0x493788
push dword [edi + 4]
call fcn.0062eaa7
push edi
call fcn.0062eaa7
add esp, 8
mov esi, dword [0x715100]
mov dword [0x715104], 0
test esi, esi
je 0x4937d6
push dword [esi + 4]
call fcn.0062eaa7
push esi
call fcn.0062eaa7
add esp, 8
mov edi, dword [0x712828]
mov dword [0x715100], 0
test edi, edi
je 0x49381f
xor esi, esi
cmp dword [edi], esi
jle 0x49380e
mov eax, dword [edi + 4]
mov eax, dword [eax + esi*4]
test eax, eax
je 0x493809
test byte [eax + 4], 1
je 0x493809
push eax
call fcn.0062eaa7
add esp, 4
inc esi
cmp esi, dword [edi]
jl 0x4937f0
push dword [edi + 4]
call fcn.0062eaa7
push edi
call fcn.0062eaa7
add esp, 8
mov eax, dword [0x714db4]
test eax, eax
je 0x4938a2
mov edx, 0x489070
mov dword [eax + 0x20], 0
call fcn.00488e10
mov edx, 0x489090
call fcn.00488e10
mov edx, 0x4890a0
call fcn.00488e10
mov ebx, dword [0x714db4]
test ebx, ebx
je 0x493898
xor edi, edi
cmp dword [ebx + 0xc], edi
jbe 0x493888
mov eax, dword [ebx]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x493882
nop dword [eax + eax]
mov esi, dword [eax + 4]
push eax
call fcn.0062eaa7
add esp, 4
mov eax, esi
test esi, esi
jne 0x493870
inc edi
cmp edi, dword [ebx + 0xc]
jb 0x493862
push dword [ebx]
call fcn.0062eaa7
push ebx
call fcn.0062eaa7
add esp, 8
mov dword [0x714db4], 0
cmp dword [0x7148ec], 0
je 0x4938b7
push dword [0x714cf4]
call dword [sym.imp.KERNEL32.dll_TlsFree]
mov esi, dword [0x714cf0]
test esi, esi
je 0x4938d1
push esi
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push esi
call fcn.0062eaa7
add esp, 4
mov ebx, dword [0x7148e4]
mov dword [0x714cf0], 0
test ebx, ebx
je 0x493928
xor edi, edi
cmp dword [ebx + 0xc], edi
jbe 0x493918
nop dword [eax]
mov eax, dword [ebx]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x493912
nop dword [eax]
mov esi, dword [eax + 4]
push eax
call fcn.0062eaa7
add esp, 4
mov eax, esi
test esi, esi
jne 0x493900
inc edi
cmp edi, dword [ebx + 0xc]
jb 0x4938f0
push dword [ebx]
call fcn.0062eaa7
push ebx
call fcn.0062eaa7
add esp, 8
pop edi
pop esi
mov dword [0x7148e4], 0
mov dword [0x7150b0], 0
pop ebx
ret