Function at 0x1012d7f0
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x164
push ebx
push esi
push edi
xor edi, edi
lea eax, [ebp - 0x90]
push eax
lea esi, [ebp - 0xa0]
mov byte [ebp - 0x93], 1
mov dword [ebp - 0xa0], edi
mov dword [ebp - 0x9c], edi
mov dword [ebp - 0x98], edi
mov byte [ebp - 0x94], 0
call fcn.1012dbb0
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 8]
lea edx, [ebp - 0xa0]
push edx
mov edx, dword [ebp + 0xc]
push 0x101975e0
push 0x14
push eax
push edx
call fcn.10164aa0
mov ebx, eax
cmp ebx, edi
jl 0x1012da7b
mov edx, dword [ebp - 0x98]
xor ebx, ebx
mov dword [ebp - 0x10], ebx
cmp edx, edi
jbe 0x1012da2f
mov dword [ebp - 0xc], edi
cmp ebx, edx
jae 0x1012d888
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0xc]
lea edi, [ecx + eax]
mov dword [ebp - 8], edi
jmp 0x1012d892
mov dword [ebp - 8], 0
mov edi, dword [ebp - 8]
mov eax, dword [edi + 8]
call fcn.101734f0
test eax, eax
je 0x1012da1f
mov edx, dword [edi + 0x10]
mov eax, dword [edi + 0x14]
lea ebx, [ebp + 0x10]
mov edi, esi
mov dword [ebp + 0x10], edx
mov dword [ebp - 4], eax
call fcn.1012d770
mov ebx, eax
test ebx, ebx
jl 0x1012da7b
cmp ebx, 1
setne cl
lea ebx, [ebp - 4]
mov byte [ebp + 0xc], cl
call fcn.1012d770
mov ebx, eax
test ebx, ebx
jl 0x1012da7b
mov edi, dword [ebp + 0x10]
mov eax, dword [edi + 0x40]
cmp ebx, 1
setne dl
and eax, 0x400000
xor ecx, ecx
or eax, ecx
mov byte [ebp + 0xd], dl
jne 0x1012da16
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x40]
and eax, 0x400000
or eax, ecx
jne 0x1012da16
mov byte [ebp + 0x13], cl
xor esi, esi
cmp esi, 1
jne 0x1012d920
mov eax, edi
mov edi, dword [ebp - 4]
mov dword [ebp - 4], eax
cmp byte [ebp + esi + 0xc], 0
je 0x1012da09
lea ecx, [ebp - 0xe0]
push ecx
push 0
mov ebx, edi
call fcn.10165c30
mov ebx, eax
test ebx, ebx
jl 0x1012da7b
mov ebx, dword [ebp - 4]
lea edx, [ebp - 0x160]
push edx
push 0
call fcn.10165c30
mov ebx, eax
test ebx, ebx
jl 0x1012da7b
lea eax, [ebp - 0x160]
push eax
mov edx, edi
call fcn.1010b3b0
movzx ecx, al
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
lea edx, [ebp - 0xe0]
push ecx
push edx
test esi, esi
sete dl
lea ebx, [ebp - 0x120]
call fcn.101737c0
mov ebx, eax
test ebx, ebx
jl 0x1012da7b
cmp ebx, 0x270f0001
je 0x1012da7b
test ebx, ebx
jne 0x1012da09
mov ecx, dword [ebp - 8]
mov eax, dword [ecx + 8]
and eax, 0xfff00000
mov ebx, edi
cmp eax, 0x20c00000
je 0x1012d9c4
cmp eax, 0x21000000
jne 0x1012d9ef
cmp byte [ebp + 0x13], 0
jne 0x1012d9ef
mov eax, dword [edi + 0x50]
mov eax, dword [eax + 8]
and eax, 0x10
xor ecx, ecx
or eax, ecx
je 0x1012d9e8
mov eax, edi
call fcn.100db5a0
test al, al
jne 0x1012d9e8
test esi, esi
je 0x1012d9ef
mov ebx, dword [ebp - 4]
mov byte [ebp + 0x13], 1
mov eax, dword [ebp + 8]
push ebx
push edi
push eax
mov eax, dword [eax + 0x18]
lea ecx, [ebp - 0x120]
call fcn.10108160
mov ebx, eax
test ebx, ebx
jl 0x1012da7b
inc esi
cmp esi, 2
jb 0x1012d913
mov esi, dword [ebp + 8]
mov edx, dword [ebp - 0x98]
mov ebx, dword [ebp - 0x10]
add dword [ebp - 0xc], 0x20
inc ebx
mov dword [ebp - 0x10], ebx
cmp ebx, edx
jb 0x1012d877
mov eax, dword [esi + 8]
lea edx, [ebp - 0xa0]
push edx
push eax
call fcn.10197ed0
mov ebx, eax
test ebx, ebx
jl 0x1012da7b
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x1012da7b
lea eax, [esi + 0x194]
mov dword [ecx], eax
mov byte [ecx + 4], 0
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov ecx, dword [ebp - 0x98]
mov edx, dword [ebp - 0xa0]
push ecx
push edx
mov edi, ebx
call fcn.1012dad0
mov ebx, eax
test ebx, ebx
jl 0x1012da7b
mov ebx, edi
cmp byte [ebp - 0x94], 0
mov dword [ebp - 0x98], 0
je 0x1012daba
mov eax, dword [ebp - 0xa0]
mov esi, eax
test eax, eax
je 0x1012daba
mov eax, dword [0x101e316c]
test eax, eax
jge 0x1012daa7
xor eax, eax
jmp 0x1012daae
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0x10