Function at 0x4c4dd0
Capabilities:
Set thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r12, qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov eax, dword [r8]
lea esi, [rax + 1]
movsxd rbx, esi
mov r14, qword [rcx + rbx*8 + 0x828]
mov qword [rsp + 0x78], rdx
mov r13, rcx
mov rdi, r8
mov qword [rsp + 0x88], r9
test r14, r14
je 0x4c4e4c
mov eax, dword [r14 + 0x36c]
mov esi, ebx
mov ebp, ebx
test eax, eax
je 0x4c4f20
mov r15d, dword [r14 + 0x374]
call r12
cmp r15d, eax
je 0x4c4f80
add rbx, 1
add esi, 1
mov r14, qword [r13 + rbx*8 + 0x828]
test r14, r14
jne 0x4c4e10
mov eax, dword [rdi]
xor r14d, r14d
test eax, eax
jle 0x4c4e8d
mov r15, qword [r13 + r14*8 + 0x828]
mov ebp, r14d
test r15, r15
je 0x4c4e8d
mov eax, dword [r15 + 0x36c]
test eax, eax
je 0x4c4fc0
mov ebx, dword [r15 + 0x374]
call r12
cmp ebx, eax
je 0x4c4ff8
add r14, 1
cmp dword [rdi], r14d
jg 0x4c4e53
cmp dword [r13 + 0x18], esi
jg 0x4c5022
movsxd rax, dword [rdi]
mov r15, qword [sym.imp.KERNEL32.dll_SleepEx]
xor ebx, ebx
mov ebp, 1
mov rsi, qword [r13 + rax*8 + 0x828]
mov eax, dword [rsi + 0x36c]
test eax, eax
je 0x4c4ee6
mov r14d, dword [rsi + 0x374]
call r12
cmp r14d, eax
je 0x4c500e
add ebx, 1
test bl, 0x3f
jne 0x4c4eb0
xor edx, edx
xor ecx, ecx
call r15
mov eax, dword [rsi + 0x36c]
test eax, eax
jne 0x4c4eba
mfence
mov eax, ebp
xchg dword [rsi + 0x36c], eax
test eax, eax
jne 0x4c4ecd
call r12
mov dword [rsi + 0x370], eax
call r12
mov dword [rsi + 0x374], eax
mov dword [rsi + 0x370], 1
movsxd rax, dword [rdi]
mov rax, qword [r13 + rax*8 + 0x828]
jmp 0x4c4f68
mfence
mov eax, 1
xchg dword [r14 + 0x36c], eax
test eax, eax
jne 0x4c4e36
call r12
mov dword [r14 + 0x374], eax
mov dword [r14 + 0x370], 1
cmp qword [rsp + 0x78], 0
mov dword [rdi], ebp
je 0x4c4f9b
mov rax, qword [rsp + 0x78]
mov dword [rax], ebp
movsxd r8, ebp
mov rax, qword [r13 + r8*8 + 0x828]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, dword [r14 + 0x370]
add eax, 1
cmp qword [rsp + 0x78], 0
mov dword [r14 + 0x370], eax
mov dword [rdi], ebp
jne 0x4c4f56
mov edx, ebp
mov ecx, dword [r13 + 0x820]
not edx
movsxd rdx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4c4f5d
jmp 0x570f4b
mfence
mov eax, 1
xchg dword [r15 + 0x36c], eax
test eax, eax
jne 0x4c4e84
call r12
mov dword [r15 + 0x374], eax
mov dword [r15 + 0x370], 1
jmp 0x4c4f4c
mov eax, dword [r15 + 0x370]
add eax, 1
mov dword [r15 + 0x370], eax
jmp 0x4c4f4c
mov eax, dword [rsi + 0x370]
add eax, 1
mov dword [rsi + 0x370], eax
jmp 0x4c4f11
mov rcx, qword [rsp + 0x88]
mov edx, 1
call fcn.004c4a30
mov rbx, rax
test rax, rax
je 0x4c4e97
xor ebp, ebp
mov r14d, 1
nop dword [rax + rax]
mov eax, dword [r13]
test eax, eax
je 0x4c5080
mov r15d, dword [r13 + 8]
call r12
cmp r15d, eax
je 0x4c518e
add ebp, 1
test bpl, 0x3f
jne 0x4c5050
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SleepEx]
jmp 0x4c5050
mfence
mov eax, r14d
xchg dword [r13], eax
test eax, eax
jne 0x4c5068
call r12
mov dword [r13 + 4], eax
call r12
mov dword [r13 + 8], eax
mov dword [r13 + 4], 1
movsxd rax, esi
mov edx, dword [r13 + 0x18]
cmp qword [r13 + rax*8 + 0x828], 0
jne 0x4c50d2
jmp 0x4c50f4
lea ebp, [rax + 1]
add rax, 1
cmp qword [r13 + rax*8 + 0x828], 0
je 0x4c50f6
cmp edx, eax
jg 0x4c50c0
mov eax, dword [r13 + 4]
sub eax, 1
mov dword [r13 + 4], eax
je 0x4c51af
mov rcx, rbx
call fcn.004c4cc0
jmp 0x4c4e97
mov ebp, esi
cmp ebp, edx
jge 0x4c50d6
movsxd rax, ebp
xor r15d, r15d
mov r14d, 1
mov qword [r13 + rax*8 + 0x828], rbx
nop
mov eax, dword [rbx + 0x36c]
test eax, eax
je 0x4c513d
mov esi, dword [rbx + 0x374]
call r12
cmp esi, eax
je 0x4c519e
add r15d, 1
test r15b, 0x3f
jne 0x4c5110
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SleepEx]
jmp 0x4c5110
mfence
mov eax, r14d
xchg dword [rbx + 0x36c], eax
test eax, eax
jne 0x4c5127
call r12
mov dword [rbx + 0x370], eax
call r12
mov dword [rbx + 0x374], eax
mov dword [rbx + 0x370], 1
mov eax, dword [r13 + 4]
sub eax, 1
mov dword [r13 + 4], eax
jne 0x4c4f4c
mov dword [r13 + 8], 0
mfence
xchg dword [r13], eax
jmp 0x4c4f4c
mov eax, dword [r13 + 4]
add eax, 1
mov dword [r13 + 4], eax
jmp 0x4c50a4
mov eax, dword [rbx + 0x370]
add eax, 1
mov dword [rbx + 0x370], eax
jmp 0x4c5169
mov dword [r13 + 8], 0
mfence
xchg dword [r13], eax
jmp 0x4c50e7
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
mov rax, qword [pe_dos_header]
ud2