Function at 0x4c9850
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, ecx
cmp dword [ebx + 0x14], 0
push esi
push edi
mov dword [ebp - 8], ebx
mov dword [ebx], 0x45cdbc
je 0x4c9945
xor eax, eax
cmp dword [ebx + 0x10], eax
mov dword [ebp - 4], eax
jbe 0x4c9939
mov edi, edi
mov ecx, dword [ebx + 0x14]
mov esi, dword [ecx + eax*4]
xor edi, edi
cmp esi, edi
je 0x4c992a
cmp word [esi + 0x3c], di
je 0x4c98d9
mov eax, dword [0x776138]
cmp eax, edi
jge 0x4c98a3
xor eax, eax
jmp 0x4c98aa
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [esi + 0x3c]
cmp ecx, dword [eax + 0x120]
ja 0x4c98d2
mov edx, dword [esi + 4]
mov eax, dword [eax + 0x11c]
shl ecx, 4
cmp edx, edi
lea ecx, [ecx + eax - 0x10]
je 0x4c98d2
mov eax, dword [ecx + 4]
mov dword [edx], eax
mov dword [ecx + 4], edx
mov word [esi + 0x3c], di
mov dword [esi + 4], edi
cmp word [esi + 0x3e], di
je 0x4c9922
mov eax, dword [0x776138]
cmp eax, edi
jge 0x4c98ec
xor eax, eax
jmp 0x4c98f3
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [esi + 0x3e]
cmp ecx, dword [eax + 0x120]
ja 0x4c991b
mov edx, dword [esi + 0xc]
mov eax, dword [eax + 0x11c]
shl ecx, 4
cmp edx, edi
lea ecx, [ecx + eax - 0x10]
je 0x4c991b
mov eax, dword [ecx + 4]
mov dword [edx], eax
mov dword [ecx + 4], edx
mov word [esi + 0x3e], di
mov dword [esi + 0xc], edi
call fcn.004ce8a0
mov eax, dword [ebp - 4]
add eax, 1
cmp eax, dword [ebx + 0x10]
mov dword [ebp - 4], eax
jb 0x4c9880
mov ecx, dword [ebx + 0x14]
push ecx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp dword [ebx + 0x38], 0
je 0x4c99fb
xor edi, edi
cmp dword [ebx + 0xc], edi
jbe 0x4c99ef
lea ebx, [ebx]
mov edx, dword [ebx + 0x38]
mov esi, dword [edx + edi*4]
test esi, esi
je 0x4c99e3
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x4c99a0
cmp ecx, 0xffffffff
je 0x4c99a0
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4c9985
mov edx, dword [esi + 0x14]
mov dword [eax + 0x14], edx
jmp 0x4c998b
mov eax, dword [esi + 0x14]
mov dword [ecx + 0x24], eax
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4c999a
mov ecx, dword [esi + 0x18]
mov dword [eax + 0x18], ecx
jmp 0x4c99a0
mov edx, dword [esi + 0x18]
mov dword [ecx + 0x28], edx
mov eax, dword [0x776138]
test eax, eax
jge 0x4c99ad
xor ebx, ebx
jmp 0x4c99b6
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
push pe_nt_image_headers32
push 0xfe
push esi
call sub.msvcrt.dll_memset
mov dword [esi], 0
mov eax, dword [ebx + 8]
add esp, 0xc
test eax, eax
je 0x4c99da
mov dword [eax], esi
jmp 0x4c99dd
mov dword [ebx + 4], esi
mov dword [ebx + 8], esi
mov ebx, dword [ebp - 8]
add edi, 1
cmp edi, dword [ebx + 0xc]
jb 0x4c9960
mov eax, dword [ebx + 0x38]
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp dword [ebx + 0x30], 0
je 0x4c9a47
xor edi, edi
cmp dword [ebx + 8], edi
jbe 0x4c9a3b
mov ecx, dword [ebx + 0x30]
mov esi, dword [ecx + edi*4]
test esi, esi
je 0x4c9a33
lea ebx, [esi + 0x24]
mov dword [ebx], 0
mov dword [ebx + 4], 0
call fcn.004e0380
push esi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov ebx, dword [ebp - 8]
add esp, 4
add edi, 1
cmp edi, dword [ebx + 8]
jb 0x4c9a08
mov edx, dword [ebx + 0x30]
push edx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp dword [ebx + 0x28], 0
je 0x4c9a96
xor edi, edi
cmp dword [ebx + 4], edi
jbe 0x4c9a8a
mov eax, dword [ebx + 0x28]
mov esi, dword [eax + edi*4]
test esi, esi
je 0x4c9a82
mov ecx, dword [esi + 0x3c]
test ecx, ecx
mov dword [ebp - 8], ecx
je 0x4c9a79
call fcn.0048d420
mov ecx, dword [ebp - 8]
push ecx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
push esi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
add edi, 1
cmp edi, dword [ebx + 4]
jb 0x4c9a54
mov edx, dword [ebx + 0x28]
push edx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret