joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10002021
Capabilities:
Query environment variable

Disassembly:
cmp dword [esp + 0xc], 0
push ebx
push ebp
je 0x1000209d
xor ebp, ebp
push ebp
push dword [esp + 0x18]
push dword [esp + 0x14]
call sym.java.dll__JNU_GetStringPlatformChars_12
mov ebx, eax
test ebx, ebx
je 0x1000209d
push edi
push ebp
push ebp
push ebx
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
mov ebp, eax
test ebp, ebp
je 0x10002088
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
pop ecx
test edi, edi
je 0x10002088
push ebp
push edi
push ebx
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
push edi
test eax, eax
je 0x10002081
push dword [esp + 0x14]
call sym.java.dll__JNU_NewStringPlatform_8
push edi
mov ebp, eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
jmp 0x1000208a
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
xor ebp, ebp
push ebx
push dword [esp + 0x1c]
push dword [esp + 0x18]
call sym.java.dll__JNU_ReleaseStringPlatformChars_12
mov eax, ebp
pop edi
jmp 0x1000209f
xor eax, eax
pop ebp
pop ebx
ret 0xc

Function at 0x10002819
Capabilities:
Identify system language via api

Disassembly:
cmp dword [esp + 0xc], 0
je 0x10002828
call dword [sym.imp.kernel32.dll_GetUserDefaultLCID]
jmp 0x1000282e
call dword [sym.imp.kernel32.dll_GetUserDefaultUILanguage]
push esi
movzx eax, ax
push edi
push eax
call fcn.10013a00
mov esi, eax
pop ecx
test esi, esi
je 0x1000285a
mov ecx, dword [esp + 0xc]
push esi
push ecx
mov edx, dword [ecx]
call dword [edx + 0x29c]
push esi
mov edi, eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
jmp 0x1000286a
push str.memory_allocation_error
push dword [esp + 0x10]
call sym.java.dll__JNU_ThrowOutOfMemoryError_8
xor edi, edi
mov eax, edi
pop edi
pop esi
ret 0xc

Function at 0x10003d57
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x18]
push edi
push esi
call sym.java.dll__JNU_ClassString_4
mov ebp, eax
test ebp, ebp
je 0x10003da0
mov ecx, dword [esi]
push str.__B_V
push str._init_
push ebp
push esi
call dword [ecx + 0x84]
mov dword [esp + 0x14], eax
test eax, eax
je 0x10003da0
call dword [sym.imp.kernel32.dll_GetEnvironmentStrings]
mov edi, eax
test edi, edi
jne 0x10003da9
push str.GetEnvironmentStrings_failed
push esi
call sym.java.dll__JNU_ThrowOutOfMemoryError_8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
xor ebx, ebx
cmp byte [edi], bl
je 0x10003dbc
mov al, byte [ebx + edi]
inc ebx
test al, al
jne 0x10003daf
cmp byte [ebx + edi], al
jne 0x10003daf
mov eax, dword [esi]
push ebx
push esi
call dword [eax + 0x2c0]
mov ecx, eax
mov dword [esp + 0x10], ecx
push edi
test ecx, ecx
jne 0x10003dd9
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsA]
jmp 0x10003da0
mov eax, dword [esi]
push ebx
push 0
push ecx
push esi
call dword [eax + 0x340]
push edi
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsA]
push dword [esp + 0x10]
mov eax, dword [esi]
push dword [esp + 0x18]
push ebp
push esi
call dword [eax + 0x70]
add esp, 0x10
jmp 0x10003da2
Function at 0x10007bba
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [sym.imp.advapi32.dll_CryptAcquireContextA]
lea eax, [esp + 0xc]
push edi
push 0
xor ebp, ebp
mov edi, str.J2SE
inc ebp
xor bl, bl
push ebp
push 0
push edi
push eax
call esi
test eax, eax
jne 0x10007bf4
push 8
push ebp
push eax
push edi
lea eax, [esp + 0x20]
push eax
call esi
test eax, eax
jne 0x10007bf4
xor al, al
jmp 0x10007c51
mov esi, dword [esp + 0x18]
push dword [esp + 0x20]
push esi
mov eax, dword [esi]
call dword [eax + 0x2ac]
mov ecx, dword [esi]
mov ebp, eax
push 0
push dword [esp + 0x24]
push esi
call dword [ecx + 0x2e0]
mov edi, eax
test edi, edi
je 0x10007c43
push edi
push ebp
push dword [esp + 0x18]
call dword [sym.imp.advapi32.dll_CryptGenRandom]
mov ecx, dword [esi]
test eax, eax
push 1
pop eax
push 0
push edi
push dword [esp + 0x28]
movzx ebx, bl
push esi
cmovne ebx, eax
call dword [ecx + 0x300]
push 0
push dword [esp + 0x14]
call dword [sym.imp.advapi32.dll_CryptReleaseContext]
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc

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

Disassembly:
push ebx
push esi
push dword [0x1001ff58]
push dword [esp + 0x18]
push dword [esp + 0x14]
call fcn.1000a1e8
mov esi, eax
add esp, 0xc
test esi, esi
je 0x10007f66
push esi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
push eax
push esi
call fcn.10013a00
push esi
mov ebx, eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0xc
cmp ebx, 0xffffffff
je 0x10007f66
mov ecx, dword [esp + 0x18]
sub ecx, 1
je 0x10007f75
sub ecx, 1
je 0x10007f6d
dec ecx
sub ecx, 1
je 0x10007f75
xor al, al
pop esi
pop ebx
ret 0x10
and bl, 0x11
cmp bl, 1
je 0x10007f66
mov al, 1
jmp 0x10007f68

Function at 0x10007f79
Capabilities:
Create directory

Disassembly:
push edi
push dword [0x1001ff58]
push dword [esp + 0x14]
push dword [esp + 0x10]
call fcn.1000a1e8
mov edi, eax
add esp, 0xc
test edi, edi
je 0x10007fb3
push esi
push 0
push edi
call dword [sym.imp.kernel32.dll_CreateDirectoryW]
push edi
mov esi, eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
test esi, esi
pop esi
je 0x10007fb3
mov al, 1
jmp 0x10007fb5
xor al, al
pop edi
ret 0xc
Function at 0x10007fba
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
xor edi, edi
push edi
push dword [esp + 0x18]
push dword [esp + 0x14]
call fcn.1000a6ac
mov esi, eax
add esp, 0xc
test esi, esi
je 0x1000803c
push esi
call fcn.10013a00
pop ecx
test eax, eax
jne 0x10008034
push edi
push 0x200080
push 1
push edi
push 3
push 0xc0000000
push esi
call dword [sym.imp.kernel32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10008043
call dword [sym.imp.kernel32.dll_GetLastError]
mov edi, eax
cmp edi, 0x50
je 0x10008034
cmp edi, 0xb7
je 0x10008034
push esi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10008034
push edi
call dword [sym.imp.kernel32.dll_SetLastError]
push str.Could_not_open_file
push dword [esp + 0x10]
call sym.java.dll__JNU_ThrowIOExceptionWithLastError_8
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
xor al, al
pop edi
pop esi
ret 0xc
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov al, 1
jmp 0x1000803e

Function at 0x1000836f
Capabilities:
Get disk size

Disassembly:
push ebp
lea ebp, [esp - 0x7a8]
sub esp, 0x828
mov eax, dword [0x1001ff00]
xor eax, ebp
mov dword [ebp + 0x7a4], eax
mov eax, dword [ebp + 0x7b8]
xorps xmm0, xmm0
mov ecx, dword [ebp + 0x7b0]
push ebx
push esi
push edi
push dword [0x1001ff58]
movlpd qword [ebp - 0x80], xmm0
push eax
push ecx
call fcn.1000a1e8
add esp, 0xc
mov ebx, eax
lea eax, [ebp - 0x60]
push 0x400
push eax
push ebx
call dword [sym.imp.kernel32.dll_GetVolumePathNameW]
test eax, eax
je 0x1000840e
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.kernel32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x1000840e
mov eax, dword [ebp + 0x7bc]
sub eax, 0
je 0x10008406
sub eax, 1
je 0x100083fe
sub eax, 1
jne 0x1000840e
mov esi, dword [ebp - 0x68]
mov edi, dword [ebp - 0x64]
jmp 0x10008414
mov esi, dword [ebp - 0x70]
mov edi, dword [ebp - 0x6c]
jmp 0x10008414
mov esi, dword [ebp - 0x78]
mov edi, dword [ebp - 0x74]
jmp 0x10008414
mov edi, dword [ebp - 0x7c]
mov esi, dword [ebp - 0x80]
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
mov ecx, dword [ebp + 0x7a4]
mov edx, edi
pop edi
mov eax, esi
xor ecx, ebp
pop esi
pop ebx
call fcn.10014785
add ebp, 0x7a8
leave
ret 0x10
Function at 0x1000b6d5
Capabilities:
Get common file path

Disassembly:
sub esp, 0x108
mov eax, dword [0x1001ff00]
xor eax, esp
mov dword [esp + 0x104], eax
push ebp
push esi
push edi
mov edi, dword [esp + 0x118]
lea eax, [esp + 0xc]
mov ebp, 0x104
xor esi, esi
push ebp
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1000b738
lea eax, [esp + 0xc]
push 0x10017e60
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
lea eax, [esp + 0x14]
push edi
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
add esp, 0x10
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
jne 0x1000b772
push ebp
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x1000b772
lea eax, [esp + 0xc]
push 0x10017e60
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
lea eax, [esp + 0x14]
push edi
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
add esp, 0x10
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov esi, eax
mov ecx, dword [esp + 0x110]
mov eax, esi
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.10014785
add esp, 0x108
ret

Function at 0x10013a00
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
pushal
call 0x10013a0f
pop dword [ebp - 0x30]
mov eax, 0xe6fca2b7
add eax, 0x29049758
sub dword [ebp - 0x30], eax
mov dword [ebp - 0x40], 0xc6f1caa5
add dword [ebp - 0x40], 0x87607aa6
mov dword [ebp - 0x3c], 0xce0db410
add dword [ebp - 0x3c], 0x64259835
mov dword [ebp - 0x38], 0x253f882e
sub dword [ebp - 0x38], 0xd8f34400
mov dword [ebp - 0x34], 0x6d23c07c
sub dword [ebp - 0x34], 0x6d23c07c
lea eax, [ebp - 0x40]
push eax
mov eax, 0xf625853f
sub eax, 0xe62424df
add eax, dword [ebp - 0x30]
call dword [eax]
mov dword [ebp - 0x40], 0x9031b1e
sub dword [ebp - 0x40], 0x9490b1c8
mov dword [ebp - 0x3c], 0xb07ac8e3
add dword [ebp - 0x3c], 0x90f19892
mov dword [ebp - 0x38], 0x294a7376
add dword [ebp - 0x38], 0x3a24f8f6
mov dword [ebp - 0x34], 0x96d2da9d
add dword [ebp - 0x34], 0x692d2563
lea ebx, [ebp - 0x40]
push ebx
push eax
mov eax, 0xe4200a13
sub eax, 0xd41ea9af
add eax, dword [ebp - 0x30]
call dword [eax]
push 0x40
push 0x1000
push 0x3b7af
push 0
call eax
mov ecx, 0x7dcbda3f
add ecx, 0x82347d42
xor edx, edx
add edx, eax
mov ebx, 0x10023600
add ebx, dword [ebp - 0x30]
mov esi, 0x49156273
xor dword [ebp - 0x2c], ecx
mov edi, dword [ebx]
add dword [ebp - 0x18], 0xbde17e68
xor edi, esi
sub dword [ebp - 0x24], 0xe6658ed4
mov dword [edx], edi
add edx, 0x828cf0b4
add edx, 0x7d730f50
add ebx, 0x554a6fee
sub ebx, 0x554a6fea
loop 0x10013b27
add eax, 0x150d7
mov ebx, eax
add eax, 0xc1fb0c00
sub eax, 0xc1fb0bfb
mov ecx, 0x6d4570ab
add ecx, 0xa2ba8f55
add ecx, dword [ebp - 0x30]
call ebx
leave
ret