Function at 0x4866a0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e8e58
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x417270]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x3c], ecx
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ecx
mov word [ebp - 0x2c], ax
mov dword [ebp - 0x34], 0x41c478
mov dword [ebp - 4], ecx
cmp edi, ecx
je 0x4868f5
cmp ebx, ecx
je 0x4868f5
movzx eax, byte [ebp + 8]
dec eax
mov byte [ebp - 4], 1
lea esi, [ecx + 1]
cmp eax, 0x52
ja case.0x4867a7.6
movzx edx, byte [eax + 0x48697c]
jmp dword [edx*4 + 0x486964]
push edi
lea ecx, [ebp - 0x34]
call fcn.00466700
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x486737
sub eax, edx
lea edi, [eax + eax + 2]
jmp 0x486787
push edi
lea ecx, [ebp - 0x34]
call fcn.00466f30
mov edi, dword [ebp - 0x1c]
inc edi
jmp 0x486787
xor eax, eax
cmp eax, 0xffff
jge 0x48676c
cmp byte [edi + eax*2], 0
jne 0x4867ae
cmp byte [edi + eax*2 + 1], 0
jne 0x4867ae
inc eax
push eax
push edi
lea ecx, [ebp - 0x34]
call fcn.00467820
mov eax, dword [ebp - 0x1c]
lea edi, [eax + eax]
shr edi, 1
cmp esi, 1
jne 0x486838
mov esi, dword [ebp + 0x14]
push esi
push 0
push ebx
call fcn.004caf20
movzx eax, byte [ebp + 8]
dec eax
add esp, 0xc
cmp eax, 0x53
ja case.0x4867a7.6
movzx ecx, byte [eax + 0x4869e8]
jmp dword [ecx*4 + 0x4869d0]
inc eax
jmp 0x486757
push edi
lea ecx, [ebp - 0x34]
call fcn.004674a0
mov eax, edi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4867c0
sub eax, edx
lea edi, [eax + eax + 2]
jmp 0x486787
push edi
lea ecx, [ebp - 0x34]
call fcn.004674a0
mov eax, edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4867e0
sub eax, edx
lea edi, [eax + eax + 2]
jmp 0x486787
mov ecx, dword [ebp - 0x3c]
push 0x69
xor esi, esi
call fcn.0047e020
jmp 0x4868d8
mov edx, dword [ebp - 0x38]
mov ebx, esi
push 1
shr ebx, 1
push ebx
push edx
lea ecx, [ebp - 0x34]
call fcn.00466780
mov esi, eax
cmp esi, ebx
jb 0x486822
inc esi
cmp edi, esi
jbe 0x486838
mov esi, edi
jmp 0x486838
inc esi
jmp 0x486838
push esi
push ebx
lea ecx, [ebp - 0x34]
call fcn.00466640
mov esi, eax
test esi, esi
jne 0x486874
mov esi, dword [ebp + 0x14]
test esi, esi
jne 0x48688c
mov ecx, dword [ebp - 0x3c]
push 0x69
call fcn.0047e020
jmp 0x4868d8
mov eax, dword [ebp - 0x38]
mov ebx, esi
push 1
shr ebx, 1
push ebx
push eax
lea ecx, [ebp - 0x34]
call fcn.004669b0
mov esi, eax
test esi, esi
jne 0x486815
jmp 0x486835
push 1
push esi
push ebx
lea ecx, [ebp - 0x34]
call fcn.004668a0
mov esi, eax
cmp esi, dword [ebp + 0x14]
jmp 0x486817
push 1
push esi
push ebx
lea ecx, [ebp - 0x34]
call fcn.00466c30
mov esi, eax
cmp esi, dword [ebp + 0x14]
jmp 0x486817
mov eax, dword [ebp + 0x14]
cmp esi, eax
jb 0x4868af
mov esi, dword [ebp - 0x1c]
lea esi, [esi*4 + 4]
cmp esi, eax
ja 0x4868a3
mov esi, eax
mov ecx, dword [ebp - 0x3c]
push 0x70
call fcn.0047e020
jmp 0x4868d8
mov ecx, dword [ebp - 0x3c]
push 0
call fcn.0047e020
jmp 0x4868d8
cmp dword [ebp - 0x18], 8
mov dword [ebp - 0x34], 0x41c478
jb 0x4868f1
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.004cada5
add esp, 4
mov eax, esi
jmp 0x486946
mov edx, dword [0x53e204]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x486925
push 4
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x486925
mov eax, dword [0x53e204]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [esi], 0x69
cmp dword [ebp - 0x18], 8
mov dword [ebp - 0x34], 0x41c478
jb 0x486944
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.004cada5
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004cb3aa
mov esp, ebp
pop ebp
ret 0x10