Function at 0x4a3590
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, 0x8000
je 0x4a35ae
cmp eax, 4
jne 0x4a3ae1
mov dword [ebp - 4], 1
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, 4
jne 0x4a35d6
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov ebx, dword [eax + 4]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax + 8]
mov dword [ebp - 0xc], eax
jmp 0x4a35ea
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov ebx, dword [eax]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax + 4]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x10]
mov edx, eax
test edx, edx
je 0x4a3600
cmp dword [eax], 1
jb 0x4a3600
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 4], eax
jbe 0x4a360f
xor eax, eax
jmp 0x4a3ae3
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 4]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x14]
mov edx, eax
test edx, edx
je 0x4a3634
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 4]
cmp dword [eax], edx
ja 0x4a3634
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
add eax, edx
cmp eax, dword [ebp - 0xc]
jbe 0x4a364b
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 4]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax]
cmp edx, 4
jne 0x4a3715
mov eax, dword [eax + 8]
movzx eax, word [eax + 0x1c]
test eax, eax
jle 0x4a3715
xor esi, esi
jmp 0x4a3677
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x20]
add esi, eax
lea ebx, [ebx + 0x20]
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x20]
add eax, esi
cmp eax, dword [ebp - 4]
jb 0x4a366c
sub dword [ebp - 4], esi
mov eax, dword [ebp + 0x1c]
push eax
mov eax, dword [ebp + 0x18]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
call fcn.004a3590
add esp, 0x18
mov edi, eax
jmp 0x4a36dd
mov eax, dword [ebp + 0x1c]
push eax
mov eax, dword [ebp + 0x18]
push eax
lea eax, [ebp - 8]
push eax
push 0
mov eax, dword [ebp + 0xc]
push eax
push ebx
call fcn.004a3590
add esp, 0x18
mov edi, eax
test edi, edi
jne 0x4a36dd
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x20]
sub dword [ebp - 8], eax
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x20]
add esi, eax
lea ebx, [ebx + 0x20]
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x20]
cmp dword [ebp - 8], eax
jbe 0x4a36ec
test edi, edi
je 0x4a36a8
test edi, edi
jne 0x4a370d
mov eax, dword [ebp + 0x1c]
push eax
mov eax, dword [ebp + 0x18]
push eax
lea eax, [ebp - 8]
push eax
push 0
mov eax, dword [ebp + 0xc]
push eax
push ebx
call fcn.004a3590
add esp, 0x18
mov edi, eax
lea eax, [esi + edi]
jmp 0x4a3ae3
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
and eax, 0x1000
je 0x4a37e2
mov esi, 2
mov eax, dword [ebp + 8]
mov eax, dword [eax]
and eax, 4
je 0x4a3739
mov esi, 3
sub dword [ebp - 4], 1
jmp 0x4a37d2
push 0x7be268
call fcn.0046b2e0
pop ecx
mov eax, dword [ebp + 0xc]
push eax
call fcn.0046a8b0
pop ecx
cmp esi, 3
jne 0x4a3773
mov eax, dword [ebp - 4]
shl eax, 5
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov edx, dword [edx]
add eax, edx
push eax
call fcn.0046a8b0
pop ecx
mov eax, dword [ebp - 4]
shl eax, 5
add eax, ebx
push eax
call fcn.0046a8b0
pop ecx
mov eax, dword [ebp - 4]
inc eax
push eax
call fcn.0046ad50
pop ecx
mov eax, esi
movzx eax, ax
push eax
call fcn.00469190
pop ecx
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax + 0x10]
and eax, 0x80
je 0x4a37ca
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x18], 0
je 0x4a37ca
mov eax, dword [ebp - 4]
inc eax
jmp 0x4a3ae3
sub dword [ebp - 8], 1
add dword [ebp - 4], 1
mov eax, dword [ebp - 8]
test eax, eax
jne 0x4a3742
jmp 0x4a3ae1
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
and eax, 0x400
je 0x4a38f9
cmp dword [ebp + 0x1c], 0
je 0x4a3814
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
mov ecx, edx
and ecx, 0x3a
jne 0x4a3861
and edx, 0x400
je 0x4a3814
mov eax, dword [eax + 8]
cmp eax, 1
je 0x4a3861
sub dword [ebp - 4], 1
jmp 0x4a3855
mov eax, dword [ebp - 4]
shl eax, 5
add eax, ebx
mov dword [ebp - 0x10], eax
mov edx, dword [eax]
and edx, 0x400
je 0x4a384d
mov edx, dword [ebp + 0x18]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
call fcn.004a0be0
add esp, 0xc
test eax, eax
jne 0x4a384d
mov eax, dword [ebp - 4]
inc eax
jmp 0x4a3ae3
sub dword [ebp - 8], 1
add dword [ebp - 4], 1
mov eax, dword [ebp - 8]
test eax, eax
jne 0x4a381a
jmp 0x4a3ae1
mov eax, dword [ebp + 0xc]
push eax
call fcn.0049fd50
pop ecx
fst qword [ebp - 0x20]
fstp qword [ebp - 0x18]
sub dword [ebp - 4], 1
jmp 0x4a38e9
mov eax, dword [ebp - 4]
shl eax, 5
lea esi, [ebx + eax]
mov eax, dword [esi]
and eax, 0x400
je 0x4a38aa
mov eax, dword [ebp + 0x18]
push eax
mov eax, dword [ebp + 0xc]
push eax
push esi
call fcn.004a0be0
add esp, 0xc
test eax, eax
jne 0x4a38aa
mov eax, dword [ebp - 4]
inc eax
jmp 0x4a3ae3
mov eax, dword [esi]
mov edx, eax
and edx, 0x3a
jne 0x4a38c2
and eax, 0x400
je 0x4a38e1
mov eax, dword [esi + 8]
cmp eax, 1
jne 0x4a38e1
push esi
call fcn.0049fd50
pop ecx
fstp qword [ebp - 0x28]
fld qword [ebp - 0x18]
fcomp qword [ebp - 0x28]
wait
fnstsw ax
sahf
jne 0x4a38e1
mov eax, dword [ebp - 4]
inc eax
jmp 0x4a3ae3
sub dword [ebp - 8], 1
add dword [ebp - 4], 1
mov eax, dword [ebp - 8]
test eax, eax
jne 0x4a387a
jmp 0x4a3ae1
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
cmp eax, 0x20
jne 0x4a3952
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
mov dword [ebp - 0x10], eax
sub dword [ebp - 4], 1
jmp 0x4a3946
mov eax, dword [ebp - 4]
shl eax, 5
lea esi, [ebx + eax]
mov eax, dword [esi]
cmp eax, 0x20
jne 0x4a393e
mov eax, dword [ebp - 0x10]
cmp dword [esi + 8], eax
jne 0x4a393e
mov eax, dword [ebp + 0xc]
mov edx, dword [esi + 0xc]
cmp dword [eax + 0xc], edx
jne 0x4a393e
mov eax, dword [ebp - 4]
inc eax
jmp 0x4a3ae3
sub dword [ebp - 8], 1
add dword [ebp - 4], 1
mov eax, dword [ebp - 8]
test eax, eax
jne 0x4a3912
jmp 0x4a3ae1
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
mov ecx, edx
and ecx, 0x3a
jne 0x4a3976
and edx, 0x400
je 0x4a39ff
mov eax, dword [eax + 8]
cmp eax, 1
jne 0x4a39ff
mov eax, dword [ebp + 0xc]
push eax
call fcn.0049fd50
pop ecx
fst qword [ebp - 0x20]
fstp qword [ebp - 0x18]
sub dword [ebp - 4], 1
jmp 0x4a39ef
mov eax, dword [ebp - 4]
shl eax, 5
add eax, ebx
mov dword [ebp - 0x10], eax
mov edx, dword [eax]
mov ecx, edx
and ecx, 0x3a
jne 0x4a39b3
and edx, 0x400
je 0x4a39e7
mov eax, dword [eax + 8]
cmp eax, 1
jne 0x4a39e7
mov eax, dword [ebp - 0x10]
push eax
call fcn.0049fd50
pop ecx
fstp qword [ebp - 0x28]
fld qword [ebp - 0x18]
fcomp qword [ebp - 0x28]
wait
fnstsw ax
sahf
jne 0x4a39e7
cmp dword [ebp + 0x1c], 0
jne 0x4a39de
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
and eax, 0x400
jne 0x4a39e7
mov eax, dword [ebp - 4]
inc eax
jmp 0x4a3ae3
sub dword [ebp - 8], 1
add dword [ebp - 4], 1
mov eax, dword [ebp - 8]
test eax, eax
jne 0x4a398f
jmp 0x4a3ae1
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
and eax, 0x80
je 0x4a3a5c
mov eax, dword [ebp + 0xc]
push eax
call fcn.0049fc50
pop ecx
mov dword [ebp - 0x10], eax
sub dword [ebp - 4], 1
jmp 0x4a3a50
mov eax, dword [ebp - 4]
shl eax, 5
add eax, ebx
mov dword [ebp - 0x14], eax
mov edx, dword [eax]
and edx, 0x80
je 0x4a3a48
push eax
call fcn.0049fc50
pop ecx
cmp eax, dword [ebp - 0x10]
jne 0x4a3a48
mov eax, dword [ebp - 4]
inc eax
jmp 0x4a3ae3
sub dword [ebp - 8], 1
add dword [ebp - 4], 1
mov eax, dword [ebp - 8]
test eax, eax
jne 0x4a3a1e
jmp 0x4a3ae1
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
test eax, eax
jne 0x4a3a92
sub dword [ebp - 4], 1
jmp 0x4a3a89
mov eax, dword [ebp - 4]
shl eax, 5
mov eax, dword [ebx + eax]
test eax, eax
jne 0x4a3a81
mov eax, dword [ebp - 4]
inc eax
jmp 0x4a3ae3
sub dword [ebp - 8], 1
add dword [ebp - 4], 1
mov eax, dword [ebp - 8]
test eax, eax
jne 0x4a3a6b
jmp 0x4a3ae1
cmp dword [ebp + 0x18], 0
je 0x4a3ae1
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
cmp eax, 0x8000
jne 0x4a3ae1
sub dword [ebp - 4], 1
jmp 0x4a3ada
mov eax, dword [ebp - 4]
shl eax, 5
add eax, ebx
mov dword [ebp - 0x10], eax
mov edx, dword [eax]
cmp edx, 0x8000
jne 0x4a3ad2
mov eax, dword [eax + 8]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx + 8]
cmp eax, edx
jne 0x4a3ad2
mov eax, dword [ebp - 4]
inc eax
jmp 0x4a3ae3
sub dword [ebp - 8], 1
add dword [ebp - 4], 1
mov eax, dword [ebp - 8]
test eax, eax
jne 0x4a3aaa
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret