joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40c59c
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
push rsi
push rdi
mov r11, rsp
sub rsp, 0x40
mov rax, qword [r8]
mov dword [r8 + 8], 0
mov rsi, rcx
mov word [rax], 0
mov rcx, qword [rcx]
lea rax, [r11 + 0x30]
mov rbx, r8
mov qword [r11 - 0x18], rax
lea r9, [r11 - 0x10]
xor r8d, r8d
mov qword [r11 - 0x20], 0
mov rdi, rdx
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x70], 0
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40c5fb
cmp eax, 0xea
jne 0x40c671
mov edx, dword [rsp + 0x70]
cmp edx, dword [rbx + 0xc]
mov dword [rsp + 0x78], edx
jbe 0x40c610
mov rcx, rbx
call fcn.00403220
mov rax, qword [rbx]
lea rcx, [rsp + 0x78]
lea r9, [rsp + 0x34]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsi]
xor r8d, r8d
mov rdx, rdi
mov dword [rsp + 0x34], 0
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [rsp + 0x70]
mov rdx, qword [rbx]
cmp ecx, dword [rsp + 0x78]
cmova ecx, dword [rsp + 0x78]
mov dword [rsp + 0x70], ecx
shr rcx, 1
mov word [rdx + rcx*2], 0
xor ecx, ecx
cmp word [rdx], cx
je 0x40c66e
add rdx, 2
inc ecx
cmp word [rdx], 0
jne 0x40c662
mov dword [rbx + 8], ecx
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret

Function at 0x40c6d8
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
mov rax, rsp
sub rsp, 0x40
mov dword [r9], 0
mov qword [rax - 0x18], r9
mov r12, rcx
mov rcx, qword [rcx]
mov rsi, r9
mov rbx, r8
lea r9, [rax + 0x48]
xor r8d, r8d
mov rbp, rdx
mov dword [rax + 0x48], 0
mov qword [rax - 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40c727
cmp eax, 0xea
jne 0x40c789
mov edi, dword [rsi]
cmp rdi, qword [rbx + 8]
je 0x40c75f
mov rcx, qword [rbx]
test rcx, rcx
je 0x40c743
call fcn.00402388
mov qword [rbx], 0
test rdi, rdi
mov qword [rbx + 8], 0
je 0x40c75f
mov rcx, rdi
call fcn.00402350
mov qword [rbx + 8], rdi
mov qword [rbx], rax
mov rax, qword [rbx]
mov rcx, qword [r12]
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rdx, rbp
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
add rsp, 0x40
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x40c7dc
Capabilities:
Get system information on windows

Disassembly:
sub rsp, 0x68
lea rcx, [rsp + 0x20]
call fcn.0040c7b4
xor r8d, r8d
cmp eax, r8d
je 0x40c81b
cmp qword [rsp + 0x20], r8
je 0x40c81b
mov rcx, r8
lea eax, [r8 + 0x40]
mov rdx, qword [rsp + 0x20]
shr rdx, cl
inc rcx
and edx, 1
add r8d, edx
dec rax
jne 0x40c800
mov eax, r8d
jmp 0x40c82a
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x50]
add rsp, 0x68
ret

Function at 0x40c830
Capabilities:
Get memory capacity

Disassembly:
push rbx
sub rsp, 0x60
movabs rax, 0x100000000
mov rbx, rcx
mov dword [rsp + 0x20], 0x40
mov qword [rcx], rax
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x40c872
mov rax, qword [rsp + 0x28]
cmp qword [rsp + 0x48], rax
cmovb rax, qword [rsp + 0x48]
mov qword [rbx], rax
mov al, 1
add rsp, 0x60
pop rbx
ret
Function at 0x40cc68
Capabilities:
Get system information on windows

Disassembly:
push rbx
sub rsp, 0x50
mov rbx, rcx
xor ecx, ecx
mov rax, qword [rbx]
mov dword [rbx + 8], ecx
mov byte [rax], cl
mov rax, qword [rdx]
mov dword [rdx + 8], ecx
mov byte [rax], cl
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call fcn.0040ca40
add rsp, 0x50
pop rbx
ret
Function at 0x41df78
Capabilities:
Encode data using xor

Disassembly:
test edx, edx
je 0x41e10b
mov eax, edx
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
add ecx, r8d
xor ecx, r8d
dec rax
jne 0x41df82
mov eax, ecx
ret
Function at 0x41e8e0
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, qword [rcx + 8]
mov r13, qword [rcx]
xor r9d, r9d
test rbp, rbp
lea r12d, [r9 + 1]
mov r14d, r8d
mov r15d, edx
mov edi, 0x159a55e5
mov esi, 0x1f123bb5
mov r10, r12
mov r11d, r12d
je 0x41ea95
movzx ecx, di
shr edi, 0x10
imul ecx, ecx, 0x9069
add edi, ecx
movzx ecx, si
shr esi, 0x10
mov edx, edi
shl edx, 0x10
imul ecx, ecx, 0x4650
add esi, ecx
add edx, esi
xor edx, r14d
mov eax, edx
shr edx, 1
and eax, r12d
je 0x41ea84
cmp r9, 0x400
jb 0x41ea84
mov ecx, edx
shr edx, 2
mov r8d, r12d
and ecx, 3
inc ecx
shl r8d, cl
sub r8d, r12d
and r8d, edx
shr edx, cl
mov eax, edx
inc r8d
shr edx, 3
and eax, 7
je 0x41ea4d
mov ecx, edx
shr edx, 2
mov eax, r12d
and ecx, 3
inc ecx
shl eax, cl
sub eax, r12d
and eax, edx
shr edx, cl
add r8d, eax
jmp 0x41e9a1
add r11d, r12d
mov ecx, r11d
mov rax, r12
shl rax, cl
cmp rax, r9
jb 0x41e99e
cmp r15d, r11d
mov ecx, 5
mov ebx, r15d
cmova ebx, r11d
lea eax, [rcx - 1]
cmp ebx, 0x15
cmovbe ecx, eax
shl r12d, cl
add r12d, 0xffffffff
movzx ecx, di
shr edi, 0x10
mov r10d, r12d
and r10d, edx
movzx edx, si
shr esi, 0x10
imul ecx, ecx, 0x9069
add edi, ecx
add r10d, 6
imul edx, edx, 0x4650
add esi, edx
mov edx, edi
shl edx, 0x10
add edx, esi
xor edx, r14d
cmp r10d, ebx
ja 0x41e9ce
mov ecx, r10d
mov r10d, 1
mov eax, edx
shl r10, cl
dec r10
and r10, rax
cmp r10, r9
jb 0x41ea44
movzx ecx, di
shr edi, 0x10
imul ecx, ecx, 0x9069
add edi, ecx
movzx ecx, si
shr esi, 0x10
mov edx, edi
imul ecx, ecx, 0x4650
add esi, ecx
shl edx, 0x10
add edx, esi
xor edx, r14d
jmp 0x41e9ce
mov r12d, 1
add r10, r12
mov eax, r8d
lea rdx, [r13 + r9]
mov rcx, rbp
sub rcx, r9
cmp rax, rcx
cmova r8d, ecx
mov rcx, rdx
mov ebx, r8d
sub rcx, r10
add r9, rbx
test r8d, r8d
je 0x41ea8c
mov al, byte [rcx]
add rcx, r12
mov byte [rdx], al
add rdx, r12
sub rbx, r12
jne 0x41ea73
jmp 0x41ea8c
mov byte [r13 + r9], dl
add r9, r12
cmp r9, rbp
jb 0x41e91a
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x4388b0
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x80
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov r12, rcx
mov edx, dword [rcx + 0x20]
mov rax, qword [rcx + 0x18]
mov rbp, qword [rax + rdx*8 - 8]
lea rdx, str.CreateDecoder
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x28], rax
lea rdx, str.CreateEncoder
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x30], rax
lea rdx, str.GetMethodProperty
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x20], rax
xor edi, edi
cmp rax, rdi
je 0x438a81
mov dword [rsp + 0xb0], 1
lea rdx, str.GetNumberOfMethods
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp rax, rdi
je 0x438953
lea rcx, [rsp + 0xb0]
call rax
cmp eax, edi
jne 0x438afc
mov esi, edi
cmp dword [rsp + 0xb0], edi
jbe 0x438a81
mov eax, dword [r12 + 0x20]
dec eax
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x54], esi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x5c]
mov r8d, 3
mov edx, esi
mov rcx, qword [rbp + 0x20]
call fcn.004373c4
cmp eax, edi
jne 0x438afc
lea rax, [rsp + 0x59]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x6c]
mov r8d, 2
mov edx, esi
mov rcx, qword [rbp + 0x20]
call fcn.004373c4
cmp eax, edi
jne 0x438afc
mov rax, qword [rbp + 0x20]
mov word [rsp + 0x38], di
mov word [rsp + 0x3a], di
mov qword [rsp + 0x40], rdi
mov byte [rsp + 0x5a], dil
mov byte [rsp + 0x5b], dil
lea r8, [rsp + 0x38]
mov edx, 0xa
mov ecx, esi
call rax
mov ebx, eax
cmp eax, edi
je 0x4389fe
lea rcx, [rsp + 0x38]
call fcn.0040be6c
jmp 0x438a2a
cmp word [rsp + 0x38], 0xb
jne 0x438a17
mov byte [rsp + 0x5b], 1
cmp word [rsp + 0x40], di
setne byte [rsp + 0x5a]
jmp 0x438a1e
cmp word [rsp + 0x38], di
jne 0x438a6e
lea rcx, [rsp + 0x38]
call fcn.0040be6c
mov ebx, edi
cmp ebx, edi
jne 0x438a7d
lea rcx, [r12 + 0x60]
call fcn.00437ddc
mov ecx, dword [r12 + 0x68]
lea eax, [rcx + 1]
mov dword [r12 + 0x68], eax
imul rcx, rcx, 0x2c
add rcx, qword [r12 + 0x60]
lea rdx, [rsp + 0x50]
mov r8d, 0x2c
call sub.msvcrt.dll_memcpy
inc esi
cmp esi, dword [rsp + 0xb0]
jae 0x438a81
jmp 0x438962
lea rcx, [rsp + 0x38]
call fcn.0040be6c
mov ebx, 0x80004005
mov eax, ebx
jmp 0x438afc
lea rdx, str.GetHashers
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp rax, rdi
je 0x438afa
lea rcx, [rbp + 0x40]
call rax
cmp eax, edi
jne 0x438afc
mov rcx, qword [rbp + 0x40]
cmp rcx, rdi
je 0x438afa
mov rax, qword [rcx]
call qword [rax + 0x18]
mov esi, eax
cmp eax, edi
jbe 0x438afa
mov ecx, dword [r12 + 0x20]
dec ecx
mov dword [rsp + 0xb0], ecx
mov dword [rsp + 0xb4], edi
lea rcx, [r12 + 0x70]
call fcn.00445a44
mov r11d, dword [r12 + 0x78]
lea eax, [r11 + 1]
mov dword [r12 + 0x78], eax
mov rcx, qword [r12 + 0x70]
mov rax, qword [rsp + 0xb0]
mov qword [rcx + r11*8], rax
inc edi
cmp edi, esi
jb 0x438ab6
xor eax, eax
add rsp, 0x80
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x45db70
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
lea rax, [rsp + 0x40]
mov r9, r8
mov rbx, rcx
mov r8, rdx
mov qword [rsp + 0x28], rax
xor ecx, ecx
xor edx, edx
mov dword [rsp + 0x20], 0
call qword [sym.imp.msvcrt.dll__beginthreadex]
test rax, rax
mov qword [rbx], rax
je 0x45dbab
xor eax, eax
add rsp, 0x30
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 1
test eax, eax
cmovne ecx, eax
mov eax, ecx
add rsp, 0x30
pop rbx
ret

Function at 0x45dbd0
Capabilities:
Create thread
Resume thread

Disassembly:
sub rsp, 0x48
mov qword [rsp + 0x58], rbx
lea rax, [rsp + 0x30]
mov qword [rsp + 0x60], rsi
mov rsi, r9
mov r9, r8
mov rbx, rcx
mov r8, rdx
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x68], rdi
mov dword [rsp + 0x20], 4
call qword [sym.imp.msvcrt.dll__beginthreadex]
test rax, rax
mov qword [rbx], rax
mov rbx, qword [rsp + 0x58]
mov rdi, rax
je 0x45dc35
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x45dc56
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 1
test eax, eax
cmovne ecx, eax
mov eax, ecx
mov rdi, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x60]
add rsp, 0x48
ret
mov rdi, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x60]
xor eax, eax
add rsp, 0x48
ret

Function at 0x45dea0
Capabilities:
Check os version

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_GetVersion]
cmp ax, 6
je 0x45ded9
lea rcx, [0x004609f0]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, str.SetDefaultDllDirectories
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x45ded9
mov ecx, 0xc00
call rax
add rsp, 0x28
ret
Function at 0x45e200
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x58
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rdi
cmp word [0x00400000], 0x5a4d
je 0x45e221
xor ebx, ebx
mov dword [rsp + 0x60], ebx
jmp 0x45e29d
movsxd rax, dword [0x0040003c]
lea rcx, [0x00400000]
add rax, rcx
cmp dword [rax], 0x4550
je 0x45e242
xor ebx, ebx
mov dword [rsp + 0x60], ebx
jmp 0x45e29d
movzx ecx, word [rax + 0x18]
cmp ecx, 0x10b
je 0x45e280
cmp ecx, 0x20b
je 0x45e25e
xor ebx, ebx
mov dword [rsp + 0x60], ebx
jmp 0x45e29d
cmp dword [rax + 0x84], 0xe
ja 0x45e26f
xor ebx, ebx
mov dword [rsp + 0x60], ebx
jmp 0x45e29d
xor ebx, ebx
cmp dword [rax + 0xf8], ebx
setne bl
mov dword [rsp + 0x60], ebx
jmp 0x45e29d
cmp dword [rax + 0x74], 0xe
ja 0x45e28e
xor ebx, ebx
mov dword [rsp + 0x60], ebx
jmp 0x45e29d
xor ebx, ebx
cmp dword [rax + 0xe8], ebx
setne bl
mov dword [rsp + 0x60], ebx
mov ecx, 1
call qword [sym.imp.msvcrt.dll___set_app_type]
mov qword [0x00483dc8], 0xffffffffffffffff
mov qword [0x00483dd0], 0xffffffffffffffff
mov rcx, qword [sym.imp.msvcrt.dll__fmode]
mov eax, dword [0x00481da4]
mov dword [rcx], eax
mov rcx, qword [sym.imp.msvcrt.dll__commode]
mov eax, dword [0x00481da0]
mov dword [rcx], eax
call fcn.0045d2e0
cmp dword [0x004817b0], 0
jne 0x45e2f7
lea rcx, [fcn.0045d2e0]
call qword [sym.imp.msvcrt.dll___setusermatherr]
lea rdx, [0x00460498]
lea rcx, [0x00460490]
call sub.msvcrt.dll__initterm
mov r11d, dword [0x00481d9c]
mov dword [rsp + 0x68], r11d
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, dword [0x00481d98]
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x30]
call qword [sym.imp.msvcrt.dll___getmainargs]
lea rdx, [0x00460488]
lea rcx, [0x00460430]
call fcn.005fa000
mov r11, qword [rsp + 0x38]
mov rax, qword [sym.imp.msvcrt.dll___initenv]
mov qword [rax], r11
mov r8, qword [rsp + 0x38]
mov rdx, qword [rsp + 0x40]
mov ecx, dword [rsp + 0x30]
call fcn.0045ae04
mov edi, eax
mov dword [rsp + 0x34], eax
test ebx, ebx
jne 0x45e383
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
call qword [sym.imp.msvcrt.dll__cexit]
jmp 0x45e3a4
mov eax, edi
mov rbx, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x58
ret
Function at 0x140001000
Capabilities:
Execute command

Disassembly:
sub rsp, 0x28
nop dword [rax]
nop dword [rax + rax]
lea rcx, str.start_curl_parrot.live
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov ecx, 0x32
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140001010

Function at 0x140001918
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140001962
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140001962
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140001962
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140001962
cmp dword [rcx + 0x84], 0xe
jbe 0x140001962
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140001964
xor al, al
add rsp, 0x28
ret