binary_hash stringlengths 64 64 | repo stringlengths 6 62 | call_graph listlengths 0 76 | unmatched_functions listlengths 0 58 | matched_functions listlengths 0 71 |
|---|---|---|---|---|
b4ca878814688fbbed613b25e0ec3149400ebd527ca5d4985600b3e79a658462 | norlanliu/data-structure | [
[
"enqueue",
"->"
],
[
"percolate_down",
"->",
"dequeue"
],
[
"dequeue",
"->",
"percolate_down"
],
[
"free_queue",
"->"
]
] | [] | [
{
"name": "percolate_down",
"canonical_name": "func1",
"repo": "norlanliu/data-structure",
"decompiled_code": "__int64 __fastcall percolate_down(__int64 a1, int a2)\n{\n__int64 result; // rax\nint v3; // [rsp+0h] [rbp-1Ch]\nint v4; // [rsp+10h] [rbp-Ch]\nunsigned int v5; // [rsp+14h] [rbp-8h]\nint v... |
ccfd915e00f9fcde7e9c458386ae44125352fa942832a00b50f36a4994da774a | norlanliu/data-structure | [
[
"counterSorting",
"->"
],
[
"bucketSorting",
"->"
],
[
"radixSorting",
"->"
],
[
"bitSorting",
"->"
],
[
"PerDown",
"->",
"BuildHeap",
"HeapSorting"
],
[
"BuildHeap",
"->",
"PerDown",
"HeapSorting"
],
[
"HeapSorting",
... | [] | [
{
"name": "counterSorting",
"canonical_name": "func0",
"repo": "norlanliu/data-structure",
"decompiled_code": "void __fastcall counterSorting(__int64 a1, __int64 a2, int a3, int a4)\n{\nchar *v4; // rax\nchar *s; // [rsp+20h] [rbp-10h]\nint i; // [rsp+28h] [rbp-8h]\nint j; // [rsp+28h] [rbp-8h]\nint... |
dcb66efe95bcdb506eb3241dd39aec7bd18dec6612d37060c77ac20b7af68f89 | norlanliu/data-structure | [
[
"sub_1020",
"->"
],
[
"_cxa_finalize",
"->",
"_do_global_dtors_aux"
],
[
"deregister_tm_clones",
"->",
"_do_global_dtors_aux"
],
[
"register_tm_clones",
"->",
"frame_dummy"
],
[
"_do_global_dtors_aux",
"->",
"_cxa_finalize",
"deregister_t... | [
[
"sub_1020",
"void func0()\n{\nJUMPOUT(0LL);\n}"
],
[
"_cxa_finalize",
"int __fastcall func1(void *a1)\n{\nreturn __cxa_finalize(a1);\n}"
],
[
"deregister_tm_clones",
"char *func2()\n{\nreturn &completed_0;\n}"
],
[
"register_tm_clones",
"__int64 func3()\n{\nreturn 0LL;\... | [
{
"name": "getHashBase",
"canonical_name": "func6",
"repo": "norlanliu/data-structure",
"decompiled_code": "__int64 getHashBase()\n{\nint v1[2]; // [rsp+Ch] [rbp-14h]\nint v2; // [rsp+14h] [rbp-Ch]\nint i; // [rsp+18h] [rbp-8h]\nint v4; // [rsp+1Ch] [rbp-4h]\n\nv2 = 17;\nv4 = 0;\nv1[0] = time(0LL);\... |
f0fbae09c9584d4d599b2f6361101e0df5d5fdcc1cc3ffcf1597bc6a65d31d3a | norlanliu/data-structure | [
[
"insert",
"->"
],
[
"findItem",
"->"
],
[
"findPredecessor",
"->",
"deleteItem"
],
[
"deleteItem",
"->",
"findPredecessor",
"remove_duplication"
],
[
"freeList",
"->"
],
[
"printList",
"->"
],
[
"reverseList",
"->"
],
... | [] | [
{
"name": "insert",
"canonical_name": "func0",
"repo": "norlanliu/data-structure",
"decompiled_code": "void __fastcall insert(__int64 a1, int a2)\n{\n_QWORD *v2; // [rsp+18h] [rbp-8h]\n\nif ( a1 )\n{\nv2 = malloc(0x10uLL);\n*(_DWORD *)v2 = a2;\nv2[1] = *(_QWORD *)(a1 + 8);\n*(_QWORD *)(a1 + 8) = v2;... |
c7db6cbf1eb8f8eb2c6b52725eb05681200eaa0e9960b306bafe0f2a4cb6b4a1 | diekmann/C_MemoryManagementManager | [
[
"GenericMemoryManager_malloc_f",
"->"
],
[
"GenericMemoryManager_free_f",
"->"
],
[
"GenericMemoryManager_print_stats",
"->"
],
[
"GenericMemoryManager_delete",
"->"
]
] | [] | [
{
"name": "GenericMemoryManager_malloc_f",
"canonical_name": "func0",
"repo": "diekmann/C_MemoryManagementManager",
"decompiled_code": "void *__fastcall GenericMemoryManager_malloc_f(size_t *a1)\n{\n_DWORD *v2; // [rsp+18h] [rbp-28h]\nvoid *v3; // [rsp+20h] [rbp-20h]\nint v4; // [rsp+2Ch] [rbp-14h]\... |
98ec3f6c182230eedda72a9be094cdf12fd375d454c714a43536c8f80ee4ad3a | NKI-GCF/b6 | [
[
"bit_count",
"->",
"tr_x32b2"
],
[
"uo_atox32b2",
"->"
],
[
"uo_x32b2toa",
"->"
],
[
"atox32b2",
"->",
"main"
],
[
"x32b2toa",
"->",
"tr_x32b2"
],
[
"test_b6",
"->",
"main"
],
[
"tr_x32b2",
"->",
"x32b2toa",
"b... | [] | [
{
"name": "bit_count",
"canonical_name": "func0",
"repo": "NKI-GCF/b6",
"decompiled_code": "unsigned __int64 __fastcall bit_count(unsigned __int64 a1)\n{\nunsigned __int64 v2; // [rsp+0h] [rbp-8h]\n\nv2 = (((a1 - ((a1 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)\n+ ((a1 - ((a1 >> 1) ... |
48fbefd2be9773c4dedf9a96d79662bd7496508c78afb60651b51fa39b565473 | ivartj/platformer | [
[
"rgba",
"->"
],
[
"rgb",
"->"
],
[
"getrgb",
"->"
]
] | [] | [
{
"name": "rgba",
"canonical_name": "func0",
"repo": "ivartj/platformer",
"decompiled_code": "__int64 __fastcall rgba(double a1, double a2, double a3, double a4)\n{\nreturn (unsigned __int8)(int)(255.0 * a3) | (((unsigned __int8)(int)(255.0 * a2) | (((unsigned __int8)(int)(255.0 * a1) | ((unsigned _... |
5ed7817edadffaf9b03e5a84ee7402de95b8fa2eb2a1ee4dcd3d1c515d0655fa | ivartj/platformer | [
[
"hash_create",
"->"
]
] | [] | [
{
"name": "hash_create",
"canonical_name": "func0",
"repo": "ivartj/platformer",
"decompiled_code": "__int64 __fastcall hash_create(__int64 a1, unsigned __int64 a2)\n{\n__int64 v3; // [rsp+18h] [rbp-18h] BYREF\n__int64 *v4; // [rsp+20h] [rbp-10h]\nint v5; // [rsp+28h] [rbp-8h]\nint i; // [rsp+2Ch] [... |
667b9dd9a51842bfa94baad0933bd0c944f88c1f3cf8201d01957a646edae841 | ivartj/platformer | [
[
"sdl_init",
"->",
"video_init"
],
[
"video_init",
"->",
"sdl_init",
"lockcanvas"
],
[
"lockcanvas",
"->",
"video_init",
"video_update"
],
[
"unlockcanvas",
"->",
"video_update"
],
[
"video_update",
"->",
"unlockcanvas",
"lockc... | [
[
"image_destroy",
"void __fastcall func5(_QWORD *a1)\n{\n_DWORD *v1; // [rsp+18h] [rbp-8h]\n\nv1 = (_DWORD *)a1[2];\nif ( v1[10] || (*v1 & 0x4005) != 0 )\nSDL_UnlockSurface(v1);\nSDL_FreeSurface(v1);\nfree(a1);\n}"
],
[
"image_fill",
"__int64 __fastcall func6(__int64 a1, _DWORD *a2, unsigned in... | [
{
"name": "sdl_init",
"canonical_name": "func0",
"repo": "ivartj/platformer",
"decompiled_code": "__int64 sdl_init()\n{\n__int64 result; // rax\nconst char *v1; // rax\n\nif ( sdl_initialized )\nreturn 0LL;\nif ( (unsigned int)SDL_Init(32LL) )\n{\nv1 = (const char *)SDL_GetError();\nresult = seterrm... |
672899941491b5433f45b2a93a67c3786624c1304325578b89d05d3bea50c5d7 | ivartj/platformer | [
[
"iterate",
"->"
]
] | [] | [
{
"name": "iterate",
"canonical_name": "func0",
"repo": "ivartj/platformer",
"decompiled_code": "__int64 __fastcall iterate(__int64 a1, __int64 a2)\n{\nreturn (*(__int64 (__fastcall **)(__int64, __int64))(a1 + 8))(a1, a2);\n}\n",
"canonical_decompiled_code": "__int64 __fastcall func0(__int64 a1,... |
860c1acdbd3958695af5f0ae9b169ee043159dcc1fc4eae4f42f90be23ea0c4b | ivartj/platformer | [
[
"thread_sleep",
"->"
]
] | [] | [
{
"name": "thread_sleep",
"canonical_name": "func0",
"repo": "ivartj/platformer",
"decompiled_code": "__int64 __fastcall thread_sleep(unsigned int a1)\n{\nreturn SDL_Delay(a1);\n}\n",
"canonical_decompiled_code": "__int64 __fastcall func0(unsigned int a1)\n{\nreturn SDL_Delay(a1);\n}",
"orig... |
88f5ed586597aacc3f06e570186d435996ca171f15a1f407fe4b8b8d30a30fc7 | ivartj/platformer | [
[
"gfx_destroy",
"->"
],
[
"gfx_translate",
"->"
],
[
"gfx_color",
"->"
],
[
"gfx_dot",
"->"
],
[
"gfx_fill",
"->"
],
[
"gfx_get",
"->"
],
[
"gfx_blit",
"->"
]
] | [] | [
{
"name": "gfx_destroy",
"canonical_name": "func0",
"repo": "ivartj/platformer",
"decompiled_code": "void __fastcall gfx_destroy(void *a1)\n{\nfree(a1);\n}\n",
"canonical_decompiled_code": "void __fastcall func0(void *a1)\n{\nfree(a1);\n}",
"original_code": "void gfx_destroy(gfx *g)\n{\n fre... |
94086feca732a85e0456d1f74f355b8c381ebb829d7d621088c2ec2d6b4b7bbc | ivartj/platformer | [
[
"add",
"->",
"inc"
],
[
"inc",
"->",
"add",
"prime_check",
"prime_get"
],
[
"prime_get",
"->",
"inc",
"prime_check"
],
[
"prime_check",
"->",
"inc",
"prime_get",
"prime_above"
],
[
"prime_above",
"->",
"prime_check"
... | [] | [
{
"name": "add",
"canonical_name": "func0",
"repo": "ivartj/platformer",
"decompiled_code": "__int64 __fastcall add(unsigned int a1)\n{\nint v1; // eax\n\nif ( cap == len )\n{\nif ( cap )\ncap *= 2;\nelse\ncap = 256;\nprimes = realloc(primes, 4LL * cap);\n}\nv1 = len++;\n*((_DWORD *)primes + v1) = a... |
bad56f4f9a108600defa720c7c6c4fa52efa75f2824166a38217fb9fc65fe138 | ivartj/platformer | [
[
"array_create",
"->"
],
[
"array_add",
"->"
],
[
"array_get",
"->"
]
] | [] | [
{
"name": "array_create",
"canonical_name": "func0",
"repo": "ivartj/platformer",
"decompiled_code": "void *array_create()\n{\nreturn calloc(1uLL, 0x10uLL);\n}\n",
"canonical_decompiled_code": "void *func0()\n{\nreturn calloc(1uLL, 0x10uLL);\n}",
"original_code": "array *array_create(void)\n... |
bfc74420505029695b687851c9461f9d168a41e4da35900be338cd34eb423f2b | ivartj/platformer | [
[
"dlist_create",
"->"
],
[
"dnode_data",
"->"
],
[
"dnode_next",
"->"
],
[
"dnode_prev",
"->"
],
[
"dlist_last",
"->"
],
[
"dlist_first",
"->"
],
[
"dnode_rem",
"->"
],
[
"dlist_add_last",
"->"
],
[
"dlist_add_first... | [
[
"dnode_data",
"void *__fastcall func1(__int64 a1, void *a2, size_t a3)\n{\nsize_t n; // [rsp+8h] [rbp-18h]\n\nn = a3;\nif ( a3 != *(_QWORD *)(a1 + 8) )\nwarning(\"dnode_data: mismatch between data type sizes stored and requested\");\nif ( n > *(_QWORD *)(a1 + 8) )\nn = *(_QWORD *)(a1 + 8);\nreturn memcpy(... | [
{
"name": "dlist_create",
"canonical_name": "func0",
"repo": "ivartj/platformer",
"decompiled_code": "void *dlist_create()\n{\nreturn calloc(1uLL, 0x10uLL);\n}\n",
"canonical_decompiled_code": "void *func0()\n{\nreturn calloc(1uLL, 0x10uLL);\n}",
"original_code": "dlist *dlist_create(void)\n... |
d756886964b3524f15b971877c8cadd81f2de76039e76b782bdd482f7c269c0b | ivartj/platformer | [
[
"ps2rect",
"->"
],
[
"rect_isoverlap",
"->"
],
[
"rect_iswithin",
"->"
]
] | [] | [
{
"name": "ps2rect",
"canonical_name": "func0",
"repo": "ivartj/platformer",
"decompiled_code": "__int64 __fastcall ps2rect(int a1, int a2, int a3, int a4)\n{\n__int64 v5; // [rsp+10h] [rbp-10h]\n\nif ( a1 >= a3 )\nLODWORD(v5) = a3;\nelse\nLODWORD(v5) = a1;\nif ( a2 >= a4 )\nHIDWORD(v5) = a4;\nelse\... |
e06c9b7b1f298134c86cfefa7c6407c3d9b9d07cb7f8663d60e8759667a34906 | ivartj/platformer | [
[
"usage",
"->",
"parseargs"
],
[
"parseargs",
"->",
"usage",
"main"
],
[
"init",
"->",
"main"
],
[
"fail",
"->"
],
[
"quit",
"->",
"main"
],
[
"main",
"->",
"parseargs",
"init",
"quit"
]
] | [
[
"usage",
"size_t __fastcall func0(FILE *a1)\n{\nreturn fwrite(\"usage: game\\n\", 1uLL, 0xCuLL, a1);\n}"
]
] | [
{
"name": "parseargs",
"canonical_name": "func1",
"repo": "ivartj/platformer",
"decompiled_code": "__int64 __fastcall parseargs(int a1, char *const *a2)\n{\nint v2; // eax\n__int64 result; // rax\n\nwhile ( 1 )\n{\nv2 = getopt_long(a1, a2, \"h\", &longopts_0, 0LL);\nif ( v2 == -1 )\nbreak;\nif ( v2 ... |
Dataset Card for REALTYPE
This dataset is a slightly modified version of the REALTYPE dataset released as part of the paper Idioms: Neural Decompilation With Joint Code and Type Prediction. It was slightly modified to make it compatible with Huggingface's datasets, which struggles with complex JSON datasets.
Dataset Details
Dataset Description
The paper Idioms: Neural Decompilation With Joint Code and Type Prediction introduces a new approach to neural decompilation that jointly predicts code and user-defined types to improve readability and usability of decompiled code. To support this research, the authors constructed REALTYPE, a comprehensive dataset containing 154,301 training functions, 540 validation functions, and 2,322 test functions. Unlike existing benchmarks, REALTYPE includes a substantial number of user-defined types (UDTs) extracted from real-world C code repositories on GitHub. The dataset was carefully constructed to capture complete definitions of all UDTs for all functions by parsing preprocessed original source code, with special attention to maintaining call graph information to enable interprocedural analysis. REALTYPE underwent rigorous deduplication through minhashing and by-project splitting to prevent data leakage between training and testing sets. It represents a significant advancement over previous benchmarks like EXEBENCH and HUMANEVAL-DECOMPILE, which contained very few, if any, realistic UDTs, making REALTYPE particularly valuable for training neural decompilers that can handle the complexity of real-world code with sophisticated type definitions.
This dataset is slightly modified from the original to make it compatible with Huggingface's datasets, which struggles with complex JSON datasets.
Dataset Sources
- Repository: Idioms
- Paper: Idioms: Neural Decompilation With Joint Code and Type Prediction
Uses
Direct Use
The REALTYPE dataset is primarily intended for training and evaluating neural decompilers that can jointly predict code and user-defined types. As described in the Idioms paper, the dataset was specifically created to address the shortcomings of existing neural decompilation benchmarks which lack realistic user-defined types (UDTs). REALTYPE is suitable for training models that need to handle real-world code with complex type structures, particularly for security applications such as malware analysis, vulnerability research, and fixing legacy software without source code. The dataset provides paired examples of decompiled code and original source code with complete UDT definitions, making it valuable for research on improving the readability and semantic accuracy of decompiled code.
Dataset Structure
The REALTYPE dataset contains 154,301 training functions, 540 validation functions, and 2,322 test functions, all extracted from C code repositories on GitHub. The base (by-binary) splits contain data for 33,500 training binaries, 109 validation binaries, and 400 test binaries. Each example in the dataset consists of:
- Decompiled code: The output of running the Hex-Rays decompiler on compiled binaries.
- Original source code: The canonicalized form of the original function from source.
- User-defined type definitions: Complete definitions of all UDTs used in the function.
- Call graph information: Data about which functions call or are called by each function.
The original REALTYPE dataset was only organized by binary. This view can be accessed using the by_binary configuration. This dataset also contains a by_function configuration, which organizes the data by function. Most data is in both views, but the by_function view does not contain the call graph or unmatched functions (decompiled functions for which the original source code could not be found).
Parity subset
The dataset also includes parity subsets for binary/function parity experiments available in configurations such as by-binary-hex-rays-parity-O0, by-binary-hex-rays-parity-O1_noinline, by-binary-hex-rays-parity-O2_noinline, by-binary-hex-rays-parity-O3_noinline, and their by-function-hex-rays-parity-* counterparts; these contain matched binaries and functions across optimization levels and inlining variants. The paper describes parity datasets for both Hex-Rays and Ghidra, but this repository's parity subsets are for Hex-Rays only. As described in section 3.3 of the Idioms paper, the parity subset includes only functions that were successfully decompiled by Hex-Rays at all included optimization levels/variants (i.e., functions present in every binary variant). See the Idioms paper (https://arxiv.org/abs/2502.04536, section 3.3) and the Zenodo record (https://zenodo.org/records/15683630) for details and citation.
Across the parity subsets organized by function (the by-function-hex-rays-parity-* configurations) there are 106,238 training functions (≈68.9% of the full training split), 431 validation functions (≈79.8%), and 1,818 test functions (≈78.3%) present. The corresponding parity subsets organized by binary (the by-binary-hex-rays-parity-* configurations) contain 23,897 training binaries (≈71.4%), 88 validation binaries (≈80.7%), and 337 test binaries (≈84.3%).
Dataset Creation
Curation Rationale
The REALTYPE dataset was created to address key limitations in existing neural decompilation benchmarks: (1) a lack of variables with user-defined types and their definitions, and (2) insufficient information to build call graphs. The authors identified these limitations as critical gaps preventing neural decompilers from handling real-world code effectively. As the paper explains, "user-defined types (UDTs), such as structs, are widespread in real code" but "existing neural decompilers are not designed to predict the definitions of UDTs." The dataset was specifically designed to enable joint prediction of code and type definitions, addressing what the authors call the "scattered evidence problem" where only a subset of a UDT's fields are accessed within any given function.
Source Data
Data Collection and Processing
The REALTYPE dataset was built by cloning and compiling majority-C-language repositories from GitHub using the GitHub Cloner and Compiler (GHCC) tool. The authors followed these key steps:
- Executed standard build configuration scripts and extracted resulting ELF-format binary files.
- Used Hex-Rays decompiler to decompile each binary.
- Processed original source code by running gcc's preprocessor (
gcc -E -P) on the repository archives. - Parsed the preprocessed code, tracking typedef aliases and recording the definitions of UDTs.
- Extracted and canonicalized each function by traversing the function's AST and recording all type descriptors.
- Matched preprocessed functions with decompiled functions and organized them by the binary in which they occur.
- Computed and stored the call graph between functions in each binary.
For deduplication, the authors used both minhashing (to cluster similar text files) and by-project splitting (ensuring all data from a given repository ends up entirely in either the train, validation, or test set).
Bias, Risks, and Limitations
The REALTYPE dataset has several technical limitations acknowledged in the paper:
- The dataset is biased toward open-source projects on GitHub that could be successfully built. As the authors note, "It is possible that some decompilation targets, especially malware, may have systematic differences from our data and thus affect performance."
- The dataset only includes unoptimized (-O0) code. The authors mention that "optimizations cause a small-to-moderate decrease in efficacy" in neural decompilation but investigating this would have required excessive computational resources.
- The dataset does not include obfuscated code, which is common in malware. The authors view deobfuscation as "an orthogonal problem" that could be addressed by separate techniques before neural decompilation.
- There is a potential risk of data leakage through pretraining, though the authors believe this risk is small because "relatively little decompiled code is found on GitHub or on the internet in general."
- The dataset is focused on C code and might not generalize well to other programming languages.
Dataset Card Contact
- Luke Dramko: Carnegie Mellon University (lukedram@cs.cmu.edu)
- Claire Le Goues: Carnegie Mellon University (clegoues@cs.cmu.edu)
- Edward J. Schwartz: Carnegie Mellon University Software Engineering Institute (eschwartz@cert.org)
- Downloads last month
- 53