Function at 0x5b5780
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x6edbc0]
sub esp, 0x10
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, eax
test ebp, ebp
je 0x5b5bb1
mov ebx, 0x2000
mov dword [ebp + 0x9196], 9
mov dword [ebp + 0x919a], 0x1ff
mov dword [ebp + 0x919e], ebx
mov dword [ebp + 0x91a2], 0x101
lea eax, [ebp + 0x4cd6]
mov ecx, 0x1f01
mov word [eax], 0xffff
sub eax, 2
dec ecx
jne 0x5b57d1
mov eax, 0xff
lea ecx, [ebp + 0xed4]
mov word [ecx], 0
mov byte [eax + ebp + 0x4cda], al
dec eax
sub ecx, 2
test eax, eax
jge 0x5b57e7
mov ecx, dword [ebp + 0x9196]
mov eax, dword [ebp + 0x8cf2]
cmp ecx, eax
jle 0x5b5814
push ebp
call fcn.005b15f0
add esp, 4
mov ecx, dword [ebp + 0x9196]
mov esi, dword [ebp + 0x8cee]
xor eax, eax
xor edx, edx
mov ax, word [ecx*2 + 0x698864]
mov dx, word [ebp + 0x8cee]
and eax, edx
mov edx, dword [ebp + 0x8cf2]
shr esi, cl
sub edx, ecx
mov cl, byte [ebp + 0x8cf6]
test cl, cl
mov dword [esp + 0x14], eax
mov dword [ebp + 0x8cf2], edx
mov dword [ebp + 0x8cee], esi
jne 0x5b5bb1
mov ecx, dword [ebp + 0x8f54]
mov dword [esp + 0x10], eax
mov edi, 0xf000
mov byte [ecx], al
mov esi, dword [ebp + 0x8f54]
mov edx, dword [ebp + 0x9064]
inc esi
inc edx
mov dword [ebp + 0x8f54], esi
mov eax, edx
mov dword [ebp + 0x9064], edx
cmp eax, edi
jne 0x5b5897
push ebp
call fcn.005b19f0
add esp, 4
cmp dword [ebp], 0
jne 0x5b5bb1
mov al, byte [ebp + 0x8cf6]
test al, al
jne 0x5b5bb1
mov edx, dword [ebp + 0x9196]
mov eax, dword [ebp + 0x8cf2]
cmp edx, eax
jle 0x5b58c8
push ebp
call fcn.005b15f0
add esp, 4
mov ecx, dword [ebp + 0x9196]
mov esi, dword [ebp + 0x8cee]
xor eax, eax
xor edx, edx
mov ax, word [ecx*2 + 0x698864]
mov dx, word [ebp + 0x8cee]
and eax, edx
mov edx, dword [ebp + 0x8cf2]
shr esi, cl
sub edx, ecx
cmp byte [ebp + 0x8cf6], 0
mov dword [ebp + 0x8cf2], edx
mov dword [ebp + 0x8cee], esi
jne 0x5b5bb1
cmp eax, 0x100
jne 0x5b59f8
cmp ecx, edx
jle 0x5b5924
push ebp
call fcn.005b15f0
add esp, 4
mov ecx, dword [ebp + 0x9196]
xor eax, eax
xor edx, edx
mov esi, dword [ebp + 0x8cf2]
mov ax, word [ecx*2 + 0x698864]
mov dx, word [ebp + 0x8cee]
and eax, edx
mov edx, dword [ebp + 0x8cee]
shr edx, cl
sub esi, ecx
dec eax
mov dword [ebp + 0x8cf2], esi
mov dword [ebp + 0x8cee], edx
je 0x5b5968
dec eax
jne 0x5b5990
call fcn.005b5bc0
jmp 0x5b5990
inc ecx
cmp ecx, 0xd
mov dword [ebp + 0x9196], ecx
jne 0x5b5982
mov eax, dword [ebp + 0x919e]
mov dword [ebp + 0x919a], eax
jmp 0x5b5990
mov edx, 1
shl edx, cl
dec edx
mov dword [ebp + 0x919a], edx
mov eax, dword [ebp + 0x9196]
mov ecx, dword [ebp + 0x8cf2]
cmp eax, ecx
jle 0x5b59a9
push ebp
call fcn.005b15f0
add esp, 4
mov ecx, dword [ebp + 0x9196]
mov esi, dword [ebp + 0x8cee]
xor eax, eax
xor edx, edx
mov ax, word [ecx*2 + 0x698864]
mov dx, word [ebp + 0x8cee]
and eax, edx
mov edx, dword [ebp + 0x8cf2]
shr esi, cl
sub edx, ecx
cmp byte [ebp + 0x8cf6], 0
mov dword [ebp + 0x8cf2], edx
mov dword [ebp + 0x8cee], esi
jne 0x5b5bb1
cmp eax, 0x100
je 0x5b5917
cmp word [ebp + eax*2 + 0xcd6], 0xffff
lea ecx, [eax + 0x66b]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
jne 0x5b5a29
dec ebx
js 0x5b5bb1
mov cl, byte [esp + 0x10]
mov eax, dword [esp + 0x14]
mov byte [ebx + ebp + 0x6cdc], cl
jmp 0x5b5a2d
mov cl, byte [esp + 0x10]
cmp eax, 0x101
jl 0x5b5a77
cmp word [ebp + eax*2 + 0xcd6], 0xffff
jne 0x5b5a53
dec ebx
js 0x5b5bb1
mov eax, dword [esp + 0x14]
mov byte [ebx + ebp + 0x6cdc], cl
jmp 0x5b5a70
dec ebx
js 0x5b5bb1
mov dl, byte [eax + ebp + 0x4cda]
mov byte [ebx + ebp + 0x6cdc], dl
movsx eax, word [ebp + eax*2 + 0xcd6]
cmp eax, 0x101
jge 0x5b5a34
xor edx, edx
dec ebx
mov dl, byte [eax + ebp + 0x4cda]
mov dword [esp + 0x10], edx
js 0x5b5bb1
lea esi, [ebx + ebp + 0x6cdc]
xor eax, eax
mov ecx, ebx
mov byte [esi], dl
mov ax, word [ebp + 0x9064]
and ecx, 0xffff
sub eax, ecx
add eax, 0x2000
cmp eax, edi
jge 0x5b5b01
mov edi, dword [ebp + 0x8f54]
mov ecx, 0x2000
sub ecx, ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 0x2000
and ecx, 3
sub eax, ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x8f54]
mov ecx, 0x2000
sub ecx, ebx
mov ebx, 0x2000
add edi, ecx
mov ecx, dword [ebp + 0x9064]
add ecx, eax
mov dword [ebp + 0x8f54], edi
mov dword [ebp + 0x9064], ecx
mov edi, 0xf000
jmp 0x5b5b5e
cmp dword [ebp], 0
jne 0x5b5b5e
cmp ebx, 0x2000
jge 0x5b5b5e
mov ecx, dword [ebp + 0x8f54]
mov dl, byte [ebx + ebp + 0x6cdc]
mov byte [ecx], dl
mov esi, dword [ebp + 0x8f54]
mov ecx, dword [ebp + 0x9064]
inc esi
inc ebx
inc ecx
mov eax, ecx
mov dword [ebp + 0x8f54], esi
cmp eax, edi
mov dword [ebp + 0x9064], ecx
jne 0x5b5b53
push ebp
call fcn.005b19f0
add esp, 4
test eax, eax
je 0x5b5b53
mov dword [ebp], 1
mov eax, dword [ebp]
mov edx, dword [esp + 0x10]
test eax, eax
je 0x5b5b07
mov eax, dword [ebp + 0x91a2]
mov ecx, dword [ebp + 0x919e]
cmp eax, ecx
jge 0x5b5b9e
mov cx, word [esp + 0x14]
lea esi, [ebp + eax*2 + 0xcd6]
mov word [esi], cx
mov byte [eax + ebp + 0x4cda], dl
mov ecx, dword [ebp + 0x919e]
inc eax
add esi, 2
cmp eax, ecx
jge 0x5b5b98
cmp word [esi], 0xffff
jne 0x5b5b8a
mov dword [ebp + 0x91a2], eax
mov eax, dword [ebp]
mov edx, dword [esp + 0x18]
test eax, eax
mov dword [esp + 0x14], edx
je 0x5b58a1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret