Function at 0x477b50
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x10
mov eax, dword [0x4c6060]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
mov esi, ecx
mov ebx, dword [esi + 0xa4]
push edi
push eax
mov dword [esp + 0x20], ebx
call ebp
mov ecx, dword [eax + 0x20]
lea edx, [ebx + 1]
shl edx, 4
and edx, 0xfffffff0
lea edi, [ecx + edx]
cmp edi, dword [eax + 0x2c]
ja 0x477b7e
mov dword [eax + 0x20], edi
mov dword [esp + 0x14], ecx
jmp 0x477b8c
mov edi, dword [eax]
push edx
mov edx, dword [edi + 0x14]
mov ecx, eax
call edx
mov dword [esp + 0x14], eax
mov eax, dword [0x4c6060]
push eax
call ebp
mov ecx, dword [eax + 0x20]
lea edi, [ebx*4 + 0x10]
and edi, 0xfffffff0
lea edx, [ecx + edi]
cmp edx, dword [eax + 0x2c]
ja 0x477bb2
mov dword [eax + 0x20], edx
mov dword [esp + 0x10], ecx
jmp 0x477bc0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x14]
push edi
call eax
mov dword [esp + 0x10], eax
mov ecx, dword [0x4c6060]
push ecx
call ebp
mov ebp, dword [eax + 0x20]
lea ecx, [edi + ebp]
cmp ecx, dword [eax + 0x2c]
ja 0x477bdd
mov dword [eax + 0x20], ecx
mov dword [esp + 0x18], ebp
jmp 0x477bed
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x14]
push edi
call eax
mov ebp, eax
mov dword [esp + 0x18], eax
xor ecx, ecx
cmp dword [esi + 0xa4], ecx
jle 0x477c5a
xor edx, edx
lea esp, [esp]
mov eax, dword [esi + 0xa0]
mov ebx, dword [eax + edx]
mov edi, dword [esp + 0x14]
add eax, edx
mov dword [edi + edx], ebx
mov ebx, dword [eax + 4]
add edi, edx
mov dword [edi + 4], ebx
mov ebx, dword [eax + 8]
mov dword [edi + 8], ebx
mov eax, dword [eax + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0xa0]
movzx eax, word [edx + eax + 8]
mov edi, dword [esi + 0xac]
mov di, word [edi + eax*4]
mov eax, dword [esp + 0x10]
mov word [eax + ecx*4], di
mov word [eax + ecx*4 + 2], cx
add ecx, 1
add edx, 0x10
cmp ecx, dword [esi + 0xa4]
jl 0x477c00
mov ebx, dword [esp + 0x1c]
lea eax, [ebx - 1]
cmp eax, 1
mov byte [esp + 0x1c], 0
jle 0x477c82
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
push ecx
add eax, 0xffffffff
push eax
add edx, 4
push 0
push edx
call fcn.004791d0
add esp, 0x10
xor edi, edi
cmp dword [esi + 0xa4], edi
jle 0x477cd9
mov edx, dword [esp + 0x10]
xor ebx, ebx
add edx, 2
movzx eax, word [edx]
mov dword [ebp + eax*4], edi
movzx eax, word [edx]
mov ecx, dword [esi + 0xa0]
shl eax, 4
add eax, dword [esp + 0x14]
add ecx, ebx
mov ebp, dword [eax]
mov dword [ecx], ebp
mov ebp, dword [eax + 4]
mov dword [ecx + 4], ebp
mov ebp, dword [eax + 8]
mov dword [ecx + 8], ebp
mov eax, dword [eax + 0xc]
mov ebp, dword [esp + 0x18]
add edi, 1
mov dword [ecx + 0xc], eax
add edx, 4
add ebx, 0x10
cmp edi, dword [esi + 0xa4]
jl 0x477c95
mov ecx, 1
cmp dword [esi + 0xa4], ecx
jle 0x477d1f
mov edi, 0x10
jmp 0x477cf0
mov edx, dword [esi + 0xa0]
mov eax, dword [edx + edi + 0xc]
add edx, edi
test al, 1
jne 0x477d04
mov dword [eax], ecx
jmp 0x477d11
mov edx, dword [esi + 0xd8]
and eax, 0xfffffffe
mov word [eax + edx], cx
add ecx, 1
add edi, 0x10
cmp ecx, dword [esi + 0xa4]
jl 0x477cf0
xor edi, edi
cmp dword [esi + 0xd0], edi
mov dword [esp + 0x18], edi
jle 0x477d6e
lea ecx, [ecx]
mov edx, dword [esi + 0xd8]
mov eax, dword [edx + edi + 8]
add edx, edi
sub eax, 1
js 0x477d58
mov ecx, dword [edx + 4]
movzx ebx, word [ecx + eax*2]
mov bx, word [ebp + ebx*4]
lea ecx, [ecx + eax*2]
sub eax, 1
mov word [ecx], bx
jns 0x477d41
mov eax, dword [esp + 0x18]
add eax, 1
add edi, 0x10
cmp eax, dword [esi + 0xd0]
mov dword [esp + 0x18], eax
jl 0x477d30
lea edx, [esi + 0xb0]
mov esi, 3
lea esp, [esp]
mov eax, dword [edx - 4]
xor ecx, ecx
cmp dword [edx], ecx
jle 0x477da5
add eax, 2
lea esp, [esp]
movzx edi, word [eax]
mov di, word [ebp + edi*4]
mov word [eax], di
add ecx, 1
add eax, 4
cmp ecx, dword [edx]
jl 0x477d90
add edx, 0xc
sub esi, 1
jne 0x477d80
mov edx, dword [0x4c6060]
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edx
call esi
cmp ebp, dword [eax + 0x28]
mov dword [eax + 0x20], ebp
jne 0x477dce
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x18]
push ebp
call eax
mov ecx, dword [0x4c6060]
push ecx
call esi
mov ecx, dword [esp + 0x10]
cmp ecx, dword [eax + 0x28]
mov dword [eax + 0x20], ecx
jne 0x477ded
mov edx, dword [eax]
push ecx
mov ecx, eax
mov eax, dword [edx + 0x18]
call eax
mov ecx, dword [0x4c6060]
push ecx
call esi
mov ecx, dword [esp + 0x14]
cmp ecx, dword [eax + 0x28]
pop edi
pop esi
pop ebp
mov dword [eax + 0x20], ecx
pop ebx
jne 0x477e10
mov edx, dword [eax]
push ecx
mov ecx, eax
mov eax, dword [edx + 0x18]
call eax
add esp, 0x10
ret