joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140003454
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x60
lea rbp, [rsp + 0x60]
lea rax, [rbp - 0x30]
mov rcx, rax
call sym.getCurrentExecutablePath_abi:cxx11___
lea rax, [rbp - 8]
mov qword [rsp + 0x20], rax
mov r9d, 2
mov r8d, 0
lea rax, str.SoftwareMicrosoftWindowsCurrentVersionRun
mov rdx, rax
mov rcx, 0xffffffff80000001
mov rax, qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
call rax
lea rax, [rbp - 0x30]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.size___const
lea esi, [rax + 1]
lea rax, [rbp - 0x30]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.c_str___const
mov rbx, rax
lea rax, [0x1401370a0]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.c_str___const
mov rdx, rax
mov rax, qword [rbp - 8]
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rbx
mov r9d, 1
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call rax
lea rax, [rbp - 0x30]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
jmp 0x140003529
add rsp, 0x60
pop rbx
pop rsi
pop rbp
ret

Function at 0x140006850
Capabilities:
Parse pe header

Disassembly:
push rsi
sub rsp, 0x30
mov rax, qword [rcx + 0x18]
movzx edx, byte [rax]
cmp dl, 0x4c
je 0x1400068c0
jg 0x140006880
sub edx, 0x49
cmp dl, 1
ja 0x1400068d0
add rax, 1
mov qword [rcx + 0x18], rax
add rsp, 0x30
pop rsi
jmp sym.d_template_args_1
cmp dl, 0x58
jne 0x1400068d0
add rax, 1
mov esi, dword [rcx + 0x4c]
mov dword [rcx + 0x4c], 1
mov qword [rcx + 0x18], rax
mov qword [rsp + 0x28], rcx
call sym.d_expression_1
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rcx + 0x18]
mov dword [rcx + 0x4c], esi
cmp byte [rdx], 0x45
jne 0x1400068e0
add rdx, 1
mov qword [rcx + 0x18], rdx
add rsp, 0x30
pop rsi
ret
add rsp, 0x30
pop rsi
jmp sym.d_expr_primary
add rsp, 0x30
pop rsi
jmp sym.d_type
xor eax, eax
jmp 0x1400068ba
Function at 0x140010600
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call dbg.__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 dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140010670
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140137134]
mov rbx, rcx
test esi, esi
jle 0x1400107a0
mov rax, qword [0x140137138]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400106bb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140010745
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400106a0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x1400107c2
mov rax, qword [0x140137138]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140137138]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400107a7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14001073e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140010750
add dword [0x140137134], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
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 [0x140137138]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14001073e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x1400106c8
mov rax, qword [0x140137138]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140010d60
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1401371a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140137180]
test rbx, rbx
je 0x140010dc4
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop word cs:[rax + rax]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x140010dbb
test eax, eax
jne 0x140010dbb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140010da0
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140011000
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140011018
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140011020
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140011030
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14001107d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x140011074
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14001107f
add rax, 0x28
cmp rax, r9
jne 0x140011060
xor eax, eax
ret

Function at 0x140011080
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140011110
mov rdx, qword [0x140108360]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x1400110fe
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400110fe
cmp word [rax + 0x18], 0x20b
jne 0x1400110fe
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140011110
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x1400110e9
add rbx, 0x28
cmp rbx, rdi
je 0x140011110
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x1400110e0
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140011120
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140108360]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140011140
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140011148
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140011140
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14001119d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140011194
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140011140
add rax, 0x28
cmp rax, r9
jne 0x140011180
xor eax, eax
ret

Function at 0x1400111a0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140108360]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x1400111bf
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400111c8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x1400111bf
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x1400111e0
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x140108360]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140011200
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140011208
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140011200
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140011258
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x14001124f
test rcx, rcx
je 0x140011200
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x140011240
xor eax, eax
ret

Function at 0x140011260
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140108360]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14001127f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140011288
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x1400112a0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140108360]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400112c0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400112c8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400112c0
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x1400112c0
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x140011314
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140011320
add rdx, 0x28
cmp r9, rdx
jne 0x140011300
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x140011330
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x140108360]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140011352
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140011360
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140011352
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140011352
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140011352
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x1400113b5
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x1400113c8
add rdx, 0x28
cmp r10, rdx
jne 0x1400113a0
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x1400113d7
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x1400113e7
mov edx, dword [rax + 0xc]
test edx, edx
je 0x1400113be
test ecx, ecx
jg 0x1400113d0
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140012040
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
mov dword [rax], 0
test rbx, rbx
je 0x1400121a0
cmp word [rbx], 0
je 0x140012190
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400121b0
test al, 0x10
je 0x140012190
lea rsi, [rsp + 0x20]
mov rdx, rbx
mov r8d, 0x104
mov rcx, rsi
lea rdi, [0x140106da0]
lea rbp, [0x140106da4]
call sym._wfullpath
mov rcx, rsi
call sym.wcslen
mov rcx, rdi
mov rbx, rax
call sym.wcslen
mov rcx, rbp
add rbx, rax
call sym.wcslen
lea rcx, [rbx + rax + 0x229]
add rcx, rcx
call sym.malloc
mov rbx, rax
test rax, rax
je 0x1400121bf
lea r12, [rax + 0x44c]
mov rdx, rsi
mov rcx, r12
call sym.wcscpy
cmp word [rbx + 0x44c], 0
jne 0x140012158
mov rdx, rbp
mov rcx, r12
call sym.wcscat
lea rdx, [rbx + 0x238]
mov ecx, 0x41
xor eax, eax
mov qword [rbx + 0x440], 0xffffffffffffffff
mov rdi, rdx
mov dword [rbx + 0x448], 0
mov qword [rbx + 0x230], 0
rep stosq qword [rdi], rax
mov rax, rbx
add rsp, 0x230
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, r12
call sym.wcslen
cmp word [rbx + rax*2 + 0x44a], 0x2f
je 0x140012102
mov rcx, r12
call sym.wcslen
cmp word [rbx + rax*2 + 0x44a], 0x5c
je 0x140012102
mov rdx, rdi
mov rcx, r12
call sym.wcscat
jmp 0x140012102
call sym._errno
xor ebx, ebx
mov dword [rax], 0x14
jmp 0x140012141
call sym._errno
xor ebx, ebx
mov dword [rax], 0xe
jmp 0x140012141
call sym._errno
xor ebx, ebx
mov dword [rax], 2
jmp 0x140012141
call sym._errno
xor ebx, ebx
mov dword [rax], 0xc
jmp 0x140012141

Function at 0x140012500
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
mov ecx, 2
mov r8d, 0x2d
lea rdx, str._buffer_overflow_detected_:_terminated_n
call sym.write
mov ecx, 0x17
call sym.IsProcessorFeaturePresent
test eax, eax
je 0x140012530
mov ecx, 8
int 0x29
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x140012550
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
mov ecx, 2
mov r8d, 0x2c
lea rdx, str._stack_smashing_detected_:_terminated_n
call sym.write
mov ecx, 0x17
call sym.IsProcessorFeaturePresent
test eax, eax
je 0x140012580
mov ecx, 2
int 0x29
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x140012800
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, 0xb8
mov ebp, ecx
mov rsi, rdx
cmp ecx, 0xffffffff
je 0x140012a30
test rdx, rdx
js 0x140012a30
call sym._get_osfhandle
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140012a60
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x140012a60
mov ecx, ebp
call sym._telli64
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
je 0x140012a30
lea rdx, [rsp + 0x68]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140012a60
cmp qword [rsp + 0x68], rsi
jb 0x1400128f0
xor r9d, r9d
mov qword [rsp + 0x70], rsi
lea r8, [rsp + 0x74]
mov edx, esi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1400128a9
cmp dword [rsp + 0x70], 0xffffffff
jne 0x140012a45
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x140012a30
mov rdx, qword [rsp + 0x48]
xor r8d, r8d
mov ecx, ebp
call sym._lseeki64
cmp rax, 0xffffffffffffffff
je 0x140012a30
xor eax, eax
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [rsp + 0x70]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x140012a30
mov edx, 2
mov ecx, 0x33
call sym.calloc
mov edx, 2
mov ecx, 0x106
mov rbx, rax
call sym.calloc
mov r12, rax
test rbx, rbx
je 0x140012a60
test rax, rax
je 0x140012a60
mov edx, 0x32
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
mov r14, qword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
mov r15, qword [sym.imp.KERNEL32.dll_FindNextVolumeW]
mov r13, rax
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x40], rax
jmp 0x140012987
mov r8d, 0x32
mov rdx, rbx
mov rcx, r13
call r15
test eax, eax
je 0x140012a18
mov dword [rsp + 0x38], 0
mov rdx, r12
mov rcx, rbx
mov r9, qword [rsp + 0x40]
mov qword [rsp + 0x30], 0
mov r8d, 0x105
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call r14
mov eax, dword [rsp + 0x5c]
cmp dword [rsp + 0x8c], eax
jne 0x140012970
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindVolumeClose]
mov rcx, r12
call sym.free
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov rcx, rbx
mov r12d, eax
call sym.free
test r12d, r12d
je 0x140012a52
mov rax, rsi
sub rax, qword [rsp + 0x68]
cmp qword [rsp + 0x60], rax
jae 0x140012881
jmp 0x140012a52
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindVolumeClose]
mov rcx, rbx
xor ebx, ebx
call sym.free
jmp 0x1400129d4
call sym._errno
mov dword [rax], 0x16
mov eax, 0xffffffff
jmp 0x1400128d5
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x83
jne 0x140012a30
call sym._errno
mov dword [rax], 0x1b
jmp 0x140012a3b
call sym._errno
mov dword [rax], 9
jmp 0x140012a3b
Function at 0x14001c710
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
je 0x14001c758
mov rcx, rbx
mov qword [dbg.init_rand_s], rax
add rsp, 0x28
pop rbx
pop rsi
jmp rax
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.SystemFunction036
mov rcx, rax
call rsi
mov qword [0x140137c30], rax
lea rax, [dbg.mingw_rand_s]
jmp 0x14001c73e

Function at 0x14001ec40
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400fd318], eax
cmp eax, 0xffffffff
je sym.pthread_tls_init.cold
add rsp, 0x28
ret

Function at 0x14001f090
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x140137cf0], 1
je 0x14001f130
lea rdi, [0x140137cf0]
mov rcx, rdi
call sym.enterOnceObject
lea rbp, [rax + 8]
mov rbx, rax
mov rcx, rbp
call sym.pthread_mutex_lock
mov esi, dword [0x140137cf0]
test esi, esi
jne 0x14001f108
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400fd318], eax
cmp eax, 0xffffffff
je sym._pthread_once_raw.constprop.0.isra.0.cold
mov dword [0x140137cf0], 1
mov rcx, rbp
call sym.pthread_mutex_unlock
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp sym.leaveOnceObject.part.0
cmp esi, 1
je 0x14001f0ec
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r9d, esi
mov r8, rdi
lea rdx, str._once__p_is__ld_n
mov rcx, rax
call sym.fprintf
jmp 0x14001f0ec
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x14001f140
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
call sym.pop_pthread_mem
mov rbx, rax
test rax, rax
je 0x14001f23c
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [rbx + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call sym.pthread_spin_destroy
cmp eax, 1
je 0x14001f248
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rbp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rsi, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
mov rdx, rsi
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.part.0.cold
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x1400fd318]
mov rdx, rbx
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
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je sym.__pthread_self_lite.part.0.cold
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.replace_spin_keys.part.0
nop
nop

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

Disassembly:
sub rsp, 0x28
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400fd318]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001f270
add rsp, 0x28
ret
add rsp, 0x28
jmp sym.__pthread_self_lite.part.0
Function at 0x14001f3d0
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 dbg._fpreset
lea rcx, [0x1400fd308]
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 [0x1400fd318]
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 0x14001f510
lea rcx, [0x1400fd308]
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x14001f521
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rdx + 8]
call rax
mov rbx, rax
nop
nop
lea rcx, [0x1400fd308]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax + 0x1d8]
mov qword [rax + 8], rbx
test rcx, rcx
je 0x14001f495
call sym._pthread_cleanup_dest.part.0
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
je 0x14001f4bc
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
je 0x14001f533
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, [0x1400fd308]
mov rcx, rbx
call sym.pthread_mutex_unlock
test eax, eax
jne 0x14001f52b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14001f4fa
lea rcx, [0x1400fd308]
call sym.pthread_mutex_lock
jmp 0x14001f495
mov ebx, pe_nt_image_headers64
jmp 0x14001f46e
mov ecx, esi
call qword [sym.imp.msvcrt.dll__endthreadex]
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 [0x1400fd318]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x14001f4f3