Search is not available for this dataset
text
stringlengths 0
214M
|
---|
/home/lucky/experiments/binaryfile/coreutils/test: file format elf64-x86-64 |
Disassembly of section .text: |
00000000000026e0 <_start>: |
26e0: f3 0f 1e fa endbr64 |
26e4: 31 ed xor ebp,ebp |
26e6: 49 89 d1 mov r9,rdx |
26e9: 5e pop rsi |
26ea: 48 89 e2 mov rdx,rsp |
26ed: 48 83 e4 f0 and rsp,0xfffffffffffffff0 |
26f1: 50 push rax |
26f2: 54 push rsp |
26f3: 4c 8d 05 a6 d6 00 00 lea r8,[rip+0xd6a6] # fda0 <__libc_csu_fini> |
26fa: 48 8d 0d 2f d6 00 00 lea rcx,[rip+0xd62f] # fd30 <__libc_csu_init> |
2701: 48 8d 3d a3 1b 00 00 lea rdi,[rip+0x1ba3] # 42ab <main> |
2708: ff 15 c2 28 01 00 call QWORD PTR [rip+0x128c2] # 14fd0 <__libc_start_main@GLIBC_2.2.5> |
270e: f4 hlt |
270f: 90 nop |
0000000000002710 <deregister_tm_clones>: |
2710: 48 8d 3d 81 29 01 00 lea rdi,[rip+0x12981] # 15098 <__TMC_END__> |
2717: 48 8d 05 7a 29 01 00 lea rax,[rip+0x1297a] # 15098 <__TMC_END__> |
271e: 48 39 f8 cmp rax,rdi |
2721: 74 15 je 2738 <deregister_tm_clones+0x28> |
2723: 48 8b 05 9e 28 01 00 mov rax,QWORD PTR [rip+0x1289e] # 14fc8 <_ITM_deregisterTMCloneTable> |
272a: 48 85 c0 test rax,rax |
272d: 74 09 je 2738 <deregister_tm_clones+0x28> |
272f: ff e0 jmp rax |
2731: 0f 1f 80 00 00 00 00 nop DWORD PTR [rax+0x0] |
2738: c3 ret |
2739: 0f 1f 80 00 00 00 00 nop DWORD PTR [rax+0x0] |
0000000000002740 <register_tm_clones>: |
2740: 48 8d 3d 51 29 01 00 lea rdi,[rip+0x12951] # 15098 <__TMC_END__> |
2747: 48 8d 35 4a 29 01 00 lea rsi,[rip+0x1294a] # 15098 <__TMC_END__> |
274e: 48 29 fe sub rsi,rdi |
2751: 48 89 f0 mov rax,rsi |
2754: 48 c1 ee 3f shr rsi,0x3f |
2758: 48 c1 f8 03 sar rax,0x3 |
275c: 48 01 c6 add rsi,rax |
275f: 48 d1 fe sar rsi,1 |
2762: 74 14 je 2778 <register_tm_clones+0x38> |
2764: 48 8b 05 75 28 01 00 mov rax,QWORD PTR [rip+0x12875] # 14fe0 <_ITM_registerTMCloneTable> |
276b: 48 85 c0 test rax,rax |
276e: 74 08 je 2778 <register_tm_clones+0x38> |
2770: ff e0 jmp rax |
2772: 66 0f 1f 44 00 00 nop WORD PTR [rax+rax*1+0x0] |
2778: c3 ret |
2779: 0f 1f 80 00 00 00 00 nop DWORD PTR [rax+0x0] |
0000000000002780 <__do_global_dtors_aux>: |
2780: f3 0f 1e fa endbr64 |
2784: 80 3d 3d 29 01 00 00 cmp BYTE PTR [rip+0x1293d],0x0 # 150c8 <completed.8061> |
278b: 75 2b jne 27b8 <__do_global_dtors_aux+0x38> |
278d: 55 push rbp |
278e: 48 83 3d 52 28 01 00 cmp QWORD PTR [rip+0x12852],0x0 # 14fe8 <__cxa_finalize@GLIBC_2.2.5> |
2795: 00 |
2796: 48 89 e5 mov rbp,rsp |
2799: 74 0c je 27a7 <__do_global_dtors_aux+0x27> |
279b: 48 8b 3d 66 28 01 00 mov rdi,QWORD PTR [rip+0x12866] # 15008 <__dso_handle> |
27a2: e8 d9 fb ff ff call 2380 <__cxa_finalize@plt> |
27a7: e8 64 ff ff ff call 2710 <deregister_tm_clones> |
27ac: c6 05 15 29 01 00 01 mov BYTE PTR [rip+0x12915],0x1 # 150c8 <completed.8061> |
27b3: 5d pop rbp |
27b4: c3 ret |
27b5: 0f 1f 00 nop DWORD PTR [rax] |
27b8: c3 ret |
27b9: 0f 1f 80 00 00 00 00 nop DWORD PTR [rax+0x0] |
00000000000027c0 <frame_dummy>: |
27c0: f3 0f 1e fa endbr64 |
27c4: e9 77 ff ff ff jmp 2740 <register_tm_clones> |
00000000000027c9 <one_argument>: |
} |
static bool |
one_argument (void) |
{ |
return argv[pos++][0] != '\0'; |
27c9: 8b 05 0d 29 01 00 mov eax,DWORD PTR [rip+0x1290d] # 150dc <pos> |
27cf: 8d 50 01 lea edx,[rax+0x1] |
27d2: 89 15 04 29 01 00 mov DWORD PTR [rip+0x12904],edx # 150dc <pos> |
27d8: 48 98 cdqe |
27da: 48 8b 15 ef 28 01 00 mov rdx,QWORD PTR [rip+0x128ef] # 150d0 <argv> |
27e1: 48 8b 04 c2 mov rax,QWORD PTR [rdx+rax*8] |
27e5: 80 38 00 cmp BYTE PTR [rax],0x0 |
27e8: 0f 95 c0 setne al |
} |
27eb: c3 ret |
00000000000027ec <binop>: |
{ |
27ec: 53 push rbx |
27ed: 48 89 fb mov rbx,rdi |
return ((STREQ (s, "=")) || (STREQ (s, "!=")) || (STREQ (s, "==")) || |
27f0: b9 02 00 00 00 mov ecx,0x2 |
End of preview. Expand
in Data Studio
YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/datasets-cards)
Overview
This repository contains a dataset designed for binary code similarity detection, focusing on the semantic alignment between assembly instructions and programming language code snippets. The dataset is created to facilitate the training and evaluation of models in tasks related to binary function similarity detection, code reuse analysis, and software security.
Dataset Description
The dataset consists of pairs of assembly instructions and corresponding programming language code snippets extracted from various open-source projects. It is curated to ensure high-quality, semantically aligned pairs that can be used for supervised and unsupervised learning tasks.
Usage
Requirements
- Python 3
Generating Dataset
Use genDataset.py
to process the .txt
files in OriAsmFile.zip
.
Loading the Dataset
- The dataset data structure is defined as:
{'Function':"",'Code':[{'PLcode':"",'ASMcode':""}]}
import json
jsondir = './CMRL-paper/json-TestData.txt'
with open(jsondir, 'r+') as f:
data = json.loads(f.read())
for func in data:
for pair in func['Code']:
print(pair['PLcode'],pair['ASMcode'])
print('===============================')
[{
"Function": "<alpn2alpnid>",
"Code": [{
"PLcode": "{\n",
"ASMcode": "\tpush rbx\n\tmov rbx,rdi\n"
}, {
"PLcode": " if(strcasecompare(name, "h1"))\n",
"ASMcode": "\tcall fb40 <curl_strequal@plt>\n\ttest eax,eax\n\tjne fdf4 <alpn2alpnid+0x41>\n"
}, {
"PLcode": " if(strcasecompare(name, "h2"))\n",
"ASMcode": "\tmov rdi,rbx\n\tcall fb40 <curl_strequal@plt>\n\ttest eax,eax\n\tjne fdfb <alpn2alpnid+0x48>\n"
}, {
"PLcode": " if(strcasecompare(name, H3VERSION))\n",
"ASMcode": "\tmov rdi,rbx\n\tcall fb40 <curl_strequal@plt>\n\ttest eax,eax\n\tje fdf9 <alpn2alpnid+0x46>\n"
}, {
"PLcode": " return ALPN_h3;\n",
"ASMcode": "\tmov eax,0x20\n\tjmp fdf9 <alpn2alpnid+0x46>\n"
}, {
"PLcode": " return ALPN_h1;\n",
"ASMcode": "\tmov eax,0x8\n"
}, {
"PLcode": "}\n",
"ASMcode": "\tpop rbx\n\tret \n"
}, {
"PLcode": " return ALPN_h2;\n",
"ASMcode": "\tmov eax,0x10\n\tjmp fdf9 <alpn2alpnid+0x46>\n"
}, {
"PLcode": "",
"ASMcode": ""
}]
}, {
"Function": "<altsvc_createid>",
"Code": [{
..................................
- Load all datasets
import os
import json
jsondir = '/home/lucky/experiments/dataset/jsonDataSet/'
jsonfile = os.listdir(jsondir)
for file in jsonfile:
pairnum = 0
with open(jsondir+file,'r+') as f:
data = f.read()
data = json.loads(data)
for func in data:
pairnum += len(func['Code'])
print(file,' func_num: ',len(data)," pair_num: ",pairnum)
output:
json-newopensslasm.txt func_num: 15669 pair_num: 242968
json-newffmpegasm.txt func_num: 28560 pair_num: 750129
json-newcoreutilsasm.txt func_num: 20043 pair_num: 263348
json-testasm.txt func_num: 2 pair_num: 35
json-newcurlasm.txt func_num: 1887 pair_num: 41551
Contact
No contact information is available yet.
- Downloads last month
- 7