joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400b0a50
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x80
mov rsi, r9
mov r15, r8
mov r14, rdx
mov rbp, rcx
mov ecx, 0x30
call fcn.14008cab8
mov rbx, rax
mov qword [rsp + 0xb0], rax
xor edi, edi
test rax, rax
je 0x1400b0aac
mov qword [rax + 0x20], r14
lea rax, [0x1400af7a0]
mov qword [rbx + 0x28], rax
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
movups xmmword [rbx + 0x10], xmm0
jmp 0x1400b0aaf
mov rbx, rdi
mov qword [rsp + 0xb0], rbx
mov rcx, qword [rsp + 0xd0]
cmp rcx, 0xffffffffffffffff
jne 0x1400b0ace
mov eax, 0xffffffff
mov ecx, eax
jmp 0x1400b0ad5
mov rax, rcx
shr rax, 0x20
mov dword [rbx + 0x10], ecx
mov dword [rbx + 0x14], eax
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.KERNEL32.dll_StartThreadpoolIo]
mov qword [rsp + 0x20], rbx
xor r9d, r9d
mov r8d, esi
mov rdx, r15
mov rcx, qword [rbp + 0x70]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r15d, eax
test r12d, r12d
jne 0x1400b0b1d
cmp eax, 0x3e5
jne 0x1400b0b1d
mov rbx, rdi
jmp 0x1400b0bd6
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.KERNEL32.dll_CancelThreadpoolIo]
mov rsi, 0xffffffffffffffff
test r12d, r12d
je 0x1400b0b5f
mov dword [rsp + 0xd0], edi
xor r9d, r9d
lea r8, [rsp + 0xd0]
mov rdx, rbx
mov rcx, qword [rbp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x1400b0b5f
mov esi, dword [rsp + 0xd0]
jmp 0x1400b0bd3
mov edx, r15d
lea rcx, [rsp + 0x50]
call fcn.1400b0c10
mov rdi, rax
lea rcx, [rsp + 0x30]
call sub.MSVCP140.dll_void___cdecl___ExceptionPtrCreate_void____ptr64_
lea r8, [0x140127610]
mov rdx, rdi
lea rcx, [rsp + 0x30]
call sub.MSVCP140.dll_void___cdecl___ExceptionPtrCopyException_void____ptr64__void_const____ptr64__void_const____ptr64_
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
call sub.MSVCP140.dll_void___cdecl___ExceptionPtrCopy_void____ptr64__void_const____ptr64_
lea rcx, [rsp + 0x30]
call sub.MSVCP140.dll_void___cdecl___ExceptionPtrDestroy_void____ptr64_
lea rax, vtable.std::exception.0
mov qword [rdi], rax
lea rcx, [rdi + 8]
call sub.VCRUNTIME140.dll___std_exception_destroy
nop
mov rax, qword [r14]
lea rdx, [rsp + 0x40]
mov rcx, r14
call qword [rax + 0x10]
nop
lea rcx, [rsp + 0x40]
call sub.MSVCP140.dll_void___cdecl___ExceptionPtrDestroy_void____ptr64_
mov rdi, rsi
test rbx, rbx
je 0x1400b0be8
mov edx, 0x30
mov rcx, rbx
call fcn.14008caf4
mov rax, rdi
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
Function at 0x1400b1220
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [rcx]
mov rbx, rcx
call qword [rax + 0x48]
test al, al
jne 0x14008b5ab
xor eax, eax
add rsp, 0x20
pop rbx
ret
mov rcx, qword [rbx + 0x30]
mov edx, 1
add rsp, 0x20
pop rbx
jmp 0x1400b1220
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rsi, rdx
mov rdi, rcx
lea rbx, [rcx + 0x48]
mov rcx, rbx
call qword [sym.imp.CONCRT140.dll_public:_void___cdecl_Concurrency::details::_ReentrantBlockingLock::_Acquire_void____ptr64]
mov rcx, qword [rdi + 0x70]
cmp rcx, 0xffffffffffffffff
jne 0x1400b1251
mov rdi, rcx
jmp 0x1400b1271
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400b126f
xor edx, edx
mov rax, qword [rsp + 0x30]
div rsi
mov rdi, rax
jmp 0x1400b1271
xor edi, edi
mov rcx, rbx
call qword [sym.imp.CONCRT140.dll_public:_void___cdecl_Concurrency::details::_ReentrantBlockingLock::_Release_void____ptr64]
nop
mov rax, rdi
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x1400b1880
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
mov rsi, r8
mov rdi, rcx
add rcx, 0x48
call qword [sym.imp.CONCRT140.dll_public:_void___cdecl_Concurrency::details::_ReentrantBlockingLock::_Acquire_void____ptr64]
mov rcx, qword [rdi + 0x70]
cmp rcx, 0xffffffffffffffff
je 0x1400b18fe
mov rax, qword [rdi + 0x20]
xor ebp, ebp
test rax, rax
je 0x1400b18d8
lea edx, [rbp + 1]
mov rcx, rax
call fcn.14008caf4
mov qword [rdi + 0x20], rbp
mov qword [rdi + 0x30], rbp
mov qword [rdi + 0x38], rbp
mov qword [rdi + 0x28], rbp
mov rcx, qword [rdi + 0x70]
mov qword [rsp + 0x30], rbp
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400b18fe
xor edx, edx
mov rax, qword [rsp + 0x30]
div rsi
mov rsi, rax
mov qword [rdi], rax
jmp 0x1400b1905
mov rsi, 0xffffffffffffffff
lea rcx, [rdi + 0x48]
call qword [sym.imp.CONCRT140.dll_public:_void___cdecl_Concurrency::details::_ReentrantBlockingLock::_Release_void____ptr64]
nop
mov rax, rsi
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x1400b6560
Capabilities:
Encrypt data using dpapi

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rbp
mov qword [rsp + 0x10], rdx
push rsi
push rdi
push r14
sub rsp, 0x50
mov r14, rdx
mov rsi, rcx
xor ebp, ebp
mov dword [rsp + 0x20], ebp
lea ecx, [rbp + 0x20]
call fcn.14008cab8
mov rbx, rax
mov qword [rsp + 0x80], rax
test rax, rax
je 0x1400b65c4
mov rdx, qword [rsi]
mov r8, qword [rsi + 8]
sub r8, rdx
mov qword [rax], rbp
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], 7
mov word [rax], bp
shr r8, 1
mov rcx, rax
call fcn.1400916c0
jmp 0x1400b65c7
mov rbx, rbp
mov qword [r14], rbx
mov dword [rsp + 0x20], 1
mov rcx, qword [rsi]
mov rax, qword [rsi + 8]
cmp rcx, rax
je 0x1400b6639
sub rax, rcx
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400b65ee
mov rcx, qword [rbx]
xor r8d, r8d
mov edx, eax
call qword [sym.imp.CRYPT32.dll_CryptUnprotectMemory]
test eax, eax
je 0x1400b6658
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400b660a
mov rdx, qword [rbx]
mov rax, qword [rsi + 0x18]
mov rcx, qword [rbx + 0x10]
sub rcx, rax
lea rdi, [rdx + rax*2]
xor eax, eax
rep stosb byte [rdi], al
mov rax, qword [rsi + 0x18]
cmp qword [rbx + 0x10], rax
jb 0x1400b6652
mov qword [rbx + 0x10], rax
cmp qword [rbx + 0x18], 8
jb 0x1400b6635
mov rbx, qword [rbx]
mov word [rbx + rax*2], bp
mov rax, r14
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x88]
add rsp, 0x50
pop r14
pop rdi
pop rsi
ret
call fcn.140098110
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x28]
call fcn.1400b0c10
lea rdx, [0x140127610]
lea rcx, [rsp + 0x28]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x1400c9000
Capabilities:
Read http header

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x20], rsi
mov qword [rax + 8], rcx
push rdi
sub rsp, 0x40
mov rdi, rdx
mov rbx, rcx
xor esi, esi
mov dword [rax - 0x18], esi
mov qword [rcx], rsi
mov qword [rcx + 0x10], rsi
mov qword [rcx + 0x18], 7
mov word [rcx], si
mov dword [rax - 0x18], 1
mov dword [rax + 0x18], esi
mov qword [rax - 0x20], rsi
lea rax, [rax + 0x18]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [rsi + 0x14]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov edx, dword [rsp + 0x60]
mov rax, qword [rbx + 0x10]
cmp rdx, rax
ja 0x1400c907e
mov qword [rbx + 0x10], rdx
mov rax, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400c9078
mov rax, qword [rbx]
mov word [rax + rdx*2], si
jmp 0x1400c908c
xor r8d, r8d
sub rdx, rax
mov rcx, rbx
call fcn.1400931a0
mov r9, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400c9099
mov r9, qword [rbx]
mov qword [rsp + 0x28], rsi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [r8 + 0x14]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov r8, qword [rbx + 0x10]
test r8, r8
je 0x1400c91cf
mov r9, qword [rbx + 0x18]
cmp r9, 8
jb 0x1400c90d7
mov rax, qword [rbx]
mov rcx, rax
jmp 0x1400c90dd
mov rax, rbx
mov rcx, rbx
lea rdx, [r8 + r8]
add rax, rdx
cmp word [rcx], 0
jne 0x1400c915f
lea rdx, [rcx + 2]
cmp rdx, rax
je 0x1400c9102
cmp word [rdx], 0
jne 0x1400c9130
add rdx, 2
cmp rdx, rax
jne 0x1400c90f3
mov qword [rbx + 0x10], rsi
mov rax, rbx
cmp r9, 8
jb 0x1400c9112
mov rax, qword [rbx]
mov word [rax], si
mov rax, rbx
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
sub rax, 2
cmp word [rax], 0
je 0x1400c9130
sub rax, rdx
lea r8, [rax + 2]
sar r8, 1
mov rcx, rbx
call fcn.1400916c0
mov rax, rbx
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
sub rax, 2
cmp word [rax], 0
jne 0x1400c91cf
nop dword [rax]
mov rcx, rax
sub rax, 2
cmp word [rax], 0
je 0x1400c9170
sub rdx, rcx
mov rax, r8
cmp r9, 8
mov r9, rcx
jb 0x1400c9197
sub r9, qword [rbx]
add rdx, qword [rbx]
mov rcx, qword [rbx]
jmp 0x1400c91a0
sub r9, rbx
add rdx, rbx
mov rcx, rbx
sar r9, 1
sar rdx, 1
sub rax, r9
cmp rax, rdx
cmovb rdx, rax
lea rcx, [rcx + r9*2]
sub r8, rdx
mov qword [rbx + 0x10], r8
sub r8, r9
lea r8, [r8*2 + 2]
lea rdx, [rcx + rdx*2]
call sub.VCRUNTIME140.dll_memmove
mov rax, rbx
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
Function at 0x1400c91f0
Capabilities:
Read http header

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x140158718]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rsi, r8
mov r12, rdx
mov r14, rcx
mov rdi, qword [r8]
mov rbx, qword [rdi + 0x58]
mov r8, qword [rbx + 8]
lea rdx, [rdi + 0x58]
lea rcx, [rdi + 0x58]
call fcn.140057f80
mov qword [rbx + 8], rbx
mov qword [rbx], rbx
mov qword [rbx + 0x10], rbx
xor r15d, r15d
mov qword [rdi + 0x60], r15
mov dword [rbp - 0x40], r15d
mov qword [rsp + 0x28], r15
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r15 + 0x13]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov qword [rbp - 0x30], r15
mov qword [rbp - 0x20], r15
mov qword [rbp - 0x18], 7
mov word [rbp - 0x30], r15w
mov edx, dword [rbp - 0x40]
test rdx, rdx
jne 0x1400c9291
mov qword [rbp - 0x20], rdx
mov word [rbp + rdx*2 - 0x30], r15w
jmp 0x1400c929d
xor r8d, r8d
lea rcx, [rbp - 0x30]
call fcn.1400931a0
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 8
cmovae r9, qword [rbp - 0x30]
mov qword [rsp + 0x28], r15
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [r8 + 0x13]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rdi, rax
lea rbx, [rbp - 0x30]
cmp qword [rbp - 0x18], 8
cmovae rbx, qword [rbp - 0x30]
mov dword [rax], r15d
mov r8d, 0xa
lea rdx, [rbp - 0x38]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstol]
mov r15d, eax
cmp rbx, qword [rbp - 0x38]
je 0x1400c93fa
cmp dword [rdi], 0x22
je 0x1400c9407
mov rdx, qword [rbp - 0x18]
cmp rdx, 8
jb 0x1400c934f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400c934a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400c934a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14008caf4
mov rax, qword [rsi]
mov word [rax + 0x88], r15w
mov rdx, r14
lea rcx, [rbp - 0x30]
call fcn.1400c9000
nop
mov rcx, qword [rsi]
add rcx, 0x90
cmp rcx, rax
je 0x1400c938d
mov rdx, rax
cmp qword [rax + 0x18], 8
jb 0x1400c9383
mov rdx, qword [rax]
mov r8, qword [rax + 0x10]
call fcn.1400916c0
nop
mov rdx, qword [rbp - 0x18]
cmp rdx, 8
jb 0x1400c93d0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400c93cb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400c93cb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14008caf4
mov rdx, qword [rsi]
add rdx, 0x58
mov rcx, r12
call fcn.1400a72e0
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.14008d670
add rsp, 0x70
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rcx, str.invalid_stoi_argument
call sub.MSVCP140.dll_void___cdecl_std::_Xinvalid_argument_char_const____ptr64_
int3
lea rcx, str.stoi_argument_out_of_range
call sub.MSVCP140.dll_void___cdecl_std::_Xout_of_range_char_const____ptr64_
int3
Function at 0x140024e08
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x140036f70], eax
call fcn.140025410
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_UnhandledExceptionFilter]
cmp dword [0x140036f70], 0
jne case.default.0x140024e5e
mov ecx, 1
call fcn.140025410
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TerminateProcess]
neg byte [rax + 0x61b63c1c]
lahf
jmp 0x157afe874
xchg edi, eax
jne 0x14005fad2
pop rdi
and bh, byte [rsi - 0x28]
adc al, 0xa5
jnp 0x14005f9f3
adc eax, 0x4effbc88
invalid
movabs al, byte [0x6397eb29c513f503]
imul r9, qword [rcx + 0x6435126e], 0xffffffffa864fcc8
invalid