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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x545d58
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x463df0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x14], edi
mov eax, dword [0x59cfc4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x4d6690
push 4
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x4d6690
mov ecx, dword [0x59cfc4]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ebx, dword [ebp + 0xc]
mov eax, ebx
shr eax, 1
and al, 1
mov dword [esi], 0
je 0x4d66c6
cmp dword [ebp + 0x14], 0
jne 0x4d66c6
push 0x69
mov ecx, edi
call fcn.004cc3d0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x4d66ec
push 0x6a
mov ecx, edi
call fcn.004cc3d0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x2c], edx
push 0
test al, al
je 0x4d681d
push 0x64000
lea ecx, [ebp - 0x4c]
call fcn.0049adc0
mov esi, dword [ebp - 0x44]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov eax, esi
neg eax
sbb eax, eax
and eax, dword [ebp - 0x48]
push 0x64000
push eax
mov eax, dword [ebp + 0x14]
push eax
push ecx
push ebx
push edx
mov ecx, edi
mov dword [ebp - 4], 0
call fcn.004d5ff0
cmp eax, 0x64000
jbe 0x4d6773
add eax, 0x400
push eax
lea ecx, [ebp - 0x4c]
mov dword [ebp + 0xc], eax
call fcn.0049b290
mov esi, dword [ebp - 0x44]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x14]
mov eax, esi
neg eax
push ecx
mov ecx, dword [ebp + 8]
sbb eax, eax
and eax, dword [ebp - 0x48]
push eax
mov eax, dword [ebp + 0x10]
push edx
push eax
push ebx
push ecx
mov ecx, edi
call fcn.004d5ff0
xor ecx, ecx
cmp eax, ecx
je 0x4d6806
push ecx
mov dl, bl
not dl
neg esi
sbb esi, esi
and esi, dword [ebp - 0x48]
and dl, 1
movzx eax, dl
push eax
lea edx, [ebp + 8]
push edx
push ecx
lea eax, [ebp + 0x10]
push eax
push ecx
lea edx, [ebp + 0x14]
push edx
push ecx
lea eax, [ebp + 0x1c]
mov dword [ebp + 0x14], ecx
mov dword [ebp + 0x10], ecx
mov dword [ebp + 8], ecx
mov ecx, dword [ebp + 0x18]
push eax
push ecx
push esi
mov byte [ebp - 4], 1
call fcn.004f6350
add esp, 0x2c
lea ecx, [ebp - 0x4c]
mov dword [ebp - 4], 0xffffffff
call fcn.00476f80
jmp 0x4d6a2b
mov dword [ebp + 0x1c], ecx
lea ecx, [ebp - 0x4c]
mov dword [ebp - 4], 0xffffffff
call fcn.00476f80
jmp 0x4d6a2b
push 0
push 0
push ecx
mov ecx, edi
call fcn.004d61a0
mov esi, eax
test esi, esi
jne 0x4d6851
push 0xc9
mov ecx, edi
call fcn.004cc3d0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
xor ecx, ecx
mov eax, esi
mov edx, 0x90
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.005260f6
mov edi, eax
add esp, 4
mov dword [ebp - 0x18], edi
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp - 0x14]
push edi
push 0
push eax
mov ecx, esi
mov dword [ebp - 4], 3
call fcn.004d61a0
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x4d68c0
push 0xc9
mov ecx, esi
call fcn.004cc3d0
test edi, edi
je 0x4d68aa
push edi
call fcn.005265f5
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 esp, ebp
pop ebp
ret 0x18
push 0
mov esi, 0x64000
push esi
lea ecx, [ebp - 0x4c]
mov dword [ebp + 0x14], 0
call fcn.0049adc0
xor ecx, ecx
mov byte [ebp - 4], 4
mov dword [ebp + 0xc], ecx
cmp ecx, dword [ebp - 0x1c]
jge 0x4d6a06
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp + 0x10]
neg eax
sbb eax, eax
and eax, dword [ebp - 0x48]
push esi
lea ecx, [ecx + ecx*8]
push eax
mov eax, dword [ebp + 8]
shl ecx, 4
add edi, ecx
mov ecx, dword [ebp - 0x14]
push edi
push edx
push ebx
push eax
call fcn.004d5ff0
cmp eax, esi
jbe 0x4d6940
lea esi, [eax + 0x400]
push esi
lea ecx, [ebp - 0x4c]
call fcn.0049b290
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
neg eax
push esi
sbb eax, eax
and eax, dword [ebp - 0x48]
push eax
push edi
push ecx
mov ecx, dword [ebp - 0x14]
push ebx
push edx
call fcn.004d5ff0
xor ecx, ecx
cmp eax, ecx
je 0x4d69a8
mov eax, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x14]
mov byte [ebp - 4], 5
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
cmp eax, edi
jbe 0x4d6964
sub eax, edi
mov dword [ebp + 0x14], eax
jmp 0x4d6967
mov dword [ebp + 0x14], ecx
mov eax, dword [ebp - 0x44]
push ecx
neg eax
sbb eax, eax
and eax, dword [ebp - 0x48]
mov dl, bl
not dl
and dl, 1
movzx edx, dl
push edx
lea edx, [ebp - 0x20]
push edx
push ecx
lea edx, [ebp - 0x24]
push edx
push ecx
lea edx, [ebp - 0x28]
push edx
push ecx
mov edx, edi
shl edx, 0xa
add edx, dword [ebp + 0x18]
lea ecx, [ebp + 0x14]
push ecx
push edx
push eax
call fcn.004f6350
add esp, 0x2c
add edi, dword [ebp + 0x14]
mov dword [ebp + 0x14], edi
inc dword [ebp + 0xc]
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], 4
jmp 0x4d68e0
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 0x4c]
mov dword [ebp + 0x1c], eax
call fcn.00476f80
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x4d6a28
push edi
call fcn.005265f5
add esp, 4
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp + 0x1c]
cmp eax, dword [ebp - 0x2c]
jbe 0x4d6a3f
push 0x70
mov ecx, edi
call fcn.004cc3d0
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x4d6abf
shr ebx, 0xc
test bl, 1
je 0x4d6abf
test eax, eax
jbe 0x4d6abf
add esi, 0x2d4
mov ebx, eax
cmp dword [esi + 0xc], 0
je 0x4d6a69
push esi
push esi
mov ecx, edi
call fcn.004d0b30
cmp dword [esi - 0x18], 0
je 0x4d6a7b
lea eax, [esi - 0x24]
push eax
push eax
mov ecx, edi
call fcn.004d0b30
cmp dword [esi - 8], 0
je 0x4d6a8d
lea eax, [esi - 0x14]
push eax
push eax
mov ecx, edi
call fcn.004d0b30
cmp dword [esi - 0x3c], 0
je 0x4d6a9f
lea eax, [esi - 0x48]
push eax
push eax
mov ecx, edi
call fcn.004d0b30
cmp dword [esi - 0x2c], 0
je 0x4d6ab1
lea eax, [esi - 0x38]
push eax
push eax
mov ecx, edi
call fcn.004d0b30
add esi, 0x400
sub ebx, 1
jne 0x4d6a5a
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18