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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebp, dword [0x72b788]
mov eax, dword [esp + 0x40]
test ebp, ebp
jne 0x5e7e14
mov eax, dword [eax + 8]
test eax, eax
je 0x5e7e70
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [eax + 8]
test edi, edi
je 0x5e7ed0
mov esi, dword [0x86c688]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
test esi, esi
je 0x5e7e82
mov edx, dword [esi]
cmp edx, edi
jb 0x5e7f50
lea esi, [esi + edi*4]
mov eax, dword [esi]
test eax, eax
jne 0x5e7e0c
mov eax, dword [esp + 0x40]
call fcn.005e7ce0
mov dword [esi], eax
jmp 0x5e7e0c
mov eax, dword [esp + 0x40]
call fcn.005e7ce0
mov ecx, dword [esp + 0x40]
mov dword [ecx + 8], eax
jmp 0x5e7e0c
lea eax, [edi + 0x21]
lea edx, [edi + 0x20]
mov dword [esp + 4], 4
mov dword [esp], eax
mov dword [esp + 0x18], edx
call fcn.005f6848
test eax, eax
mov esi, eax
mov edx, dword [esp + 0x18]
je 0x5e8055
mov dword [eax], edx
mov eax, dword [0x86c688]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x5e7e57
call ebp
jmp 0x5e7e57
mov edi, dword [0x72b788]
test edi, edi
je 0x5e7ef6
mov esi, dword [0x72b79c]
test esi, esi
je 0x5e7fac
lock add dword [0x86c68c], 1
jne 0x5e7ffc
mov eax, dword [esp + 0x40]
mov edi, dword [eax + 8]
test edi, edi
je 0x5e7fe2
mov eax, dword [0x72b788]
test eax, eax
je 0x5e7e1f
mov eax, 0xffffffff
lock xadd dword [0x86c68c], eax
sub eax, 1
js 0x5e7e1f
mov eax, dword [0x86c690]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
sub esp, 0xc
jmp 0x5e7e1f
lea ecx, [edx + edx]
lea eax, [edi + 0x20]
mov dword [esp], esi
mov dword [esp + 0x1c], edx
cmp edi, ecx
cmova ecx, eax
lea eax, [ecx*4 + 4]
mov dword [esp + 0x18], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_realloc
test eax, eax
mov esi, eax
je 0x5e8055
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [eax], ecx
sub ecx, edx
lea eax, [eax + edx*4 + 4]
shl ecx, 2
mov dword [esp + 4], 0
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memset
jmp 0x5e7eac
lock add dword [0x72b7a0], 1
jne 0x5e802a
call fcn.005e7d80
mov dword [0x72b79c], 1
mov edx, dword [0x72b788]
test edx, edx
jne 0x5e7ee8
mov eax, dword [esp + 0x40]
mov edi, dword [eax + 8]
test edi, edi
jne 0x5e7e1f
mov eax, dword [0x86c684]
lea edi, [eax + 1]
mov eax, dword [esp + 0x40]
mov dword [0x86c684], edi
mov dword [eax + 8], edi
jmp 0x5e7f05
mov eax, dword [0x86c690]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test eax, eax
je 0x5e7ef6
lock sub dword [0x86c68c], 1
jmp 0x5e7ef6
mov ebx, dword [0x72b79c]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
test ebx, ebx
jne 0x5e7fc5
mov dword [esp], 0
call esi
mov ecx, dword [0x72b79c]
sub esp, 4
test ecx, ecx
je 0x5e803a
jmp 0x5e7fc5
call sub.msvcrt.dll_abort
lea esi, [esi]
push ebx
mov eax, dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
cmp dword [eax], edx
jae 0x5e807e
mov dword [eax], edx
mov dword [eax + 0xc], 0
cmp dword [eax + 4], ecx
jae 0x5e8086
mov dword [eax + 4], ecx
test ebx, ebx
je 0x5e808e
cmp dword [eax], edx
je 0x5e8090
pop ebx
ret
mov dword [eax + 0xc], ebx
pop ebx
ret