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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140088a90]
mov rcx, qword [0x140088a40]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x140088aa0]
cmp word [rcx], 0x5a4d
mov dword [rax], 1
mov rax, qword [0x140088ab0]
mov dword [rax], 1
jne 0x140001083
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x140001083
mov ecx, dword [rax + 0x18]
cmp cx, 0x10b
je 0x14000105e
cmp cx, 0x20b
je 0x14000106d
jmp 0x140001083
cmp dword [rax + 0x74], 0xe
jbe 0x140001083
cmp dword [rax + 0xe8], 0
jmp 0x14000107d
cmp dword [rax + 0x84], 0xe
jbe 0x140001083
cmp dword [rax + 0xf8], 0
setne dl
movzx edx, dl
mov rax, qword [0x140088a80]
mov dword [0x1400b100c], edx
mov ecx, 2
cmp dword [rax], 0
jne 0x14000109f
mov ecx, 1
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x140088b70]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140088b50]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140087f40]
cmp dword [rax], 1
jne 0x1400010e1
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
Function at 0x140006da4
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x1400b10a8]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x1400b10a4]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x140006df2
mov rdx, qword [rax]
cmp r12, rdx
jb 0x140006dea
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140006ed9
inc ebx
add rax, 0x28
jmp 0x140006dca
mov rcx, r12
call sym.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
jne 0x140006e11
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
movsxd rbx, ebx
mov rax, qword [0x1400b10a8]
xor edx, edx
imul rbx, rbx, 0x28
add rax, rbx
mov dword [rax], edx
mov qword [rax + 0x20], rbp
call sym._GetPEImageBase
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400b10a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140006e73
mov rax, qword [0x1400b10a8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140006ed3
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140006ed3
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1400b10a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140006ed3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
inc dword [0x1400b10a4]
mov ecx, edi
mov rdi, r12
rep movsb byte [rdi], byte [rsi]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x140007300
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x1400b1100]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400b10e0]
test rbx, rbx
je 0x14000734c
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rsi, rsi
je 0x140007346
test eax, eax
jne 0x140007346
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x14000731e
mov rcx, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140007500
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140007523
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
jne 0x140007523
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x140007524
Capabilities:
Enumerate pe sections

Disassembly:
xor r8d, r8d
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
cmp r8d, r9d
jae 0x14000755e
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp rdx, r10
jb 0x140007555
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x140007560
inc r8d
add rax, 0x28
jmp 0x14000753c
xor eax, eax
ret

Function at 0x1400075d1
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x140088a40]
mov r8, rcx
mov rcx, r9
call sym._ValidateImageBase
test eax, eax
je 0x1400075fd
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp sym._FindPESection
xor eax, eax
add rsp, 0x28
ret

Function at 0x140008210
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x230
mov rbx, rcx
call sym._errno
xor ecx, ecx
mov dword [rax], ecx
test rbx, rbx
jne 0x14000823b
call sym._errno
mov dword [rax], 0xe
jmp 0x14000824c
cmp word [rbx], 0
jne 0x140008253
call sym._errno
mov dword [rax], 0x14
xor ebx, ebx
jmp 0x140008363
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14000826e
call sym._errno
mov dword [rax], 2
jmp 0x14000824c
test al, 0x10
je 0x140008241
lea rdi, [rsp + 0x28]
mov rdx, rbx
mov r8d, 0x104
mov rcx, rdi
lea rbp, [0x1400878c0]
lea r12, [0x1400878c4]
call sym._wfullpath
mov rcx, rdi
call sym.wcslen
mov rcx, rbp
mov rbx, rax
call sym.wcslen
mov rcx, r12
add rbx, rax
call sym.wcslen
lea rcx, [rbx + rax + 0x229]
add rcx, rcx
call sym.malloc
mov rbx, rax
test rax, rax
jne 0x1400082dc
call sym._errno
mov dword [rax], 0xc
jmp 0x14000824c
lea rsi, [rax + 0x44c]
mov rdx, rdi
mov rcx, rsi
call sym.wcscpy
cmp word [rbx + 0x44c], 0
je 0x140008329
mov rcx, rsi
call sym.wcslen
cmp word [rbx + rax*2 + 0x44a], 0x2f
je 0x140008329
mov rcx, rsi
call sym.wcslen
cmp word [rbx + rax*2 + 0x44a], 0x5c
je 0x140008329
mov rdx, rbp
mov rcx, rsi
call sym.wcscat
mov rdx, r12
mov rcx, rsi
call sym.wcscat
xor edx, edx
xor eax, eax
mov ecx, 0x82
mov qword [rbx + 0x230], rdx
lea rdx, [rbx + 0x238]
mov dword [rbx + 0x448], eax
mov rdi, rdx
xor eax, eax
mov qword [rbx + 0x440], 0xffffffffffffffff
rep stosd dword [rdi], eax
mov rax, rbx
add rsp, 0x230
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x140008780
Capabilities:
Enumerate disk volumes
Get disk information
Get disk size
Get file size

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
mov ebp, ecx
mov rbx, rdx
cmp ecx, 0xffffffff
je 0x140008959
test rdx, rdx
js 0x140008959
call sym._get_osfhandle
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400087eb
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileType]
dec eax
jne 0x1400087eb
mov ecx, ebp
call sym._telli64
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x140008959
lea rdx, [rsp + 0x60]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1400087fd
mov ecx, 9
call sym._set_errno
or eax, 0xffffffff
jmp 0x140008977
cmp qword [rsp + 0x60], rbx
jae 0x140008912
lea rdx, [rsp + 0x68]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x140008959
mov edx, 2
mov ecx, 0x33
call sym.calloc
mov edx, 2
mov ecx, 0x106
mov rdi, rax
call sym.calloc
mov r12, rax
test rdi, rdi
je 0x1400087eb
test rax, rax
je 0x1400087eb
mov edx, 0x32
mov rcx, rdi
lea r15, [rsp + 0x54]
call qword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
mov r14, qword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
mov qword [rsp + 0x48], rax
xor edx, edx
xor eax, eax
mov r9, r15
mov r8d, 0x105
mov qword [rsp + 0x30], rdx
mov rcx, rdi
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x20], rdx
mov rdx, r12
mov dword [rsp + 0x38], eax
call r14
mov eax, dword [rsp + 0x54]
cmp dword [rsp + 0x84], eax
je 0x1400088be
mov rcx, qword [rsp + 0x48]
mov r8d, 0x32
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextVolumeW]
test eax, eax
jne 0x14000886b
xor r14d, r14d
jmp 0x1400088c1
mov r14, rdi
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_FindVolumeClose]
test r14, r14
jne 0x1400088d9
mov rcx, rdi
call sym.free
mov rcx, r12
call sym.free
xor r9d, r9d
xor r8d, r8d
mov rcx, r14
lea rdx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov rcx, r14
mov edi, eax
call sym.free
test edi, edi
je 0x140008942
mov rax, rbx
sub rax, qword [rsp + 0x60]
cmp qword [rsp + 0x58], rax
jb 0x140008942
xor r9d, r9d
mov qword [rsp + 0x68], rbx
lea r8, [rsp + 0x6c]
mov edx, ebx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
inc eax
jne 0x14000894c
cmp dword [rsp + 0x68], 0xffffffff
je 0x14000894c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x83
jne 0x140008959
mov ecx, 0x1b
jmp 0x1400087f0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140008963
mov ecx, 0x16
jmp 0x1400087f0
xor r8d, r8d
mov rdx, r13
mov ecx, ebp
call sym._lseeki64
inc rax
je 0x140008959
xor eax, eax
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x14000e49e
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
lea rcx, str.msvcrt.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rsi, qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.rand_s
mov rcx, rax
call rsi
test rax, rax
jne 0x14000e4f3
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.SystemFunction036
mov rcx, rax
call rsi
mov qword [0x1400b1c80], rax
lea rax, [sym.mingw_rand_s]
mov rcx, rbx
mov qword [sym.init_rand_s], rax
add rsp, 0x28
pop rbx
pop rsi
jmp rax

Function at 0x1400103e3
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140080158], eax
inc eax
jne 0x1400103fd
call sym.abort
nop
add rsp, 0x28
ret

Function at 0x140010571
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
mov rbx, rcx
test rcx, rcx
je 0x14001060d
call sym.pthread_spin_destroy
dec eax
jne 0x140010606
xor eax, eax
lea rdi, [rsp + 0x25]
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x4d]
mov ecx, 0x43
rep stosb byte [rdi], al
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x4c]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
mov eax, 0x27
lea rcx, [rsp + 0x25]
cmp byte [rcx + rax], 0
je 0x1400105e5
inc rax
cmp rax, 0x6b
jne 0x1400105d4
jmp 0x1400105fb
cmp eax, 0x6a
je 0x1400105fb
movsxd rdx, eax
inc eax
cdqe
mov byte [rsp + rdx + 0x25], 0xa
mov byte [rsp + rax + 0x25], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret
Function at 0x1400106af
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x140080158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test rax, rax
jne 0x1400107be
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rbx, rax
je 0x1400107be
test rax, rax
je 0x1400107be
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
xor edx, edx
xor ecx, ecx
mov rdi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rbx + 0xb8], edx
mov qword [rbx + 0x28], rcx
call rdi
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rsi, rax
call rdi
xor r8d, r8d
mov dword [rsp + 0x30], 2
mov rdx, rsi
mov dword [rsp + 0x28], r8d
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], r8d
mov r8, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x140010784
call sym.abort
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x140080158]
mov rdx, rbx
mov dword [rbx + 0xc0], eax
xor eax, eax
mov dword [rbx + 0xbc], eax
mov al, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14001077f
mov rsi, rbx
mov rax, rsi
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
Function at 0x140010ef8
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
test edx, edx
jne 0x140010f32
test r8, r8
jne 0x14001105d
mov rcx, qword [0x1400b1ce0]
test rcx, rcx
je 0x14001105d
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
xor r9d, r9d
mov qword [0x1400b1ce0], r9
jmp 0x14001105d
cmp edx, 1
jne 0x140010f55
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x1400b1ce0], rax
jmp 0x14001105d
cmp edx, 3
jne 0x14001105d
mov ecx, dword [0x140080158]
cmp ecx, 0xffffffff
je 0x14001105d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x14001105d
test byte [rax + 0x40], 0x30
lea rdi, [rax + 0x38]
lea rsi, [rax + 0x68]
je 0x140010feb
mov rcx, qword [rax + 0x1d8]
call sym._pthread_cleanup_dest
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x140010fc3
mov rbp, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rbp
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x140010fb6
call rbp
xor r8d, r8d
mov qword [rbx + 0x30], r8
xor ecx, ecx
mov qword [rbx + 0x28], rcx
mov rcx, rdi
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.0
mov rcx, rbx
call sym.push_pthread_mem
mov ecx, dword [0x140080158]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x14001105d
cmp dword [rax + 0xbc], 0
mov rcx, qword [rax + 0x30]
jne 0x14001103c
test rcx, rcx
je 0x140011003
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov rcx, qword [rbx + 0x1d8]
mov dword [rbx + 0xbc], 1
mov qword [rbx + 0x30], rdx
call sym._pthread_cleanup_dest
test byte [rbx + 0x44], 4
je 0x14001104d
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x140010fbd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140010fbd
test rcx, rcx
je 0x140011047
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov qword [rbx + 0x30], rax
mov rcx, rdi
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.0
mov eax, 1
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x14001106b
Capabilities:
Set thread local storage value

Disassembly:
push rbp
mov rbp, rsp
push rsi
push rbx
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
call sym._fpreset
lea rcx, [0x140080148]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x10]
lea rbx, [rax + 0x38]
mov rcx, rbx
call sym.pthread_mutex_lock
call sym._pthread_once_raw.constprop.0.isra.0
mov rdx, qword [rbp + 0x10]
mov ecx, dword [0x140080158]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rsi, qword [rbp + 0x10]
mov rcx, rbx
mov dword [rsi + 0x70], eax
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x10]
mov rdx, rbp
lea rcx, [rax + 0xd0]
call sym._setjmp
test eax, eax
jne 0x14001114b
lea rcx, [0x140080148]
mov ebx, pe_nt_image_headers64
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x140011106
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rdx + 8]
call rax
mov rbx, rax
nop
nop
lea rcx, [0x140080148]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x10]
mov qword [rax + 8], rbx
mov rcx, qword [rax + 0x1d8]
call sym._pthread_cleanup_dest
mov rax, qword [rbp + 0x10]
lea rbx, [rax + 0x38]
mov rcx, rbx
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax + 0x30]
mov rsi, qword [rax + 8]
test rcx, rcx
jne 0x140011159
jmp 0x14001115f
lea rcx, [0x140080148]
call sym.pthread_mutex_lock
jmp 0x140011128
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x10]
xor edx, edx
cmp qword [rax + 0x28], 0
mov qword [rax + 0x30], rdx
jne 0x1400111a3
mov rax, qword [rbp + 0x10]
mov rcx, rbx
mov dword [rax], 0xdeadbeef
call sym.pthread_mutex_unlock
mov rcx, rbx
call sym.pthread_mutex_destroy
mov rcx, qword [rbp + 0x10]
call sym.push_pthread_mem
mov ecx, dword [0x140080158]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x1400111c9
mov rcx, rbx
call sym.pthread_mutex_unlock
mov rcx, rbx
call sym.pthread_mutex_destroy
mov rax, qword [rbp + 0x10]
mov qword [rax + 0x38], 0xffffffffffffffff
mov dword [rax + 0xbc], 1
lea rbx, [0x140080148]
mov rcx, rbx
call sym.pthread_mutex_unlock
test eax, eax
jne 0x1400111e6
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400111d0
mov ecx, esi
call qword [sym.imp.msvcrt.dll__endthreadex]
nop
Function at 0x14001133f
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
call sym.__pthread_self_lite
mov qword [rax + 8], rsi
mov rcx, qword [rax + 0x1d8]
mov rbx, rax
call sym._pthread_cleanup_dest
test byte [rbx + 0x40], 0x30
jne 0x140011378
lea rcx, [rbx + 0xd0]
mov edx, 1
call qword [sym.imp.msvcrt.dll_longjmp]
mov ecx, dword [0x140080158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x140011403
cmp qword [rax + 0x28], 0
mov rcx, qword [rax + 0x30]
jne 0x1400113b3
mov dword [rax], 0xdeadbeef
test rcx, rcx
je 0x1400113a8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
mov esi, dword [rbx + 8]
mov qword [rbx + 0x30], rcx
jmp 0x1400113ed
mov dword [rax + 0xbc], 1
mov esi, dword [rax + 8]
test rcx, rcx
je 0x1400113cb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov qword [rbx + 0x30], rdx
test byte [rbx + 0x44], 4
je 0x140011403
mov dword [rbx], 0xdeadbeef
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov qword [rbx + 0x28], rax
mov rcx, rbx
call sym.push_pthread_mem
mov ecx, dword [0x140080158]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, esi
call qword [sym.imp.msvcrt.dll__endthreadex]
nop
Function at 0x140011638
Capabilities:
Hijack thread execution

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x4f8
mov rdi, rcx
call sym.__pth_gpointer_locked
mov rbx, rax
test rax, rax
je 0x1400117dd
mov rcx, qword [rax + 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400117dd
lea rbp, [rsp + 0x20]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x1400117dd
lea rsi, [rbx + 0x38]
mov rcx, rsi
call sym.pthread_mutex_lock
call sym.pthread_self
cmp rax, rdi
mov al, byte [rbx + 0x40]
jne 0x1400116ea
test al, 3
jne 0x1400116fc
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
lock inc dword [0x1400b1d28]
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x1400116bb
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [rbx + 0x44]
mov edx, eax
not edx
and dl, 3
jne 0x1400117d0
and eax, 0xfffffffe
mov rcx, rsi
mov dword [rbx + 0x44], eax
mov al, byte [rbx + 0x40]
and eax, 0xfffffff3
or eax, 4
mov byte [rbx + 0x40], al
call sym.pthread_mutex_unlock
call sym._pthread_invoke_cancel
mov edx, dword [rbx + 0x44]
not edx
and dl, 3
jne 0x1400117a9
test al, 0xc
je 0x140011715
mov rcx, rsi
call sym.pthread_mutex_unlock
test byte [rbx + 0x40], 0xc
jne 0x1400117dd
xor eax, eax
jmp 0x1400117e2
test al, 0xf
jne 0x1400117dd
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 0x1400117d0
mov rcx, qword [rbx + 0x28]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
lea rax, [sym._pthread_invoke_cancel]
mov rcx, qword [rbx + 0x28]
mov rdx, rbp
mov qword [rsp + 0x118], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
mov al, byte [rbx + 0x40]
and dword [rbx + 0x44], 0xfffffffe
and eax, 0xfffffff0
or eax, 5
mov byte [rbx + 0x40], al
lock inc dword [0x1400b1d28]
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x140011795
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rsi
call sym.pthread_mutex_unlock
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x1400117d0
test al, 3
jne 0x1400116fc
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
lock inc dword [0x1400b1d28]
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x1400117d0
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rsi
call sym.pthread_mutex_unlock
jmp 0x14001170e
mov eax, 3
add rsp, 0x4f8
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x1400117ee
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x140080148]
mov rsi, rcx
mov rcx, rdi
mov ebx, edx
call sym.pthread_mutex_lock
mov rcx, rsi
call sym.__pthread_get_pointer
test rax, rax
je 0x14001183b
cmp qword [rax + 0x1d8], rsi
jne 0x14001183b
test byte [rax + 0x40], 0xc
jne 0x14001183b
cmp dword [rax + 0xbc], 0
jne 0x14001183b
mov rax, qword [rax + 0x28]
dec rax
cmp rax, 0xfffffffffffffffd
jbe 0x14001184a
mov rcx, rdi
mov ebx, 3
call sym.pthread_mutex_unlock
jmp 0x140011872
mov rcx, rdi
call sym.pthread_mutex_unlock
test ebx, ebx
je 0x140011872
sub ebx, 2
cmp ebx, 0x15
ja 0x14001186d
mov rcx, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp sym.pthread_cancel
mov ebx, 0x16
mov eax, ebx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
Function at 0x140011a3b
Capabilities:
Create thread
Resume thread

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rdi, rcx
mov rsi, rdx
mov rbp, r8
mov r12, r9
call sym.pop_pthread_mem
mov rbx, rax
test rax, rax
je 0x140011b0f
test rdi, rdi
je 0x140011a71
mov rax, qword [rax + 0x1d8]
mov qword [rdi], rax
xor r11d, r11d
mov dword [rbx + 0x44], 1
mov dword [rbx + 0xbc], r11d
mov qword [rbx + 0x28], 0xffffffffffffffff
mov qword [rbx + 8], r12
mov r12, qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x10], rbp
xor ebp, ebp
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call r12
mov qword [rbx + 0x30], rax
test rax, rax
jne 0x140011aca
mov eax, ebp
neg eax
sbb ecx, ecx
inc ebp
and ecx, 0x14
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp ebp, 5
jne 0x140011a9b
mov qword [rbx + 0x38], 0xffffffffffffffff
lea r12, [rbx + 0x68]
mov rcx, r12
call sym.replace_spin_keys.constprop.0
xor r10d, r10d
cmp qword [rbx + 0x30], 0
mov dword [rbx], 0xbab1f00d
mov dword [rbx + 0xc0], r10d
mov dword [rbx + 0xb8], r10d
jne 0x140011b19
test rdi, rdi
je 0x140011b07
xor r9d, r9d
mov qword [rdi], r9
mov rcx, rbx
call sym.push_pthread_mem
mov eax, 0xb
jmp 0x140011c1c
xor ebp, ebp
test rsi, rsi
je 0x140011b45
mov eax, dword [rsi]
mov rbp, qword [rsi + 0x10]
mov dword [rbx + 0x44], eax
test al, 8
je 0x140011b40
call sym.__pthread_self_lite
mov eax, dword [rax + 0xc0]
mov dword [rbx + 0xc0], eax
jmp 0x140011b45
mov eax, dword [rsi + 0x18]
jmp 0x140011b38
xor r8d, r8d
mov dword [rsp + 0x20], 4
mov r9, rbx
mov edx, ebp
mov qword [rsp + 0x28], r8
xor ecx, ecx
lea r8, [sym.pthread_create_wrapper]
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov rsi, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x140011ba5
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x140011b85
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
mov rcx, r12
call sym.replace_spin_keys.constprop.0
xor ecx, ecx
mov qword [rbx + 0x30], rcx
mov qword [rbx + 0x28], rcx
jmp 0x140011afc
mov eax, dword [rbx + 0xc0]
mov edx, 0xfffffff1
cmp eax, 0xfffffff2
jl 0x140011bd3
mov edx, 0xfffffffe
cmp eax, 0xffffffff
jl 0x140011bd3
mov edx, 0xf
cmp eax, 0xe
jg 0x140011bd3
mov edx, 2
cmp eax, edx
cmovle edx, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov rcx, qword [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test byte [rbx + 0x44], 4
mov rax, qword [sym.imp.KERNEL32.dll_ResumeThread]
je 0x140011c09
xor edx, edx
mov rcx, rsi
mov qword [rbx + 0x28], rdx
call rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140011c12
mov qword [rbx + 0x28], rsi
mov rcx, rsi
call rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret