joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40615f
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
lea eax, [ebp - 0x23c]
push esi
mov esi, 0x104
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
ja 0x406199
test eax, eax
je 0x406199
add eax, eax
cmp word [ebp + eax - 0x23e], 0x5c
je 0x40619b
mov ecx, 0x4082a8
jmp 0x4061a0
xor eax, eax
mov ecx, 0x4082aa
push dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x23c]
add eax, ecx
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x23c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

Function at 0x4061fe
Capabilities:
Move file

Disassembly:
push 5
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x406221
push dword [esp + 8]
push dword [esp + 8]
call fcn.004062c7
pop ecx
pop ecx
inc dword [0x4342f0]
ret 8

Function at 0x4062c7
Capabilities:
Get file size

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
mov ebx, 0x400
mov dword [0x4301d8], 0x55004e
mov ebp, 0x4301d8
mov dword [0x4301dc], 0x4c
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test esi, esi
je 0x40631d
push 1
push 0
push esi
call fcn.004068dc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push ebp
push esi
call edi
test eax, eax
je 0x4063fd
cmp eax, ebx
jg 0x4063fd
push ebx
mov esi, 0x42f9d8
push esi
push dword [esp + 0x1c]
call edi
test eax, eax
je 0x4063fd
cmp eax, ebx
jg 0x4063fd
push esi
push ebp
push str._ls_ls_r_n
push 0x42f5d8
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [0x434230]
add esp, 0x10
mov ebp, eax
push dword [ecx + 0x128]
push esi
call fcn.00405e69
push 4
push 0xc0000000
push esi
call fcn.004068dc
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4063fd
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea ecx, [ebp + 0xa]
add ecx, esi
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x4063f6
push esi
push edi
push ebx
call fcn.00406909
test eax, eax
je 0x4063f6
push str._Rename__r_n
push edi
call fcn.00406af7
test eax, eax
jne 0x406402
push str._Rename__r_n
lea eax, [edi + esi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esi, 0xa
mov ecx, esi
push ebp
push 0x42f5d8
lea eax, [ecx + edi]
push eax
call fcn.00406675
xor eax, eax
push eax
push eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esi + ebp]
push eax
push edi
push ebx
call fcn.004069cc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
ret
push 0x408984
add eax, 0xa
push eax
call fcn.00406af7
mov ecx, eax
test ecx, ecx
je 0x4063c7
lea edx, [edi + esi]
jmp 0x406421
mov al, byte [edx]
mov byte [edx + ebp], al
dec edx
cmp edx, ecx
ja 0x40641b
sub ecx, edi
inc ecx
jmp 0x4063c9
Function at 0x406546
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
push dword [ebp + 8]
call fcn.00406b5e
mov edi, eax
cmp edi, 0xffffffff
je 0x406589
test byte [ebp + 0xc], 1
push dword [ebp + 8]
je 0x40656a
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x406570
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x406579
xor eax, eax
inc eax
jmp 0x40658b
test byte [ebp + 0xc], 4
jne 0x406589
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
pop edi
pop ebp
ret 8

Function at 0x4065f9
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push esi
push dword [esp + 0xc]
mov ebx, 0x42edd8
push ebx
call fcn.00406adb
push ebx
call fcn.00406b86
mov esi, eax
test esi, esi
je 0x40666e
push esi
call fcn.00406cfe
test byte [0x43422c], 0x80
je 0x406632
movzx eax, word [esi]
test ax, ax
je 0x40666e
cmp eax, 0x5c
je 0x40666e
sub esi, ebx
sar esi, 1
jmp 0x40664c
call fcn.00406590
test eax, eax
je 0x406646
test byte [eax], 0x10
je 0x40666e
push ebx
call fcn.00406cd1
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
cmp eax, esi
jg 0x406638
call fcn.00406517
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40666e
xor eax, eax
inc eax
jmp 0x406670
xor eax, eax
pop esi
pop ebx
ret 4

Function at 0x406697
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [0x42e590], 0x44
lea eax, [ebp - 0x10]
push eax
push 0x42e590
xor eax, eax
push eax
push eax
push 0x4000000
push eax
push eax
push eax
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x4066d6
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4
Function at 0x4066da
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x25c
push ebx
mov ebx, dword [esp + 0x268]
push esi
mov esi, dword [esp + 0x268]
push edi
mov edi, ebx
push esi
and edi, 4
call fcn.004065f9
mov dword [esp + 0x14], eax
test bl, 8
je 0x40671c
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x4342e8], eax
jmp 0x40689b
push ebp
mov ebp, ebx
and ebp, 1
mov dword [esp + 0x14], ebp
je 0x406739
test eax, eax
je 0x40688a
test bl, 2
je 0x406853
push esi
push 0x42e5d8
call fcn.00406adb
test ebp, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatW]
je 0x40675c
push str..
push 0x42e5d8
call ebp
jmp 0x406762
push esi
call fcn.00406cd1
xor eax, eax
cmp word [esi], ax
jne 0x406773
cmp word [0x42e5d8], 0x5c
jne 0x40677b
push 0x4082a8
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [esi + eax*2]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x1c]
push eax
push 0x42e5d8
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40683c
push 0x2e
pop eax
cmp word [esp + 0x48], ax
jne 0x4067c5
cmp word [esp + 0x4a], 0
je 0x40681e
cmp word [esp + 0x4a], ax
jne 0x4067c5
cmp word [esp + 0x4c], 0
je 0x40681e
lea eax, [esp + 0x48]
push eax
push dword [esp + 0x14]
call fcn.00406adb
test byte [esp + 0x1c], 0x10
je 0x4067ec
mov eax, ebx
and eax, 3
cmp al, 3
jne 0x40681e
push ebx
push esi
call fcn.004066da
jmp 0x40681e
push edi
push esi
call fcn.00406546
test eax, eax
jne 0x406816
test edi, edi
je 0x40680e
push esi
push 0xfffffffffffffff1
call fcn.00405d0a
xor eax, eax
push eax
push esi
call fcn.004061fe
jmp 0x40681e
inc dword [0x4342e8]
jmp 0x40681e
push esi
push 0xfffffffffffffff2
call fcn.00405d0a
lea eax, [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x4067a7
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [esp + 0x14], 0
je 0x40689a
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov word [eax - 2], cx
cmp dword [esp + 0x18], ecx
je 0x40688a
push esi
call fcn.00406590
test eax, eax
je 0x40689a
push esi
call fcn.00406517
mov eax, edi
or eax, 1
push eax
push esi
call fcn.00406546
test eax, eax
jne 0x406892
test edi, edi
je 0x40688a
push esi
push 0xfffffffffffffff1
call fcn.00405d0a
xor eax, eax
push eax
push esi
call fcn.004061fe
jmp 0x40689a
inc dword [0x4342e8]
jmp 0x40689a
push esi
push 0xffffffffffffffe5
call fcn.00405d0a
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x25c
ret 8

Function at 0x4068dc
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
push 0
cmove eax, ecx
push eax
push dword [esp + 0x14]
push ecx
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
ret 0xc
Function at 0x406938
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push edi
lea eax, [ebp - 4]
mov dword [ebp - 8], 0x800
push eax
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00406299
mov edi, dword [ebp + 0x14]
test eax, eax
jne 0x4069aa
push esi
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp + 0x18]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
mov word [edi + 0x7fe], ax
pop esi
jne 0x4069aa
cmp dword [ebp + 0x18], 1
je 0x4069af
cmp dword [ebp + 0x18], 2
je 0x4069af
xor eax, eax
mov word [edi], ax
pop edi
leave
ret 0x14

Function at 0x4069b4
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 4]
push eax
and dword [eax + 0x24], 0
mov dword [eax], 0x3c
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
ret 4

Function at 0x406a17
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp - 8], 0x73006e
mov dword [ebp - 4], 0x61
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
pop ecx
xor edx, edx
div ecx
push esi
add word [ebp - 4], dx
lea eax, [ebp - 8]
push 0
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x406a61
test edi, edi
jne 0x406a24
mov word [esi], ax
jmp 0x406a63
mov eax, esi
pop edi
pop esi
leave
ret 8

Function at 0x406b5e
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
je 0x406b80
mov ecx, esi
and ecx, 0xfffffffe
push ecx
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, esi
pop esi
ret 4

Function at 0x406dfd
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x430c2c], 0
push esi
jne 0x406e37
xor ecx, ecx
push 8
mov edx, ecx
pop esi
mov eax, edx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
sub esi, 1
jne 0x406e0e
mov dword [ecx*4 + 0x430c28], edx
inc ecx
cmp ecx, 0x100
jl 0x406e09
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x10]
not ecx
test edx, edx
je 0x406e61
mov esi, dword [esp + 0xc]
movzx eax, byte [esi]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x430c28]
inc esi
sub edx, 1
jne 0x406e49
not ecx
mov eax, ecx
pop esi
ret 0xc
Function at 0x100373cc
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x10037404
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.1003503d
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.10035015
jmp 0x10037410
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x40ab70
Capabilities:
Inspect section memory permissions

Disassembly:
cmp dword [eax], ebx
je 0x40abb6
mov edx, dword [eax + 4]
lea ecx, [eax + 8]
add edx, eax
mov dword [ebp + 8], ecx
cmp ecx, edx
jae 0x40abb1
mov ecx, dword [ebp + 8]
movzx ecx, word [ecx]
mov edx, ecx
and edx, 0xf000
cmp edx, 0x3000
jne 0x40ab9b
and ecx, 0xfff
mov edx, esi
sub edx, dword [edi + 0x34]
add ecx, esi
add ecx, dword [eax]
add dword [ecx], edx
jmp 0x40aba3
cmp edx, ebx
jne 0x40acf1
mov ecx, dword [eax + 4]
add dword [ebp + 8], 2
add ecx, eax
cmp dword [ebp + 8], ecx
jb 0x40ab72
add eax, dword [eax + 4]
jmp 0x40ab5f
mov dword [ebp + 0xc], ebx
jmp 0x40abc1
mov edi, dword [ebp - 0x88]
mov eax, dword [ebp + 0xc]
cmp ax, word [edi + 6]
jne 0x40abd9
mov edx, dword [ebp - 0xb4]
xor ecx, ecx
mov edi, 0x60000000
jmp 0x40abf7
movzx eax, ax
lea eax, [eax + eax*4]
mov ecx, dword [edi + eax*8 + 0x104]
mov edx, dword [edi + eax*8 + 0x108]
lea eax, [edi + eax*8 + 0xf8]
mov edi, dword [eax + 0x24]
lea eax, [edx + ecx - 1]
xor edx, edx
div dword [ebp - 0xac]
xor edx, edx
mov dword [ebp - 0x44], eax
mov eax, ecx
div dword [ebp - 0xac]
cmp eax, dword [ebp - 0x44]
ja 0x40ac55
mov edx, edi
mov dword [ebp + 8], edi
and dword [ebp + 8], 0x40000000
mov dword [ebp + 0x10], edi
and edx, 0x20000000
and dword [ebp + 0x10], 0x80000000
mov ecx, dword [ebp + 0x18]
cmp edx, ebx
je 0x40ac3c
or byte [eax + ecx], 1
cmp dword [ebp + 8], ebx
je 0x40ac45
or byte [eax + ecx], 2
cmp dword [ebp + 0x10], ebx
je 0x40ac4f
add ecx, eax
or byte [ecx], 4
inc eax
cmp eax, dword [ebp - 0x44]
jbe 0x40ac31
inc dword [ebp + 0xc]
mov eax, dword [ebp - 0x88]
mov cx, word [ebp + 0xc]
dec ebp
or al, 0x66
cmp ecx, dword [eax + 6]
jbe 0x40abbb
mov dword [ebp + 8], esi
xor edi, edi
mov eax, dword [ebp + 0x18]
push 2
pop ecx
movzx eax, byte [edi + eax]
sub eax, ecx
je 0x40aca2
dec eax
je 0x40ac99
sub eax, 3
je 0x40ac90
mov dword [ebp - 4], 0x40
jmp 0x40acbf
mov dword [ebp - 4], 4
jmp 0x40aca5
mov dword [ebp - 4], 0x20
jmp 0x40aca5
mov dword [ebp - 4], ecx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 0xac]
push dword [ebp + 8]
call dword [ebp - 0xbc]
test eax, eax
je 0x40acf1
mov eax, dword [ebp - 0xac]
add dword [ebp + 8], eax
inc edi
cmp edi, dword [ebp - 0x8c]
jbe 0x40ac71
mov eax, dword [ebp - 0x88]
mov edi, dword [eax + 0x28]
add edi, esi
call fcn.0040a502
imul ecx, esp, 0xffffffb3
sar edi, 0x75
adc al, 0x6a
add dword [esi - 1], edx
xlatb
mov eax, esi
jmp 0x40acfd
push 0x8000
push ebx
push esi
call dword [ebp - 8]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40dd76
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x421e94]
jne 0x40dd80
repz ret
jmp fcn.00410490