joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40fecf
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x90
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
lea rax, str.echoBinSafe
mov qword [rbp - 0x58], rax
lea rax, [0x0041a0d8]
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x50], 0
mov word [rbp - 0x40], 0
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.nimFrame_5
call sym.nimErrorFlag_4
mov qword [rbp - 0x10], rax
mov qword [rbp - 0x50], 0xad7
lea rax, [0x00420ac0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x50], 0x12
lea rax, [0x0041a838]
mov qword [rbp - 0x48], rax
mov qword [rbp - 8], 0
mov qword [rbp - 0x50], 0x13
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x18]
jge 0x41002f
mov qword [rbp - 0x50], 0xad8
lea rax, [0x0041a0d8]
mov qword [rbp - 0x48], rax
cmp qword [rbp - 8], 0
js 0x40ff93
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x18]
jl 0x40ffac
mov rax, qword [rbp + 0x18]
lea rdx, [rax - 1]
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.raiseIndexError2
jmp 0x4100bd
mov rax, qword [rbp - 8]
shl rax, 4
mov rdx, rax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x50], 0xaef
mov ecx, 1
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov rax, qword [rbp - 0x18]
mov rdx, qword [rax + 8]
mov rax, qword [rax]
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rdx
lea rax, [rbp - 0x70]
mov r8d, 0
mov rdx, rax
call sym.writeWindows__system_u9015
mov rax, qword [rbp - 0x10]
movzx eax, byte [rax]
movzx eax, al
test eax, eax
jne 0x4100bc
mov qword [rbp - 0x50], 0xd
lea rax, [0x0041a838]
mov qword [rbp - 0x48], rax
add qword [rbp - 8], 1
jmp 0x40ff61
nop
mov qword [rbp - 0x50], 0xaf3
lea rax, [0x0041a0d8]
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x20], 0
mov ecx, 1
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 1
mov edx, 1
lea rcx, [0x0041a0c9]
call sym.fwrite
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x50], 0xaf4
mov dword [rbp - 0x24], 0
mov ecx, 1
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
call sym.fflush
mov dword [rbp - 0x24], eax
mov qword [rbp - 0x50], 0xaf8
lea rax, [0x00420ac0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x4100bd
nop
call sym.popFrame_5
nop
add rsp, 0x90
pop rbp
ret
Function at 0x4116e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00420624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x411868
mov rax, qword [0x00420628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x41172c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x4117b5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x411710
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x41189d
mov rax, qword [0x00420628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00420628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x411880
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x4117ae
sub eax, 0x40
and eax, 0xffffffbf
jne 0x411810
add dword [0x00420624], 1
cmp edi, 8
jae 0x4117e3
test dil, 4
jne 0x411854
test edi, edi
je 0x4117d8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x41186f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x4117d8
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x4117fc
jmp 0x4117d8
add rsi, qword [0x00420628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4117ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x4117d8
xor esi, esi
jmp 0x411737
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x4117d8
mov rax, qword [0x00420628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x411ff0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00420900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004208e0]
test rbx, rbx
je 0x412044
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 0x41203b
test rsi, rsi
je 0x41203b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x412020
lea rcx, [0x00420900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x412280
Capabilities:
Parse pe header

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

Function at 0x4122a0
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 0x4122e1
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x4122d8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x4122e3
add rax, 0x28
cmp rax, r9
jne 0x4122c4
xor eax, eax
ret

Function at 0x412380
Capabilities:
Enumerate pe sections

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

Function at 0x4124f0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x0041b020]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x412510
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x412508
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x41256d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x412564
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x412574
add rax, 0x28
cmp rax, r9
jne 0x412550
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x412590
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x0041b020]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x4125fe
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4125fe
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x4125fe
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x4125fe
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x4125f5
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x412605
add rcx, 0x28
cmp rcx, rax
jne 0x4125e0
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x412618
jmp 0x4125fe
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x412626
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x4125fe
test r9d, r9d
jg 0x412610
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x413120
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x00418338], eax
je 0x41313a
add rsp, 0x28
ret
call sym.abort
nop

Function at 0x413640
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x413663
call sym.pthread_spin_destroy
cmp eax, 1
je 0x41366e
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret
lea rdi, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
lea rbx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rbx + 0x27]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x4136e5
mov eax, 0x28
jmp 0x4136ca
add rax, 1
cmp rax, 0x6b
je 0x4136d7
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x4136c0
cmp eax, 0x6a
jne 0x4136ea
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov edx, 0x27
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
jmp 0x4136d7

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

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x004209e0], 1
je 0x4137a6
call sym._pthread_once_raw.part.5.constprop.11
mov ecx, dword [0x00418338]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x4137d0
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 0x4137ba
test rax, rax
je 0x4137ba
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 [rsi + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
lea rcx, [rsi + 0x68]
mov qword [rsi + 0x38], 0xffffffffffffffff
mov qword [rsi + 0x30], rax
call sym.replace_spin_keys.constprop.10
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
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 r8, rbp
mov rdx, rdi
mov dword [rsp + 0x28], 0
lea r9, [rsi + 0x28]
mov rcx, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x4138c0
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x00418338]
mov dword [rsi + 0xbc], 0
mov dword [rsi + 0xc0], eax
movzx eax, byte [rsi + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rsi + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4138c0
mov rbx, rsi
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.abort
nop
nop word cs:[rax + rax]
Function at 0x413a30
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
test edx, edx
jne 0x413a51
test r8, r8
je 0x413af0
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
cmp edx, 1
je 0x413b20
cmp edx, 3
jne 0x413a44
mov ecx, dword [0x00418338]
cmp ecx, 0xffffffff
je 0x413a44
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x413a44
test byte [rax + 0x40], 0x30
je 0x413b40
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
jne 0x413c35
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x413abf
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x413aaf
call rsi
mov qword [rbx + 0x30], 0
mov qword [rbx + 0x28], 0
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.replace_spin_keys.constprop.10
cmp qword [rbx + 0x1d0], 0
jne 0x413bcc
mov rcx, rbx
call sym.push_pthread_mem.part.2
jmp 0x413bcc
mov rcx, qword [0x004209a0]
test rcx, rcx
je 0x413a44
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov qword [0x004209a0], 0
jmp 0x413a44
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x004209a0], rax
jmp 0x413a44
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x413be0
test rcx, rcx
je 0x413b5d
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 0x413c10
test byte [rbx + 0x44], 4
lea rdi, [rbx + 0x38]
lea rsi, [rbx + 0x68]
je 0x413c20
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x413ba6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
mov qword [rbx + 0x28], 0
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
cmp qword [rbx + 0x1d0], 0
je 0x413adf
xor edx, edx
mov ecx, dword [0x00418338]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x413a44
test rcx, rcx
je 0x413beb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x38]
mov qword [rbx + 0x30], 0
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.replace_spin_keys.constprop.10
jmp 0x413a44
call sym._pthread_cleanup_dest.part.8
jmp 0x413b7f
mov rcx, rdi
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
jmp 0x413a44
call sym._pthread_cleanup_dest.part.8
jmp 0x413a92
Function at 0x413c40
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x28
mov qword [rbp + 0x28], rcx
lea rcx, [0x00418328]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
lea rbx, [rax + 0x38]
mov rcx, rbx
call sym.pthread_mutex_lock
cmp dword [0x004209e0], 1
je 0x413c79
call sym._pthread_once_raw.part.5.constprop.11
mov rdx, qword [rbp + 0x28]
mov ecx, dword [0x00418338]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rsi, qword [rbp + 0x28]
mov rcx, rbx
mov dword [rsi + 0x70], eax
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x28]
mov rdx, rbp
lea rcx, [rax + 0xd0]
call sym._setjmp
test eax, eax
je 0x413d4d
lea rcx, [0x00418328]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
lea rbx, [rax + 0x38]
mov rcx, rbx
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
mov rcx, qword [rax + 0x30]
mov rsi, qword [rax + 8]
test rcx, rcx
je 0x413cec
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x28]
cmp qword [rax + 0x28], 0
mov qword [rax + 0x30], 0
je 0x413da7
mov rcx, rbx
call sym.pthread_mutex_unlock
mov rcx, rbx
call sym.pthread_mutex_destroy
mov rax, qword [rbp + 0x28]
mov qword [rax + 0x38], 0xffffffffffffffff
mov dword [rax + 0xbc], 1
mov rbx, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x00418328]
mov rcx, rdi
call sym.pthread_mutex_unlock
test eax, eax
jne 0x413df1
xor ecx, ecx
call rbx
jmp 0x413d37
lea rcx, [0x00418328]
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x28]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x413df9
mov rdi, qword [rbp + 0x28]
mov rcx, qword [rdi + 8]
call rax
mov rbx, rax
nop
nop
lea rcx, [0x00418328]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
mov rcx, qword [rax + 0x1d8]
mov qword [rax + 8], rbx
test rcx, rcx
je 0x413cc5
call sym._pthread_cleanup_dest.part.8
jmp 0x413cc5
mov rax, qword [rbp + 0x28]
mov rcx, rbx
mov dword [rax], 0xdeadbeef
call sym.pthread_mutex_unlock
mov rcx, rbx
call sym.pthread_mutex_destroy
cmp qword [rbp + 0x28], 0
je 0x413dde
mov rax, qword [rbp + 0x28]
cmp qword [rax + 0x1d0], 0
jne 0x413dde
mov rcx, rax
call sym.push_pthread_mem.part.2
xor edx, edx
mov ecx, dword [0x00418338]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x413d29
mov ecx, esi
call qword [sym.imp.msvcrt.dll__endthreadex]
mov ebx, pe_nt_image_headers64
jmp 0x413d77
Function at 0x414980
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 0x414a4a
mov rcx, qword [rax + 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x414a4a
lea rbp, [rsp + 0x20]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x414a4a
lea rdi, [rbx + 0x38]
mov rcx, rdi
call sym.pthread_mutex_lock
call sym.__pthread_self_lite
xor edx, edx
test rax, rax
je 0x4149e6
mov rdx, qword [rax + 0x1d8]
cmp rsi, rdx
movzx eax, byte [rbx + 0x40]
je 0x414a34
mov edx, dword [rbx + 0x44]
and edx, 3
cmp edx, 3
je 0x414a60
test al, 3
jne 0x414a3c
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
lock add dword [0x004209e8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x414a1e
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rdi
call sym.pthread_mutex_unlock
xor eax, eax
add rsp, 0x4f8
pop rbx
pop rsi
pop rdi
pop rbp
ret
test al, 3
je 0x414af5
mov rcx, rdi
call sym.pthread_mutex_unlock
test byte [rbx + 0x40], 0xc
je 0x414a26
mov eax, 3
add rsp, 0x4f8
pop rbx
pop rsi
pop rdi
pop rbp
ret
test al, 0xc
jne 0x414a3c
test al, 0xf
jne 0x414a4a
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 0x414a1e
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]
movzx eax, byte [rbx + 0x40]
and dword [rbx + 0x44], 0xfffffffe
and eax, 0xfffffff0
or eax, 5
mov byte [rbx + 0x40], al
lock add dword [0x004209e8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x414ade
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rdi
call sym.pthread_mutex_unlock
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x414a1e
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
lock add dword [0x004209e8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x414b15
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [rbx + 0x44]
mov edx, eax
and edx, 3
cmp edx, 3
jne 0x414a1e
and eax, 0xfffffffe
mov rcx, rdi
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
nop word [rax + rax]
Function at 0x414b50
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
mov esi, edx
lea rcx, [0x00418328]
call sym.pthread_mutex_lock
mov rcx, rbx
call sym.__pthread_get_pointer
test rax, rax
je 0x414bc1
cmp qword [rax + 0x1d8], rbx
jne 0x414bc1
test byte [rax + 0x40], 0xc
jne 0x414bc1
mov edx, dword [rax + 0xbc]
test edx, edx
jne 0x414bc1
mov rax, qword [rax + 0x28]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x414bc1
lea rcx, [0x00418328]
call sym.pthread_mutex_unlock
test esi, esi
je 0x414be0
sub esi, 2
cmp esi, 0x15
ja 0x414be4
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
jmp sym.pthread_cancel
lea rcx, [0x00418328]
call sym.pthread_mutex_unlock
mov eax, 3
add rsp, 0x28
pop rbx
pop rsi
ret
xor eax, eax
jmp 0x414bd2
mov eax, 0x16
jmp 0x414bd2
Function at 0x414e60
Capabilities:
Create thread
Resume thread

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rbp, rcx
mov r13, rdx
mov rsi, r8
mov rdi, r9
call sym.pop_pthread_mem
test rax, rax
mov rbx, rax
je 0x414fe8
test rbp, rbp
je 0x414e9b
mov rax, qword [rax + 0x1d8]
mov qword [rbp], rax
mov r12, qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [rbx + 8], rdi
mov rdi, qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x10], rsi
xor esi, esi
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0x44], 1
mov qword [rbx + 0x28], 0xffffffffffffffff
mov r14, r12
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
call rdi
test rax, rax
mov qword [rbx + 0x30], rax
jne 0x414f10
test rsi, rsi
je 0x414f00
mov ecx, 0x14
call r14
cmp esi, 4
je 0x414f10
add rsi, 1
jmp 0x414ecf
xor ecx, ecx
call r12
jmp 0x414ef9
lea rsi, [rbx + 0x68]
mov qword [rbx + 0x38], 0xffffffffffffffff
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
cmp qword [rbx + 0x30], 0
mov dword [rbx], 0xbab1f00d
mov dword [rbx + 0xc0], 0
mov dword [rbx + 0xb8], 0
je 0x414fcd
xor edx, edx
test r13, r13
je 0x414f6d
mov eax, dword [r13]
mov edx, dword [r13 + 0x10]
test al, 8
mov dword [rbx + 0x44], eax
jne 0x4150a0
mov eax, dword [r13 + 0x18]
mov dword [rbx + 0xc0], eax
xor ecx, ecx
mov dword [rsp + 0x20], 4
mov r9, rbx
mov qword [rsp + 0x28], 0
lea r8, [sym.pthread_create_wrapper]
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov rdi, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x415000
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x414fac
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
mov qword [rbx + 0x30], 0
mov qword [rbx + 0x28], 0
test rbp, rbp
je 0x414fda
mov qword [rbp], 0
cmp qword [rbx + 0x1d0], 0
je 0x415090
mov eax, 0xb
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov eax, dword [rbx + 0xc0]
mov edx, 0xfffffff1
cmp eax, 0xfffffff2
jl 0x415030
add edx, 0xd
cmp eax, 0xffffffff
jl 0x415030
cmp eax, 0xe
mov edx, 0xf
jle 0x4150c0
nop word cs:[rax + rax]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov rcx, qword [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test byte [rbx + 0x44], 4
jne 0x415070
mov qword [rbx + 0x28], rdi
mov rcx, rdi
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 rcx, rdi
mov qword [rbx + 0x28], 0
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x415056
mov rcx, rbx
call sym.push_pthread_mem.part.2
jmp 0x414fe8
mov dword [rsp + 0x3c], edx
call sym.__pthread_self_lite
mov edx, dword [rsp + 0x3c]
mov eax, dword [rax + 0xc0]
mov dword [rbx + 0xc0], eax
jmp 0x414f6d
cmp eax, 2
mov edx, 2
cmovle edx, eax
jmp 0x415030
Function at 0x417680
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x408dc0
Capabilities:
Inspect section memory permissions

Disassembly:
sub rsp, 0x28
mov rax, rdx
test r8, r8
je 0x408de7
mov dword [rsp + 0x20], 1
xor edx, edx
mov r8, rax
xor r9d, r9d
call method.__tsan.MutexPostLock___tsan::ThreadState__unsigned_long_long__unsigned_long_long__unsigned_int__int_
nop
add rsp, 0x28
ret
xor edx, edx
mov r8, rax
xor r9d, r9d
add rsp, 0x28
jmp method.__tsan.MutexPostReadLock___tsan::ThreadState__unsigned_long_long__unsigned_long_long__unsigned_int_