Function at 0x4e1da0
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x25c
push ebx
push esi
mov esi, eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax + 0x38]
push edi
mov eax, 1
add dword [esi + 8], eax
mov edi, ecx
xor ecx, ecx
and ebx, 0xfffff
cmp byte [esi], cl
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], 2
mov dword [esp + 0x24], 3
je 0x4e20ad
push 0x80
push ecx
lea ecx, [esp + 0xb0]
push ecx
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x80
lea edx, [esp + 0x2c]
push 0
push edx
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 0x10]
add esp, 0xc
push eax
push ebx
mov ebx, dword [ebp + 0xc]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x134]
push edx
mov edx, dword [edi]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0xbc]
push ecx
mov ecx, dword [ebp + 8]
push edx
push ebx
call fcn.004e14d0
test eax, eax
mov dword [esp + 0x14], eax
jl 0x4e1faa
jne 0x4e1f5d
cmp byte [esi], 0
jne 0x4e1e6f
mov eax, 1
add dword [esi + 4], eax
mov dword [esp + 0x14], eax
jmp 0x4e1f69
mov eax, dword [ebp + 8]
add dword [esi + 4], 1
push ebx
push edi
push eax
lea esi, [esp + 0x1d4]
call fcn.004e0ad0
test eax, eax
mov dword [esp + 0x14], eax
jl 0x4e1faa
xor esi, esi
cmp dword [edi + 4], esi
jbe 0x4e1ee7
lea ecx, [esp + 0x28]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x10]
push edx
lea eax, [esp + 0xac]
push eax
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x134]
push edx
lea eax, [esp + 0x1d8]
push eax
push edi
push ebx
mov eax, esi
call fcn.004e0ee0
test eax, eax
mov dword [esp + 0x14], eax
jl 0x4e1faa
add dword [esp + 0x10], 4
add esi, 1
cmp esi, dword [edi + 4]
jb 0x4e1ea0
mov eax, dword [edi + 4]
cmp eax, 1
jne 0x4e1f12
mov ecx, dword [esp + 0x28]
push ecx
push ebx
call fcn.004ccff0
test eax, eax
mov dword [esp + 0x14], eax
jl 0x4e1faa
or edx, 0xffffffff
mov ecx, ebx
call fcn.00482d90
jmp 0x4e1f5d
xor ebx, ebx
test eax, eax
jbe 0x4e1f41
mov eax, dword [esp + ebx*4 + 0x28]
mov esi, dword [ebp + 8]
push eax
call fcn.004ca180
test eax, eax
mov dword [esp + 0x14], eax
jl 0x4e1faa
mov ecx, dword [esp + ebx*4 + 0x28]
or edx, 0xffffffff
call fcn.00482d90
add ebx, 1
cmp ebx, dword [edi + 4]
jb 0x4e1f18
mov edx, dword [ebp + 0xc]
mov ecx, dword [edi + 4]
push 1
push edx
mov edx, dword [ebp + 8]
lea eax, [esp + 0x30]
push eax
push ecx
push edx
call fcn.004caa20
mov dword [esp + 0x14], eax
cmp dword [esp + 0x14], 0
jl 0x4e1faa
mov eax, 1
cmp dword [edi + 4], eax
jne 0x4e20a9
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4e20a9
mov ebx, eax
lea esi, [eax + 4]
lea edi, [ebx + 0x3c]
call fcn.004cc530
lea esi, [ebx + 0xc]
lea edi, [ebx + 0x3e]
call fcn.004cc530
mov esi, ebx
call fcn.004ce8a0
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [0x776138]
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x10], ecx
jmp 0x4e1fc2
xor edx, edx
mov esi, dword [esp + ecx*4 + 0x28]
cmp esi, edx
je 0x4e2095
cmp word [esi + 0x3c], dx
je 0x4e2015
cmp eax, edx
jge 0x4e1fdc
xor eax, eax
jmp 0x4e1fdf
push eax
call ebx
movzx ecx, word [esi + 0x3c]
cmp ecx, dword [eax + 0x120]
ja 0x4e2007
mov edx, dword [esi + 4]
mov eax, dword [eax + 0x11c]
shl ecx, 4
test edx, edx
lea ecx, [ecx + eax - 0x10]
je 0x4e2007
mov eax, dword [ecx + 4]
mov dword [edx], eax
mov dword [ecx + 4], edx
xor edx, edx
mov word [esi + 0x3c], dx
mov dword [esi + 4], edx
mov eax, dword [0x776138]
cmp word [esi + 0x3e], dx
je 0x4e205c
cmp eax, edx
jge 0x4e2023
xor eax, eax
jmp 0x4e2026
push eax
call ebx
movzx ecx, word [esi + 0x3e]
cmp ecx, dword [eax + 0x120]
ja 0x4e204e
mov edx, dword [esi + 0xc]
mov eax, dword [eax + 0x11c]
shl ecx, 4
test edx, edx
lea ecx, [ecx + eax - 0x10]
je 0x4e204e
mov eax, dword [ecx + 4]
mov dword [edx], eax
mov dword [ecx + 4], edx
xor edx, edx
mov word [esi + 0x3e], dx
mov dword [esi + 0xc], edx
mov eax, dword [0x776138]
cmp eax, edx
jl 0x4e2095
push eax
call ebx
mov edi, eax
test edi, edi
je 0x4e2090
push 0x40
push 0xfe
push esi
call sub.msvcrt.dll_memset
mov dword [esi], 0
mov eax, dword [edi + 0x14]
add esp, 0xc
test eax, eax
je 0x4e208a
mov dword [eax], esi
jmp 0x4e208d
mov dword [edi + 0x10], esi
mov dword [edi + 0x14], esi
mov eax, dword [0x776138]
mov ecx, dword [esp + 0x10]
add ecx, 1
cmp ecx, 0x20
mov dword [esp + 0x10], ecx
jb 0x4e1fc0
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc