Function at 0x562fc0
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 0x562fe6
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 0x5634e6
cmp dword [ebx], 0
jne 0x5634e6
cmp ebp, 1
jae 0x563069
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 0x563044
test byte [esp + 0x10], 1
je 0x56311b
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 0x5630a8
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x5630a8
mov eax, dword [ebx + 0x8cea]
test eax, eax
ja 0x5630a8
mov dword [esp + 0x18], 0
cmp ebp, 8
jae 0x5630da
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 0x5630b3
mov al, byte [esp + 0x10]
mov byte [edi + ebx + 0xcd6], al
inc edi
cmp edi, 0x8000
mov dword [esp + 0x14], edi
jne 0x563108
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 0x5634da
mov edx, dword [esp + 0x10]
shr edx, 1
dec ebp
mov dword [esp + 0x10], edx
cmp ebp, 7
jae 0x563158
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, 7
mov dword [esp + 0x10], edi
jb 0x563131
mov ecx, dword [esp + 0x10]
sub ebp, 7
mov eax, ecx
and eax, 0x7f
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x40]
shr ecx, 7
cmp ebp, eax
mov dword [esp + 0x10], ecx
jae 0x5631a5
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 0x56317d
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 0x56323f
cmp esi, 0x63
je 0x563501
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 0x563218
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 0x5631e8
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 0x5631c7
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 0x56329e
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 0x563274
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 0x563353
cmp esi, 0x63
je 0x563501
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 0x563322
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 0x5632ee
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 0x5632c7
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 0x5633c2
cmp ebp, 8
jae 0x5633aa
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 0x563381
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 0x5633ec
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x5633ec
mov eax, dword [ebx + 0x8cea]
test eax, eax
ja 0x5633ec
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 0x563402
mov esi, eax
mov edx, 0x8000
sub edx, esi
cmp edx, ecx
jbe 0x56340f
mov edx, ecx
sub ecx, edx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x563452
cmp eax, edi
ja 0x563452
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 0x5634ab
mov ecx, eax
sub ecx, edi
cmp ecx, edx
jb 0x563494
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 0x5634ab
mov cl, byte [ebx + edi + 0xcd6]
mov byte [ebx + eax + 0xcd6], cl
inc eax
inc edi
dec edx
jne 0x563494
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x20]
cmp eax, 0x8000
jne 0x5634ce
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 0x5633ec
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
test eax, eax
jg 0x563030
push ebx
push edi
call fcn.00561630
mov eax, dword [ebx + 0x44]
add esp, 8
test eax, eax
je 0x56350e
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