Function at 0x1009c5f0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x1009c71a
prefetcht0 byte [edi]
mov eax, edi
and eax, 0xffe00000
mov esi, dword [eax + 0x1000]
mov ecx, edi
shr ecx, 9
and ecx, 0xfe0
lea ebx, [eax + ecx]
add ebx, 0x1000
movzx eax, byte [eax + ecx + 0x101e]
and eax, 0x3f
shl eax, 5
mov edx, edi
sub edx, dword [esi + 0x10]
sub ebx, eax
mov dword [ebp - 0x10], ebx
prefetcht0 byte [ebx]
cmp byte [esi], 2
je 0x1009c916
cmp byte [esi + 6], 0
jne 0x1009c722
cmp byte [esi + 3], 0
je 0x1009c7ac
mov eax, dword [0x10149ec8]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov ebx, dword [eax + 0x90]
cmp ebx, 1
jbe 0x1009c904
cmp ebx, 2
jb 0x1009c7ac
mov eax, dword [ebp - 0x10]
mov edi, dword [eax + 8]
lea eax, [esi + 0x48]
lea ecx, [esi + 0x1148]
cmp ecx, edi
setae cl
cmp eax, edi
ja 0x1009c9f4
test cl, cl
je 0x1009c785
sub edi, eax
sar edi, 5
add dword [ebx + 0x30], 1
adc dword [ebx + 0x34], 0
movzx eax, word [0x10148e08]
cmp edi, eax
ja 0x1009c77d
mov eax, dword [ebx + edi*8 + 0x78]
bswap eax
mov dword [edx], eax
mov dword [ebx + edi*8 + 0x78], edx
inc byte [ebx + edi*8 + 0x7c]
movzx eax, word [ebx + edi*8 + 0x7e]
add dword [ebx], eax
add dword [ebx + 0x38], 1
adc dword [ebx + 0x3c], 0
movzx eax, byte [ebx + edi*8 + 0x7d]
cmp byte [ebx + edi*8 + 0x7c], al
ja 0x1009c833
lea edi, [ebx + edi*8]
movzx eax, byte [ebx + 4]
test al, 1
jne 0x1009c8ec
movzx eax, word [edi + 0x7e]
sub eax, dword [esi + 0xc]
add dword [ebx + 0x68], 1
adc dword [ebx + 0x6c], 0
add dword [ebx + 0x70], eax
adc dword [ebx + 0x74], 0
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
test edx, 0xfff
je 0x1009c84c
lea ebx, [edx - 4]
mov eax, dword [ebx]
and eax, 0x7fffffff
cmp eax, 1
jne 0x1009c89c
mov eax, dword [ebx]
nop word cs:[eax + eax]
mov ecx, eax
and ecx, 0xfffffffe
lock cmpxchg dword [ebx], ecx
jne 0x1009c750
test al, 1
je 0x1009c9fb
and eax, 0x7fffffff
cmp eax, 1
jne 0x1009c86c
cmp byte [esi + 3], 0
jne 0x1009c660
jmp 0x1009c7ac
add dword [ebx + 0x40], 1
adc dword [ebx + 0x44], 0
mov eax, dword [ebp - 0x10]
test byte [eax + 0xf], 8
jne 0x1009c8e4
mov eax, dword [eax + 8]
add eax, 0xc
mov eax, dword [eax]
sub eax, dword [esi + 0xc]
add dword [ebx + 0x68], 1
adc dword [ebx + 0x6c], 0
add dword [ebx + 0x70], eax
adc dword [ebx + 0x74], 0
mov dword [edx], 0
lea ebx, [esi + 0x40]
push ebx
mov edi, edx
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1009c8f8
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 8]
mov eax, dword [eax + 0xc]
sub dword [esi + 0x117c], eax
mov eax, dword [ecx]
cmp eax, edi
je 0x1009ca03
bswap eax
mov dword [edi], eax
mov dword [ecx], edi
mov eax, dword [ecx + 0xc]
mov edx, eax
and edx, 0xefffffff
mov dword [ecx + 0xc], edx
test eax, 0x3ffe
je 0x1009ca06
lea esi, [eax + 0x3ffe]
and esi, 0x3ffe
mov edx, eax
and edx, 0xefffc001
or edx, esi
mov dword [ecx + 0xc], edx
test al, 1
jne 0x1009c8d8
test esi, esi
je 0x1009c8d8
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x1009c71a
lea edx, [ebx + edi*8]
add edx, 0x78
movzx eax, al
shr eax, 1
mov ecx, ebx
push eax
push edx
call fcn.1009f200
jmp 0x1009c6f5
mov eax, edx
and eax, 0xffe00000
mov ecx, edx
shr ecx, 9
and ecx, 0xff8
lea ebx, [ecx + eax]
add ebx, 0x2000
jmp 0x1009c731
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 8]
mov eax, dword [eax + 0xc]
lock add dword [esi + 0x1198], eax
lock inc dword [esi + 0x119c]
mov eax, dword [ecx + 8]
mov eax, dword [eax + 0xc]
lock add dword [esi + 0x11a0], eax
lock inc dword [esi + 0x11a4]
jmp 0x1009c71a
cmp byte [esi + 7], 0
je 0x1009c741
mov eax, dword [ebp - 0x10]
test byte [eax + 0xf], 8
mov dword [ebp - 0x14], edx
jne 0x1009ca09
mov eax, dword [eax + 8]
add eax, 0xc
mov eax, dword [eax]
sub eax, dword [esi + 0xc]
push eax
push 0xef
push edi
call fcn.100c5370
add esp, 0xc
mov edx, dword [ebp - 0x14]
jmp 0x1009c741
push 1
call fcn.10066570
jmp 0x1009c827
add eax, 0x20
jmp 0x1009c798
mov ecx, ebx
call fcn.1009f960
jmp 0x1009c704
mov ecx, ebx
call fcn.1009fbb0
jmp 0x1009c7c6
mov ecx, esi
mov edi, edx
call fcn.10048a30
mov edx, edi
mov ebx, eax
jmp 0x1009c67e
mov dword [ebp - 0x14], edx
mov al, byte [0x10148dd1]
test al, 1
jne 0x1009ca11
mov edx, dword [ebp - 0x14]
mov eax, edx
shr eax, 0x15
cmp word [eax + eax + 0x10148e0c], 0xfffe
jne 0x1009c64c
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 8]
test byte [ecx + 0xf], 8
jne 0x1009ca1b
lea ecx, [eax + 0xc]
mov dword [ebp - 0x10], ecx
mov ebx, dword [eax + 0xc]
cmp byte [0x10148dd3], 1
jne 0x1009c973
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
sub eax, dword [esi + 0xc]
push eax
push 0
push edi
call fcn.100c5370
add esp, 0xc
mov ecx, dword [0x10148dbc]
and ecx, 1
mov eax, 2
sub eax, ecx
mov edx, dword [ebp - 0x14]
mov ecx, edx
shr cl, 2
and cl, 0x1e
shl eax, cl
mov ecx, edx
and ecx, 0xffe00000
not eax
shr edx, 5
and edx, 0xfffc
lock and dword [edx + ecx + 0x4000], eax
mov eax, ebx
lock xadd dword [0x10148db4], eax
add eax, ebx
mov ecx, dword [0x10148db8]
cmp eax, ecx
jbe 0x1009c71a
mov ecx, dword [0x10148dcc]
call fcn.10121320
test al, al
je 0x1009c71a
mov al, byte [0x10148dd0]
test al, al
jne 0x1009c71a
push 1
call fcn.101122f0
add esp, 0xc
jmp 0x1009c71d
xor ecx, ecx
jmp 0x1009c6a3
mov ecx, ebx
push eax
call fcn.1010b0e0
int3
int3
add eax, 0x20
jmp 0x1009c8bc
call fcn.10112310
jmp 0x1009c926
add dword [ebp - 0x10], 0x20
jmp 0x1009c953