Function at 0x489cc0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x40
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x10], ecx
mov eax, dword [ecx]
mov ebx, eax
test eax, eax
jne 0x489d04
jmp 0x489cea
cmp byte [ebp - 0x3c], 0
je 0x48a18a
mov ecx, dword [ebp - 0x10]
mov eax, ebx
mov edx, 2
lock cmpxchg dword [ecx], edx
je 0x48a054
mov ebx, eax
test eax, eax
je 0x489cea
cmp ebx, 1
je 0x489ce0
cmp ebx, 3
je 0x48a07f
mov eax, ebx
and eax, 3
cmp eax, 2
je 0x489d3e
jmp 0x48a1b8
mov eax, ebx
and eax, 3
cmp eax, 2
jne 0x48a040
mov eax, dword [0x572178]
test eax, eax
je 0x489d63
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x489d80
cmp dword [eax + 4], 0
mov esi, eax
je 0x489d80
add esi, 8
jmp 0x489e40
mov ecx, 0x572178
call fcn.0048a3d0
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jae 0x489d53
nop dword [eax + eax]
mov eax, dword [0x572178]
test eax, eax
je 0x489da0
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
test eax, eax
je 0x489dc0
mov edi, eax
cmp eax, 1
jne 0x489e18
jmp 0x48a135
mov ecx, 0x572178
call fcn.0048a3d0
push eax
call sub.KERNEL32.dll_TlsGetValue
test eax, eax
jne 0x489d94
nop word cs:[eax + eax]
nop
movzx eax, byte [0x597110]
mov eax, dword [0x5970d8]
test eax, eax
jne 0x489de2
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x48a0bc
mov dword [0x5970d8], eax
push 0xc
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x48a0bc
mov dword [eax], 0x572178
mov dword [eax + 4], 0
mov edi, eax
mov eax, dword [0x572178]
test eax, eax
je 0x489f2f
dec eax
push edi
push eax
call sub.KERNEL32.dll_TlsSetValue
mov ecx, dword [edi + 8]
cmp dword [edi + 4], 0
lea esi, [edi + 8]
mov dword [edi + 4], 1
mov dword [edi + 8], 0
je 0x489e40
test ecx, ecx
je 0x489e40
lock dec dword [ecx]
jne 0x489e40
call fcn.0048a390
mov edi, dword [esi]
test edi, edi
jne 0x489ee2
movzx eax, byte [0x597110]
mov eax, dword [0x5970d8]
test eax, eax
jne 0x489e6c
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x48a0ad
mov dword [0x5970d8], eax
push 0x20
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x48a0ad
mov dword [eax], 1
mov dword [eax + 4], 1
mov dword [ebp - 0x40], ebx
mov dword [eax + 0x10], 0
mov edi, eax
movq xmm0, qword [0x5970d0]
movd eax, xmm0
pshufd xmm0, xmm0, 0x55
movd edx, xmm0
nop dword [eax]
mov ebx, eax
mov ecx, edx
add ebx, 1
adc ecx, 0
jb 0x48a087
lock cmpxchg8b qword [0x5970d0]
jne 0x489eb0
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ecx
mov byte [edi + 0x18], 0
cmp dword [esi], 0
jne 0x48a0cb
mov ebx, dword [ebp - 0x40]
mov dword [esi], edi
lock inc dword [edi]
jle 0x48a207
mov ecx, dword [ebp - 0x10]
mov eax, ebx
mov dword [ebp - 0x34], edi
mov byte [ebp - 0x2c], 0
lea edx, [ebp - 0x32]
add eax, 0xfffffffe
mov dword [ebp - 0x30], eax
mov eax, ebx
lock cmpxchg dword [ecx], edx
je 0x48a020
mov ebx, eax
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x489d30
lock dec dword [eax]
jne 0x489d30
mov ecx, dword [ebp - 0x34]
call fcn.0048a390
jmp 0x489d30
mov ecx, 0x572178
call fcn.0048a3d0
jmp 0x489e11
call fcn.0048a6e0
mov esi, eax
test eax, eax
je 0x48a091
mov edi, dword [esi]
test edi, edi
jne 0x489f69
xor ecx, ecx
call fcn.00489a50
cmp dword [esi], 0
mov edi, eax
jne 0x48a100
mov dword [esi], edi
lock inc dword [edi]
jle 0x48a207
lock dec byte [edi + 0x18]
je 0x489fa6
mov esi, dword [0x5970e4]
lea ebx, [edi + 0x18]
test esi, esi
je 0x489fb4
nop word cs:[eax + eax]
nop
push 0xffffffffffffffff
push 1
push 0x581d30
push ebx
call esi
xor ecx, ecx
mov al, 1
lock cmpxchg byte [ebx], cl
jne 0x489f90
lock dec dword [edi]
jne 0x48a020
mov ecx, edi
call fcn.0048a390
jmp 0x48a020
mov ecx, dword [0x57213c]
cmp ecx, 0xffffffff
jne 0x489ffe
mov dword [ebp - 0x38], 0xffffffff
mov eax, dword [0x572144]
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x38]
push ecx
call eax
test eax, eax
jne 0x48a149
mov ecx, dword [ebp - 0x38]
mov eax, 0xffffffff
lock cmpxchg dword [0x57213c], ecx
je 0x489ffe
mov esi, eax
push ecx
call sub.KERNEL32.dll_CloseHandle
mov ecx, esi
mov eax, dword [0x57214c]
push 0
push 0
push ebx
push ecx
call eax
xor eax, eax
xchg byte [ebx], al
lock dec dword [edi]
je 0x489fab
nop word cs:[eax + eax]
nop
movzx eax, byte [ebp - 0x2c]
test al, al
je 0x489f40
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x48a040
lock dec dword [eax]
jne 0x48a040
mov ecx, dword [ebp - 0x34]
call fcn.0048a390
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov ebx, eax
test eax, eax
jne 0x489d04
jmp 0x489cea
mov eax, dword [ebp + 0xc]
cmp ebx, 1
mov dword [ebp - 0x28], 3
sete byte [ebp - 0x24]
mov eax, dword [eax + 0x10]
lea ecx, [ebp - 0x28]
push ecx
push dword [ebp + 8]
call eax
add esp, 8
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x10]
call 0x48a230
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.0048c670
jmp 0x48a207
mov edx, 0x5e
mov ecx, 0x582264
push 0x5822c4
call fcn.0046f1c0
add esp, 4
jmp 0x48a207
mov ecx, 8
mov edx, 0x20
call fcn.00429f40
mov ecx, 4
mov edx, 0xc
call fcn.00429f40
mov dword [ebp - 0x28], 0x581cc8
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], str.vmesh_src_char_anim.rs
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x28]
mov edx, 0x581d20
call fcn.004696f0
jmp 0x48a207
mov dword [ebp - 0x28], 0x581cc8
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], str.vmesh_src_char_anim.rs
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x28]
mov edx, 0x581d20
call fcn.004696f0
jmp 0x48a207
mov ecx, 0x582264
mov edx, 0x5e
push 0x5822c4
call fcn.0046f1c0
lea ebx, [ebp - 0x44]
lea esi, [ebp - 0x4c]
mov dword [ebp - 0x28], 0x5839ec
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x48], 0x473200
mov dword [ebp - 0x1c], 1
lea ecx, [ebp - 0x28]
mov edx, 0x583a24
call fcn.004696f0
jmp 0x48a207
mov dword [ebp - 0x28], 0x583c68
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], str.vmesh_src_char_anim.rs
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp + 0x10]
lea ecx, [ebp - 0x28]
call fcn.004696f0
mov ecx, str.assertion_failed:_state_and_queue.addr____STATE_MASK__RUNNING
mov edx, 0x40
push dword [ebp + 0x10]
call fcn.0046b190
mov esi, eax
mov ecx, dword [ebp - 0x10]
mov edx, 1
call 0x48a230
jmp 0x48a222
ud2
push esi
call fcn.00567e20
nop dword [eax + eax]
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
xchg dword [ecx], edx
mov eax, edx
and eax, 3
cmp eax, 2
mov dword [ebp - 0x18], eax
jne 0x48a358
add edx, 0xfffffffe
jne 0x48a266
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
test ebx, ebx
mov edx, ebx
je 0x48a251
mov esi, dword [edx]
mov ebx, dword [edx + 4]
mov dword [edx], 0
test esi, esi
je 0x48a303
mov byte [edx + 8], 1
mov al, 1
xchg byte [esi + 0x18], al
cmp al, 0xff
jne 0x48a295
mov eax, dword [0x5970e8]
lea edi, [esi + 0x18]
test eax, eax
je 0x48a2a3
push edi
call eax
lock dec dword [esi]
jne 0x48a260
mov ecx, esi
call fcn.0048a390
jmp 0x48a260
mov ecx, dword [0x57213c]
cmp ecx, 0xffffffff
jne 0x48a2eb
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [0x572144]
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x10]
push ecx
call eax
test eax, eax
jne 0x48a317
mov ecx, dword [ebp - 0x10]
mov eax, 0xffffffff
lock cmpxchg dword [0x57213c], ecx
je 0x48a2eb
push ecx
mov dword [ebp - 0x1c], eax
call sub.KERNEL32.dll_CloseHandle
mov ecx, dword [ebp - 0x1c]
mov eax, dword [0x572148]
push 0
push 0
push edi
push ecx
call eax
lock dec dword [esi]
jne 0x48a260
jmp 0x48a29a
mov ecx, 0x586c6b
mov edx, 0x2b
push 0x583cdc
call fcn.0046b190
lea ebx, [ebp - 0x20]
lea edi, [ebp - 0x18]
mov dword [ebp - 0x38], 0x5839ec
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x14], 0x473200
mov dword [ebp - 0x2c], 1
lea ecx, [ebp - 0x38]
mov edx, 0x583a24
call fcn.004696f0
ud2
mov dword [ebp - 0x38], 0
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x18]
mov edx, 0x583cb0
push 0x583cec
push eax
call fcn.0048ad60
lock dec dword [esi]
mov edi, eax
jne 0x48a383
mov ecx, esi
call fcn.0048a390
push edi
call fcn.00567e20
nop dword [eax]