joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140041da4
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x50
mov rax, qword [0x14006c270]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov ebp, r8d
mov r14, rdx
mov r13, rcx
call fcn.14003af40
xor ebx, ebx
cmp qword [0x14006f180], rbx
mov rdi, rax
jne 0x140041eb7
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x140041f8e
lea rdx, [0x140054fc0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140041f8e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetActiveWindow
mov rcx, rsi
mov qword [0x14006f180], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetLastActivePopup
mov rcx, rsi
mov qword [0x14006f188], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetUserObjectInformationW
mov rcx, rsi
mov qword [0x14006f190], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov r11, rax
mov qword [0x14006f1a0], rax
test rax, rax
je 0x140041eae
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov qword [0x14006f198], rax
jmp 0x140041ebe
mov rax, qword [0x14006f198]
jmp 0x140041ec5
mov rax, qword [0x14006f198]
mov r11, qword [0x14006f1a0]
cmp rax, rdi
je 0x140041f2c
cmp r11, rdi
je 0x140041f2c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov rcx, qword [0x14006f1a0]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov r12, rax
test rsi, rsi
je 0x140041f2c
test rax, rax
je 0x140041f2c
call rsi
test rax, rax
je 0x140041f26
lea rcx, [rsp + 0x30]
mov r9d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x140041f26
test byte [rsp + 0x40], 1
jne 0x140041f2c
bts ebp, 0x15
jmp 0x140041f6c
mov rcx, qword [0x14006f188]
cmp rcx, rdi
je 0x140041f6c
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x140041f6c
call rax
mov rbx, rax
test rax, rax
je 0x140041f6c
mov rcx, qword [0x14006f190]
cmp rcx, rdi
je 0x140041f6c
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x140041f6c
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x14006f180]
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x140041f8e
mov r9d, ebp
mov r8, r14
mov rdx, r13
mov rcx, rbx
call rax
jmp 0x140041f90
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140034530
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x401a10
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 sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call fcn.00402e90
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop word [rax + rax]
Function at 0x401a80
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x00408614]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x401c28
mov rax, qword [0x00408618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x401acc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x401b57
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x401ab0
mov rcx, r12
call fcn.004027e0
mov rbp, rax
test rax, rax
je 0x401c62
mov rax, qword [0x00408618]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.00402910
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00408618]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401c71
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x401b50
sub eax, 4
and eax, 0xfffffffb
jne 0x401be0
add dword [0x00408614], 1
cmp ebx, 8
jae 0x401b88
test bl, 4
jne 0x401c30
test ebx, ebx
je 0x401b79
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x401c50
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 0x401b79
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 0x401bba
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x00408618]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401b50
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00401a10
nop dword [rax]
xor edi, edi
jmp 0x401ad7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x401b79
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x401b79
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.00401a10
mov rax, qword [0x00408618]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.00401a10
nop
nop dword [rax]
Function at 0x402450
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00408900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004088e0]
test rbx, rbx
je 0x4024a4
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 0x40249b
test r12, r12
je 0x40249b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402480
lea rcx, [0x00408900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x4027e0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x00405440]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x402859
mov rcx, r10
call fcn.004026b0
test eax, eax
je 0x402859
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 0x402856
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 0x40284d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x402859
add r8, 0x28
cmp r8, r9
jne 0x402838
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret
Function at 0x1400169c0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
mov eax, 0x10090
call fcn.140041460
sub rsp, rax
mov rax, qword [0x140059040]
xor rax, rsp
mov qword [rsp + 0x10080], rax
xor eax, eax
lea rsi, str.PYTHON_FROZEN_MODULES
mov word [rsp + 0x80], ax
lea rbx, [rsp + 0x30]
mov word [rsp + 0x30], ax
mov edi, 0x28
mov dl, 0x50
nop dword [rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x140016a2d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x140016a20
cmp rcx, 1
jb 0x140016ada
mov byte [rsp + 0x20], dl
mov rcx, 0xffffffffffffffff
mov byte [rsp + 0x21], 0
nop word [rax + rax]
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x140016a50
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.140034a38
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x140016a10
mov r8d, 0x10000
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0xffff
ja 0x140016ad6
lea rcx, [rsp + 0x80]
call fcn.14003620c
mov rcx, qword [rsp + 0x10080]
xor rcx, rsp
call fcn.1400259b0
lea r11, [rsp + 0x10090]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
xor eax, eax
jmp 0x140016ab1
call fcn.140029fa0
int3
Function at 0x140026384
Capabilities:
Parse pe header

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

Function at 0x14002a300
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x14002a16b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14002a16b
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14002a16b
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14002a16b
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14002a16b
cmp dword [rcx + 0x84], 0xe
jbe 0x14002a16b
cmp dword [rcx + 0xf8], 0
je 0x14002a16b
mov ecx, ebx
call fcn.14002a21c
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140029ff8
nop
cmp dword [rbp + 0x20], 0
je 0x14002a1b9
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14002a1c4
int3
xor r8d, r8d
xor edx, edx
jmp 0x14002a0fc
Function at 0x14003af34
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14003afbb
mov rsi, rbx
cmp word [rax], bp
je 0x14003af7a
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14003af64
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14003af60
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1400387bc
mov rdi, rax
test rax, rax
je 0x14003afa8
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140041ac0
mov rbp, rdi
xor ecx, ecx
call fcn.140036b8c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14003eb30
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14003eb46
mov al, 1
jmp 0x14003eba6
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14003eb57
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14003eba4
mov ecx, dword [rcx + 0x18]
nop
call fcn.14003b6d8
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14003eba4
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14003eba4
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14003eba4
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14003eba6
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x140041370
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140041398
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140041398
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret