Function at 0x517030
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x13c
push ebx
push esi
push edi
mov edi, eax
or eax, 0xffffffff
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0xaa78]
mov esi, dword [eax + 0x38]
xor ecx, ecx
and esi, 0xfffff
cmp esi, 3
mov dword [ebp - 8], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x10], 2
mov dword [ebp - 0xc], 3
jb 0x517393
cmp esi, ecx
mov dword [ebp - 4], ecx
jbe 0x517154
mov ebx, dword [eax + 0xc]
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + 8]
and eax, 0x20
xor edx, edx
or eax, edx
jne 0x517393
mov eax, dword [ebp - 4]
cmp dword [ecx + 0x2c], eax
jne 0x517393
add eax, 1
add ebx, 4
cmp eax, esi
mov dword [ebp - 4], eax
jb 0x517124
xor ecx, ecx
push ecx
push esi
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0xb8]
push ecx
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x138]
push eax
mov eax, dword [edi + 0xaa78]
push 0x429580
push eax
mov ecx, edi
call fcn.004e14d0
test eax, eax
jne 0x517398
jmp 0x517190
mov ecx, dword [ebp + eax*4 - 0xb8]
cmp ecx, dword [ebp + eax*4 - 0xa8]
jne 0x517393
cmp ecx, dword [ebp + eax*4 - 0x98]
jne 0x517393
cmp dword [ecx + 0x2c], eax
je 0x5171c3
test byte [edi + 0xa8], 2
jne 0x517393
add eax, 1
cmp eax, 3
jb 0x517190
or eax, 0xffffffff
cmp dword [ebp - 0x9c], eax
jne 0x517393
cmp dword [ebp - 0x8c], eax
jne 0x517393
mov eax, dword [0x776138]
test eax, eax
jge 0x5171f3
xor eax, eax
jmp 0x5171fa
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x10], 0
je 0x517221
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x51720b
mov ebx, ecx
jmp 0x51722f
mov edx, dword [ecx]
test edx, edx
mov dword [eax + 0x10], edx
jne 0x517217
mov dword [eax + 0x14], edx
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x51722f
mov ecx, dword [eax + 0xc]
push 0x10
push 0x40
call fcn.007515ae
mov ebx, eax
xor eax, eax
cmp ebx, eax
je 0x517387
push eax
mov dword [ebx], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x38], eax
mov dword [ebx + 4], eax
mov word [ebx + 0x3c], ax
mov dword [ebx + 0xc], eax
mov word [ebx + 0x3e], ax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x34], eax
or ecx, 0xffffffff
mov eax, esi
and eax, 0xfffff
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x20], ecx
or eax, 0x70200000
push ebx
mov edx, esi
mov ecx, esi
call fcn.004cc5e0
test eax, eax
mov dword [ebp - 4], eax
jl 0x517360
mov eax, dword [edi + 0xaa78]
mov ecx, dword [eax + 0x30]
mov dword [ebx + 0x30], ecx
mov edx, dword [eax + 0x34]
mov dword [ebx + 0x34], edx
mov edx, dword [ebx + 0xc]
lea eax, [esi*4]
push eax
mov eax, dword [edi + 0xaa78]
mov ecx, dword [eax + 0xc]
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebx + 4]
add esp, 0xc
lea eax, [esi*4]
push eax
lea eax, [ebp - 0xb8]
push eax
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
xor eax, eax
test esi, esi
jbe 0x517350
lea ecx, [ecx]
test byte [edi + 0xa8], 2
je 0x517330
mov edx, dword [edi + 0xaa78]
mov ecx, dword [edx + 4]
mov ecx, dword [ecx + eax*4]
mov edx, dword [ecx + 8]
or dword [ecx + 0xc], 0x400
mov dword [ecx + 8], edx
mov ecx, dword [edi + 0xaa78]
mov edx, dword [ecx + 4]
mov ecx, dword [edx + eax*4]
cmp dword [ecx + 0x44], 0xffffffff
je 0x517330
mov edx, dword [edi + 0xaa78]
mov ecx, dword [edx + 4]
mov edx, dword [ecx + eax*4]
mov ecx, dword [edx + 0x44]
mov edx, dword [ecx + 8]
or dword [ecx + 0xc], 0x400
mov dword [ecx + 8], edx
mov ecx, dword [edi + 0xaa78]
mov edx, dword [ecx + 0xc]
mov ecx, dword [edx + eax*4]
mov edx, dword [ecx + 8]
or dword [ecx + 0xc], 0x400
add eax, 1
cmp eax, esi
mov dword [ecx + 8], edx
jb 0x5172e0
mov eax, dword [edi + 0xaa78]
push ebx
push eax
call fcn.004ccff0
mov dword [ebp - 4], eax
lea esi, [ebx + 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 [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret