joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001f00
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140093094]
mov rbx, rcx
test esi, esi
jle 0x140002030
mov rax, qword [0x140093098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001f4b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001fd5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001f30
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140002052
mov rax, qword [0x140093098]
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 [0x140093098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002037
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140001fce
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001fe0
add dword [0x140093094], 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 [0x140093098]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001fce
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 0x140001f58
mov rax, qword [0x140093098]
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 0x1400025e0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140093100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400930e0]
test rbx, rbx
je 0x14000263c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x140002633
test eax, eax
jne 0x140002633
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002618
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 0x140002850
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140002868
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002870
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x140002880
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 0x1400028cd
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 0x1400028c4
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400028cf
add rax, 0x28
cmp rax, r9
jne 0x1400028b0
xor eax, eax
ret

Function at 0x1400028d0
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140002960
mov rdx, qword [0x14008f870]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000294e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000294e
cmp word [rax + 0x18], 0x20b
jne 0x14000294e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140002960
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140002939
add rbx, 0x28
cmp rbx, rdi
je 0x140002960
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140002930
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 0x140002970
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14008f870]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002990
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002998
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002990
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x1400029ed
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 0x1400029e4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140002990
add rax, 0x28
cmp rax, r9
jne 0x1400029d0
xor eax, eax
ret

Function at 0x1400029f0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14008f870]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x140002a0f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002a18
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x140002a0f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140002a30
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x14008f870]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140002a50
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140002a58
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140002a50
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140002aa0
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140002a97
test rcx, rcx
je 0x140002a50
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x140002a88
xor eax, eax
ret
Function at 0x140002ab0
Capabilities:
Parse pe header

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

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

Disassembly:
mov rdx, qword [0x14008f870]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002b10
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002b18
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002b10
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140002b10
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 0x140002b64
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140002b70
add rdx, 0x28
cmp rdx, r9
jne 0x140002b50
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x14008f870]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140002ba2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140002bb0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002ba2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140002ba2
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140002ba2
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 0x140002c05
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140002c18
add rdx, 0x28
cmp r10, rdx
jne 0x140002bf0
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140002c27
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140002c37
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140002c0e
test ecx, ecx
jg 0x140002c20
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x14001b5ac
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14001b5c2
mov al, 1
jmp 0x14001b622
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14001b5d3
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14001b620
mov ecx, dword [rcx + 0x18]
nop
call fcn.140019700
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001b620
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14001b620
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14001b620
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14001b622
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x14001f840
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14001f868
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14001f868
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret

Function at 0x14048dd0d
Capabilities:
Encode data using xor

Disassembly:
push qword [rsp + 0x10]
popfq
mov edi, 0xda4ea0d
push rdi
mov rsi, qword [rsp + rdi - 0xda4e9ed]
mov rdi, qword [rsp + rdi*4 - 0x3693a80c]
lea rsp, [rsp + 0x30]
jmp fcn.14047e481