joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000ea01
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x140017540], 0
je 0x14000ea21
mov r8d, 1
jmp 0x14000eb62
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
xor edx, edx
mov rcx, qword [rax + 0x10]
xor eax, eax
mov r11, qword [rcx + 0x30]
test r11, r11
je 0x14000ea86
movsxd rdx, dword [r11 + 0x3c]
mov edx, dword [r11 + rdx + 0x88]
test edx, edx
je 0x14000ea7e
mov eax, edx
add rax, r11
mov edx, dword [rax + 0xc]
add rdx, r11
mov r8d, dword [rdx]
or r8d, 0x20202020
cmp r8d, 0x6c64746e
jne 0x14000ea7e
mov edx, dword [rdx + 4]
or edx, 0x20202020
cmp edx, 0x6c642e6c
je 0x14000ea95
mov rcx, qword [rcx]
mov rdx, r11
jmp 0x14000ea36
xor r8d, r8d
test rax, rax
je 0x14000eb62
mov r11, rdx
mov ebp, dword [rax + 0x1c]
mov esi, dword [rax + 0x24]
xor r10d, r10d
lea r13, [0x140017544]
mov edx, dword [rax + 0x18]
mov eax, dword [rax + 0x20]
add rsi, r11
add rbp, r11
lea ebx, [rdx - 1]
add rax, r11
lea rdi, [rax + rbx*4]
add rbx, rbx
add rbx, rsi
mov ecx, dword [rdi]
add rcx, r11
cmp word [rcx], 0x775a
jne 0x14000eaf6
mov eax, r10d
inc r10d
lea r12, [r13 + rax*8]
call fcn.14000e9d9
mov dword [r12], eax
movzx eax, word [rbx]
mov eax, dword [rbp + rax*4]
mov dword [r12 + 4], eax
cmp r10d, 0x1f4
je 0x14000eb08
sub rdi, 4
lea rax, [rbx - 2]
cmp rsi, rbx
je 0x14000eb08
mov rbx, rax
jmp 0x14000eac1
mov dword [0x140017540], r10d
lea r11, [0x140017544]
dec r10d
test r10d, r10d
je 0x14000ea16
lea rax, [0x140017540]
xor edx, edx
lea ecx, [rdx + 1]
mov r8d, dword [rax + 8]
mov rdx, rcx
lea rcx, [r11 + rcx*8]
mov r9d, dword [rcx + 4]
cmp r8d, r9d
jbe 0x14000eb54
mov ebx, dword [rax + 4]
mov esi, dword [rcx]
mov dword [rax + 8], r9d
mov dword [rax + 4], esi
mov dword [rcx], ebx
mov dword [rcx + 4], r8d
add rax, 8
cmp edx, r10d
jb 0x14000eb2b
dec r10d
jmp 0x14000eb19
mov eax, r8d
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret

Function at 0x14000ed69
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0x3950907
call fcn.14000eb72
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
nop
syscall
ret

Function at 0x14000edac
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0x8b19978d
call fcn.14000eb72
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
nop
syscall
ret

Function at 0x14000f06a
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0x88a6285
call fcn.14000eb72
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
nop
syscall
ret
Function at 0x14000f0ad
Capabilities:
Parse pe header

Disassembly:
push r12
push rbx
sub rsp, 0x28
test rcx, rcx
je 0x14000f0f0
cmp word [rcx], 0x5a4d
jne 0x14000f0f0
movsxd rdx, dword [rcx + 0x3c]
cmp edx, 0x400
jg 0x14000f0f0
call fcn.140006eb0
mov rcx, qword [0x140035110]
mov rbx, rax
call fcn.140011700
cmp byte [rax], 0
jne 0x14000f0f3
cmp dword [rbx], 0x4550
mov r12, rbx
je 0x14000f0f3
xor r12d, r12d
mov rax, r12
add rsp, 0x28
pop rbx
pop r12
ret

Function at 0x14000f150
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0x19991f17
call fcn.14000eb72
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
nop
syscall
ret

Function at 0x14000f839
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0xc85e88a6
call fcn.14000eb72
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
nop
syscall
ret

Function at 0x14000f87c
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov ecx, 0x8a92015
call fcn.14000eb72
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
nop
syscall
ret

Function at 0x1400107a0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, 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 fcn.140016b50
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.140016b50
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]
Function at 0x140010810
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x14003a814]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x1400109c0
mov rax, qword [0x14003a818]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14001085c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x1400108e7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x140010840
mov rcx, r12
call fcn.1400112c0
mov rbp, rax
test rax, rax
je 0x140010a1d
mov rax, qword [0x14003a818]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.1400113f0
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x14003a818]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140010a02
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400108e0
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140010970
add dword [0x14003a814], 1
cmp ebx, 8
jae 0x140010918
test bl, 4
jne 0x1400109d0
test ebx, ebx
je 0x140010909
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x1400109f0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x140010909
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x14001094a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rdi, qword [0x14003a818]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400108e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400107a0
xor edi, edi
jmp 0x140010867
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x140010909
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x140010909
mov rax, qword [0x14003a818]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.1400107a0
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.1400107a0
nop
nop dword [rax]
Function at 0x140010f30
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x14003a880]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14003a860]
test rbx, rbx
je 0x140010f84
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x140010f7b
test r12, r12
je 0x140010f7b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140010f60
lea rcx, [0x14003a880]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x1400112c0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x140035120]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x140011339
mov rcx, r10
call fcn.140011190
test eax, eax
je 0x140011339
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x140011336
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x14001132d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x140011339
add r8, 0x28
cmp r8, r9
jne 0x140011318
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x1400116a0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor ecx, ecx
xor r9d, r9d
mov r8d, 0xffff
mov dword [0x14003a900], 0xffffffff
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x14003a908], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x1400116f0
lea rdx, [0x1400115b0]
mov dword [0x14003a8f8], eax
call fcn.140016d90
test eax, eax
jne 0x1400116f8
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400116e7
call sub.msvcrt.dll_abort
nop
nop
Function at 0x140011700
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r13, qword [0x1400350b0]
mov r11d, dword [r13]
mov r12, rcx
test r11d, r11d
jne 0x140011740
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x1400117a8
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
mov rsi, qword [rcx + 0x10]
test rsi, rsi
je 0x1400117c0
mov r13d, dword [0x14003a8f8]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rdi
mov r14d, eax
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r14d
mov r13, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r13, r13
je 0x140011838
mov rbx, qword [r13]
cmp rbx, rsi
jb 0x140011880
sub rsi, 1
mov rax, qword [r13 + rsi*8 + 8]
test rax, rax
jne 0x140011729
mov rcx, r12
call fcn.140011600
mov qword [r13 + rsi*8 + 8], rax
jmp 0x140011729
call fcn.140011600
mov qword [r12 + 0x10], rax
jmp 0x140011729
mov r10d, dword [r13]
test r10d, r10d
je 0x1400118e2
mov r9d, dword [0x140018540]
test r9d, r9d
je 0x140011910
lock add dword [0x14003a900], 1
jne 0x140011944
mov rsi, qword [r12 + 0x10]
test rsi, rsi
je 0x1400118f0
mov eax, dword [r13]
test eax, eax
je 0x140011749
mov eax, 0xffffffff
lock xadd dword [0x14003a900], eax
sub eax, 1
js 0x140011749
mov rcx, qword [0x14003a908]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x140011749
lea rcx, [rsi + 0x21]
mov edx, 8
lea rbx, [rsi + 0x20]
call sub.msvcrt.dll_calloc
mov r13, rax
test rax, rax
je 0x14001196b
mov qword [rax], rbx
mov ecx, dword [0x14003a8f8]
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x140011787
call rdi
jmp 0x140011787
lea r14, [rbx + rbx]
lea rax, [rsi + 0x20]
mov rcx, r13
cmp rsi, r14
cmova r14, rax
lea rdx, [r14*8 + 8]
call sub.msvcrt.dll_realloc
mov r13, rax
test rax, rax
je 0x14001196b
mov qword [rax], r14
sub r14, rbx
lea rcx, [rax + rbx*8 + 8]
xor edx, edx
lea r8, [r14*8]
call sub.msvcrt.dll_memset
jmp 0x140011859
call fcn.1400116a0
mov dword [0x140018540], 1
mov edx, dword [r13]
test edx, edx
jne 0x1400117dd
mov rsi, qword [r12 + 0x10]
test rsi, rsi
jne 0x140011749
mov rax, qword [0x14003a8f0]
lea rsi, [rax + 1]
mov qword [0x14003a8f0], rsi
mov qword [r12 + 0x10], rsi
jmp 0x1400117f9
lock add dword [0x140018544], 1
je 0x1400118c7
mov r8d, dword [0x140018540]
mov rsi, qword [sym.imp.KERNEL32.dll_Sleep]
lea rbx, [0x140018540]
test r8d, r8d
jne 0x1400118d6
nop dword [rax]
xor ecx, ecx
call rsi
mov ecx, dword [rbx]
test ecx, ecx
je 0x140011938
jmp 0x1400118d6
mov rcx, qword [0x14003a908]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1400117eb
lock sub dword [0x14003a900], 1
jmp 0x1400117eb
call sub.msvcrt.dll_abort
nop
nop word cs:[rax + rax]
nop dword [rax]
cmp qword [rcx], rdx
jae 0x140011990
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x14001199a
mov qword [rcx + 8], r8
test r9, r9
je 0x1400119a4
cmp qword [rcx], rdx
je 0x1400119a8
ret
mov qword [rcx + 0x18], r9
ret