Function at 0x4d0010
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp byte [eax + 0x1f], 0
je 0x4d01d3
mov eax, dword [ebp - 8]
movzx eax, word [eax + 4]
sub ax, 4
jae 0x4d01d3
mov eax, dword [ebp - 8]
movzx eax, word [eax + 4]
sub ax, 2
jb 0x4d0052
sub ax, 2
jb 0x4d0073
jmp 0x4d0099
mov eax, dword [ebp - 4]
movzx ebx, word [eax + 8]
mov eax, ebx
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x40]
cdq
idiv ecx
mov dword [ebp - 0xc], eax
mov eax, ebx
cdq
idiv ecx
mov dword [ebp - 0x10], edx
mov edi, ecx
jmp 0x4d00a5
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xa]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x3c]
mov eax, dword [ebp - 0xc]
cdq
idiv ebx
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0xc]
cdq
idiv ebx
mov dword [ebp - 0xc], eax
mov edi, ebx
jmp 0x4d00a5
xor edi, edi
xor eax, eax
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0x14], eax
test edi, edi
jle 0x4d0153
call fcn.0040d1bc
mov ebx, eax
mov esi, ebx
sub esi, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
cmp esi, dword [eax + 0x20]
jae 0x4d00d4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
sub eax, esi
push eax
call sub.KERNEL32.DLL_TlsSetValue
mov dword [ebp - 0x14], ebx
mov eax, dword [ebp - 8]
movzx eax, word [eax + 4]
sub ax, 1
jb 0x4d00f2
je 0x4d0105
dec ax
je 0x4d0118
dec ax
je 0x4d012b
jmp 0x4d013c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
sub edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp 0x4d013c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp 0x4d013c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
sub edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp 0x4d013c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.004d0384
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [eax]
call dword [edx + 0x9c]
dec edi
test edi, edi
jg 0x4d00b2
cmp dword [ebp - 0x10], 0
jle case.default.0x4d01e3
mov eax, dword [ebp - 8]
movzx eax, word [eax + 4]
sub ax, 1
jb 0x4d017b
je 0x4d0191
dec ax
je 0x4d01a7
dec ax
je 0x4d01bd
jmp case.default.0x4d01e3
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
sub edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
add edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
sub edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
add edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
mov eax, dword [ebp - 8]
movsx eax, word [eax + 4]
cmp eax, 7
ja case.default.0x4d01e3
jmp dword [eax*4 + 0x4d01ea]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 8]
sub edx, eax
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 8]
add edx, eax
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
xor ecx, ecx
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.004cff0c
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0xc]
sub edx, eax
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
xor ecx, ecx
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.004cff0c
mov edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
mov eax, dword [ebp - 4]
cmp dword [eax + 0x14], 0x7fff
jle 0x4d02a3
push ebp
call fcn.004cffb4
pop ecx
mov edx, eax
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
mov edx, dword [ebp - 8]
movsx edx, word [edx + 6]
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
mov eax, dword [ebp - 4]
cmp byte [eax + 0x1d], 0
je case.default.0x4d01e3
mov eax, dword [ebp - 4]
cmp dword [eax + 0x14], 0x7fff
jle 0x4d02dc
push ebp
call fcn.004cffb4
pop ecx
mov edx, eax
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
mov edx, dword [ebp - 8]
movsx edx, word [edx + 6]
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.004d0384
jmp case.default.0x4d01e3
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 4]
call fcn.004d0384
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret