Function at 0x4a6580
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
mov eax, dword [ebp + 8]
push eax
call fcn.004a5370
pop ecx
test eax, eax
je 0x4a67a7
mov dword [ebp - 0x2c], 9
mov word [ebp - 0x10], 0x3f
mov dword [ebp - 0x28], 1
movzx eax, byte [ebp + 0xc]
and eax, 0x40
je 0x4a65bf
mov esi, dword [0x7bf1f4]
jmp 0x4a65c5
movzx eax, byte [ebp + 0xc]
mov esi, eax
mov dword [ebp - 0x20], esi
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x10]
push eax
call fcn.004a9b80
pop ecx
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 0x3c]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.004a5280
add esp, 0xc
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x3c]
push eax
call fcn.0049b640
pop ecx
cmp dword [ebp - 0x40], 0
jne 0x4a6780
cmp dword [ebp - 8], 6
jne 0x4a6617
lea ebx, [0x69c1a0]
jmp 0x4a6786
mov eax, dword [ebp - 0x28]
and eax, 8
je 0x4a662a
lea ebx, [0x69c19e]
jmp 0x4a6786
mov eax, dword [ebp - 0x28]
and eax, 4
je 0x4a6650
mov eax, dword [ebp - 0x28]
and eax, 1
je 0x4a6645
lea ebx, [0x69c19b]
jmp 0x4a6786
lea ebx, [0x69c19e]
jmp 0x4a6786
mov eax, dword [ebp - 0x28]
and eax, 1
je 0x4a6778
lea eax, [0x4a54b0]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x54]
push eax
call fcn.00491110
pop ecx
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x38]
push eax
call fcn.004a54e0
pop ecx
mov eax, dword [ebp - 0x58]
push eax
call fcn.00491110
pop ecx
mov eax, dword [ebp - 0x28]
and eax, 1
je 0x4a6744
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax + 4]
mov eax, dword [eax - 4]
push eax
call fcn.004a0890
pop ecx
mov ebx, eax
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax + 4]
mov eax, dword [eax - 4]
mov eax, dword [eax]
and eax, 0xf405
je 0x4a66e9
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax + 4]
mov eax, dword [eax - 4]
push eax
call fcn.004a45e0
pop ecx
jmp 0x4a6701
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax + 4]
mov eax, dword [eax - 4]
mov dword [eax], 0
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea eax, [eax + 4]
mov edx, dword [eax]
lea edx, [edx - 4]
mov dword [ebp - 0x5c], edx
mov dword [eax], edx
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, dword [ebp - 0x5c]
mov eax, dword [eax]
cmp edx, eax
jae 0x4a6786
push 0
push 0
push 0
push 0x233b
call fcn.00492ef0
add esp, 0x10
jmp 0x4a6786
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4a6770
mov eax, dword [ebp - 0x24]
push eax
call fcn.00491970
pop ecx
movzx eax, ax
mov dword [ebp - 0x5c], eax
cmp eax, 0xe
jne 0x4a6768
lea ebx, [0x69c19e]
jmp 0x4a6786
lea ebx, [0x69c198]
jmp 0x4a6786
lea ebx, [0x69c198]
jmp 0x4a6786
lea ebx, [0x69c198]
jmp 0x4a6786
lea ebx, [0x69c198]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4a679b
push eax
call fcn.0049f7d0
pop ecx
mov dword [ebp - 0x24], 0
lea eax, [ebp - 0x38]
push eax
call fcn.004a5330
pop ecx
jmp 0x4a67ad
lea ebx, [0x69c19e]
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret