Function at 0x4f9fd0
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
push esi
push edi
mov dword [ebp - 0xc], edx
mov byte [ebp - 1], dl
cmp eax, edx
jbe 0x4f9ff4
mov ecx, dword [ecx + 0x14]
mov edi, dword [ecx]
jmp 0x4f9ff6
xor edi, edi
mov dword [ebp - 0x14], edx
cmp eax, edx
jbe 0x4fa24a
mov eax, dword [edi + 0x3c]
mov ecx, eax
and ecx, 0xfff00000
cmp ecx, 0x30000000
je 0x4fa020
cmp ecx, 0x30100000
jne 0x4fa1c6
and eax, 0xfffff
mov ebx, eax
mov cl, 1
mov dword [ebp - 0x10], ebx
mov edx, 0
jbe 0x4fa0a0
lea eax, [ebx*4]
mov dword [ebp - 8], eax
test cl, cl
je 0x4fa08d
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 0x4fa08d
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 8]
mov eax, dword [eax + ecx]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 8]
and eax, 0x44210008
xor esi, esi
or eax, esi
je 0x4fa08d
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 0x4fa08d
mov cl, 1
jmp 0x4fa08f
xor cl, cl
add dword [ebp - 8], 4
inc edx
cmp edx, ebx
jb 0x4fa03d
test cl, cl
je 0x4fa1c6
mov eax, dword [0x551d48]
test eax, eax
jge 0x4fa0ad
xor eax, eax
jmp 0x4fa0b4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x14], 0
je 0x4fa0db
mov ecx, dword [eax + 0x14]
test ecx, ecx
jne 0x4fa0c5
mov esi, ecx
jmp 0x4fa0e9
mov edx, dword [ecx]
mov dword [eax + 0x14], edx
test edx, edx
jne 0x4fa0d1
mov dword [eax + 0x18], edx
mov dword [ecx], 0xfefefefe
mov esi, ecx
jmp 0x4fa0e9
mov ecx, dword [eax + 0x10]
push 0x10
push 0x44
call fcn.00547721
mov esi, eax
xor eax, eax
cmp esi, eax
je 0x4fa1ef
push eax
mov dword [esi], eax
mov dword [esi + 8], eax
mov dword [esi + 0x3c], eax
mov dword [esi + 4], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], eax
or ecx, 0xffffffff
xor edx, edx
mov eax, ebx
and eax, 0xfffff
mov dword [esi + 0x10], ecx
mov word [esi + 0x40], dx
mov word [esi + 0x42], dx
mov dword [esi + 0x20], ecx
lea ecx, [ebx + ebx]
or eax, 0x24700000
push esi
mov edx, ebx
call fcn.0050a980
mov dword [ebp - 0xc], eax
test eax, eax
jl 0x4fa1fd
mov eax, dword [edi + 0x34]
mov dword [esi + 0x34], eax
mov ecx, dword [edi + 0x38]
xor eax, eax
mov dword [esi + 0x38], ecx
test ebx, ebx
jbe 0x4fa1aa
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
inc eax
add ecx, 4
mov dword [ebp - 0xc], ecx
cmp eax, dword [ebp - 0x10]
jb 0x4fa170
push esi
push edi
call fcn.0050b3a0
mov dword [ebp - 0xc], eax
test eax, eax
jl 0x4fa1fd
mov byte [ebp - 1], 1
call fcn.0050a890
call fcn.0050cb90
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
inc ecx
mov dword [ebp - 0x14], ecx
cmp ecx, eax
jb 0x4fa1de
xor edi, edi
mov dword [ebp - 0x14], eax
jmp 0x4fa1e4
mov edx, dword [edx + 0x14]
mov edi, dword [edx + ecx*4]
cmp dword [ebp - 0x14], eax
jb 0x4fa001
jmp 0x4fa243
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test esi, esi
je 0x4fa243
call fcn.0050a890
mov eax, dword [0x551d48]
test eax, eax
jl 0x4fa243
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
je 0x4fa243
push 0x44
push 0xfe
push esi
call sub.msvcrt.dll_memset
mov dword [esi], 0
mov eax, dword [edi + 0x18]
add esp, 0xc
test eax, eax
je 0x4fa23d
mov dword [eax], esi
jmp 0x4fa240
mov dword [edi + 0x14], esi
mov dword [edi + 0x18], esi
mov eax, dword [ebp - 0xc]
test eax, eax
jl 0x4fa252
xor eax, eax
cmp byte [ebp - 1], al
sete al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4