joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180063b30
Capabilities:
Get system information on windows

Disassembly:
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x80
mov rdi, rcx
lea rcx, [rsp + 0x20]
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetSystemInfo]
mov r14, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
cmp rdi, 0x40000000
jbe 0x180063b70
lea rax, [rdi - 0x40000000]
cmp r14, rax
cmovb r14, rax
mov rsi, qword [0x1801bb510]
lea r15, [rdi + 0x40000000]
cmp rcx, r15
cmovbe r15, rcx
sub r15, 0xfff
test rsi, rsi
je 0x180063bae
cmp rsi, r14
jb 0x180063ba6
cmp rsi, r15
jae 0x180063ba6
cmp qword [rsi + 8], 0
jne 0x180063d77
mov rsi, qword [rsi]
test rsi, rsi
jne 0x180063b91
mov qword [rsp + 0xa0], rbx
mov rbx, rdi
mov qword [rsp + 0xa8], rbp
mov qword [rsp + 0xb0], r12
mov r12d, 0x40
cmp rdi, r14
jb 0x180063c42
nop dword [rax]
nop dword [rax + rax]
mov ebp, dword [rsp + 0x48]
mov rax, rbx
xor edx, edx
div rbp
sub rbx, rdx
sub rbx, rbp
cmp rbx, r14
jb 0x180063c39
nop word [rax + rax]
mov r8d, 0x30
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_VirtualQuery]
test rax, rax
je 0x180063c39
cmp dword [rsp + 0x70], 0x10000
je 0x180063cbb
mov rbx, qword [rsp + 0x58]
cmp rbx, rbp
jb 0x180063c39
sub rbx, rbp
cmp rbx, r14
jae 0x180063c00
test rsi, rsi
jne 0x180063d20
cmp rdi, r15
ja 0x180063d5f
nop dword [rax + rax]
mov ebp, dword [rsp + 0x48]
xor edx, edx
mov rax, rdi
mov ebx, ebp
div rbp
mov eax, ebp
sub rax, rdx
add rax, rdi
mov rdi, rax
cmp rax, r15
ja 0x180063d5f
mov r8d, 0x30
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_VirtualQuery]
test rax, rax
je 0x180063d5f
cmp dword [rsp + 0x70], 0x10000
je 0x180063cf1
xor edx, edx
lea edi, [rbp - 1]
add rdi, qword [rsp + 0x68]
add rdi, qword [rsp + 0x50]
mov rax, rdi
div rbx
sub rdi, rdx
cmp rdi, r15
jbe 0x180063c72
jmp 0x180063d5f
test rbx, rbx
je 0x180063c39
mov r9d, r12d
mov edx, 0x1000
mov r8d, 0x3000
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x180063d20
cmp rbx, r14
jae 0x180063be0
jmp 0x180063c42
test rdi, rdi
je 0x180063d5f
mov r9d, r12d
mov edx, 0x1000
mov r8d, 0x3000
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x180063d20
cmp rdi, r15
jbe 0x180063c50
jmp 0x180063d5f
xor edx, edx
lea rcx, [rsi + 0x40]
mov dword [rsi + 0x10], edx
nop dword [rax]
mov qword [rcx], rdx
mov rax, rcx
mov qword [rsi + 8], rcx
add r12, 0x40
add rcx, 0x40
mov rdx, rax
cmp r12, 0xfc0
jbe 0x180063d30
mov rax, qword [0x1801bb510]
mov qword [rsi], rax
mov qword [0x1801bb510], rsi
mov r12, qword [rsp + 0xb0]
mov rbp, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0xa0]
mov rax, rsi
mov rsi, qword [rsp + 0xb8]
add rsp, 0x80
pop r15
pop r14
pop rdi
ret
Function at 0x180064830
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x40
xor esi, esi
mov r14d, edx
mov rbx, rcx
mov qword [rcx], rsi
mov qword [rcx + 8], rsi
xor edx, edx
mov ebp, r8d
lea ecx, [rsi + 4]
call qword [sym.imp.api_ms_win_core_toolhelp_l1_1_0.dll_CreateToolhelp32Snapshot]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x180064954
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, rax
call qword [sym.imp.api_ms_win_core_toolhelp_l1_1_0.dll_Thread32First]
test eax, eax
je 0x18006494b
cmp dword [rsp + 0x20], 0x10
jb 0x18006492d
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcessId]
cmp dword [rsp + 0x2c], eax
jne 0x18006492d
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentThreadId]
cmp dword [rsp + 0x28], eax
je 0x18006492d
mov rdx, qword [rbx]
test rdx, rdx
jne 0x1800648e8
mov rcx, qword [0x1801bb528]
mov r8d, 0x200
mov dword [rbx + 8], 0x80
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov qword [rbx], rax
mov rdx, rax
test rax, rax
je 0x18006494b
jmp 0x18006491d
mov eax, dword [rbx + 8]
cmp dword [rbx + 0xc], eax
jb 0x18006491d
mov rcx, qword [0x1801bb528]
lea r9d, [rax + rax]
mov r8, rdx
shl r9, 2
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapReAlloc]
mov rdx, rax
test rax, rax
je 0x18006494b
mov eax, dword [rbx + 8]
add eax, eax
mov qword [rbx], rdx
mov dword [rbx + 8], eax
mov ecx, dword [rbx + 0xc]
mov eax, dword [rsp + 0x28]
mov dword [rdx + rcx*4], eax
lea eax, [rcx + 1]
mov dword [rbx + 0xc], eax
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_toolhelp_l1_1_0.dll_Thread32Next]
test eax, eax
jne 0x180064892
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
cmp qword [rbx], rsi
je 0x1800649a3
cmp dword [rbx + 0xc], esi
jbe 0x1800649a3
nop
mov r8, qword [rbx]
xor edx, edx
mov eax, esi
lea ecx, [rdx + 0x5a]
mov r8d, dword [r8 + rax*4]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_OpenThread]
mov rdi, rax
test rax, rax
je 0x18006499c
mov rcx, rax
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_SuspendThread]
mov r8d, ebp
mov edx, r14d
mov rcx, rdi
call fcn.1800646a0
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
inc esi
cmp esi, dword [rbx + 0xc]
jb 0x180064960
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x1800649c0
Capabilities:
Resume thread

Disassembly:
push rdi
sub rsp, 0x20
cmp qword [rcx], 0
mov rdi, rcx
je 0x180064a2f
mov qword [rsp + 0x30], rbx
xor ebx, ebx
cmp dword [rcx + 0xc], ebx
jbe 0x180064a18
mov qword [rsp + 0x38], rsi
mov r8, qword [rdi]
xor edx, edx
mov r8d, dword [r8 + rbx*4]
lea ecx, [rdx + 0x5a]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x180064a0c
mov rcx, rax
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
inc ebx
cmp ebx, dword [rdi + 0xc]
jb 0x1800649e0
mov rsi, qword [rsp + 0x38]
mov r8, qword [rdi]
xor edx, edx
mov rcx, qword [0x1801bb528]
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x180064a40
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov dword [rsp + 0x10], edx
push rdi
sub rsp, 0x20
mov eax, ecx
lea r9, [rsp + 0x38]
imul rbx, rax, 0x38
mov r8d, 0x40
add rbx, qword [0x1801bb518]
mov rdx, qword [rbx]
movzx eax, byte [rbx + 0x20]
and al, 1
movzx ecx, al
lea rdi, [rdx - 5]
cmove rdi, rdx
lea rsi, [rcx*2 + 5]
mov rcx, rdi
mov rdx, rsi
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_VirtualProtect]
test eax, eax
jne 0x180064aac
mov eax, 0xa
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov byte [rdi], 0xe9
mov eax, dword [rbx + 8]
sub eax, edi
sub eax, 5
mov dword [rdi + 1], eax
test byte [rbx + 0x20], 1
je 0x180064ac8
mov rax, qword [rbx]
mov word [rax], 0xf9eb
mov r8d, dword [rsp + 0x38]
lea r9, [rsp + 0x38]
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_VirtualProtect]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
mov r8, rsi
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_1.dll_FlushInstructionCache]
or byte [rbx + 0x20], 6
mov rbx, qword [rsp + 0x30]
xor eax, eax
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x180064b10
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x30
mov eax, dword [0x1801bb524]
xor edi, edi
mov ebx, edi
test eax, eax
je 0x180064c20
mov rcx, qword [0x1801bb518]
add rcx, 0x20
test byte [rcx], 2
je 0x180064b53
inc ebx
add rcx, 0x38
cmp ebx, eax
jb 0x180064b37
mov eax, edi
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
cmp ebx, 0xffffffff
je 0x180064c20
mov edx, 0xffffffff
lea rcx, [rsp + 0x20]
mov r8d, 1
call fcn.180064830
mov edx, dword [0x1801bb524]
cmp ebx, edx
jae 0x180064bad
nop dword [rax + rax]
mov eax, ebx
imul rcx, rax, 0x38
mov rax, qword [0x1801bb518]
test byte [rcx + rax + 0x20], 2
jne 0x180064ba7
mov ecx, ebx
call fcn.180064a40
mov edi, eax
test eax, eax
jne 0x180064bad
mov edx, dword [0x1801bb524]
inc ebx
cmp ebx, edx
jb 0x180064b80
cmp qword [rsp + 0x20], 0
je 0x180064c20
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x180064c0c
mov rbx, qword [rsp + 0x20]
mov qword [rsp + 0x40], rbp
mov ebp, eax
mov qword [rsp + 0x48], rsi
nop
mov r8d, dword [rbx]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x180064bf8
mov rcx, rax
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
add rbx, 4
sub rbp, 1
jne 0x180064bd0
mov rsi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x40]
mov r8, qword [rsp + 0x20]
xor edx, edx
mov rcx, qword [0x1801bb528]
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov rbx, qword [rsp + 0x50]
mov eax, edi
add rsp, 0x30
pop rdi
ret
Function at 0x1414ff058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1414ff1df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x1414ff089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1414ff06f
add dl, dl
jne 0x1414ff096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1414ff0f6
xor eax, eax
add dl, dl
jne 0x1414ff0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1414ff1ad
add dl, dl
jne 0x1414ff0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1414ff0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1414ff0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1414ff0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1414ff0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1414ff07e
mov eax, 1
add dl, dl
jne 0x1414ff106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1414ff113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1414ff0fb
sub eax, ebx
mov ebx, 1
jne 0x1414ff14c
mov ecx, 1
add dl, dl
jne 0x1414ff12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1414ff13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1414ff123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1414ff07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1414ff168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1414ff175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1414ff15d
cmp eax, 0x7d00
jae 0x1414ff19b
cmp eax, 0x500
jb 0x1414ff196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1414ff07e
cmp eax, 0x7f
ja 0x1414ff19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1414ff07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1414ff1d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x1414ff07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20