Function at 0x6601c686
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.6601c384
cmp eax, 0x400
jb 0x66042696
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 0x660426a0
mov eax, dword [edi]
lea ecx, [esi + 0x10]
push ecx
push 0x6602f1d0
push edi
call dword [eax]
mov edi, eax
test edi, edi
jl 0x660426fc
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 0x660426ab
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 0x6601c73d
push dword [ebp + 0x2c]
call fcn.6601cbac
mov edi, eax
test edi, edi
jl 0x660426fc
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 0x6601c801
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 0x660426cd
mov edi, dword [ebp - 0x14]
push dword [ebp + 0xc]
mov ecx, edi
call fcn.6601cbc9
test eax, eax
jne 0x6601c7e2
push dword [ebp + 0xc]
mov ecx, edi
call fcn.6601cbe7
test eax, eax
jne 0x6601c7e2
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x18]
test byte [eax + 0x2b], 2
jne 0x6601c7e2
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.6601cc05
mov edi, eax
test edi, edi
jl 0x660426fc
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0xc], 0xffffffff
je 0x6601c861
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 0x6601c763
mov ebx, dword [ebp - 0x14]
mov eax, dword [esi + 0x2c]
inc dword [ebx + 0xc]
test al, 4
jne 0x6601c817
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.6601d0c0
mov edi, eax
test edi, edi
jl 0x66042725
mov eax, dword [esi + 0xc]
or dword [esi + 0x2c], 8
test eax, eax
mov edi, 0x6602f1c0
je 0x6601c84d
mov ecx, dword [eax]
lea edx, [ebp - 4]
push edx
push edi
push eax
call dword [ecx]
test eax, eax
jge 0x66042761
mov esi, dword [esi + 0x14]
test esi, esi
jne 0x6604277a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x28
cmp dword [ebp + 0x14], 0
je 0x6601c7e2
jmp 0x660426d8
mov eax, 0x800a001c
jmp 0x6601c85a
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
jmp 0x6601c6dc
mov ecx, dword [eax]
lea edx, [esi + 0x18]
push edx
push 0x6602f1d0
push eax
call dword [ecx]
mov edi, eax
test edi, edi
jl 0x660426fc
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x6601c70c
mov eax, dword [ebp - 0xc]
mov dword [ebp + 8], eax
jmp 0x6601c787
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.6601cc05
mov edi, eax
test edi, edi
jge 0x6601c7e2
mov eax, dword [ebp + 0x24]
mov ebx, dword [ebp + 0x28]
and dword [eax], 0
mov eax, dword [ebx]
test eax, eax
je 0x66042711
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 0x6601c85a
cmp edi, 0x800a9c68
je 0x660426fc
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [ebp + 0x2c]
add eax, 0x78
test ecx, ecx
je 0x6604275c
mov ecx, dword [ecx + 0x2c]
test ecx, ecx
je 0x6604275c
cmp eax, ecx
je 0x66042755
push eax
push ecx
call fcn.660d6d46
mov edi, 0x80020009
jmp 0x660426fc
mov edi, dword [eax + 0x1c]
jmp 0x660426fc
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 0x6601c84d
mov eax, dword [esi]
lea ecx, [ebp - 4]
push ecx
push edi
push esi
call dword [eax]
test eax, eax
jl 0x6601c858
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 0x6601c858