Function at 0x100c8970
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10294]
mov eax, dword [ecx + 0x3c]
push ebx
push esi
and eax, 0xfffff
push edi
mov dword [ebp - 0x10], eax
je 0x100c8f6a
xor ebx, ebx
cmp dword [ecx], ebx
je 0x100c8f6a
cmp dword [ecx + 8], ebx
je 0x100c8f6a
mov esi, dword [ecx + 0x3c]
mov eax, dword [ecx]
xor edx, edx
and esi, 0xfffff
div esi
mov dword [ebp - 0x14], ebx
mov edx, eax
xor eax, eax
mov dword [ebp - 0x20], edx
cmp edx, ebx
jbe 0x100c8f6a
mov edi, dword [ecx + 4]
lea esp, [esp]
mov ecx, dword [edi]
mov edx, dword [ecx + 0x5c]
cmp edx, 0xffffffff
je 0x100c8a08
mov ecx, dword [edx + 0x50]
mov ecx, dword [ecx + 8]
and ecx, 4
xor esi, esi
or ecx, esi
jne 0x100c8a08
mov dword [ebp + ebx*4 - 0x3c], edx
test ebx, ebx
jbe 0x100c8a00
mov edx, dword [ebp + eax*4 - 0x3c]
cmp dword [ebp + ecx*4 - 0x3c], edx
je 0x100c8a00
inc ecx
cmp ecx, ebx
jb 0x100c89f5
cmp ecx, ebx
jne 0x100c8a07
inc dword [ebp - 0x14]
inc ebx
mov ecx, dword [ebp - 0x10]
add ecx, ecx
add ecx, ecx
inc eax
add edi, ecx
cmp eax, dword [ebp - 0x20]
jb 0x100c89d0
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x100c8f6a
xor edx, edx
mov dword [ebp - 0xc], edx
test ebx, ebx
jbe 0x100c8b9f
nop
xor ecx, ecx
test edx, edx
jbe 0x100c8a5d
mov esi, dword [ebp + edx*4 - 0x3c]
lea ebx, [ebx]
cmp dword [ebp + ecx*4 - 0x3c], esi
je 0x100c8a4d
inc ecx
cmp ecx, edx
jb 0x100c8a40
jmp 0x100c8a5d
mov eax, dword [ebp + ecx*4 - 0x4c]
mov dword [ebp + edx*4 - 0x4c], eax
cmp ecx, edx
jb 0x100c8b93
cmp dword [ebp - 0x14], 1
mov dword [ebp - 0x18], 3
je 0x100c8a6d
mov dword [ebp - 0x18], edx
mov eax, dword [0x101e316c]
mov ecx, dword [ebp + 8]
mov esi, dword [ecx + 0x8044]
xor edi, edi
cmp eax, edi
jge 0x100c8a85
xor eax, eax
jmp 0x100c8a8c
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0xc], edi
je 0x100c8ab4
mov ecx, dword [eax + 0xc]
cmp ecx, edi
jne 0x100c8a9e
xor ecx, ecx
mov ebx, ecx
jmp 0x100c8ac5
mov edx, dword [ecx]
mov dword [eax + 0xc], edx
cmp edx, edi
jne 0x100c8aaa
mov dword [eax + 0x10], edi
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x100c8ac5
mov ecx, dword [eax + 8]
push 0x10
push pe_nt_image_headers32
call fcn.101d8457
mov ebx, eax
cmp ebx, edi
je 0x100c8b14
mov edx, dword [ebp - 0x18]
or eax, 0xffffffff
push edx
push edi
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x48], eax
push esi
mov eax, ebx
mov dword [ebx], edi
mov dword [ebx + 4], edi
mov dword [ebx + 0x94], edi
mov dword [ebx + 0x98], edi
mov dword [ebx + 0x24], edi
call fcn.10165570
mov esi, eax
cmp esi, edi
jl 0x100c8b1b
mov edi, dword [ebp + 8]
push 0
call fcn.10169830
mov esi, eax
test esi, esi
jl 0x100c8b1b
mov eax, dword [ebp - 0xc]
xor esi, esi
mov dword [ebp + eax*4 - 0x4c], ebx
jmp 0x100c8b62
mov esi, 0x8007000e
jmp 0x100c8b62
mov edi, ebx
call fcn.101654a0
mov eax, dword [0x101e316c]
test eax, eax
jge 0x100c8b2f
xor edi, edi
jmp 0x100c8b38
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push pe_nt_image_headers32
push 0xfe
push ebx
call sub.msvcrt.dll_memset
mov dword [ebx], 0
mov eax, dword [edi + 0x10]
add esp, 0xc
test eax, eax
je 0x100c8b5c
mov dword [eax], ebx
jmp 0x100c8b5f
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
mov edi, esi
test esi, esi
jl 0x100c8f08
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + ecx*4 - 0x4c]
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x10294]
mov edx, dword [ecx + 0xc]
mov ecx, dword [edx]
mov edx, dword [ecx + 0x68]
mov ebx, dword [ebp - 8]
mov dword [eax + 0x68], edx
mov cl, byte [ecx + 0x6c]
mov edx, dword [ebp - 0xc]
mov byte [eax + 0x6c], cl
inc edx
mov dword [ebp - 0xc], edx
cmp edx, ebx
jb 0x100c8a30
mov eax, dword [ebp - 0x10]
xor edi, edi
xor esi, esi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x1c], esi
nop
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x10294]
mov edx, dword [ecx + 4]
mov ecx, dword [esi + edx]
mov ecx, dword [ecx + 0x5c]
cmp ecx, 0xffffffff
je 0x100c8da0
mov ecx, dword [ecx + 0x50]
mov ecx, dword [ecx + 8]
and ecx, 4
xor edx, edx
or ecx, edx
jne 0x100c8da0
mov dword [ebp - 0x18], edi
cmp eax, edi
jbe 0x100c8d98
mov dword [ebp - 0x14], esi
lea esp, [esp]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10294]
mov edx, dword [ecx + 4]
mov ecx, dword [ebp - 0x14]
mov edi, dword [eax + 0x8020]
mov eax, dword [0x101e316c]
mov edx, dword [ecx + edx]
xor esi, esi
cmp eax, esi
mov dword [ebp - 0x24], edx
jge 0x100c8c1a
xor eax, eax
jmp 0x100c8c21
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0xc], esi
je 0x100c8c49
mov ecx, dword [eax + 0xc]
cmp ecx, esi
jne 0x100c8c33
xor ecx, ecx
mov ebx, ecx
jmp 0x100c8c5a
mov edx, dword [ecx]
mov dword [eax + 0xc], edx
cmp edx, esi
jne 0x100c8c3f
mov dword [eax + 0x10], esi
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x100c8c5a
mov ecx, dword [eax + 8]
push 0x10
push pe_nt_image_headers32
call fcn.101d8457
mov ebx, eax
cmp ebx, esi
je 0x100c8ca4
or eax, 0xffffffff
push 0
push 0
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x48], eax
push edi
mov eax, ebx
mov dword [ebx], esi
mov dword [ebx + 4], esi
mov dword [ebx + 0x94], esi
mov dword [ebx + 0x98], esi
mov dword [ebx + 0x24], esi
call fcn.10165570
mov esi, eax
test esi, esi
jl 0x100c8cab
mov edi, dword [ebp + 8]
push 0
call fcn.10169830
mov esi, eax
test esi, esi
jl 0x100c8cab
xor esi, esi
mov dword [ebp - 0x28], ebx
jmp 0x100c8cf2
mov esi, 0x8007000e
jmp 0x100c8cf2
mov edi, ebx
call fcn.101654a0
mov eax, dword [0x101e316c]
test eax, eax
jge 0x100c8cbf
xor edi, edi
jmp 0x100c8cc8
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push pe_nt_image_headers32
push 0xfe
push ebx
call sub.msvcrt.dll_memset
mov dword [ebx], 0
mov eax, dword [edi + 0x10]
add esp, 0xc
test eax, eax
je 0x100c8cec
mov dword [eax], ebx
jmp 0x100c8cef
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
mov edi, esi
test esi, esi
jl 0x100c8f08
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x28]
mov edx, ebx
mov eax, esi
call fcn.10165690
mov edi, eax
test edi, edi
jl 0x100c8f08
cmp dword [esi + 0x7c], 0xffffffff
je 0x100c8d63
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x8020]
push 0x11
push 0
push 0
push ecx
lea edx, [ebp - 0x2c]
push edx
push eax
call fcn.10169c20
mov edi, eax
test edi, edi
jl 0x100c8f08
mov edx, dword [ebx + 0x7c]
mov ebx, dword [ebp - 0x2c]
mov eax, ebx
call fcn.10165690
mov edi, eax
test edi, edi
jl 0x100c8f08
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + eax*4 - 0x4c]
mov dword [esi + 0x7c], ebx
mov dword [ebx + 0x5c], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp + edx*4 - 0x4c]
mov ecx, dword [ebp + 8]
mov dword [esi + 0x5c], eax
mov edx, dword [ecx + 0x10294]
mov ecx, dword [ebp - 0x14]
mov eax, dword [edx + 4]
mov dword [ecx + eax], esi
mov eax, dword [ebp - 0x18]
inc eax
add ecx, 4
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
cmp eax, dword [ebp - 0x10]
jb 0x100c8bf0
mov esi, dword [ebp - 0x1c]
inc dword [ebp - 8]
mov eax, dword [ebp - 0x10]
xor edi, edi
mov edx, dword [ebp - 0xc]
inc edx
lea ecx, [eax*4]
add esi, ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x1c], esi
cmp edx, dword [ebp - 0x20]
jb 0x100c8bb0
mov eax, dword [0x101e316c]
cmp eax, edi
jge 0x100c8dc9
xor eax, eax
jmp 0x100c8dd0
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x18], edi
je 0x100c8df8
mov ecx, dword [eax + 0x18]
cmp ecx, edi
jne 0x100c8de2
xor ecx, ecx
mov ebx, ecx
jmp 0x100c8e06
mov edx, dword [ecx]
mov dword [eax + 0x18], edx
cmp edx, edi
jne 0x100c8dee
mov dword [eax + 0x1c], edi
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x100c8e06
mov ecx, dword [eax + 0x14]
push 0x10
push 0x44
call fcn.101d8457
mov ebx, eax
cmp ebx, edi
je 0x100c8ef8
or eax, 0xffffffff
mov dword [ebx + 0x10], eax
xor ecx, ecx
xor edx, edx
mov dword [ebx + 0x20], eax
xor esi, esi
xor eax, eax
mov dword [ebx], edi
mov dword [ebx + 8], edi
mov dword [ebx + 0x3c], edi
mov dword [ebx + 4], edi
mov word [ebx + 0x40], cx
mov dword [ebx + 0xc], edi
mov word [ebx + 0x42], dx
mov dword [ebx + 0x14], edi
mov dword [ebx + 0x18], edi
mov dword [ebx + 0x1c], edi
mov dword [ebx + 0x24], edi
mov dword [ebx + 0x34], edi
mov dword [ebx + 0x38], edi
mov dword [ebp - 0x2c], ebx
cmp dword [ebp - 8], edi
jbe 0x100c8e86
nop
xor ecx, ecx
cmp eax, edi
jbe 0x100c8e6b
mov edx, dword [ebp + eax*4 - 0x3c]
lea ebx, [ebx]
cmp dword [ebp + ecx*4 - 0x3c], edx
je 0x100c8e6b
inc ecx
cmp ecx, eax
jb 0x100c8e60
cmp ecx, eax
jne 0x100c8e80
mov ecx, dword [ebp + eax*4 - 0x4c]
mov edx, dword [ebp + eax*4 - 0x3c]
mov dword [ebp + esi*4 - 0x5c], ecx
mov dword [ebp + esi*4 - 0x6c], edx
inc esi
inc eax
cmp eax, dword [ebp - 8]
jb 0x100c8e50
mov eax, esi
push 0
and eax, 0xfffff
or eax, 0x10000000
push ebx
mov edx, esi
mov ecx, esi
call fcn.10172020
mov edi, eax
test edi, edi
jl 0x100c8f08
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x10294]
mov ecx, dword [eax + 0x34]
mov dword [ebx + 0x34], ecx
mov edx, dword [eax + 0x38]
mov ecx, dword [ebx + 0xc]
add esi, esi
add esi, esi
push esi
lea eax, [ebp - 0x5c]
push eax
push ecx
mov dword [ebx + 0x38], edx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebx + 4]
add esp, 0xc
push esi
lea edx, [ebp - 0x6c]
push edx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push ebx
call fcn.101699c0
mov edi, eax
test edi, edi
jl 0x100c8f08
xor edi, edi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, 0x8007000e
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x100c8f5f
mov esi, ebx
call fcn.10171ee0
mov eax, dword [0x101e316c]
test eax, eax
jl 0x100c8f5f
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x100c8f5f
push 0x44
push 0xfe
push ebx
call sub.msvcrt.dll_memset
mov dword [ebx], 0
mov eax, dword [esi + 0x1c]
add esp, 0xc
test eax, eax
je 0x100c8f59
mov dword [eax], ebx
mov dword [esi + 0x1c], ebx
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 4