joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401000
Capabilities:
Set registry value

Disassembly:
sub esp, 0x234
mov ecx, 0x41
xor eax, eax
push edi
lea edi, [esp + 0x134]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x134]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x134]
push 0x5c
push ecx
call fcn.00408130
add esp, 8
test eax, eax
je 0x401045
mov byte [eax], 0
mov ecx, 0x4a
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x134]
stosb byte es:[edi], al
push edx
lea eax, [esp + 0xc]
push 0x412060
push eax
call fcn.004080d0
add esp, 0xc
lea ecx, [esp + 4]
push ecx
push str.SoftwareBeaView
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4010a6
lea edx, [esp + 4]
push edx
push str.SoftwareBeaView
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x4010d8
lea edi, [esp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 8]
push ecx
mov ecx, dword [esp + 8]
push eax
push 1
push 0
push str.InstallPath
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
add esp, 0x234
ret
Function at 0x408287
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4082a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040974d
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x4082c8
test byte [esp + 8], 2
je 0x4082c8
mov dword [0x4171ec], 0xd
mov dword [0x4171f0], 5
jmp 0x4082a3
xor eax, eax
ret
Function at 0x40aec7
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x80dd20]
jne 0x40aed1
repz ret
jmp fcn.0040e52c

Function at 0x40cbe2
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x80dd20]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0040699f
and dword [ebp - 0x14], 0
cmp dword [0x80f348], 0
mov dword [ebp - 0x18], eax
jne 0x40cc95
push 0x404510
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x40cd3d
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x404504
push ebx
call edi
test eax, eax
je 0x40cd3d
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x4044f4
push ebx
mov dword [0x80f348], eax
call edi
push eax
call esi
push 0x4044e0
push ebx
mov dword [0x80f34c], eax
call edi
push eax
call esi
push 0x4044c4
push ebx
mov dword [0x80f350], eax
call edi
push eax
call esi
mov dword [0x80f358], eax
test eax, eax
je 0x40cc95
push 0x4044ac
push ebx
call edi
push eax
call esi
mov dword [0x80f354], eax
mov eax, dword [0x80f354]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x40ccee
cmp dword [0x80f358], ecx
je 0x40ccee
push eax
call esi
push dword [0x80f358]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x40ccee
test ebx, ebx
je 0x40ccee
call edi
test eax, eax
je 0x40cce5
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x40cce5
test byte [ebp - 8], 1
jne 0x40ccee
or dword [ebp + 0x10], 0x200000
jmp 0x40cd21
mov eax, dword [0x80f34c]
cmp eax, dword [ebp - 0x18]
je 0x40cd21
push eax
call esi
test eax, eax
je 0x40cd21
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40cd21
mov eax, dword [0x80f350]
cmp eax, dword [ebp - 0x18]
je 0x40cd21
push eax
call esi
test eax, eax
je 0x40cd21
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x80f348]
call esi
test eax, eax
je 0x40cd3d
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x40cd3f
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040aec7
leave
ret
Function at 0x8091d0
Capabilities:
Delete directory
Get common file path
Read file on windows
Set console window title

Disassembly:
mov eax, 0x1464
call fcn.0040e6f0
cmp dword [0xb943b8], 0x37
jne 0x8092c2
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
push 0x4046a8
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp]
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_FreeUserPhysicalPages]
push 0
lea edx, [esp + 0x868]
push edx
push 0x4046e0
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
push 0
lea eax, [esp + 0xc68]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea ecx, [esp + 4]
push ecx
push 0
lea edx, [esp + 0x14]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputA]
push 0x404714
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomW]
lea eax, [esp + 8]
push eax
push 0x404720
call dword [sym.imp.KERNEL32.dll_GetCompressedFileSizeW]
push 0x404790
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
push 0
lea ecx, [esp + 0x68]
push ecx
push 0
push 0x4047d8
push 0
call dword [sym.imp.KERNEL32.dll_FoldStringA]
lea edx, [esp + 0x464]
push edx
push 0
push 0x404774
push 0x40478c
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0
push 0
push 0
push 0
push 0x404838
push 0x40486c
call dword [sym.imp.KERNEL32.dll_ReplaceFileW]
mov eax, dword [0xb943bc]
mov dword [esp], eax
mov eax, 0x5d1
add dword [esp], eax
mov ecx, dword [esp]
mov dl, byte [ecx + esi]
mov eax, dword [0x81441c]
mov byte [eax + esi], dl
add esp, 0x1464
ret
Function at 0x809480
Capabilities:
Enumerate files on windows
Manipulate console buffer
Move file

Disassembly:
mov eax, dword [0xb943b8]
sub esp, 0x1d4
push ebx
push ebp
push esi
mov esi, dword [0x81441c]
shr eax, 3
push edi
test eax, eax
je 0x809635
mov dword [esp + 0x38], 0x9e3779b9
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], eax
jmp 0x8094b6
mov esi, dword [esp + 0x1c]
cmp dword [0xb943b8], 0x1c
jne 0x8094d3
lea eax, [esp + 0x3c]
push eax
push 0
lea ecx, [esp + 0x4c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
mov edx, dword [0x80e310]
mov ecx, dword [0x80e314]
mov eax, dword [esi]
mov edi, dword [esi + 4]
mov dword [esp + 0x2c], edx
mov edx, dword [0x80e318]
mov dword [esp + 0x30], ecx
mov ecx, dword [0x80e31c]
mov dword [esp + 0x14], eax
mov ebx, 0xc6ef3720
mov dword [esp + 0x28], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], 0x20
jmp 0x809517
mov eax, dword [esp + 0x14]
mov edx, eax
mov ecx, eax
shr edx, 5
add edx, dword [esp + 0x34]
shl ecx, 4
add ecx, dword [esp + 0x28]
add eax, ebx
xor edx, ecx
xor edx, eax
sub edi, edx
mov ecx, edi
shl ecx, 4
mov dword [0xb9333c], 0
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x2c]
add dword [esp + 0x10], eax
cmp dword [0xb943b8], 0x1be
lea ebp, [ebx + edi]
jne 0x80956c
lea edx, [esp + 0x40]
push edx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputA]
mov esi, edi
shr esi, 5
add esi, dword [esp + 0x30]
cmp dword [0xb943b8], 0x979
mov dword [0xb93340], 0xff6b3619
mov dword [0xb93344], 0xffffffff
jne 0x8095a5
lea eax, [esp + 0xa0]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
xor esi, ebp
xor dword [esp + 0x10], esi
mov eax, dword [esp + 0x10]
sub dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x38]
add dword [esp + 0x18], eax
sub ebx, dword [esp + 0x18]
dec dword [esp + 0x20]
jne 0x809513
cmp dword [0xb943b8], 0x8d4
jne 0x8095e8
lea ecx, [esp + 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov dword [esi], edx
mov dword [esi + 4], edi
cmp dword [0xb943b8], 0x17
jne 0x809624
push 0
push 0
push 0
push 0x404568
push 0x4045e0
call dword [sym.imp.KERNEL32.dll_MoveFileWithProgressW]
lea eax, [esp + 0xa0]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
add esi, 8
dec dword [esp + 0x24]
mov dword [esp + 0x1c], esi
jne 0x8094b2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d4
ret
Function at 0x405f7f
Capabilities:
Delete directory
Get common file path
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x860
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [eax]
mov eax, dword [eax + 4]
xor esi, esi
cmp dword [0xc750d4], 0x594
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], eax
jne 0x405fc0
push esi
call dword [sym.imp.KERNEL32.dll_DeleteVolumeMountPointA]
push 0x405900
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomA]
mov eax, dword [0x812768]
mov dword [ebp - 0x20], eax
mov eax, dword [0x81276c]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 8]
mov dword [ebp - 8], esi
call fcn.00405f78
mov eax, dword [0x812770]
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x24], eax
mov eax, dword [0x812774]
add ebx, 0x23f
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], 0x20
jmp 0x406000
mov edi, dword [ebp - 0x14]
mov dword [ebp - 8], 2
add dword [ebp - 8], 3
mov eax, edi
shl eax, 4
cmp dword [0xc750d4], 0xc
mov dword [ebp - 4], eax
jne 0x40603e
push esi
lea eax, [ebp - 0x860]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
lea eax, [ebp - 0x2c]
push eax
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
mov eax, dword [ebp - 0x24]
add dword [ebp - 4], eax
mov eax, dword [0xc750d4]
cmp eax, 0xfa9
jne 0x40605a
mov dword [0xc750d0], 0xedeb2e40
cmp eax, 0x3eb
jne 0x406067
mov dword [0xc4e270], esi
mov ecx, dword [ebp - 8]
mov edx, edi
shr edx, cl
lea eax, [ebx + edi]
mov dword [ebp - 0x10], eax
mov dword [0xc750cc], 0xf4ea3dee
add edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x10]
xor dword [ebp - 4], eax
xor edx, dword [ebp - 4]
cmp dword [0xc750d4], 0x213
mov dword [ebp - 0x10], edx
jne 0x4060a1
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp - 0x10]
add dword [ebp - 0xc], 0x64
sub dword [ebp - 0xc], eax
sub dword [ebp - 0xc], 0x64
cmp dword [0xc750d4], 0xc
jne 0x406100
lea eax, [ebp - 0x10]
push eax
push esi
push esi
lea eax, [ebp - 0x30]
push eax
push esi
push esi
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_BackupRead]
xor eax, eax
mov dword [ebp - 0x44], esi
lea edi, [ebp - 0x40]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x60]
push eax
push 0x405914
call dword [sym.imp.KERNEL32.dll_BuildCommDCBAndTimeoutsA]
push esi
lea eax, [ebp - 0x460]
push eax
push 0x405928
call dword [sym.imp.KERNEL32.dll_GetVolumePathNameA]
mov eax, dword [ebp - 0xc]
shl eax, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x20]
add dword [ebp - 4], eax
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov eax, edx
shr eax, cl
lea edi, [ebx + edx]
add ebx, 0x61c88647
add eax, dword [ebp - 0x1c]
xor eax, edi
xor dword [ebp - 4], eax
mov eax, dword [ebp - 4]
sub dword [ebp - 0x14], eax
dec dword [ebp - 0x18]
jne 0x405ffd
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
pop edi
pop esi
mov dword [eax], ecx
mov dword [eax + 4], edx
pop ebx
leave
ret 4
Function at 0x40614b
Capabilities:
Create pipe
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0xc750d4]
mov ecx, dword [0xc4e274]
sub esp, 0xe84
push ebx
push esi
shr eax, 3
xor esi, esi
push edi
cmp eax, esi
jbe 0x40624e
mov ebx, ecx
mov dword [ebp - 8], eax
cmp dword [0xc750d4], 0x959
jne 0x40623c
lea eax, [ebp - 0x18]
push eax
push esi
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputW]
xor eax, eax
mov word [ebp - 4], ax
lea edi, [ebp - 2]
stosw word es:[edi], ax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 4]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
push esi
push esi
lea eax, [ebp - 0x680]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesA]
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
push esi
call dword [sym.imp.KERNEL32.dll_GetPriorityClass]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
lea eax, [ebp - 0x280]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push 0x405940
push esi
push esi
call dword [sym.imp.KERNEL32.dll_OpenWaitableTimerW]
push esi
push esi
push esi
push esi
push esi
push esi
push 0x405960
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
lea eax, [ebp - 0xe80]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_InterlockedFlushSList]
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push ebx
call fcn.00405f7f
add ebx, 8
dec dword [ebp - 8]
jne 0x406174
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408d3b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x811718]
jne 0x408d45
repz ret
jmp fcn.0041112c

Function at 0x412ea7
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.0040a4bd
and dword [ebp - 4], 0
cmp dword [0x813b28], 0
mov ebx, eax
jne 0x412f58
push 0x40394c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x413009
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x403940
push edi
call esi
test eax, eax
je 0x413009
push eax
call fcn.0040a44b
mov dword [esp], 0x403930
push edi
mov dword [0x813b28], eax
call esi
push eax
call fcn.0040a44b
mov dword [esp], 0x40391c
push edi
mov dword [0x813b2c], eax
call esi
push eax
call fcn.0040a44b
mov dword [esp], 0x403900
push edi
mov dword [0x813b30], eax
call esi
push eax
call fcn.0040a44b
pop ecx
mov dword [0x813b38], eax
test eax, eax
je 0x412f58
push 0x4038e8
push edi
call esi
push eax
call fcn.0040a44b
pop ecx
mov dword [0x813b34], eax
mov eax, dword [0x813b34]
cmp eax, ebx
je 0x412fb0
cmp dword [0x813b38], ebx
je 0x412fb0
push eax
call fcn.0040a4c6
push dword [0x813b38]
mov esi, eax
call fcn.0040a4c6
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x412fb0
test edi, edi
je 0x412fb0
call esi
test eax, eax
je 0x412fa7
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x412fa7
test byte [ebp - 0xc], 1
jne 0x412fb0
or dword [ebp + 0x10], 0x200000
jmp 0x412fe9
mov eax, dword [0x813b2c]
cmp eax, ebx
je 0x412fe9
push eax
call fcn.0040a4c6
pop ecx
test eax, eax
je 0x412fe9
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x412fe9
mov eax, dword [0x813b30]
cmp eax, ebx
je 0x412fe9
push eax
call fcn.0040a4c6
pop ecx
test eax, eax
je 0x412fe9
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x813b28]
call fcn.0040a4c6
pop ecx
test eax, eax
je 0x413009
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x41300b
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret