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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 8]
sub esp, 0xc
mov dword [eax], 0
push ebx
push esi
mov esi, edx
push edi
test ecx, ecx
je 0x4881a1
test esi, esi
je 0x4881a1
mov ecx, dword [ecx + 0x98]
cmp ecx, 1
jne 0x48800e
movzx edx, byte [esi + 0x1b]
movzx eax, byte [esi + 0x1a]
shl edx, 8
add edx, eax
movzx eax, byte [esi + 0x19]
shl edx, 8
add edx, eax
movzx eax, byte [esi + 0x18]
jmp 0x488028
movzx edx, byte [esi + 0x18]
movzx eax, byte [esi + 0x19]
shl edx, 8
add edx, eax
movzx eax, byte [esi + 0x1a]
shl edx, 8
add edx, eax
movzx eax, byte [esi + 0x1b]
shl edx, 8
add edx, eax
cmp ecx, 1
jne 0x48804e
movzx eax, byte [esi + 0x13]
movzx ecx, byte [esi + 0x12]
shl eax, 8
add eax, ecx
movzx ecx, byte [esi + 0x11]
shl eax, 8
add eax, ecx
movzx ecx, byte [esi + 0x10]
jmp 0x488068
movzx eax, byte [esi + 0x10]
movzx ecx, byte [esi + 0x11]
shl eax, 8
add eax, ecx
movzx ecx, byte [esi + 0x12]
shl eax, 8
add eax, ecx
movzx ecx, byte [esi + 0x13]
shl eax, 8
lea edi, [esi + 0x14]
add eax, ecx
add edi, edx
add eax, esi
mov dword [esp + 0x10], edi
cmp edi, eax
jbe 0x4880a1
call fcn.00476ab0
mov ecx, 0x8000009
call fcn.00476850
push str.ntfs_sds_to_str:_owner_offset_larger_than_a_sds_length
call fcn.004768f0
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [edi], 1
jne 0x488178
movzx eax, byte [edi + 2]
cdq
mov esi, eax
mov ecx, edx
movzx eax, byte [edi + 3]
shld ecx, esi, 8
cdq
shl esi, 8
add esi, eax
movzx eax, byte [edi + 4]
adc ecx, edx
cdq
shld ecx, esi, 8
shl esi, 8
add esi, eax
movzx eax, byte [edi + 5]
adc ecx, edx
cdq
shld ecx, esi, 8
shl esi, 8
add esi, eax
movzx eax, byte [edi + 6]
adc ecx, edx
cdq
shld ecx, esi, 8
shl esi, 8
add esi, eax
movzx eax, byte [edi + 7]
adc ecx, edx
cdq
shld ecx, esi, 8
shl esi, 8
add esi, eax
movzx eax, byte [edi + 1]
adc ecx, edx
mov dword [esp + 0xc], ecx
imul ecx, eax, 0xb
add ecx, 0x12
call fcn.00479b80
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x4881f0
push dword [esp + 0xc]
push esi
push str.S_1__llu
push ebx
call fcn.004bb44f
add esp, 0x10
lea esi, [ebx + eax]
xor ebx, ebx
cmp byte [edi + 1], bl
jbe 0x488166
add edi, 8
push dword [edi]
push 0x52e44c
push esi
call fcn.004bb44f
add esi, eax
lea edi, [edi + 4]
mov eax, dword [esp + 0x1c]
inc ebx
add esp, 0xc
movzx eax, byte [eax + 1]
cmp ebx, eax
jl 0x488144
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x14]
mov dword [ecx], eax
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00476ab0
mov ecx, 0x800000f
call fcn.00476850
movzx eax, byte [edi]
push eax
push str.ntfs_sds_to_str:_Invalid_SID_revision___d_
call fcn.004768f0
add esp, 8
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00476ab0
mov edi, dword [0x56161c]
push edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x4881dd
push 0xc08
call fcn.004bb5d5
push 0xc08
mov esi, eax
push 0
push esi
call fcn.004c13c0
add esp, 0x10
push esi
push edi
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push str.Invalid_argument
mov dword [esi], 0x8000006
call fcn.004768f0
add esp, 4
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret