Function at 0x472090
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x5296dc]
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 0x472513
mov ebx, 0x2000
mov dword [ebp + 0x16938], 9
mov dword [ebp + 0x1693c], 0x1ff
mov dword [ebp + 0x16940], ebx
mov dword [ebp + 0x16944], 0x101
lea eax, [ebp + 0x8f7c]
mov ecx, 0x1f01
mov word [eax], 0xffff
sub eax, 2
dec ecx
jne 0x4720e1
mov eax, 0xff
lea ecx, [ebp + 0x517a]
mov word [ecx], 0
mov byte [eax + ebp + 0x8f80], al
dec eax
sub ecx, 2
test eax, eax
jge 0x4720f7
mov ecx, dword [ebp + 0x16938]
mov eax, dword [ebp + 0x14fa0]
cmp ecx, eax
jle 0x472124
push ebp
call fcn.0046d5d0
add esp, 4
mov ecx, dword [ebp + 0x16938]
mov esi, dword [ebp + 0x14f9c]
xor eax, eax
xor edx, edx
mov ax, word [ecx*2 + 0x51d2b0]
mov dx, word [ebp + 0x14f9c]
and eax, edx
mov edx, dword [ebp + 0x14fa0]
shr esi, cl
sub edx, ecx
mov cl, byte [ebp + 0x14fa4]
test cl, cl
mov dword [esp + 0x14], eax
mov dword [ebp + 0x14fa0], edx
mov dword [ebp + 0x14f9c], esi
jne 0x472513
mov ecx, dword [ebp + 0x15ff8]
mov dword [esp + 0x10], eax
mov byte [ecx], al
mov esi, dword [ebp + 0x15ff8]
mov edx, dword [ebp + 0x16804]
mov ecx, dword [ebp + 0xa4]
inc esi
inc edx
mov eax, edx
mov dword [ebp + 0x15ff8], esi
cmp eax, ecx
mov dword [ebp + 0x16804], edx
jne 0x4721a8
push ebp
call fcn.0046db10
add esp, 4
cmp dword [ebp], 0
jne 0x472513
mov al, byte [ebp + 0x14fa4]
test al, al
jne 0x472513
mov edx, dword [ebp + 0x16938]
mov eax, dword [ebp + 0x14fa0]
cmp edx, eax
jle 0x4721d9
push ebp
call fcn.0046d5d0
add esp, 4
mov ecx, dword [ebp + 0x16938]
xor eax, eax
xor edx, edx
mov edi, dword [ebp + 0x14fa0]
mov ax, word [ecx*2 + 0x51d2b0]
mov dx, word [ebp + 0x14f9c]
and eax, edx
mov edx, dword [ebp + 0x14f9c]
shr edx, cl
sub edi, ecx
cmp byte [ebp + 0x14fa4], 0
mov dword [ebp + 0x14fa0], edi
mov dword [ebp + 0x14f9c], edx
mov edx, edi
jne 0x472513
cmp eax, 0x100
jne 0x472311
cmp ecx, edx
jle 0x472237
push ebp
call fcn.0046d5d0
add esp, 4
mov ecx, dword [ebp + 0x16938]
mov edi, dword [ebp + 0x14f9c]
mov esi, dword [ebp + 0x14fa0]
xor eax, eax
mov ax, word [ecx*2 + 0x51d2b0]
xor edx, edx
mov dx, word [ebp + 0x14f9c]
sub esi, ecx
shr edi, cl
and eax, edx
mov dword [ebp + 0x14fa0], esi
dec eax
mov dword [ebp + 0x14f9c], edi
je 0x47227f
dec eax
jne 0x4722a7
push ebp
call fcn.00472520
add esp, 4
jmp 0x4722a7
inc ecx
cmp ecx, 0xd
mov dword [ebp + 0x16938], ecx
jne 0x472299
mov eax, dword [ebp + 0x16940]
mov dword [ebp + 0x1693c], eax
jmp 0x4722a7
mov edx, 1
shl edx, cl
dec edx
mov dword [ebp + 0x1693c], edx
mov eax, dword [ebp + 0x16938]
mov ecx, dword [ebp + 0x14fa0]
cmp eax, ecx
jle 0x4722c0
push ebp
call fcn.0046d5d0
add esp, 4
mov ecx, dword [ebp + 0x16938]
xor eax, eax
xor edx, edx
mov edi, dword [ebp + 0x14fa0]
mov ax, word [ecx*2 + 0x51d2b0]
mov dx, word [ebp + 0x14f9c]
and eax, edx
mov edx, dword [ebp + 0x14f9c]
shr edx, cl
sub edi, ecx
cmp byte [ebp + 0x14fa4], 0
mov dword [ebp + 0x14fa0], edi
mov dword [ebp + 0x14f9c], edx
mov edx, edi
jne 0x472513
cmp eax, 0x100
je 0x47222a
lea ecx, [eax + 0x27be]
or esi, 0xffffffff
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
cmp word [ebp + ecx*2], si
jne 0x472341
dec ebx
js 0x472513
mov cl, byte [esp + 0x10]
mov eax, dword [esp + 0x14]
mov byte [ebx + ebp + 0xaf82], cl
jmp 0x472345
mov cl, byte [esp + 0x10]
cmp eax, 0x101
jl 0x47238e
cmp word [ebp + eax*2 + 0x4f7c], si
jne 0x47236a
dec ebx
js 0x472513
mov eax, dword [esp + 0x14]
mov byte [ebx + ebp + 0xaf82], cl
jmp 0x472387
dec ebx
js 0x472513
mov dl, byte [eax + ebp + 0x8f80]
mov byte [ebx + ebp + 0xaf82], dl
movsx eax, word [ebp + eax*2 + 0x4f7c]
cmp eax, 0x101
jge 0x47234c
xor ecx, ecx
dec ebx
mov cl, byte [eax + ebp + 0x8f80]
mov dword [esp + 0x10], ecx
js 0x472513
lea esi, [ebx + ebp + 0xaf82]
xor eax, eax
xor edx, edx
mov byte [esi], cl
mov ax, word [ebp + 0x16804]
mov dx, word [ebp + 0xa4]
mov ecx, ebx
and ecx, 0xffff
sub eax, ecx
add eax, 0x2000
cmp eax, edx
jge 0x47241f
mov edi, dword [ebp + 0x15ff8]
mov ecx, 0x2000
sub ecx, ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp + 0x15ff8]
mov ecx, 0x2000
mov eax, dword [ebp + 0x16804]
sub ecx, ebx
add edx, ecx
mov dword [ebp + 0x15ff8], edx
mov edx, 0x2000
sub edx, ebx
mov ebx, 0x2000
add eax, edx
mov dword [ebp + 0x16804], eax
jmp 0x4724bc
cmp dword [ebp], 0
jne 0x4724bc
mov al, byte [ebp + 0x14fa4]
test al, al
jne 0x4724bc
cmp ebx, 0x2000
jge 0x4724bc
mov eax, dword [ebp + 0x15ff8]
mov cl, byte [ebx + ebp + 0xaf82]
inc ebx
mov byte [eax], cl
mov esi, dword [ebp + 0x15ff8]
mov edx, dword [ebp + 0x16804]
mov ecx, dword [ebp + 0xa4]
inc esi
inc edx
mov eax, edx
mov dword [ebp + 0x15ff8], esi
cmp eax, ecx
mov dword [ebp + 0x16804], edx
jne 0x4724b2
push ebp
call fcn.0046db10
add esp, 4
test eax, eax
je 0x472489
mov dword [ebp], 1
mov edx, dword [ebp + 0x3d44]
mov eax, dword [ebp + 0x455c]
cmp edx, eax
jl 0x4724b2
jg 0x4724ab
mov eax, dword [ebp + 0x3d40]
mov ecx, dword [ebp + 0x4558]
cmp eax, ecx
jb 0x4724b2
mov byte [ebp + 0x14fa4], 1
cmp dword [ebp], 0
je 0x472429
mov eax, dword [ebp + 0x16944]
mov ecx, dword [ebp + 0x16940]
cmp eax, ecx
jge 0x472500
mov dx, word [esp + 0x14]
lea ecx, [ebp + eax*2 + 0x4f7c]
mov word [ecx], dx
mov dl, byte [esp + 0x10]
mov byte [eax + ebp + 0x8f80], dl
mov edx, dword [ebp + 0x16940]
inc eax
add ecx, 2
cmp eax, edx
jge 0x4724fa
cmp word [ecx], 0xffff
jne 0x4724ec
mov dword [ebp + 0x16944], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], eax
mov eax, dword [ebp]
test eax, eax
je 0x4721b2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret