{"name": "sub_4024FF", "code": "__int64 __fastcall sub_4024FF ( void * * @@a1@@ , unsigned int @@a2@@ , int @@a3@@ ) { __int64 @@v4@@ ; @@v4@@ = sub_40245F ( @@a3@@ ) ; if ( ! @@v4@@ ) return Number L ; sub_402BF8 ( @@v4@@ , @@a2@@ , * @@a1@@ ) ; sub_4024CD ( * @@a1@@ ) ; * @@a1@@ = ( void * ) @@v4@@ ; return Number L ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "void *"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r64"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]}
{"name": "sub_402237", "code": "_BOOL8 __fastcall sub_402237 ( __int64 @@a1@@ , unsigned int @@a2@@ ) { unsigned int @@v2@@ ; _BOOL8 @@result@@ ; if ( * ( _QWORD * ) @@a1@@ ) { @@v2@@ = * ( _DWORD * ) ( @@a1@@ + Number ) ; if ( @@a2@@ <= @@v2@@ ) { @@result@@ = Number L ; } else { * ( _DWORD * ) ( @@a1@@ + Number ) = ( @@a2@@ >> Number ) + @@a2@@ + Number ; if ( ( unsigned int ) sub_4024FF ( @@a1@@ , @@v2@@ , * ( unsigned int * ) ( @@a1@@ + Number ) ) ) { @@result@@ = Number L ; } else { * ( _DWORD * ) ( @@a1@@ + Number ) = @@v2@@ ; @@result@@ = Number L ; } } } else { * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@a2@@ ; * ( _QWORD * ) @@a1@@ = sub_40245F ( * ( unsigned int * ) ( @@a1@@ + Number ) ) ; @@result@@ = * ( _QWORD * ) @@a1@@ != Number L ; } return @@result@@ ; }", "source": [{"n": "v2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r104"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "_BOOL8", "s": 8}, "location": "r8"}]} {"name": "sub_4022C9", "code": "_BOOL8 __fastcall sub_4022C9 ( __int64 @@a1@@ , int @@a2@@ ) { unsigned int @@v2@@ ; unsigned int v3 ; _BOOL8 result ; if ( * ( _QWORD * ) @@a1@@ ) { @@v2@@ = * ( _DWORD * ) ( @@a1@@ + Number ) ; v3 = * ( _DWORD * ) ( @@a1@@ + Number ) + @@a2@@ ; if ( v3 <= @@v2@@ ) { result = Number L ; } else { * ( _DWORD * ) ( @@a1@@ + Number ) = ( v3 >> Number ) + v3 + Number ; if ( ( unsigned int ) sub_4024FF ( @@a1@@ , @@v2@@ , * ( unsigned int * ) ( @@a1@@ + Number ) ) ) { result = Number L ; } else { * ( _DWORD * ) ( @@a1@@ + Number ) = @@v2@@ ; result = Number L ; } } } else { * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@a2@@ ; * ( _QWORD * ) @@a1@@ = sub_40245F ( * ( unsigned int * ) ( @@a1@@ + Number ) ) ; result = * ( _QWORD * ) @@a1@@ != Number L ; } return result ; }", "source": [{"n": "v2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r104"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}]} {"name": "sub_40245F", "code": "__int64 __fastcall sub_40245F ( int @@a1@@ ) { __int64 @@result@@ ; unsigned int @@size@@ ; void * @@v3@@ ; @@size@@ = ( @@a1@@ & Number ) + Number ; if ( @@size@@ > dword_4051B0 ) { @@v3@@ = malloc ( @@size@@ ) ; if ( ! @@v3@@ ) * __errno_location ( ) = dword_4051B8 ; @@result@@ = ( __int64 ) @@v3@@ ; } else { dword_4051B0 -= @@size@@ ; @@result@@ = ( unsigned int ) dword_4051B0 + Number L ; } return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "size", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s20"}, {"n": "v3", "t": {"T": 3, "t": "void"}, "location": "s8"}]} {"name": "sub_4024CD", "code": "void __fastcall sub_4024CD ( void * @@a1@@ ) { if ( @@a1@@ < & unk_405240 || @@a1@@ >= & unk_406240 ) free ( @@a1@@ ) ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "void"}, "location": "r56"}]} {"name": "sub_402BF8", "code": "__int64 __fastcall sub_402BF8 ( _BYTE * @@a1@@ , unsigned int @@a2@@ , _BYTE * @@a3@@ ) { __int64 @@result@@ ; _BYTE * v5 ; _BYTE * v6 ; _BYTE * v7 ; _BYTE * v8 ; _BYTE * v9 ; _BYTE * v10 ; _BYTE * v11 ; _BYTE * v12 ; _BYTE * v13 ; _BYTE * v14 ; _BYTE * v15 ; _BYTE * v16 ; _BYTE * v17 ; _BYTE * v18 ; for ( @@result@@ = @@a2@@ ; ( _DWORD ) @@result@@ ; @@result@@ = ( unsigned int ) ( @@result@@ - Number ) ) { v5 = @@a3@@ ; v6 = @@a3@@ + Number ; v7 = @@a1@@ ; v8 = @@a1@@ + Number ; * v7 = * v5 ; @@result@@ = ( unsigned int ) ( @@result@@ - Number ) ; if ( ! ( _DWORD ) @@result@@ ) break ; v9 = v6 ; v10 = v6 + Number ; v11 = v8 ; v12 = v8 + Number ; * v11 = * v9 ; @@result@@ = ( unsigned int ) ( @@result@@ - Number ) ; if ( ! ( _DWORD ) @@result@@ ) break ; v13 = v10 ; v14 = v10 + Number ; v15 = v12 ; v16 = v12 + Number ; * v15 = * v13 ; @@result@@ = ( unsigned int ) ( @@result@@ - Number ) ; if ( ! ( _DWORD ) @@result@@ ) break ; v17 = v14 ; @@a3@@ = v14 + Number ; v18 = v16 ; @@a1@@ = v16 + Number ; * v18 = * v17 ; } return @@result@@ ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "_BYTE"}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "_BYTE"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}]}