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

Disassembly:
push ebp
lea ebp, [esp - 0xc0]
sub esp, 0xc0
push 0xffffffffffffffff
push 0x54601e
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x463df0]
xor eax, ebp
mov dword [ebp + 0xbc], 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 - 0x14], ecx
mov edx, dword [0x59cfc4]
mov eax, dword [ebp + 0xcc]
mov ecx, dword [ebp + 0xd8]
mov esi, dword [ebp + 0xd0]
push edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x38], ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
xor ebx, ebx
cmp edi, ebx
jne 0x4d8819
push 4
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
cmp edi, ebx
je 0x4d8819
mov eax, dword [0x59cfc4]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [ebp + 0xdc]
add eax, eax
add eax, eax
add eax, eax
mov dword [edi], ebx
cmp eax, ebx
je 0x4d884a
mov ecx, dword [ebp - 0x38]
push eax
push ecx
call fcn.004ee390
test al, al
jne 0x4d884a
mov ecx, dword [ebp - 0x14]
push 0x71
call fcn.004cc3d0
xor eax, eax
jmp 0x4d8b85
cmp dword [ebp - 0x18], ebx
jne 0x4d888d
cmp dword [ebp + 0xd4], ebx
je 0x4d8895
mov dword [ebp - 0x50], 0x465920
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x48], ebx
mov byte [ebp - 0x40], 1
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 4], ebx
cmp esi, ebx
je 0x4d88a6
mov edx, dword [ebp + 0xd4]
mov ecx, dword [ebp - 0x14]
push edx
push esi
call fcn.004d7030
mov ebx, dword [ebp + 0xc8]
jmp 0x4d88c5
cmp dword [ebp + 0xd4], ebx
je 0x4d8857
mov ecx, dword [ebp - 0x14]
push 0x69
call fcn.004cc3d0
xor eax, eax
jmp 0x4d8b85
mov ebx, dword [ebp + 0xc8]
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x50]
push eax
mov ecx, ebx
and ecx, 0xf00
push ecx
mov ecx, dword [ebp - 0x14]
push edx
call fcn.004d74d0
lea ecx, [ebp - 0x34]
mov edi, eax
call fcn.004d7e60
mov byte [ebp - 4], 1
cmp edi, 7
jne 0x4d8914
test esi, esi
jne 0x4d88fb
mov eax, dword [ebp - 0x48]
mov esi, eax
neg esi
lea ecx, [ebp - 0x34]
push ecx
mov ecx, dword [ebp - 0x14]
sbb esi, esi
and esi, dword [ebp - 0x4c]
push eax
push esi
call fcn.004d8640
jmp 0x4d8b11
mov eax, dword [ebp + 0xd4]
lea ecx, [ebp - 0x34]
push ecx
mov ecx, dword [ebp - 0x14]
push eax
push esi
call fcn.004d8640
jmp 0x4d8b11
cmp edi, 4
jne 0x4d8b04
cmp dword [ebp - 0x18], 0
lea eax, [edi - 2]
jne 0x4d892b
mov eax, 0x1002
push eax
lea ecx, [ebp]
call fcn.004f7a40
mov edi, dword [ebp - 0x18]
mov byte [ebp - 4], 3
test edi, edi
jne 0x4d8985
call fcn.004b5900
push eax
lea ecx, [ebp + 0x9c]
call fcn.004bc340
push edi
lea edx, [ebp + 0x9c]
push edx
lea ecx, [ebp]
mov byte [ebp - 4], 4
call fcn.004f92a0
lea ecx, [ebp + 0x9c]
mov byte [ebp - 4], 3
call fcn.004bbaf0
mov eax, dword [ebp + 0xd4]
push eax
push esi
lea ecx, [ebp]
call fcn.004f77c0
jmp 0x4d89e2
lea ecx, [ebp + 0x9c]
call fcn.004bbad0
and ebx, 0xf00
mov byte [ebp - 4], 5
push edi
lea ecx, [ebp + 0x9c]
cmp ebx, 0x100
je 0x4d89bf
cmp ebx, 0x200
je 0x4d89b8
call fcn.004b5f20
jmp 0x4d89c4
call fcn.004b60c0
jmp 0x4d89c4
call fcn.004b5500
lea ecx, [ebp + 0x9c]
push ecx
lea ecx, [ebp]
call fcn.004f9390
lea ecx, [ebp + 0x9c]
mov byte [ebp - 4], 3
call fcn.004bbaf0
lea ecx, [ebp]
call fcn.004f81b0
test al, al
je 0x4d8aaf
mov esi, dword [ebp - 0x28]
cmp esi, dword [ebp - 0x24]
jbe 0x4d89ff
call fcn.00526bf6
mov ebx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x24]
cmp dword [ebp - 0x28], edi
jbe 0x4d8a0f
call fcn.00526bf6
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4d8a1a
cmp eax, ebx
je 0x4d8a1f
call fcn.00526bf6
cmp edi, esi
jne 0x4d8a47
mov dx, word [ebp + 0x20]
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x24]
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x34]
mov word [ebp - 0x18], dx
mov dword [ebp - 0x1c], eax
call fcn.004d7fe0
jmp 0x4d89e2
test ebx, ebx
jne 0x4d8aa3
call fcn.00526bf6
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x4d8a5c
call fcn.00526bf6
mov edx, dword [ebp + 0x24]
cmp dword [esi], edx
jne 0x4d8a86
test ebx, ebx
jne 0x4d8aa7
call fcn.00526bf6
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x4d8a78
call fcn.00526bf6
mov ax, word [ebp + 0x20]
cmp word [esi + 4], ax
je 0x4d89e2
test ebx, ebx
jne 0x4d8aab
call fcn.00526bf6
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x4d8a9b
call fcn.00526bf6
add esi, 8
jmp 0x4d8a02
mov eax, dword [ebx]
jmp 0x4d8a52
mov eax, dword [ebx]
jmp 0x4d8a6e
mov eax, dword [ebx]
jmp 0x4d8a91
lea ecx, [ebp]
mov dword [ebp - 4], 2
call fcn.004f90f0
lea ecx, [ebp]
mov byte [ebp - 4], 1
call fcn.004f7880
jmp 0x4d8b11
mov ecx, dword [ebp - 0x14]
push 0xdc
call fcn.004cc3d0
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
mov eax, esi
sub eax, edi
sar eax, 3
test eax, eax
je 0x4d8b52
mov ebx, dword [ebp + 0xdc]
cmp ebx, eax
jb 0x4d8b2e
mov ebx, eax
test eax, eax
ja 0x4d8b3d
call fcn.00526bf6
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x38]
lea ecx, [ebx*8]
push ecx
push edi
push edx
call fcn.00526df0
add esp, 0xc
sub esi, edi
xor ebx, ebx
sar esi, 3
cmp edi, ebx
je 0x4d8b66
push edi
call fcn.005265f5
add esp, 4
mov eax, dword [ebp - 0x34]
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call fcn.005265f5
add esp, 4
lea ecx, [ebp - 0x50]
call fcn.00476f80
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xbc]
xor ecx, ebp
call fcn.00526a8a
add ebp, 0xc0
mov esp, ebp
pop ebp
ret 0x18