Function at 0x517900
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x158
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0xaa78]
push esi
mov esi, dword [eax + 0x38]
push edi
push 1
and esi, 0xfffff
push esi
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0xd4]
push edx
lea ecx, [ebp - 0xc]
push ecx
lea edx, [ebp - 0x154]
push edx
push 0x42b970
xor edi, edi
push eax
mov ecx, ebx
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x28], 2
mov dword [ebp - 0x24], 3
mov byte [ebp - 5], 0
call fcn.004e14d0
cmp eax, edi
mov dword [ebp - 0x10], eax
je 0x5179a9
push 1
push esi
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0xd4]
push ecx
mov ecx, dword [ebx + 0xaa78]
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x154]
push eax
push 0x42ba10
push ecx
mov ecx, ebx
call fcn.004e14d0
cmp eax, edi
mov dword [ebp - 0x10], eax
jne 0x517c41
mov byte [ebp - 5], 1
mov edx, dword [ebp - 0x150]
cmp dword [edx + 0x38], 0x50000002
je 0x5179c6
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, 1
cmp esi, edx
jbe 0x517a17
mov eax, dword [ebx + 0xaa78]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
add eax, 4
mov dword [ebp - 0x14], ecx
lea ecx, [esi*4 + 4]
mov dword [ebp - 0xc], eax
mov edi, dword [ebp - 0x14]
cmp dword [eax], edi
jne 0x5179b8
mov eax, dword [ebx + 0xaa78]
mov eax, dword [eax + 4]
mov edi, dword [ecx + eax]
cmp edi, dword [eax + esi*4]
jne 0x5179b8
mov eax, dword [ebp - 0xc]
add edx, 1
add eax, 4
add ecx, 4
cmp edx, esi
mov dword [ebp - 0xc], eax
jb 0x5179ea
xor edi, edi
mov eax, dword [0x776138]
cmp eax, edi
jge 0x517a24
xor eax, eax
jmp 0x517a2b
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x10], edi
je 0x517a53
mov ecx, dword [eax + 0x10]
cmp ecx, edi
jne 0x517a3d
xor ecx, ecx
mov ebx, ecx
jmp 0x517a61
mov edx, dword [ecx]
cmp edx, edi
mov dword [eax + 0x10], edx
jne 0x517a49
mov dword [eax + 0x14], edi
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x517a61
mov ecx, dword [eax + 0xc]
push 0x10
push 0x40
call fcn.007515ae
mov ebx, eax
cmp ebx, edi
je 0x517c3e
xor eax, eax
or ecx, 0xffffffff
mov dword [ebx], edi
mov dword [ebx + 8], edi
mov dword [ebx + 0x38], edi
push eax
mov dword [ebx + 0x10], ecx
lea edi, [ebx + 4]
mov dword [ebx + 0x20], ecx
mov dword [edi], 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
lea ecx, [eax + 6]
push ebx
mov edx, esi
mov eax, 0x70800002
call fcn.004cc5e0
test eax, eax
mov dword [ebp - 0x10], eax
jl 0x517c22
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xaa78]
mov edx, dword [eax + 0x30]
mov dword [ebx + 0x30], edx
mov eax, dword [eax + 0x34]
mov dword [ebx + 0x34], eax
mov eax, dword [ecx + 0xaa78]
mov ecx, dword [eax + 0xc]
lea edx, [esi*4]
push edx
mov edx, dword [ebx + 0xc]
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov eax, dword [edi]
mov ecx, dword [ebp - 0xd4]
mov edx, dword [ebp - 0xd0]
add esp, 0xc
cmp byte [ebp - 5], 0
mov dword [eax], ecx
mov dword [eax + 4], edx
jne 0x517b21
mov eax, dword [edi]
mov ecx, dword [ebp - 0xc4]
mov edx, dword [ebp - 0xc0]
add eax, 8
mov dword [eax], ecx
mov dword [eax + 4], edx
jmp 0x517be8
mov eax, dword [ebp - 0xc4]
mov esi, dword [ebp - 0xc0]
mov ecx, eax
mov dword [ebp - 0x18], eax
mov eax, dword [eax + 0x44]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], esi
mov dword [ebp - 0xc], ecx
je 0x517b48
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], eax
mov ecx, eax
mov eax, dword [esi + 0x44]
cmp eax, 0xffffffff
je 0x517b55
mov dword [ebp - 0x14], eax
mov esi, eax
fldz
mov eax, dword [ecx + 0x2c]
mov edx, dword [ecx + 0x28]
sub esp, 8
fstp qword [esp]
push 0
push 0
push eax
mov eax, dword [ecx + 0x10]
push edx
mov edx, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x20]
push ecx
push edx
call fcn.004ca3c0
test eax, eax
mov dword [ebp - 0x10], eax
jl 0x517c22
fldz
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x10]
sub esp, 8
fstp qword [esp]
push 0
push 0
push eax
push ecx
mov ecx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x1c]
push eax
push ecx
call fcn.004ca3c0
test eax, eax
mov dword [ebp - 0x10], eax
jl 0x517c22
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + 0x48]
mov eax, dword [ebp - 0x20]
xor ecx, 0x400
mov dword [eax + 0x48], ecx
mov edx, dword [esi + 0x48]
mov ecx, dword [ebp - 0x1c]
xor edx, 0x400
mov dword [ecx + 0x48], edx
mov edx, dword [ebp - 0x18]
mov dword [eax + 0x44], edx
mov edx, dword [ebp - 0x14]
mov dword [ecx + 0x44], edx
mov edx, dword [edi]
mov dword [edx + 8], eax
mov eax, dword [edi]
mov dword [eax + 0xc], ecx
mov ecx, dword [edi]
mov eax, dword [ebp - 0xb4]
mov esi, dword [ebp + 8]
mov dword [ecx + 0x10], eax
mov edx, dword [edi]
mov dword [edx + 0x14], eax
mov eax, dword [esi]
mov edx, dword [eax + 0x28]
push ebx
mov ecx, esi
call edx
test al, al
je 0x517c12
mov dword [ebp - 0x10], 1
jmp 0x517c22
mov eax, dword [esi + 0xaa78]
push ebx
push eax
call fcn.004ccff0
mov dword [ebp - 0x10], eax
mov esi, edi
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 - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4