joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140004790
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x4a8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x420], 0xfffffffffffffffe
mov rsi, rcx
lea rcx, [rbp - 0x60]
call fcn.14000a8a0
mov rax, qword [rbp - 0x60]
mov qword [rbp + 0x408], rax
test rax, rax
je 0x140004916
mov qword [rbp + 0x400], rsi
mov rax, qword [rbp - 0x58]
mov qword [rbp + 0x418], rax
mov qword [rbp + 0x3e8], 2
xorps xmm0, xmm0
movups xmmword [rbp + 0x3f0], xmm0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x410], rax
xor edi, edi
xor ebx, ebx
xor r13d, r13d
cmp r8, 0x201
jae 0x140004850
jmp 0x14000483f
jae 0x140004928
cmp r8, 0x201
jae 0x140004850
mov r15d, 0x200
lea r14, [rbp - 0x60]
mov r12, r8
jmp 0x1400048a8
sub r8, r13
sub rbx, r13
cmp rbx, r8
jae 0x14000487f
lea rcx, [rbp + 0x3e8]
mov rdx, r13
call fcn.140018910
mov rax, qword [rbp + 0x3e8]
mov qword [rbp + 0x410], rax
mov rdi, qword [rbp + 0x3f0]
mov eax, 0xffffffff
cmp rdi, rax
mov r13d, 0xffffffff
cmovb r13, rdi
mov qword [rbp + 0x3f8], r13
mov rbx, rdi
mov r15, r13
mov r14, qword [rbp + 0x410]
mov r12, r13
xor ecx, ecx
call qword [sym.imp.kernel32.dll_SetLastError]
mov rcx, qword [rbp + 0x408]
mov rdx, r14
mov r8d, r12d
call qword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov esi, eax
test eax, eax
jne 0x1400048d7
call qword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
jne 0x1400049fb
mov r8d, esi
cmp r12, r8
jne 0x140004830
call qword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140004a25
add r12, r12
mov eax, 0xffffffff
cmp r12, rax
cmovae r12, rax
mov r8, r12
cmp r8, 0x201
jb 0x14000483f
jmp 0x140004850
lea rcx, [rbp - 0x58]
call fcn.1400026b0
mov byte [rsi + 0x18], 2
jmp 0x1400049ba
cmp r15, r8
jb 0x140004a3f
lea rcx, [rbp + 0x3a0]
mov rdx, r14
call fcn.140005800
movups xmm0, xmmword [rbp + 0x3a0]
movups xmm1, xmmword [rbp + 0x3b0]
movaps xmmword [rbp + 0x3d0], xmm1
movaps xmmword [rbp + 0x3c0], xmm0
test rdi, rdi
je 0x140004979
add rdi, rdi
mov r8d, 2
mov rcx, qword [rbp + 0x410]
mov rdx, rdi
call fcn.140001fe0
cmp byte [rbp + 0x3d8], 2
jne 0x1400049d1
mov rsi, qword [rbp + 0x400]
mov byte [rsi + 0x18], 2
lea rcx, [rbp + 0x3c0]
call fcn.1400026b0
mov rdx, qword [rbp + 0x418]
test rdx, rdx
je 0x1400049ba
add rdx, rdx
mov r8d, 2
mov rcx, qword [rbp + 0x408]
call fcn.140001fe0
mov rax, rsi
add rsp, 0x4a8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
movaps xmm0, xmmword [rbp + 0x3c0]
movaps xmm1, xmmword [rbp + 0x3d0]
mov rsi, qword [rbp + 0x400]
movups xmmword [rsi + 0x10], xmm1
movups xmmword [rsi], xmm0
mov rdx, qword [rbp + 0x418]
test rdx, rdx
jne 0x1400049a5
jmp 0x1400049ba
call qword [sym.imp.kernel32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov qword [rbp + 0x3c0], rax
mov byte [rbp + 0x3d8], 2
test rdi, rdi
jne 0x140004961
jmp 0x140004979
lea rcx, str.internal_error:_entered_unreachable_code_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112library_alloc_src_vecmod.rs
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call fcn.140019150
jmp 0x140004a54
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, r15
mov r8, rax
call fcn.1400195a0
ud2
Function at 0x140009940
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
mov rcx, qword [rsp + 0xe0]
movups xmm0, xmmword [0x14002f5d8]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
test rcx, rcx
je 0x140009984
mov rdx, qword [rsp + 0xe8]
mov qword [rsp + 0x80], rdx
test rcx, rcx
mov qword [rsp + 0x78], rcx
lea rdx, [rsp + 0x80]
cmove rdx, rcx
mov qword [rsp + 0x38], rdx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x40], 0
mov rcx, rdi
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x1400099ea
mov rcx, rdi
mov edx, 0xffffffff
call qword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [rsp + 0x60]
cmp eax, 0x103
je 0x140009a21
test eax, eax
js 0x1400099fb
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
xor eax, eax
jmp 0x140009a14
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
add rsp, 0xa8
pop rdi
pop rsi
ret
mov dword [rsp + 0x58], 0
mov byte [rsp + 0x5c], 0
lea rax, str.fatal_runtime_error:_I_O_error:_operation_failed_to_complete_synchronously_n
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x78]
call fcn.1400055d0
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x70]
call fcn.140002850
mov ecx, 7
int 0x29
ud2
Function at 0x140016be0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
test r8, r8
je 0x140016c5a
mov rax, rdx
mov rdx, qword [rsp + 0x70]
mov esi, ecx
shr esi, 8
lea r8, [rax + r8*2]
xor r11d, r11d
mov rbx, rax
movzx edi, byte [rax + 1]
add rax, 2
lea r10, [r11 + rdi]
cmp byte [rbx], sil
jne 0x140016c50
cmp r11, r10
ja 0x140016cf3
cmp r10, rdx
ja 0x140016d07
add r11, r9
xor ebx, ebx
nop dword [rax]
cmp rdi, rbx
je 0x140016c52
lea r14, [rbx + 1]
cmp byte [r11 + rbx], cl
mov rbx, r14
jne 0x140016c30
jmp 0x140016cc7
ja 0x140016c5a
mov r11, r10
cmp rax, r8
jne 0x140016c02
mov rdx, qword [rsp + 0x80]
test rdx, rdx
je 0x140016ccb
mov r8, qword [rsp + 0x78]
add rdx, r8
movzx ecx, cx
mov al, 1
nop word cs:[rax + rax]
lea r10, [r8 + 1]
movzx r9d, byte [r8]
test r9b, r9b
js 0x140016ca0
mov r8, r10
sub ecx, r9d
jns 0x140016cbe
jmp 0x140016ccd
cmp r10, rdx
je 0x140016cd9
movzx r10d, byte [r8 + 1]
add r8, 2
and r9d, 0x7f
shl r9d, 8
or r9d, r10d
sub ecx, r9d
js 0x140016ccd
xor al, 1
cmp r8, rdx
jne 0x140016c80
jmp 0x140016ccd
xor eax, eax
jmp 0x140016ccd
mov al, 1
and al, 1
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
lea rcx, str.called__Option::unwrap____on_a__None__valuefrom_str_radix_int:_must_lie_in_the_range___2__36_____found
lea r8, str.librarycore_srcunicodeprintable.rs
mov edx, 0x2b
call fcn.140019150
ud2
lea r8, str.librarycore_srcunicodeprintable.rs
mov rcx, r11
mov rdx, r10
call fcn.140019620
ud2
lea r8, str.librarycore_srcunicodeprintable.rs
mov rcx, r10
call fcn.1400195a0
ud2

Function at 0x1400182e0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.kernel32.dll_GetModuleHandleW]
test rax, rax
je 0x14001832a
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14001832a
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14001832a
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14001832a
cmp dword [rcx + 0x84], 0xe
jbe 0x14001832a
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14001832c
xor al, al
add rsp, 0x28
ret
Function at 0x140003f4c
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
call fcn.140003b5c
add rsp, 0x28
jmp 0x140003f70
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], r12
push r13
sub rsp, 0xb0
xor ebx, ebx
mov dword [rsp + 0x20], ebx
lea rcx, [rax - 0x78]
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
nop
mov rax, qword gs:[0x30]
mov rdi, qword [rax + 8]
mov r12d, ebx
xor eax, eax
lock cmpxchg qword [0x14001d938], rdi
jne 0x140008848
mov eax, dword [0x14001d930]
cmp eax, 1
je 0x140008868
mov eax, dword [0x14001d930]
cmp eax, ebx
jne 0x14000887f
mov dword [0x14001d930], 1
lea r13, [0x140014218]
lea rdi, [0x140014200]
mov qword [rsp + 0x30], rdi
mov eax, ebx
mov dword [rsp + 0x24], ebx
cmp rdi, r13
jae 0x14000401c
cmp eax, ebx
jne 0x14000401c
mov rcx, qword [rdi]
cmp rcx, rbx
je 0x140004011
call rcx
mov dword [rsp + 0x24], eax
add rdi, 8
mov qword [rsp + 0x30], rdi
jmp 0x140003ffa
cmp eax, ebx
jne 0x140008875
mov eax, dword [0x14001d930]
cmp eax, 1
jne 0x14000404c
lea rdx, [0x1400141f8]
lea rcx, [0x1400141c0]
call fcn.14016a000
mov dword [0x14001d930], 2
cmp r12d, ebx
jne 0x14000405b
mov rax, rbx
xchg qword [0x14001d938], rax
cmp qword [0x14001d950], rbx
jne 0x14000888e
mov rcx, qword [sym.imp.msvcrt.dll__wcmdln]
cmp qword [rcx], rbx
je 0x1400088b7
mov rcx, qword [rcx]
mov qword [rsp + 0x28], rcx
mov edx, dword [rsp + 0x20]
cmp word [rcx], 0x20
jbe 0x14000409f
cmp word [rcx], 0x22
je 0x140008912
add rcx, 2
mov qword [rsp + 0x28], rcx
jmp 0x140004084
cmp word [rcx], bx
jne 0x1400088c1
cmp word [rcx], bx
jne 0x1400088ce
test byte [rsp + 0x7c], 1
movzx eax, word [rsp + 0x80]
mov r9d, 0xa
cmovne r9d, eax
mov r8, rcx
xor edx, edx
lea rcx, [0x140000000]
call fcn.1400040e8
nop
jmp 0x1400088e6
cmp rax, rdi
jne 0x140008858
mov r12d, 1
jmp 0x140003fba
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140003fa9
lea ecx, [rax + 0x1e]
call sub.msvcrt.dll__amsg_exit
jmp 0x140004024
mov eax, 0xff
jmp 0x140008951
mov dword [0x14001db2c], 1
jmp 0x140004024
lea rcx, [0x14001d950]
call fcn.140011e1c
cmp eax, ebx
je 0x140004068
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
call qword [0x14001d950]
nop
jmp 0x140004068
mov eax, 0xff
jmp 0x140008951
cmp edx, ebx
je 0x1400040a8
jmp 0x14000408a
cmp word [rcx], 0x20
ja 0x1400040b1
add rcx, 2
mov qword [rsp + 0x28], rcx
jmp 0x1400040a8
mov dword [0x14001db28], eax
cmp dword [0x14001d30c], ebx
jne 0x1400088fc
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x14001db2c], ebx
jne 0x140008910
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x14001db28]
jmp 0x140008951
mov eax, ebx
cmp edx, ebx
sete al
mov edx, eax
mov dword [rsp + 0x20], eax
jmp 0x140004094
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov r12, qword [r11 + 0x20]
mov rsp, r11
pop r13
ret