Function at 0x515be0
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
push edi
mov edi, dword [eax + 0x38]
push 1
and edi, 0xfffff
push edi
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0xd4]
push edx
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x154]
push edx
push 0x429cb0
xor esi, esi
push eax
mov ecx, ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x18], 2
mov dword [ebp - 0x14], 3
mov dword [ebp - 0xc], edi
call fcn.004e14d0
test eax, eax
jne 0x515d44
call fcn.004ce850
mov esi, eax
xor eax, eax
cmp esi, eax
je 0x515cbe
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 edx, 0xffffffff
mov eax, edi
and eax, 0xfffff
mov dword [esi + 0x10], edx
mov dword [esi + 0x20], edx
lea ecx, [edi + edi]
or eax, 0x73600000
push esi
mov edx, edi
call fcn.004cc5e0
test eax, eax
mov dword [ebp - 0xc], eax
jge 0x515ccc
mov ebx, esi
call fcn.004c9ab0
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx + 0xaa78]
mov ecx, dword [eax + 0x30]
mov dword [esi + 0x30], ecx
mov edx, dword [eax + 0x34]
mov dword [esi + 0x34], edx
mov eax, dword [ebx + 0xaa78]
mov ecx, dword [eax + 0xc]
mov edx, dword [esi + 0xc]
add edi, edi
add edi, edi
push edi
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov ecx, dword [esi + 4]
add esp, 0xc
push edi
lea eax, [ebp - 0xd4]
push eax
push ecx
call sub.msvcrt.dll_memcpy
mov eax, dword [esi + 4]
add esp, 0xc
push edi
lea edx, [ebp - 0xc4]
push edx
add eax, edi
push eax
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebx + 0xaa78]
add esp, 0xc
push esi
push ecx
call fcn.004ccff0
mov ebx, esi
mov edi, eax
call fcn.004c9ab0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 1
push edi
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0xd4]
push eax
mov eax, dword [ebx + 0xaa78]
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x154]
push edx
push 0x429d50
push eax
mov ecx, ebx
call fcn.004e14d0
test eax, eax
jne 0x515e09
call fcn.004ce850
cmp eax, esi
je 0x515cbe
call fcn.004cc410
mov esi, eax
test esi, esi
je 0x515cbe
mov eax, edi
push 0
and eax, 0xfffff
lea ecx, [edi + edi]
or eax, 0x73500000
push esi
mov edx, edi
call fcn.004cc5e0
test eax, eax
mov dword [ebp - 0xc], eax
jl 0x515cab
mov eax, dword [ebx + 0xaa78]
mov ecx, dword [eax + 0x30]
mov dword [esi + 0x30], ecx
mov edx, dword [eax + 0x34]
mov dword [esi + 0x34], edx
mov ecx, dword [ebx + 0xaa78]
mov edx, dword [ecx + 0xc]
push 0
push esi
mov eax, edi
call fcn.00482d60
push 0
push esi
mov eax, edi
lea edx, [ebp - 0xd4]
call fcn.00482d30
push edi
push esi
mov eax, edi
lea edx, [ebp - 0xc4]
call fcn.00482d30
mov edx, dword [ebx + 0xaa78]
push esi
push edx
jmp 0x515d2b
push 1
push edi
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0xd4]
push ecx
mov ecx, dword [ebx + 0xaa78]
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x154]
push eax
push 0x429df0
push ecx
mov ecx, ebx
call fcn.004e14d0
cmp eax, esi
jne 0x5160b7
mov edx, dword [ebp - 0xb4]
mov eax, 0x400
cmp dword [edx + 0x48], eax
jne 0x515e78
xor eax, eax
cmp edi, esi
jbe 0x515eb9
mov ecx, edi
lea esi, [ebp - 0xa4]
lea edi, [ebp - 0x20]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + eax*4 - 0xb4]
mov edx, dword [ecx + 0x44]
mov dword [ebp + eax*4 - 0x30], edx
add eax, 1
cmp eax, dword [ebp - 0xc]
jb 0x515e60
jmp 0x515eb6
mov ecx, dword [ebp - 0xa4]
cmp dword [ecx + 0x48], eax
jne 0x5160b2
xor eax, eax
cmp edi, esi
jbe 0x515eb9
mov ecx, edi
lea esi, [ebp - 0xb4]
lea edi, [ebp - 0x20]
rep movsd dword es:[edi], dword [esi]
lea ebx, [ebx]
mov edx, dword [ebp + eax*4 - 0xa4]
mov ecx, dword [edx + 0x44]
mov dword [ebp + eax*4 - 0x30], ecx
add eax, 1
cmp eax, dword [ebp - 0xc]
jb 0x515ea0
mov edi, dword [ebp - 0xc]
mov bl, 1
xor ecx, ecx
test edi, edi
mov byte [ebp - 5], bl
jbe 0x515f67
fldz
fld1
mov eax, dword [ebp + ecx*4 - 0xd4]
fld qword [eax + 0xa8]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 8]
and eax, 0x100
xor edx, edx
or eax, edx
jne 0x515eef
mov byte [ebp - 5], al
xor bl, bl
fld st(2)
fucomp st(1)
fnstsw ax
test ah, 0x44
jnp 0x515efe
mov byte [ebp - 5], 0
fld st(1)
fucompp
fnstsw ax
test ah, 0x44
jnp 0x515f0b
xor bl, bl
mov eax, dword [ebp + ecx*4 - 0xc4]
fld qword [eax + 0xa8]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 8]
and eax, 0x100
xor edx, edx
or eax, edx
jne 0x515f2e
mov byte [ebp - 5], al
xor bl, bl
fld st(1)
fucomp st(1)
fnstsw ax
test ah, 0x44
jnp 0x515f3d
mov byte [ebp - 5], 0
fld st(2)
fucompp
fnstsw ax
test ah, 0x44
jnp 0x515f4a
xor bl, bl
add ecx, 1
cmp ecx, edi
jb 0x515ecc
cmp byte [ebp - 5], 0
fstp st(1)
fstp st(0)
jne 0x515f67
test bl, bl
je 0x5160b2
mov eax, dword [0x776138]
test eax, eax
jge 0x515f74
xor eax, eax
jmp 0x515f7b
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x10], 0
je 0x515fa2
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x515f8c
mov ebx, ecx
jmp 0x515fb0
mov edx, dword [ecx]
test edx, edx
mov dword [eax + 0x10], edx
jne 0x515f98
mov dword [eax + 0x14], edx
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x515fb0
mov ecx, dword [eax + 0xc]
push 0x10
push 0x40
call fcn.007515ae
mov ebx, eax
xor ecx, ecx
cmp ebx, ecx
je 0x515cbe
or edx, 0xffffffff
mov eax, edi
lea esi, [ebx + 4]
and eax, 0xfffff
cmp byte [ebp - 5], cl
mov dword [ebx], ecx
mov dword [ebx + 8], ecx
mov dword [ebx + 0x10], edx
mov dword [ebx + 0x38], ecx
mov dword [esi], ecx
mov word [ebx + 0x3c], cx
mov dword [ebx + 0xc], ecx
mov word [ebx + 0x3e], cx
mov dword [ebx + 0x14], ecx
mov dword [ebx + 0x18], ecx
mov dword [ebx + 0x1c], ecx
mov dword [ebx + 0x20], edx
mov dword [ebx + 0x24], ecx
mov dword [ebx + 0x30], ecx
mov dword [ebx + 0x34], ecx
je 0x516000
or eax, 0x73600000
jmp 0x516005
or eax, 0x73500000
push ecx
lea ecx, [edi + edi]
push ebx
mov edx, edi
call fcn.004cc5e0
test eax, eax
mov dword [ebp - 0xc], eax
jge 0x51603e
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 - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
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 ecx, dword [ecx + 0xaa78]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebx + 0xc]
add edi, edi
add edi, edi
push edi
push edx
push eax
call sub.msvcrt.dll_memcpy
mov edx, dword [esi]
add esp, 0xc
push edi
lea ecx, [ebp - 0x20]
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov ecx, dword [esi]
add esp, 0xc
push edi
lea eax, [ebp - 0x30]
push eax
add ecx, edi
push ecx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xaa78]
add esp, 0xc
push ebx
push eax
call fcn.004ccff0
mov esi, eax
call fcn.004c9ab0
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4