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

Disassembly:
push ebp
lea ebp, [esp - 0x1164]
mov eax, 0x1164
call fcn.005277b0
push 0xffffffffffffffff
push 0x54615e
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x463df0]
xor eax, ebp
mov dword [ebp + 0x1160], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x1178]
mov edi, dword [ebp + 0x116c]
mov ebx, dword [ebp + 0x1174]
push 0x10
mov esi, ecx
mov ecx, dword [ebp + 0x1180]
lea edx, [ebp - 0x4c]
push edx
mov dword [ebp - 0x14], eax
xor eax, eax
push 0x20
mov dword [ebp - 0x24], ecx
push edi
mov ecx, esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
call fcn.004d3ec0
cmp eax, 0x10
jne 0x4d97d9
cmp word [ebp - 0x4c], 0
je 0x4d97d9
push 0x90
lea eax, [ebp + 0x1088]
push 0
push eax
mov dword [ebp - 4], 0
call fcn.00526600
add esp, 0xc
push 0x90
lea ecx, [ebp + 0x1088]
push ecx
push 1
push edi
mov ecx, esi
call fcn.004d3ec0
cmp eax, 0x90
jne 0x4d97c1
xor eax, eax
mov dword [ebp - 0x3c], 0x465920
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x2c], 1
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], 1
cmp ebx, eax
je 0x4d9699
push 0x2b000
push eax
lea ecx, [ebp - 0x3c]
call fcn.004766f0
mov eax, dword [ebp - 0x34]
mov ebx, eax
neg ebx
sbb ebx, ebx
and ebx, dword [ebp - 0x38]
mov dword [ebp - 0x14], eax
jmp 0x4d96a5
mov edx, dword [ebp + 0x117c]
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x14], edx
push 0x1088
lea eax, [ebp]
push 0
push eax
call fcn.00526600
mov ecx, dword [ebp - 0x14]
add esp, 0xc
push ecx
push ebx
push 0x1088
lea edx, [ebp]
push edx
push 0x19
push edi
mov ecx, esi
mov dword [ebp + 0x80], 0
call fcn.004d8c30
mov edi, dword [ebp - 0x24]
mov dword [edi], eax
test eax, eax
je 0x4d97b9
cmp eax, dword [ebp - 0x14]
ja 0x4d97b9
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x4d97b2
lea ecx, [ebp + 0x1140]
call fcn.004bbad0
mov eax, dword [ebp + 0x1170]
and eax, 0xf00
mov byte [ebp - 4], 2
push esi
lea ecx, [ebp + 0x1140]
cmp eax, 0x100
je 0x4d9738
cmp eax, 0x200
je 0x4d9731
call fcn.004b5f20
jmp 0x4d973d
call fcn.004b60c0
jmp 0x4d973d
call fcn.004b5500
lea ecx, [ebp + 0x1118]
call fcn.004f29f0
cmp dword [ebp + 0x1158], 0
mov byte [ebp - 4], 3
mov esi, 3
je 0x4d976c
lea eax, [ebp + 0x1140]
push eax
lea ecx, [ebp + 0x111c]
call fcn.004bb790
push 0
push esi
lea ecx, [ebp + 0x1118]
call fcn.004f3540
mov ecx, dword [edi]
push ecx
push ebx
lea ecx, [ebp + 0x1118]
call fcn.004f2d80
lea ecx, [ebp + 0x1118]
call fcn.004f2ab0
lea ecx, [ebp + 0x1118]
mov byte [ebp - 4], 2
call fcn.004f2a40
lea ecx, [ebp + 0x1140]
mov byte [ebp - 4], 1
call fcn.004bbaf0
mov dword [ebp - 0x18], 1
lea ecx, [ebp - 0x3c]
call fcn.00476f80
mov eax, dword [ebp - 0x18]
jmp 0x4d9811
mov edx, dword [0x59cfc4]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x4d9809
push 4
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x4d9809
mov eax, dword [0x59cfc4]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [esi], 0x10e
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 + 0x1160]
xor ecx, ebp
call fcn.00526a8a
add ebp, 0x1164
mov esp, ebp
pop ebp
ret 0x18