Function at 0x4d9c10
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
push ebx
xor edx, edx
cmp eax, edx
push esi
push edi
mov dword [ebp - 0xc], edx
mov byte [ebp - 1], dl
jbe 0x4d9c34
mov ecx, dword [ecx + 0x14]
mov edi, dword [ecx]
jmp 0x4d9c36
xor edi, edi
cmp eax, edx
mov dword [ebp - 0x14], edx
jbe 0x4d9fb7
mov eax, dword [edi + 0x38]
mov ecx, eax
and ecx, 0xfff00000
cmp ecx, 0x30000000
je 0x4d9c60
cmp ecx, 0x30100000
jne 0x4d9e9b
and eax, 0xfffff
mov ebx, eax
mov cl, 1
mov dword [ebp - 0x10], ebx
mov edx, 0
jbe 0x4d9ce2
lea eax, [ebx*4]
mov dword [ebp - 8], eax
test cl, cl
je 0x4d9ccd
mov ecx, dword [edi + 0xc]
mov eax, dword [ecx + edx*4]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 8]
and eax, 0x44210008
xor ecx, ecx
or eax, ecx
je 0x4d9ccd
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 8]
mov eax, dword [ecx + eax]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 8]
and eax, 0x44210008
xor esi, esi
or eax, esi
je 0x4d9ccd
lea eax, [edx + ebx*2]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + 8]
and eax, 0x44210008
xor ecx, ecx
or eax, ecx
je 0x4d9ccd
mov cl, 1
jmp 0x4d9ccf
xor cl, cl
add dword [ebp - 8], 4
add edx, 1
cmp edx, ebx
jb 0x4d9c7d
test cl, cl
je 0x4d9e9b
mov eax, dword [0x776138]
test eax, eax
jge 0x4d9cef
xor eax, eax
jmp 0x4d9cf6
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x10], 0
je 0x4d9d1d
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x4d9d07
mov esi, ecx
jmp 0x4d9d2b
mov edx, dword [ecx]
test edx, edx
mov dword [eax + 0x10], edx
jne 0x4d9d13
mov dword [eax + 0x14], edx
mov dword [ecx], 0xfefefefe
mov esi, ecx
jmp 0x4d9d2b
mov ecx, dword [eax + 0xc]
push 0x10
push 0x40
call fcn.007515ae
mov esi, eax
xor eax, eax
cmp esi, eax
je 0x4d9ec9
push eax
mov dword [esi], eax
mov dword [esi + 8], eax
mov dword [esi + 0x38], eax
mov dword [esi + 4], eax
mov word [esi + 0x3c], ax
mov dword [esi + 0xc], eax
mov word [esi + 0x3e], ax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
or ecx, 0xffffffff
mov eax, ebx
and eax, 0xfffff
mov dword [esi + 0x10], ecx
mov dword [esi + 0x20], ecx
lea ecx, [ebx + ebx]
or eax, 0x24700000
push esi
mov edx, ebx
call fcn.004cc5e0
test eax, eax
mov dword [ebp - 0xc], eax
jl 0x4d9ed7
mov edx, dword [edi + 0x30]
mov dword [esi + 0x30], edx
mov eax, dword [edi + 0x34]
mov dword [esi + 0x34], eax
xor eax, eax
test ebx, ebx
jbe 0x4d9dec
lea ecx, [ebx*4]
lea edx, [ebx*8]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
nop
mov edx, dword [edi + 0xc]
mov edx, dword [edx + eax*4]
mov ebx, dword [esi + 0xc]
mov dword [ebx + eax*4], edx
mov edx, dword [edi + 4]
mov ecx, dword [ecx + edx]
mov ebx, dword [esi + 4]
mov dword [ebx + eax*4], ecx
mov ecx, dword [ebp - 8]
mov edx, dword [edi + 4]
mov edx, dword [ecx + edx]
mov ecx, dword [ebp - 0xc]
mov ebx, dword [esi + 4]
add dword [ebp - 8], 4
mov dword [ecx + ebx], edx
add eax, 1
add ecx, 4
cmp eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
jb 0x4d9db0
push esi
push edi
call fcn.004ccff0
test eax, eax
mov dword [ebp - 0xc], eax
jl 0x4d9ed7
xor edi, edi
cmp word [esi + 0x3c], di
mov byte [ebp - 1], 1
je 0x4d9e4d
mov eax, dword [0x776138]
cmp eax, edi
jge 0x4d9e17
xor eax, eax
jmp 0x4d9e1e
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [esi + 0x3c]
cmp ecx, dword [eax + 0x120]
ja 0x4d9e46
mov edx, dword [esi + 4]
mov eax, dword [eax + 0x11c]
shl ecx, 4
cmp edx, edi
lea eax, [ecx + eax - 0x10]
je 0x4d9e46
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [esi + 0x3c], di
mov dword [esi + 4], edi
cmp word [esi + 0x3e], di
je 0x4d9e96
mov eax, dword [0x776138]
cmp eax, edi
jge 0x4d9e60
xor eax, eax
jmp 0x4d9e67
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [esi + 0x3e]
cmp ecx, dword [eax + 0x120]
ja 0x4d9e8f
mov edx, dword [esi + 0xc]
mov eax, dword [eax + 0x11c]
shl ecx, 4
cmp edx, edi
lea eax, [ecx + eax - 0x10]
je 0x4d9e8f
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [esi + 0x3e], di
mov dword [esi + 0xc], edi
call fcn.004ce8a0
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
add ecx, 1
cmp ecx, eax
mov dword [ebp - 0x14], ecx
jb 0x4d9eb5
xor edi, edi
mov dword [ebp - 0x14], eax
jmp 0x4d9ebb
mov edx, dword [edx + 0x14]
mov edi, dword [edx + ecx*4]
cmp dword [ebp - 0x14], eax
jb 0x4d9c41
jmp 0x4d9fb0
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test esi, esi
je 0x4d9fb0
xor edi, edi
cmp word [esi + 0x3c], di
je 0x4d9f2a
mov eax, dword [0x776138]
cmp eax, edi
jge 0x4d9ef4
xor eax, eax
jmp 0x4d9efb
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [esi + 0x3c]
cmp ecx, dword [eax + 0x120]
ja 0x4d9f23
mov edx, dword [esi + 4]
mov eax, dword [eax + 0x11c]
shl ecx, 4
cmp edx, edi
lea eax, [ecx + eax - 0x10]
je 0x4d9f23
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [esi + 0x3c], di
mov dword [esi + 4], edi
cmp word [esi + 0x3e], di
je 0x4d9f73
mov eax, dword [0x776138]
cmp eax, edi
jge 0x4d9f3d
xor eax, eax
jmp 0x4d9f44
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [esi + 0x3e]
cmp ecx, dword [eax + 0x120]
ja 0x4d9f6c
mov edx, dword [esi + 0xc]
mov eax, dword [eax + 0x11c]
shl ecx, 4
cmp edx, edi
lea eax, [ecx + eax - 0x10]
je 0x4d9f6c
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [esi + 0x3e], di
mov dword [esi + 0xc], edi
mov eax, dword [0x776138]
cmp eax, edi
jl 0x4d9fb0
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
je 0x4d9fb0
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 0x4d9faa
mov dword [eax], esi
jmp 0x4d9fad
mov dword [edi + 0x10], esi
mov dword [edi + 0x14], esi
mov eax, dword [ebp - 0xc]
test eax, eax
jl 0x4d9fbf
xor eax, eax
cmp byte [ebp - 1], al
sete al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4