Function at 0x52c390
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x178
cmp byte [ebp + 0x10], 0
push esi
push edi
je 0x52c572
cmp byte [ebp + 0x14], 0
mov edi, dword [ebp + 8]
jne 0x52c467
mov ecx, dword [edi + 0x1f8]
mov eax, dword [edi + 0xe0]
mov dword [esp + 0x18], ecx
push ecx
lea ecx, [edi + 0xe0]
call dword [eax + 0x64]
mov ecx, dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x20], 0x12
mov dword [ecx + 0xa], eax
mov al, byte [edi + 0x1fc]
mov byte [edi + 0x2a], al
lea eax, [ecx + 8]
mov dword [esp + 0x14], eax
lea eax, [edi + 0xe8]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
nop
mov eax, dword [edi - 8]
mov ecx, dword [edi - 4]
mov edx, dword [edi]
mov esi, dword [edi + 4]
mov edi, dword [esp + 0x1c]
mov dword [edi - 8], eax
mov eax, edi
mov edi, dword [esp + 0x14]
add edi, 0x10
mov dword [esp + 0x14], edi
mov dword [eax - 4], ecx
mov dword [eax], edx
mov dword [eax + 4], esi
add eax, 0x10
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x20], eax
test eax, eax
jg 0x52c400
mov edi, dword [ebp + 8]
push 0
push 0
lea eax, [edi + 0x200]
push eax
call fcn.0045d830
mov ecx, dword [esp + 0x24]
add esp, 0xc
call fcn.0045c160
push dword [edi + 0x10]
mov ecx, edi
push dword [ebp + 0x18]
call fcn.00507d80
movzx eax, byte [edi + 0xe8]
mov ecx, dword [ebp + 0xc]
cmp eax, ecx
je 0x52c7b9
cmp ecx, 1
je 0x52c7b9
lea ecx, [esp + 0x30]
call fcn.00506d40
lea edx, [edi + 0xe0]
mov dword [esp + 0x148], 0
mov eax, edx
mov dword [esp + 0x30], vtable.hkpMaxSizeMotion.0
sub eax, edi
mov esi, edx
mov ecx, 0x48
lea edi, [esp + eax - 0xb0]
mov eax, dword [edx]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x150]
push ecx
mov ecx, edx
call dword [eax + 0x14]
movzx eax, byte [esp + 0xeb]
lea ecx, [esp + 0x30]
mov edi, dword [ebp + 8]
movss xmm0, dword [eax*4 + 0x7beb28]
movzx eax, byte [esp + 0xea]
lea esi, [edi + 0xe0]
push esi
sub esp, 8
movss xmm1, dword [eax*4 + 0x7beb28]
lea eax, [esp + 0xcc]
movss dword [esp + 4], xmm0
movss dword [esp], xmm1
push eax
lea eax, [esp + 0x160]
push eax
call fcn.00506ec0
push ecx
fstp dword [esp]
lea eax, [esp + 0xc8]
push eax
lea eax, [esp + 0x8c]
push eax
push dword [ebp + 0xc]
call fcn.00512670
add esp, 0x24
lea ecx, [esp + 0x30]
push esi
call fcn.00507080
movsx eax, word [esp + 0xe4]
shl eax, 0x10
sar eax, 0x10
mov word [esi + 0xb4], ax
movsx eax, word [esp + 0xe6]
shl eax, 0x10
sar eax, 0x10
mov word [esi + 0xb6], ax
jmp 0x52c7b0
lea ecx, [esp + 0x30]
call fcn.00506d40
mov edx, dword [ebp + 8]
mov ecx, 0x48
mov dword [esp + 0x148], 0
mov dword [esp + 0x30], vtable.hkpMaxSizeMotion.0
lea esi, [edx + 0xe0]
mov eax, esi
sub eax, edx
cmp dword [ebp + 0xc], 5
lea edi, [esp + eax - 0xb0]
rep movsd dword es:[edi], dword [esi]
lea ecx, [edx + 0xe0]
jne 0x52c659
test ecx, ecx
je 0x52c5d8
lea eax, [edx + 0x160]
push eax
lea eax, [edx + 0x120]
push eax
call fcn.0051e430
mov esi, eax
mov dword [esp + 0x14], eax
jmp 0x52c5de
xor esi, esi
mov dword [esp + 0x14], esi
lea eax, [esp + 0x40]
lea edi, [esi + 0x10]
push eax
mov ecx, edi
call fcn.005070c0
mov al, byte [esp + 0x39]
mov byte [esi + 9], al
movss xmm1, dword [esp + 0x9c]
ucomiss xmm1, dword [0x718814]
lahf
test ah, 0x44
jnp 0x52c688
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x52c633
mov ecx, eax
call fcn.0050f820
fstp dword [esp + 0x18]
movss xmm0, dword [esp + 0x18]
push edi
push ecx
movss dword [esp], xmm0
call fcn.00650b80
add esp, 8
jmp 0x52c688
movss xmm0, dword [0x718824]
divss xmm0, xmm1
push edi
push ecx
addss xmm0, dword [esp + 0x94]
movss dword [esp], xmm0
call fcn.00650b80
add esp, 8
jmp 0x52c688
test ecx, ecx
je 0x52c678
lea eax, [edx + 0x160]
push eax
lea eax, [edx + 0x120]
push eax
call fcn.00507180
mov esi, eax
mov dword [esp + 0x14], eax
jmp 0x52c67e
xor esi, esi
mov dword [esp + 0x14], esi
push esi
lea ecx, [esp + 0x34]
call fcn.00507080
cmp byte [ebp + 0x14], 0
je 0x52c77c
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0x120
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov esi, eax
mov eax, 0x120
mov ecx, esi
mov dword [esp + 0x24], esi
mov word [esi + 4], ax
call fcn.00506d40
mov dword [esi + 0x118], 0
lea edi, [esp + 0x38]
mov dword [esi], vtable.hkpMaxSizeMotion.0
mov ecx, edi
movzx eax, word [esi + 4]
mov dword [esp + 0x28], eax
lea eax, [esi + 8]
mov dword [esp + 0x18], eax
mov eax, esi
sub eax, ecx
mov dword [esp + 0x20], 0x12
mov dword [esp + 0x1c], eax
nop dword [eax + eax]
mov ecx, dword [edi - 4]
lea edi, [edi + 0x10]
mov eax, dword [edi - 0x18]
mov edx, dword [edi - 0x10]
mov esi, dword [edi - 0xc]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x1c]
mov dword [ecx + edi - 0x10], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
mov dword [eax - 4], ecx
mov dword [eax], edx
mov dword [eax + 4], esi
add eax, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x20], eax
test eax, eax
jg 0x52c700
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edi, dword [ebp + 8]
mov word [eax + 4], cx
mov ecx, 1
mov word [eax + 6], cx
mov ecx, dword [esp + 0x14]
mov dword [ecx + 0x118], eax
movsx ax, byte [edi + 0x2a]
mov word [ecx + 0x11c], ax
mov ecx, edi
push dword [edi + 0x10]
push dword [ebp + 0x18]
call fcn.00507d80
jmp 0x52c79c
mov eax, dword [esi]
mov ecx, esi
push dword [esp + 0x148]
call dword [eax + 0x6c]
mov ax, word [esp + 0x14c]
mov edi, dword [ebp + 8]
mov word [esi + 0x11c], ax
cmp dword [ebp + 0xc], 5
mov dword [edi + 0xa4], 0
setne al
mov byte [edi + 0x2a], al
lea ecx, [esp + 0x30]
call fcn.005071c0
lea eax, [edi + 0xf0]
mov dword [edi + 0x18], eax
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x52c838
movzx ecx, byte [eax + 0x317]
movzx edx, byte [eax + 0x316]
movzx esi, byte [eax + 0x315]
movzx eax, byte [edi + 0xe9]
mov dword [esp + 0x24], ecx
and ecx, 3
mov dword [esp + 0x28], eax
and eax, 3
cmp cl, al
jae 0x52c7f9
not esi
mov eax, dword [esp + 0x28]
shl esi, 0xe
cmp dword [esp + 0x24], eax
jge 0x52c808
not edx
movzx eax, word [edi + 0xea]
mov ecx, 0x3fff
and ax, cx
shl edx, 0xe
or ax, si
mov word [edi + 0xea], ax
movzx eax, word [edi + 0xec]
and ax, cx
or ax, dx
mov word [edi + 0xec], ax
pop edi
pop esi
mov esp, ebp
pop ebp
ret