joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4aa451
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x4d7d90]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4aa494
cmp word [esi], dx
jne 0x4aa494
or byte [edi + eax + 0x28], 4
jmp 0x4aa499
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x4aa5ec
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x4aa5cc
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4aa4db
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4aa511
cmp eax, edx
jae 0x4aa51d
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x4aa4b3
jmp 0x4aa5ec
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4aa5c8
cmp dword [ebp - 0x14], 0
je 0x4aa5c8
mov eax, dword [ebx*4 + 0x4d7d90]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4aa5a0
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x4aa569
mov word [esi], cx
jmp 0x4aa59c
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x4d7d90]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x4d7d90]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x4d7d90]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4aa5ec
pop ebx
cmp word [ebp - 4], bx
jne 0x4aa5b1
cmp esi, dword [ebp + 0xc]
jne 0x4aa5b1
mov word [esi], bx
jmp 0x4aa5e9
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00401933
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4aa5ec
push 0xd
jmp 0x4aa5e5
mov ecx, dword [ebx*4 + 0x4d7d90]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4aa5e3
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4aa5ec
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x432003
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
call 0x43200c
nop
nop
pop eax
nop
nop
nop
nop
add eax, 0x40729f
sub eax, reloc.shlwapi.dll_PathFindFileNameA
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
nop
nop
add ebx, 4
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
jl 0x432030
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
jne 0x43201e
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219