Function at 0x563530
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x684f20]
sub esp, 0x20
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x563556
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0x20
ret
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
xor eax, eax
xor edi, edi
mov ax, word [ecx*2 + 0x62ff84]
xor ebp, ebp
mov dword [esp + 0x2c], eax
xor eax, eax
mov ax, word [edx*2 + 0x62ff84]
mov dword [esp + 0x14], edi
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0xab6]
test eax, eax
mov dword [esp + 0x10], ebp
mov dword [esp + 0x24], 1
mov dword [esp + 0x18], eax
jle 0x563a56
cmp dword [ebx], 0
jne 0x563a56
cmp ebp, 1
jae 0x5635d9
lea esi, [ebx + 0x9088]
push ebx
push esi
call fcn.00560260
mov edx, dword [esp + 0x18]
xor eax, eax
mov ax, word [esi]
mov ecx, ebp
shl eax, cl
add ebp, 8
add esp, 8
or edx, eax
cmp ebp, 1
mov dword [esp + 0x10], edx
jb 0x5635b4
test byte [esp + 0x10], 1
je 0x56368b
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov eax, dword [ebx + 0x44]
shr esi, 1
dec ebp
dec ecx
test eax, eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], ecx
je 0x563618
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x563618
mov eax, dword [ebx + 0x8cea]
test eax, eax
ja 0x563618
mov dword [esp + 0x18], 0
cmp ebp, 8
jae 0x56364a
lea esi, [ebx + 0x9088]
push ebx
push esi
call fcn.00560260
xor ecx, ecx
mov eax, dword [esp + 0x18]
mov cx, word [esi]
add esp, 8
mov edx, ecx
mov ecx, ebp
shl edx, cl
add ebp, 8
or eax, edx
cmp ebp, 8
mov dword [esp + 0x10], eax
jb 0x563623
mov al, byte [esp + 0x10]
mov byte [edi + ebx + 0xcd6], al
inc edi
cmp edi, 0x8000
mov dword [esp + 0x14], edi
jne 0x563678
push ebx
push edi
call fcn.00561630
add esp, 8
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], eax
mov edi, eax
mov ecx, dword [esp + 0x10]
shr ecx, 8
mov dword [esp + 0x10], ecx
sub ebp, 8
jmp 0x563a4a
mov edx, dword [esp + 0x10]
shr edx, 1
dec ebp
mov dword [esp + 0x10], edx
cmp ebp, 6
jae 0x5636c8
lea esi, [ebx + 0x9088]
push ebx
push esi
call fcn.00560260
xor ecx, ecx
mov edi, dword [esp + 0x18]
mov cx, word [esi]
add esp, 8
mov edx, ecx
mov ecx, ebp
shl edx, cl
add ebp, 8
or edi, edx
cmp ebp, 6
mov dword [esp + 0x10], edi
jb 0x5636a1
mov ecx, dword [esp + 0x10]
sub ebp, 6
mov eax, ecx
and eax, 0x3f
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x40]
shr ecx, 6
cmp ebp, eax
mov dword [esp + 0x10], ecx
jae 0x563715
lea esi, [ebx + 0x9088]
push ebx
push esi
call fcn.00560260
mov edx, dword [esp + 0x18]
xor eax, eax
mov ax, word [esi]
mov ecx, ebp
shl eax, cl
add ebp, 8
add esp, 8
or edx, eax
mov eax, dword [esp + 0x40]
cmp ebp, eax
mov dword [esp + 0x10], edx
jb 0x5636ed
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x38]
not eax
and eax, ecx
lea ecx, [eax + eax*2]
xor eax, eax
mov al, byte [edx + ecx*2]
lea edi, [edx + ecx*2]
mov esi, eax
cmp esi, 0x10
jbe 0x5637af
cmp esi, 0x63
je 0x563a71
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov cl, byte [edi + 1]
sub esi, 0x10
shr eax, cl
sub ebp, ecx
cmp ebp, esi
mov dword [esp + 0x10], eax
jae 0x563788
lea eax, [ebx + 0x9088]
push ebx
push eax
call fcn.00560260
xor ecx, ecx
mov eax, dword [esp + 0x18]
mov cx, word [ebx + 0x9088]
add esp, 8
mov edx, ecx
mov ecx, ebp
shl edx, cl
add ebp, 8
or eax, edx
cmp ebp, esi
mov dword [esp + 0x10], eax
jb 0x563758
mov ecx, dword [esp + 0x10]
xor eax, eax
mov ax, word [esi*2 + 0x62ff84]
not ecx
and eax, ecx
xor ecx, ecx
lea edx, [eax + eax*2]
mov eax, dword [edi + 2]
mov cl, byte [eax + edx*2]
lea edi, [eax + edx*2]
mov esi, ecx
cmp esi, 0x10
ja 0x563737
xor edx, edx
xor eax, eax
mov dl, byte [edi + 1]
mov ax, word [edi + 2]
mov edi, dword [esp + 0x14]
mov esi, edx
mov edx, dword [esp + 0x10]
mov ecx, esi
shr edx, cl
mov ecx, dword [esp + 0x1c]
sub edi, eax
mov eax, dword [esp + 0x3c]
sub ebp, esi
sub edi, ecx
cmp ebp, eax
mov dword [esp + 0x10], edx
jae 0x56380e
lea esi, [ebx + 0x9088]
push ebx
push esi
call fcn.00560260
xor ecx, ecx
mov eax, dword [esp + 0x18]
mov cx, word [esi]
add esp, 8
mov edx, ecx
mov ecx, ebp
shl edx, cl
add ebp, 8
or eax, edx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
cmp ebp, eax
jb 0x5637e4
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
not eax
and eax, ecx
mov ecx, dword [esp + 0x34]
lea eax, [eax + eax*2]
lea edx, [ecx + eax*2]
xor eax, eax
mov dword [esp + 0x20], edx
mov al, byte [edx]
mov esi, eax
cmp esi, 0x10
jbe 0x5638c3
cmp esi, 0x63
je 0x563a71
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov cl, byte [edx + 1]
sub esi, 0x10
shr eax, cl
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
mov eax, ecx
sub ebp, eax
cmp ebp, esi
jae 0x563892
lea eax, [ebx + 0x9088]
push ebx
push eax
call fcn.00560260
xor ecx, ecx
mov eax, dword [esp + 0x18]
mov cx, word [ebx + 0x9088]
add esp, 8
mov edx, ecx
mov ecx, ebp
shl edx, cl
add ebp, 8
or eax, edx
cmp ebp, esi
mov dword [esp + 0x10], eax
jb 0x56385e
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
xor eax, eax
mov ax, word [esi*2 + 0x62ff84]
not ecx
and eax, ecx
mov ecx, dword [edx + 2]
xor edx, edx
lea eax, [eax + eax*2]
mov dl, byte [ecx + eax*2]
lea eax, [ecx + eax*2]
mov esi, edx
mov dword [esp + 0x20], eax
cmp esi, 0x10
mov edx, eax
ja 0x563837
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov cl, byte [edx + 1]
mov dword [esp + 0x1c], ecx
sub ebp, ecx
shr eax, cl
xor ecx, ecx
mov cx, word [edx + 2]
test esi, esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], ecx
je 0x563932
cmp ebp, 8
jae 0x56391a
lea esi, [ebx + 0x9088]
push ebx
push esi
call fcn.00560260
mov edx, dword [esp + 0x18]
xor eax, eax
mov ax, word [esi]
mov ecx, ebp
shl eax, cl
add ebp, 8
add esp, 8
or edx, eax
cmp ebp, 8
mov dword [esp + 0x10], edx
jb 0x5638f1
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
mov edx, eax
and edx, 0xff
shr eax, 8
add ecx, edx
mov dword [esp + 0x10], eax
sub ebp, 8
mov edx, dword [esp + 0x18]
mov eax, dword [ebx + 0x44]
sub edx, ecx
test eax, eax
mov dword [esp + 0x18], edx
je 0x56395c
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x56395c
mov eax, dword [ebx + 0x8cea]
test eax, eax
ja 0x56395c
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x14]
and edi, 0x7fff
cmp edi, eax
mov dword [esp + 0x1c], edi
mov esi, edi
ja 0x563972
mov esi, eax
mov edx, 0x8000
sub edx, esi
cmp edx, ecx
jbe 0x56397f
mov edx, ecx
sub ecx, edx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x5639c2
cmp eax, edi
ja 0x5639c2
mov esi, dword [esp + 0x14]
mov ecx, edx
xor eax, eax
lea edi, [esi + ebx + 0xcd6]
mov esi, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
add ecx, edx
add edi, edx
mov dword [esp + 0x14], ecx
mov eax, ecx
jmp 0x563a1b
mov ecx, eax
sub ecx, edi
cmp ecx, edx
jb 0x563a04
mov ecx, edx
lea esi, [ebx + edi + 0xcd6]
lea edi, [ebx + eax + 0xcd6]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
add ecx, edx
add eax, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ecx
mov edi, dword [esp + 0x1c]
mov eax, ecx
jmp 0x563a1b
mov cl, byte [ebx + edi + 0xcd6]
mov byte [ebx + eax + 0xcd6], cl
inc eax
inc edi
dec edx
jne 0x563a04
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x20]
cmp eax, 0x8000
jne 0x563a3e
push ebx
push eax
call fcn.00561630
mov ecx, dword [esp + 0x28]
add esp, 8
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], eax
test ecx, ecx
jne 0x56395c
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
test eax, eax
jg 0x5635a0
push ebx
push edi
call fcn.00561630
mov eax, dword [ebx + 0x44]
add esp, 8
test eax, eax
je 0x563a7e
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret
mov eax, dword [ebx + 0xab2]
pop edi
neg eax
sbb eax, eax
pop esi
pop ebp
and eax, 5
pop ebx
add esp, 0x20
ret