Function at 0x471190
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x5296dc]
sub esp, 0x24
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
xor esi, esi
cmp ebx, esi
jne 0x4711b8
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0x24
ret
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
xor eax, eax
xor edi, edi
mov ax, word [ecx*2 + 0x51d2b0]
mov ecx, dword [ebx + 0x4558]
mov dword [esp + 0x28], eax
xor eax, eax
mov ax, word [edx*2 + 0x51d2b0]
xor ebp, ebp
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x455c]
cmp eax, esi
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], eax
jl 0x4716dd
jg 0x471216
cmp ecx, esi
jbe 0x4716dd
cmp dword [ebx], esi
jne 0x4716dd
cmp ebp, 1
jae 0x471250
lea esi, [ebx + 0x16828]
push ebx
push esi
call fcn.0046d640
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 0x471229
xor esi, esi
test byte [esp + 0x10], 1
je 0x47130c
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x2c]
shr ecx, 1
or eax, 0xffffffff
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x30]
dec ebp
add edx, eax
adc ecx, eax
mov eax, dword [ebx + 0x54]
cmp eax, esi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], ecx
je 0x471299
cmp dword [ebx + 0x5c], esi
je 0x471299
cmp dword [ebx + 0x14f98], esi
ja 0x471299
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
cmp ebp, 8
jae 0x4712cd
lea esi, [ebx + 0x16828]
push ebx
push esi
call fcn.0046d640
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 0x4712a4
xor esi, esi
mov al, byte [esp + 0x10]
mov byte [edi + ebx + 0x4f7c], al
inc edi
cmp edi, 0x8000
mov dword [esp + 0x14], edi
jne 0x4712f9
push ebx
push edi
call fcn.0046f1c0
add esp, 8
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], esi
mov edi, esi
mov ecx, dword [esp + 0x10]
shr ecx, 8
mov dword [esp + 0x10], ecx
sub ebp, 8
jmp 0x4716c7
mov edx, dword [esp + 0x10]
shr edx, 1
dec ebp
mov dword [esp + 0x10], edx
cmp ebp, 6
jae 0x471349
lea esi, [ebx + 0x16828]
push ebx
push esi
call fcn.0046d640
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 0x471322
mov ecx, dword [esp + 0x10]
sub ebp, 6
mov eax, ecx
and eax, 0x3f
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x44]
shr ecx, 6
cmp ebp, eax
mov dword [esp + 0x10], ecx
jae 0x471396
lea esi, [ebx + 0x16828]
push ebx
push esi
call fcn.0046d640
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 + 0x44]
cmp ebp, eax
mov dword [esp + 0x10], edx
jb 0x47136e
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x24]
not ecx
and ecx, edx
mov edx, dword [esp + 0x3c]
xor eax, eax
mov al, byte [edx + ecx*8]
lea edi, [edx + ecx*8]
mov esi, eax
mov dword [esp + 0x18], edi
cmp esi, 0x10
jbe 0x471434
cmp esi, 0x63
je 0x471711
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 0x47140a
lea edi, [ebx + 0x16828]
push ebx
push edi
call fcn.0046d640
xor ecx, ecx
mov eax, dword [esp + 0x18]
mov cx, word [edi]
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 0x4713e0
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov edx, dword [edi + 4]
xor eax, eax
mov ax, word [esi*2 + 0x51d2b0]
not ecx
and eax, ecx
xor ecx, ecx
mov cl, byte [edx + eax*8]
lea eax, [edx + eax*8]
mov esi, ecx
cmp esi, 0x10
mov dword [esp + 0x18], eax
mov edi, eax
ja 0x4713b9
xor edx, edx
xor eax, eax
mov dl, byte [edi + 1]
mov ax, word [edi + 4]
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 + 0x40]
sub ebp, esi
sub edi, ecx
cmp ebp, eax
mov dword [esp + 0x10], edx
jae 0x471493
lea esi, [ebx + 0x16828]
push ebx
push esi
call fcn.0046d640
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 + 0x40]
cmp ebp, eax
jb 0x471469
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
not eax
and eax, edx
xor edx, edx
mov dl, byte [ecx + eax*8]
lea eax, [ecx + eax*8]
mov esi, edx
cmp esi, 0x10
mov dword [esp + 0x18], eax
jbe 0x471534
cmp esi, 0x63
je 0x471711
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov cl, byte [eax + 1]
sub esi, 0x10
shr edx, cl
sub ebp, ecx
mov dword [esp + 0x1c], ecx
cmp ebp, esi
mov dword [esp + 0x10], edx
jae 0x47150d
lea eax, [ebx + 0x16828]
push ebx
push eax
call fcn.0046d640
mov edx, dword [esp + 0x18]
xor eax, eax
mov ax, word [ebx + 0x16828]
mov ecx, ebp
shl eax, cl
add ebp, 8
add esp, 8
or edx, eax
cmp ebp, esi
mov dword [esp + 0x10], edx
jb 0x4714db
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov eax, dword [eax + 4]
xor ecx, ecx
mov cx, word [esi*2 + 0x51d2b0]
not edx
and ecx, edx
lea eax, [eax + ecx*8]
xor ecx, ecx
mov dword [esp + 0x18], eax
mov cl, byte [eax]
mov esi, ecx
cmp esi, 0x10
ja 0x4714b6
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov cl, byte [eax + 1]
shr edx, cl
mov dword [esp + 0x1c], ecx
sub ebp, ecx
xor ecx, ecx
mov cx, word [eax + 4]
mov dword [esp + 0x10], edx
xor edx, edx
cmp esi, edx
mov dword [esp + 0x18], ecx
je 0x4715a7
cmp ebp, 8
jae 0x47158f
lea esi, [ebx + 0x16828]
push ebx
push esi
call fcn.0046d640
mov eax, dword [esp + 0x18]
xor edx, edx
mov dx, word [esi]
mov ecx, ebp
shl edx, cl
add ebp, 8
add esp, 8
or eax, edx
cmp ebp, 8
mov dword [esp + 0x10], eax
jb 0x471564
mov ecx, dword [esp + 0x18]
xor edx, edx
mov eax, dword [esp + 0x10]
mov esi, eax
and esi, 0xff
shr eax, 8
add ecx, esi
mov dword [esp + 0x10], eax
sub ebp, 8
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
sub eax, ecx
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 0x54]
sbb esi, edx
cmp eax, edx
mov dword [esp + 0x30], esi
je 0x4715d7
cmp dword [ebx + 0x5c], edx
je 0x4715d7
cmp dword [ebx + 0x14f98], edx
ja 0x4715d7
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
mov eax, dword [esp + 0x14]
and edi, 0x7fff
cmp edi, eax
mov dword [esp + 0x1c], edi
mov esi, edi
ja 0x4715ed
mov esi, eax
mov edx, 0x8000
sub edx, esi
cmp edx, ecx
jbe 0x4715fa
mov edx, ecx
sub ecx, edx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x47163d
cmp eax, edi
ja 0x47163d
mov esi, dword [esp + 0x14]
mov ecx, edx
xor eax, eax
lea edi, [esi + ebx + 0x4f7c]
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 0x471696
mov ecx, eax
sub ecx, edi
cmp ecx, edx
jb 0x47167f
mov ecx, edx
lea esi, [ebx + edi + 0x4f7c]
lea edi, [ebx + eax + 0x4f7c]
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 0x471696
mov cl, byte [ebx + edi + 0x4f7c]
mov byte [ebx + eax + 0x4f7c], cl
inc eax
inc edi
dec edx
jne 0x47167f
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x18]
cmp eax, 0x8000
jne 0x4716b9
push ebx
push eax
call fcn.0046f1c0
mov ecx, dword [esp + 0x20]
add esp, 8
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], eax
test ecx, ecx
jne 0x4715d7
mov edi, dword [esp + 0x14]
xor esi, esi
cmp dword [esp + 0x30], esi
jg 0x471216
jl 0x4716dd
cmp dword [esp + 0x2c], esi
ja 0x471216
push ebx
push edi
call fcn.0046f1c0
mov eax, dword [ebx + 0x54]
add esp, 8
cmp eax, esi
jne 0x47171e
mov edx, dword [ebx + 0x4550]
mov eax, dword [ebx + 0x4554]
add ebx, 0x4550
or edx, eax
je 0x47171e
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret