Function at 0x5160d0
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x148
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xaa78]
push ebx
push esi
push edi
mov edi, dword [eax + 0x38]
push 1
and edi, 0xfffff
push edi
lea edx, [ebp - 0x20]
push edx
lea edx, [ebp - 0xc4]
push edx
lea edx, [ebp - 0xc]
push edx
lea edx, [ebp - 0x144]
push edx
push 0x429670
xor ebx, ebx
push eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x18], 2
mov dword [ebp - 0x14], 3
call fcn.004e14d0
cmp eax, ebx
jne 0x51639d
cmp edi, ebx
fldz
mov byte [ebp - 0xd], bl
mov byte [ebp - 5], bl
mov dword [ebp - 0xc], ebx
jbe 0x516237
mov eax, dword [ebp - 0xb4]
fld1
mov eax, dword [eax + 0x10]
mov esi, dword [eax + 8]
mov edx, dword [ebp - 0xa4]
and esi, 0x100
mov ecx, esi
xor eax, eax
or ecx, eax
je 0x51620e
mov eax, dword [edx + 0x10]
mov eax, dword [eax + 8]
and eax, 0x100
xor ecx, ecx
or eax, ecx
je 0x51620e
mov ecx, dword [ebp - 0xb4]
or eax, 0xffffffff
cmp dword [ecx + 0x24], eax
jne 0x51620e
cmp dword [edx + 0x24], eax
jne 0x51620e
fld qword [ecx + 0xa8]
fld qword [edx + 0xa8]
fld st(2)
fucomp st(2)
fnstsw ax
test ah, 0x44
jp 0x5161c6
fld st(3)
fucomp st(1)
fnstsw ax
test ah, 0x44
jp 0x5161c6
fstp st(0)
mov byte [ebp - 0xd], 1
fstp st(0)
jmp 0x5161e0
fld st(2)
fucompp
fnstsw ax
test ah, 0x44
jp 0x51620c
fld st(2)
fucompp
fnstsw ax
test ah, 0x44
jp 0x51620e
mov byte [ebp - 5], 1
add ebx, 1
cmp ebx, edi
jb 0x516166
cmp byte [ebp - 0xd], 0
fstp st(0)
fstp st(0)
je 0x516220
cmp byte [ebp - 5], 0
jne 0x516212
mov eax, edi
and eax, 0xfffff
or eax, 0x73500000
mov dword [ebp - 0xc], eax
jmp 0x516239
fstp st(0)
fstp st(0)
fstp st(0)
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp byte [ebp - 5], 0
je 0x516239
mov eax, edi
and eax, 0xfffff
or eax, 0x73600000
mov dword [ebp - 0xc], eax
jmp 0x516239
fstp st(0)
mov eax, dword [0x776138]
test eax, eax
jge 0x516246
xor eax, eax
jmp 0x51624d
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x10], 0
je 0x516274
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x51625e
mov ebx, ecx
jmp 0x516282
mov edx, dword [ecx]
test edx, edx
mov dword [eax + 0x10], edx
jne 0x51626a
mov dword [eax + 0x14], edx
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x516282
mov ecx, dword [eax + 0xc]
push 0x10
push 0x40
call fcn.007515ae
mov ebx, eax
xor eax, eax
cmp ebx, eax
je 0x5163a6
or ecx, 0xffffffff
push eax
lea esi, [ebx + 4]
mov dword [ebx], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x38], eax
mov dword [esi], 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 + 0x20], ecx
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x34], eax
mov eax, dword [ebp - 0xc]
lea ecx, [edi + edi]
push ebx
mov edx, edi
call fcn.004cc5e0
test eax, eax
mov dword [ebp - 0xc], eax
jl 0x516380
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]
lea eax, [edi*4]
push eax
mov eax, dword [ebx + 0xc]
push edx
push eax
call sub.msvcrt.dll_memcpy
mov edx, dword [esi]
add esp, 0xc
lea eax, [edi*4]
push eax
lea ecx, [ebp - 0xc4]
push ecx
push edx
call sub.msvcrt.dll_memcpy
fldz
mov eax, dword [ebp + 8]
fstp qword [esp + 4]
mov ecx, dword [eax + 0x28e0]
add esp, 4
push 0x20
push 0
push 0
push 0
push ecx
lea edx, [ebp - 0xc]
push edx
push eax
call fcn.004ca3c0
test eax, eax
jl 0x51639d
test edi, edi
jbe 0x51636d
mov ecx, dword [ebp - 0xc]
lea eax, [edi*4]
lea ebx, [ebx]
mov edx, dword [esi]
mov dword [eax + edx], ecx
add eax, 4
sub edi, 1
jne 0x516360
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xaa78]
push ebx
push ecx
call fcn.004ccff0
mov dword [ebp - 0xc], eax
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
pop edi
pop esi
mov eax, 0x8007000e
pop ebx
mov esp, ebp
pop ebp
ret 4