Function at 0x487720
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov eax, dword [ebp + 8]
push eax
call fcn.0048ace0
pop ecx
mov ebx, eax
test bx, bx
je 0x48780e
movzx eax, bx
push eax
push esi
call fcn.00487a60
add esp, 8
mov dword [ebp - 4], eax
test eax, eax
je 0x48780e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xe]
and eax, 0x800
jle 0x48778a
mov dword [ebp - 0xc], 1
jmp 0x487791
mov dword [ebp - 0xc], 0
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp - 0xc]
mov dword [eax], edx
mov eax, dword [ebp + 8]
mov edx, dword [eax]
and edx, 0x8000
je 0x4877b1
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
and eax, 2
jne 0x4877c9
mov eax, dword [ebp + 0x18]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.00486b00
add esp, 0xc
test eax, eax
jne 0x4877db
lea eax, [0x48b840]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0
mov eax, dword [ebp - 4]
mov dword [edi + 0x60], eax
cmp dword [0x7be260], 0
je 0x4877f3
mov eax, dword [ebp - 4]
lea eax, [eax + 0x20]
add dword [eax], 1
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x487806
mov edx, dword [ebp - 4]
movzx edx, word [edx + 0xe]
and edx, 0x10
mov dword [eax], edx
mov eax, dword [ebp - 8]
jmp 0x4879c2
mov dword [edi + 0x60], 0
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x487822
mov dword [eax], 0
mov eax, dword [0x7beb04]
test eax, eax
jne 0x48788b
push 0x699a3c
call fcn.004a1ea0
pop ecx
mov dword [0x7beb04], eax
push 0x699a35
call fcn.004a1ea0
pop ecx
mov dword [0x7beb08], eax
push 0x699a2c
call fcn.004a1ea0
pop ecx
mov dword [0x7beb10], eax
push 0x699a1f
call fcn.004a1ea0
pop ecx
mov dword [0x7beb14], eax
push 0x699a1a
call fcn.004a1ea0
pop ecx
mov dword [0x7beb0c], eax
push 0x699a0c
call fcn.004a1ea0
pop ecx
mov dword [0x7beb18], eax
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0
mov eax, esi
mov edx, dword [0x7beb04]
cmp eax, edx
jne 0x4878ab
lea eax, [0x48b030]
jmp 0x4879c2
mov eax, esi
mov edx, dword [0x7beb08]
cmp eax, edx
jne 0x4878c2
lea eax, [0x48aed0]
jmp 0x4879c2
mov eax, esi
mov edx, dword [0x7beb10]
cmp eax, edx
jne 0x4878d9
lea eax, [0x48b2b0]
jmp 0x4879c2
mov eax, esi
mov edx, dword [0x7beb14]
cmp eax, edx
jne 0x4878f0
lea eax, [0x48b070]
jmp 0x4879c2
mov eax, esi
mov edx, dword [0x7beb18]
cmp eax, edx
jne 0x487907
lea eax, [0x48af10]
jmp 0x4879c2
cmp dword [ebp + 0x10], 0
je 0x4879c0
movzx eax, bx
test eax, eax
je 0x4879c0
movzx edx, word [0x7beb00]
cmp eax, edx
jg 0x4879c0
movzx eax, bx
shl eax, 6
mov edx, dword [0x7beafc]
lea eax, [edx + eax - 0x40]
mov dword [ebp - 0xc], eax
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x4879c0
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x12]
and eax, 0x800
je 0x487960
mov dword [ebp - 0x10], 1
jmp 0x487967
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x10]
mov dword [eax], edx
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x4879b8
push 0x10
call fcn.0049b580
pop ecx
mov dword [ebp - 0x14], eax
push 0x10
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x1c]
push eax
mov eax, dword [ebp - 0x14]
push eax
call fcn.00531d20
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
mov dword [eax], edx
mov eax, dword [ebp - 0x14]
lea eax, [eax + 4]
movsx edx, word [eax]
or edx, 0x2000
mov word [eax], dx
mov eax, dword [ebp - 0x14]
jmp 0x4879c2
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x1c]
jmp 0x4879c2
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret