Function at 0x4706d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
mov eax, dword [ebx + 4]
mov eax, dword [eax - 8]
mov dword [ebp - 8], eax
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
mov dword [ebp - 4], eax
mov eax, dword [eax]
and eax, 0x2000
je 0x47070d
mov eax, dword [ebp - 4]
push eax
call fcn.004a0990
pop ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
push eax
call fcn.004874e0
pop ecx
and eax, 0x100000
je 0x47075c
mov eax, dword [ebp + 8]
xor edx, edx
push edx
push eax
call fcn.0046ab70
add esp, 8
push 0
push 2
mov eax, dword [ebp - 8]
push eax
push str.__OPARRAYINDEX
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.004689e0
add esp, 0x18
lea eax, [ebx + 0x10]
push eax
call fcn.004a4430
pop ecx
jmp 0x470a7a
mov eax, dword [ebp - 4]
mov eax, dword [eax]
and eax, 0x8000
je 0x470862
mov eax, dword [ebp + 8]
test eax, eax
je 0x47082b
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
cmp eax, dword [edx + 4]
ja 0x47082b
mov eax, dword [ebp - 8]
and dword [eax], 0xfffff7ff
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp + 8]
shl eax, 5
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
mov edx, dword [edx]
lea eax, [edx + eax - 0x20]
push eax
call fcn.004a44a0
add esp, 8
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
mov eax, dword [eax]
and eax, 0xf405
je 0x4707cc
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
push eax
call fcn.004a45e0
pop ecx
jmp 0x4707d8
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
mov dword [eax], 0
lea eax, [ebx + 4]
mov edx, dword [eax]
lea edx, [edx - 4]
mov dword [eax], edx
mov eax, edx
mov edx, dword [ebx]
cmp eax, edx
jae 0x4707fd
push 0
push 0
push 0
push 0x233b
call fcn.00492ef0
add esp, 0x10
lea eax, [ebx + 4]
mov edx, dword [eax]
lea edx, [edx - 4]
mov dword [eax], edx
mov eax, edx
mov edx, dword [ebx]
cmp eax, edx
jae 0x470a7a
push 0
push 0
push 0
push 0x233b
call fcn.00492ef0
add esp, 0x10
jmp 0x470a7a
mov eax, dword [ebp + 8]
xor edx, edx
push edx
push eax
call fcn.0046ab70
add esp, 8
push 0x2f
call fcn.004ab070
pop ecx
mov edx, dword [ebx + 4]
mov edx, dword [edx - 4]
push edx
push 1
push eax
push 0
push 0x46d
push 2
call fcn.00492870
add esp, 0x18
jmp 0x470a7a
mov eax, dword [ebp - 4]
mov eax, dword [eax]
and eax, 0x400
je 0x470a40
mov eax, dword [ebp - 8]
mov edx, dword [eax]
mov ecx, edx
and ecx, 0x400
jne 0x47089a
and edx, 0x3a
jne 0x47089a
test ecx, ecx
je 0x470a40
mov eax, dword [eax + 8]
cmp eax, 1
jne 0x470a40
mov eax, dword [ebp + 8]
test eax, eax
je 0x4708a5
sub dword [ebp + 8], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
cmp dword [ebp + 8], eax
jae 0x470a04
mov eax, dword [ebp - 8]
mov eax, dword [eax]
and eax, 0x400
je 0x4708ce
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x10]
movsx eax, byte [eax]
mov byte [ebp - 9], al
jmp 0x47090a
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 2
jne 0x4708e3
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0xc]
mov byte [ebp - 9], al
jmp 0x47090a
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 8
jne 0x4708fc
mov eax, dword [ebp - 8]
push dword [eax + 0xc]
mov eax, dword [eax + 8]
pop edx
mov byte [ebp - 9], al
jmp 0x47090a
mov eax, dword [ebp - 8]
fld qword [eax + 8]
call fcn.00532060
mov byte [ebp - 9], al
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
cmp eax, 1
jne 0x470931
push 1
movzx eax, byte [ebp - 9]
mov eax, dword [eax*4 + 0x7bfba8]
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.004a4e80
add esp, 0xc
jmp 0x47094d
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
test edx, edx
je 0x470943
mov eax, dword [eax + 0x14]
cmp dword [eax], 1
jbe 0x47094d
mov eax, dword [ebp - 4]
push eax
call fcn.004a0ae0
pop ecx
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x10]
movzx ecx, byte [ebp - 9]
mov byte [edx + eax], cl
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
mov eax, dword [eax]
and eax, 0xf405
je 0x47097b
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
push eax
call fcn.004a45e0
pop ecx
jmp 0x470987
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
mov dword [eax], 0
lea eax, [ebx + 4]
mov edx, dword [eax]
lea edx, [edx - 4]
mov dword [eax], edx
mov eax, edx
mov edx, dword [ebx]
cmp eax, edx
jae 0x4709ac
push 0
push 0
push 0
push 0x233b
call fcn.00492ef0
add esp, 0x10
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
mov eax, dword [eax]
and eax, 0xf405
je 0x4709ca
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
push eax
call fcn.004a45e0
pop ecx
jmp 0x4709d6
mov eax, dword [ebx + 4]
mov eax, dword [eax - 4]
mov dword [eax], 0
lea eax, [ebx + 4]
mov edx, dword [eax]
lea edx, [edx - 4]
mov dword [eax], edx
mov eax, edx
mov edx, dword [ebx]
cmp eax, edx
jae 0x470a7a
push 0
push 0
push 0
push 0x233b
call fcn.00492ef0
add esp, 0x10
jmp 0x470a7a
mov eax, dword [ebp + 8]
xor edx, edx
push edx
push eax
call fcn.0046ab70
add esp, 8
push 0x2f
call fcn.004ab070
pop ecx
mov edx, dword [ebp - 8]
push edx
mov edx, dword [ebx + 4]
mov edx, dword [edx - 4]
push edx
mov edx, dword [ebp - 4]
push edx
push 3
push eax
push 0
push 0x46d
push 2
call fcn.00492870
add esp, 0x20
jmp 0x470a7a
mov eax, dword [ebp + 8]
xor edx, edx
push edx
push eax
call fcn.0046ab70
add esp, 8
push 0x2f
call fcn.004ab070
pop ecx
mov edx, dword [ebp - 8]
push edx
mov edx, dword [ebx + 4]
mov edx, dword [edx - 4]
push edx
mov edx, dword [ebp - 4]
push edx
push 3
push eax
push 0
push 0x42d
push 1
call fcn.00492870
add esp, 0x20
pop ebx
mov esp, ebp
pop ebp
ret