Function at 0x6601c952
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, ecx
push esi
push edi
mov eax, dword [ebx + 8]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x24]
and dword [eax], 0
mov eax, dword [ebp + 0x28]
and dword [eax], 0
call fcn.6601c644
cmp eax, 0x400
jb 0x660423c3
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x14], eax
mov eax, dword [edi]
push edi
mov dword [esi + 0xc], edi
call dword [eax + 4]
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x660423cd
mov eax, dword [edi]
lea ecx, [esi + 0x10]
push ecx
push 0x6602f1f8
push edi
call dword [eax]
mov edi, eax
test edi, edi
jl 0x66042429
mov eax, dword [ebp + 0xc]
or byte [esi + 0x2d], 0x10
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x660423d8
mov ecx, dword [ebp + 0x24]
lea eax, [esi + 0x1c]
push esi
mov dword [ecx], eax
mov eax, dword [esi]
call dword [eax + 4]
mov eax, dword [ebp + 0x28]
mov dword [eax], esi
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x18]
test byte [eax + 0x29], 2
jne 0x6601ca09
push dword [ebp + 0x2c]
call fcn.6601ce78
mov edi, eax
test edi, edi
jl 0x66042429
mov ecx, dword [ebp - 0x10]
push 1
pop eax
movzx ecx, word [ecx + 0x58]
inc ecx
mov dword [ebp + 0xc], eax
cmp ecx, eax
jbe 0x6601cacd
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 8], 0x28
add eax, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
and dword [ebp + 8], 0
mov eax, dword [eax + 0x5c]
mov ebx, dword [ecx + eax - 0x24]
lea eax, [ecx + eax - 0x28]
add ebx, esi
cmp dword [ebp + 0x1c], 0
mov dword [ebp - 0x18], eax
jne 0x660423fa
mov edi, dword [ebp - 0x14]
push dword [ebp + 0xc]
mov ecx, edi
call fcn.6601ce95
test eax, eax
jne 0x6601caae
push dword [ebp + 0xc]
mov ecx, edi
call fcn.6601ceb3
test eax, eax
jne 0x6601caae
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x18]
test byte [eax + 0x2b], 2
jne 0x6601caae
push dword [ebp + 0x20]
mov ecx, edi
push 0
push dword [ebp + 8]
push dword [ebp + 0x18]
push ebx
push dword [ebp + 0xc]
push dword [ebp + 0x10]
call fcn.6601ced1
mov edi, eax
test edi, edi
jl 0x66042429
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0xc], 0xffffffff
je 0x6601cb2d
mov eax, dword [ebp - 0x10]
inc dword [ebp + 0xc]
add dword [ebp - 8], 0x28
add dword [ebp - 0xc], 4
movzx eax, word [eax + 0x58]
inc eax
cmp dword [ebp + 0xc], eax
jb 0x6601ca2f
mov ebx, dword [ebp - 0x14]
mov eax, dword [esi + 0x2c]
inc dword [ebx + 0xc]
test al, 4
jne 0x6601cae3
mov ecx, dword [ebx]
or al, 4
mov dword [esi + 4], ecx
mov dword [ebx], esi
mov dword [esi + 0x2c], eax
push 1
push esi
mov ecx, ebx
call fcn.6601d38c
mov edi, eax
test edi, edi
jl 0x66042452
mov eax, dword [esi + 0xc]
or dword [esi + 0x2c], 8
test eax, eax
mov edi, 0x6602f1e8
je 0x6601cb19
mov ecx, dword [eax]
lea edx, [ebp - 4]
push edx
push edi
push eax
call dword [ecx]
test eax, eax
jge 0x6604248e
mov esi, dword [esi + 0x14]
test esi, esi
jne 0x660424a7
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x28
cmp dword [ebp + 0x14], 0
je 0x6601caae
jmp 0x66042405
mov eax, 0x800a001c
jmp 0x6601cb26
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
jmp 0x6601c9a8
mov ecx, dword [eax]
lea edx, [esi + 0x18]
push edx
push 0x6602f1f8
push eax
call dword [ecx]
mov edi, eax
test edi, edi
jl 0x66042429
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x6601c9d8
mov eax, dword [ebp - 0xc]
mov dword [ebp + 8], eax
jmp 0x6601ca53
push dword [ebp + 0x20]
mov ecx, dword [ebp - 0x14]
push 1
push dword [ebp + 8]
push dword [ebp + 0x18]
push ebx
push dword [ebp + 0xc]
push dword [ebp + 0x14]
call fcn.6601ced1
mov edi, eax
test edi, edi
jge 0x6601caae
mov eax, dword [ebp + 0x24]
mov ebx, dword [ebp + 0x28]
and dword [eax], 0
mov eax, dword [ebx]
test eax, eax
je 0x6604243e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esi + 0x1c]
and dword [ebx], 0
add esi, 0x1c
push esi
call dword [eax + 8]
mov eax, edi
jmp 0x6601cb26
cmp edi, 0x800a9c68
je 0x66042429
push dword [0x6610feb0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [ebp + 0x2c]
add eax, 0x78
test ecx, ecx
je 0x66042489
mov ecx, dword [ecx + 0x2c]
test ecx, ecx
je 0x66042489
cmp eax, ecx
je 0x66042482
push eax
push ecx
call fcn.660d8197
mov edi, 0x80020009
jmp 0x66042429
mov edi, dword [eax + 0x1c]
jmp 0x66042429
mov eax, dword [ebp - 4]
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x6601cb19
mov eax, dword [esi]
lea ecx, [ebp - 4]
push ecx
push edi
push esi
call dword [eax]
test eax, eax
jl 0x6601cb24
mov eax, dword [ebp - 4]
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x6601cb24