joyce8/EMBER2024-capa huggingface dataset:
Function at 0x412040
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004fdc20]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004fdc00]
test rbx, rbx
je 0x412094
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x41208b
test r12, r12
je 0x41208b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x412070
lea rcx, [0x004fdc20]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x4122c0
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
jne 0x4122d0
jmp sym._ValidateImageBase.part.0
xor eax, eax
ret

Function at 0x4122e0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x412325
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x41231c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x412327
add rax, 0x28
cmp rax, r9
jne 0x412308
xor eax, eax
ret

Function at 0x4123d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x004d29b0]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x412449
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x412449
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x412446
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x41243d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x412449
add r8, 0x28
cmp r8, r9
jne 0x412428
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x412530
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x004d29b0]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x41259f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x41259f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x41259d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x412594
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4125a8
add rax, 0x28
cmp rax, r9
jne 0x412580
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x4125c0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004d29b0]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x412638
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x412638
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x412638
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x412638
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x41262c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x412640
add rdx, 0x28
cmp rdx, r10
jne 0x412618
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x412650
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x41265e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x412635
test r8d, r8d
jg 0x412648
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret
Function at 0x412de0
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rbp, [rsp + 0x80]
mov qword [rbp], r8
mov r15, rcx
movsxd rbx, edx
call sym.strlen
mov rsi, rax
lea r13d, [rax + 0xf]
lea edi, [rax + 0x10]
lea eax, [rax + 0x52]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.00412680
sub rsp, rax
movsxd r12, esi
mov rdx, r15
movsxd r13, r13d
mov r8, r12
lea r14, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
movabs rax, 0x656d68732d636367
mov qword [rsp + 0x20], rax
mov eax, 0x326d
lea r15d, [rsi + 0x50]
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
mov byte [rsp + 0x2e], 0x2d
call sym.memcpy
lea rax, [r14 + r12 + 0x10]
mov r8, r14
movabs rdx, 0x6161616161616161
movabs rcx, 0x6161616161616161
mov qword [rax], rdx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rcx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rcx
mov qword [rax + 0x30], rdx
xor edx, edx
mov qword [rax + 0x38], rcx
movsxd rax, r15d
xor ecx, ecx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + r13 + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + r13 + 0x20], 0x2d
mov edx, 0xffffffff
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x412eda
int3
mov rcx, r14
add esi, 0x51
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
je 0x412f28
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, esi
call dbg.get_ptr_from_atom
mov r14, rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, r14
lea rsp, [rbp - 0x58]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rcx, rbx
call sym.malloc
mov r13, rax
mov eax, 0x40
nop dword [rax + rax]
bt r13, rax
jae 0x412f53
mov edx, r15d
sub edx, eax
movsxd rdx, edx
mov byte [r14 + rdx], 0x41
sub eax, 1
jne 0x412f40
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
jne 0x412f67
int3
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, esi
call dbg.get_ptr_from_atom
mov r14, rax
cmp r13, rax
je 0x412f8d
mov rcx, r13
call sym.free
jmp 0x412eff
xor edx, edx
mov r8, rbx
mov rcx, rax
call sym.memset
cmp qword [rbp], 0
je 0x412eff
mov rcx, r14
call qword [rbp]
jmp 0x412eff

Function at 0x41dc30
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_cond_locked_shmem_cond]
mov edx, 8
lea rcx, str.cond_locked_shmem_cond
jmp sym.__shmem_winpthreads_grab
Function at 0x4203f0
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x004fe708]
test rbx, rbx
je 0x420428
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x004fe708]
test rax, rax
je 0x420450
cmp dword [rax], 0xffffffff
je sym.pthread_tls_init.cold
add rsp, 0x20
pop rbx
ret
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004fe708], rax
mov rbx, rax
jmp 0x420401
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004fe708], rax
jmp 0x420415

Function at 0x420900
Capabilities:
Print debug messages

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x98
mov rbx, rcx
test rcx, rcx
je 0x420925
call sym.pthread_spin_destroy
cmp eax, 1
je 0x420932
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop r12
ret
lea r12, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
mov rdi, r12
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x4209b8
mov eax, 0x28
jmp 0x42098a
add rax, 1
cmp rax, 0x6b
je 0x4209aa
cmp byte [r12 + rax], 0
mov edx, eax
jne 0x420980
cmp eax, 0x6a
je 0x4209aa
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov edx, 0x27
jmp 0x420998
Function at 0x4209c0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rcx, qword [0x004fe710]
test rcx, rcx
je 0x420b18
cmp dword [rcx], 1
je 0x4209e3
call sym._pthread_once_raw.part.0.constprop.0
mov rax, qword [0x004fe708]
test rax, rax
je 0x420b40
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x420a10
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rbx, rax
je 0x420a03
test rax, rax
je 0x420a03
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
mov dword [rbx + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call sym.replace_spin_keys.constprop.0
mov rdi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rdi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rdi
mov dword [rsp + 0x30], 2
mov r8, rsi
mov rdx, r12
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je sym.__pthread_self_lite.cold
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
mov rax, qword [0x004fe708]
test rax, rax
je 0x420b68
mov ecx, dword [rax]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je sym.__pthread_self_lite.cold
mov r12, rbx
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004fe710], rax
mov rcx, rax
jmp 0x4209d9
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004fe708], rax
jmp 0x4209f3
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004fe708], rax
jmp 0x420aee

Function at 0x420ba0
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 8
lea rcx, str._pthread_key_dest_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420bc0
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_cancelling_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420be0
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_concur_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420c00
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_tls_once_shmem
jmp sym.__shmem_winpthreads_grab
Function at 0x420c20
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420c40
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init__pthread_key_lock_shmem]
mov edx, 8
lea rcx, str._pthread_key_lock_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420c60
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_key_max_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420c80
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_key_sch_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420ca0
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 8
lea rcx, str.pthr_root_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420cc0
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 8
lea rcx, str.pthr_last_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420ce0
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
lea rcx, str.mtx_pthr_locked_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420d00
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 8
lea rcx, str.idList_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420d20
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 8
lea rcx, str.idListCnt_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420d40
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 8
lea rcx, str.idListMax_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x420d60
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 8
lea rcx, str.idListNextId_shmem
jmp sym.__shmem_winpthreads_grab
Function at 0x421030
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r14
push r13
push r12
sub rsp, 0x20
test edx, edx
jne 0x421060
test r8, r8
je 0x421118
mov eax, 1
add rsp, 0x20
pop r12
pop r13
pop r14
ret
cmp edx, 1
je 0x421140
cmp edx, 3
jne 0x421047
mov rax, qword [0x004fe708]
test rax, rax
je 0x421258
mov ecx, dword [rax]
cmp ecx, 0xffffffff
je 0x421047
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x421047
test byte [rax + 0x40], 0x30
je 0x421170
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
je 0x4210ae
call sym._pthread_cleanup_dest.part.0
mov rcx, qword [r12 + 0x28]
test rcx, rcx
je 0x4210e1
mov r13, qword [sym.imp.KERNEL32.dll_CloseHandle]
call r13
mov rcx, qword [r12 + 0x30]
test rcx, rcx
je 0x4210cf
call r13
mov qword [r12 + 0x30], 0
mov qword [r12 + 0x28], 0
lea rcx, [r12 + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [r12 + 0x68]
call sym.replace_spin_keys.constprop.0
cmp qword [r12 + 0x1d0], 0
jne 0x42120a
mov rcx, r12
call sym.push_pthread_mem.part.0
jmp 0x42120a
mov rcx, qword [0x004fe738]
test rcx, rcx
je 0x421047
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov qword [0x004fe738], 0
jmp 0x421047
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x004fe738], rax
mov eax, 1
add rsp, 0x20
pop r12
pop r13
pop r14
ret
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x421228
test rcx, rcx
je 0x42118d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [r12 + 0x1d8]
mov qword [r12 + 0x30], 0
mov dword [r12 + 0xbc], 1
test rcx, rcx
je 0x4211b4
call sym._pthread_cleanup_dest.part.0
lea r14, [r12 + 0x38]
lea r13, [r12 + 0x68]
test byte [r12 + 0x44], 4
je 0x421280
mov rcx, qword [r12 + 0x28]
mov dword [r12], 0xdeadbeef
test rcx, rcx
je 0x4211e2
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r12 + 0x28], 0
mov rcx, r14
call sym.pthread_mutex_destroy
mov rcx, r13
call sym.replace_spin_keys.constprop.0
cmp qword [r12 + 0x1d0], 0
je 0x421104
mov rax, qword [0x004fe708]
test rax, rax
je 0x421295
mov ecx, dword [rax]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x421047
test rcx, rcx
je 0x421233
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r12 + 0x30], 0
lea rcx, [r12 + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [r12 + 0x68]
call sym.replace_spin_keys.constprop.0
jmp 0x421047
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004fe708], rax
jmp 0x42107e
mov rcx, r14
call sym.pthread_mutex_destroy
mov rcx, r13
call sym.replace_spin_keys.constprop.0
jmp 0x421047
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004fe708], rax
jmp 0x421216
Function at 0x4216b0
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 8
lea rcx, str.once_obj_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x4216d0
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_once_global_shmem]
mov edx, 8
lea rcx, str.once_global_shmem
jmp sym.__shmem_winpthreads_grab
Function at 0x4229b0
Capabilities:
Hijack thread execution

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x4f8
mov rsi, rcx
call sym.__pth_gpointer_locked
mov rbx, rax
test rax, rax
je 0x422a8c
mov rcx, qword [rax + 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x422a8c
lea r12, [rsp + 0x20]
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x422a8c
lea r13, [rbx + 0x38]
mov rcx, r13
call sym.pthread_mutex_lock
call sym.__pthread_self_lite
test rax, rax
je 0x422b20
mov rdx, qword [rax + 0x1d8]
movzx eax, byte [rbx + 0x40]
cmp rsi, rdx
je 0x422aa0
mov edx, dword [rbx + 0x44]
and edx, 3
cmp edx, 3
je 0x422a80
test al, 3
jne 0x422b00
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
mov rax, qword [0x004fe720]
test rax, rax
je 0x422bd0
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x422a62
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, r13
call sym.pthread_mutex_unlock
xor eax, eax
add rsp, 0x4f8
pop rbx
pop rsi
pop r12
pop r13
ret
test al, 0xc
jne 0x422b00
test al, 0xf
je 0x422b30
mov eax, 3
add rsp, 0x4f8
pop rbx
pop rsi
pop r12
pop r13
ret
test al, 3
jne 0x422b00
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
mov rax, qword [0x004fe720]
test rax, rax
je 0x422bf0
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x422ad0
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [rbx + 0x44]
mov edx, eax
and edx, 3
cmp edx, 3
jne 0x422a62
and eax, 0xfffffffe
mov rcx, r13
mov dword [rbx + 0x44], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xfffffff3
or eax, 4
mov byte [rbx + 0x40], al
call sym.pthread_mutex_unlock
call sym._pthread_invoke_cancel
nop dword [rax]
mov rcx, r13
call sym.pthread_mutex_unlock
test byte [rbx + 0x40], 0xc
jne 0x422a8c
xor eax, eax
jmp 0x422a6c
xor edx, edx
jmp 0x422a1a
mov rcx, qword [rbx + 0x28]
mov dword [rsp + 0x50], 0x100001
call qword [sym.imp.KERNEL32.dll_SuspendThread]
xor edx, edx
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x422a62
mov rcx, qword [rbx + 0x28]
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
lea rax, [sym._pthread_invoke_cancel]
mov rcx, qword [rbx + 0x28]
mov rdx, r12
mov qword [rsp + 0x118], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
movzx eax, byte [rbx + 0x40]
and dword [rbx + 0x44], 0xfffffffe
and eax, 0xfffffff0
or eax, 5
mov byte [rbx + 0x40], al
mov rax, qword [0x004fe720]
test rax, rax
je 0x422c10
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x422bb2
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, r13
call sym.pthread_mutex_unlock
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x422a62
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_cancelling_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004fe720], rax
jmp 0x422a4f
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_cancelling_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004fe720], rax
jmp 0x422abd
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_cancelling_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004fe720], rax
jmp 0x422b9f
Function at 0x422c30
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push r12
push rbx
sub rsp, 0x28
mov r12, rcx
mov rcx, qword [0x004fe6d8]
mov ebx, edx
test rcx, rcx
je 0x422ce8
call sym.pthread_mutex_lock
mov rcx, r12
call sym.__pthread_get_pointer
mov rcx, qword [0x004fe6d8]
test rax, rax
je 0x422cc0
cmp qword [rax + 0x1d8], r12
jne 0x422cc0
test byte [rax + 0x40], 0xc
jne 0x422cc0
mov edx, dword [rax + 0xbc]
test edx, edx
jne 0x422cc0
mov rax, qword [rax + 0x28]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x422cc0
test rcx, rcx
je 0x422d40
call sym.pthread_mutex_unlock
test ebx, ebx
je 0x422ce0
lea edx, [rbx - 2]
cmp edx, 0x15
ja 0x422d38
mov rcx, r12
add rsp, 0x28
pop rbx
pop r12
jmp sym.pthread_cancel
test rcx, rcx
je 0x422d10
call sym.pthread_mutex_unlock
mov eax, 3
add rsp, 0x28
pop rbx
pop r12
ret
xor eax, eax
jmp 0x422ccf
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov qword [0x004fe6d8], rax
mov rcx, rax
jmp 0x422c4c
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov qword [0x004fe6d8], rax
mov rcx, rax
jmp 0x422cc5
mov eax, 0x16
jmp 0x422ccf
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov qword [0x004fe6d8], rax
mov rcx, rax
jmp 0x422c95
Function at 0x422fe0
Capabilities:
Create thread
Resume thread

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rdi, rcx
mov rsi, rdx
mov rbx, r8
mov rbp, r9
call sym.pop_pthread_mem
mov r12, rax
test rax, rax
je 0x42321b
test rdi, rdi
je 0x42301a
mov rax, qword [rax + 0x1d8]
mov qword [rdi], rax
mov r13, qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [r12 + 8], rbp
mov dword [r12 + 0x44], 1
mov rbp, qword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [r12 + 0xbc], 0
mov r14, r13
mov qword [r12 + 0x28], 0xffffffffffffffff
mov qword [r12 + 0x10], rbx
xor ebx, ebx
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call rbp
mov qword [r12 + 0x30], rax
test rax, rax
jne 0x423090
test ebx, ebx
je 0x423088
mov ecx, 0x14
call r14
cmp ebx, 4
je 0x423090
add ebx, 1
jmp 0x423055
xor ecx, ecx
call r13
jmp 0x42307f
mov qword [r12 + 0x38], 0xffffffffffffffff
lea r14, [r12 + 0x68]
mov rcx, r14
call sym.replace_spin_keys.constprop.0
cmp qword [r12 + 0x30], 0
mov dword [r12], 0xbab1f00d
mov dword [r12 + 0xc0], 0
mov dword [r12 + 0xb8], 0
je 0x4231fc
xor edx, edx
test rsi, rsi
je 0x4230f6
mov eax, dword [rsi]
mov edx, dword [rsi + 0x10]
mov dword [r12 + 0x44], eax
test al, 8
jne 0x423230
mov eax, dword [rsi + 0x18]
mov dword [r12 + 0xc0], eax
lea r8, [sym.pthread_create_wrapper]
mov r9, r12
xor ecx, ecx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 4
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov r13, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
ja 0x4231c8
mov eax, dword [r12 + 0xc0]
mov edx, 0xfffffff1
cmp eax, 0xfffffff2
jge 0x4231a0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov rcx, qword [r12 + 0x30]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test byte [r12 + 0x44], 4
jne 0x423180
mov qword [r12 + 0x28], r13
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ResumeThread]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov qword [r12 + 0x28], 0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x423166
mov edx, 0xfffffffe
cmp eax, 0xffffffff
jl 0x42313c
mov edx, 0xf
cmp eax, 0xe
jg 0x42313c
cmp eax, 2
mov edx, 2
cmovle edx, eax
jmp 0x42313c
mov rcx, qword [r12 + 0x30]
test rcx, rcx
je 0x4231d8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [r12 + 0x38]
call sym.pthread_mutex_destroy
mov rcx, r14
call sym.replace_spin_keys.constprop.0
mov qword [r12 + 0x30], 0
mov qword [r12 + 0x28], 0
test rdi, rdi
je 0x423208
mov qword [rdi], 0
cmp qword [r12 + 0x1d0], 0
jne 0x42321b
mov rcx, r12
call sym.push_pthread_mem.part.0
mov eax, 0xb
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov dword [rsp + 0x3c], edx
call sym.__pthread_self_lite
mov edx, dword [rsp + 0x3c]
mov eax, dword [rax + 0xc0]
mov dword [r12 + 0xc0], eax
jmp 0x4230f6

Function at 0x423860
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 4
lea rcx, str.dummy_concurrency_level_shmem
jmp sym.__shmem_winpthreads_grab