Skip to content

Instantly share code, notes, and snippets.

@cacaodev
Created April 1, 2017 17:33
Show Gist options
  • Save cacaodev/6de091956d4d532b094c479d16df82cb to your computer and use it in GitHub Desktop.
Save cacaodev/6de091956d4d532b094c479d16df82cb to your computer and use it in GitHub Desktop.
@implementation NSTreeController
- (id)initWithCoder:(id)
//id __cdecl -[NSTreeController initWithCoder:](struct NSTreeController *self, SEL a2, id a3)
{
void *v3; // esi@1
void *v4; // eax@2
void *v5; // eax@2
void *v6; // eax@2
void *v7; // eax@2
struct NSTreeController *v9; // [sp+10h] [bp-18h]@1
char *v10; // [sp+14h] [bp-14h]@1
v9 = self;
v10 = objc_class_name_NSTreeController.super_class;
v3 = objc_msgSendSuper(&v9, "initWithCoder:", a3);
if ( (unsigned __int8)objc_msgSend(a3, "allowsKeyedCoding") )
{
*((_DWORD *)v3 + 29) = (unsigned int)objc_msgSend(a3, "decodeBoolForKey:", CFSTR("NSAvoidsEmptySelection")) & 1 | *((_DWORD *)v3 + 29) & 0xFFFFFFFE;
*((_DWORD *)v3 + 29) = 2 * (unsigned __int8)objc_msgSend(a3, "decodeBoolForKey:", CFSTR("NSPreservesSelection")) & 2 | *((_DWORD *)v3 + 29) & 0xFFFFFFFD;
*((_DWORD *)v3 + 29) = 4 * (unsigned __int8)objc_msgSend(a3, "decodeBoolForKey:", CFSTR("NSSelectsInsertedObjects")) & 4 | *((_DWORD *)v3 + 29) & 0xFFFFFFFB;
*((_DWORD *)v3 + 29) = ((unsigned __int8)objc_msgSend(
a3,
"decodeBoolForKey:",
CFSTR("NSAlwaysUsesMultipleValuesMarker")) << 6) & 0x40 | *((_DWORD *)v3 + 29) & 0xFFFFFFBF;
v4 = objc_msgSend(a3, "decodeObjectForKey:", CFSTR("NSSortDescriptors"));
objc_assign_ivar(v4, v3, 136);
v5 = objc_msgSend(a3, "decodeObjectForKey:", CFSTR("NSTreeContentChildrenKey"));
objc_msgSend(v3, "setChildrenKeyPath:", v5);
v6 = objc_msgSend(a3, "decodeObjectForKey:", CFSTR("NSTreeContentLeafKey"));
objc_msgSend(v3, "setLeafKeyPath:", v6);
v7 = objc_msgSend(a3, "decodeObjectForKey:", CFSTR("NSTreeContentCountKey"));
objc_msgSend(v3, "setCountKeyPath:", v7);
}
return (id)v3;
}
- (void)_init
//void __cdecl -[NSTreeController _init](struct NSTreeController *self, SEL a2)
{
void *v2; // esi@1
void *v3; // eax@1
void *v4; // eax@1
void *v5; // eax@1
void *v6; // eax@1
void *v7; // eax@1
struct NSTreeController *v8; // [sp+10h] [bp-18h]@1
char *v9; // [sp+14h] [bp-14h]@1
v8 = self;
v9 = objc_class_name_NSTreeController.super_class;
objc_msgSendSuper(&v8, "_init");
self->_treeControllerFlags = (struct __treeControllerFlags)7;
objc_assign_ivar(0, self, 96);
objc_assign_ivar(0, self, 100);
objc_assign_ivar(0, self, 120);
objc_assign_ivar(0, self, 104);
objc_assign_ivar(0, self, 112);
objc_assign_ivar(0, self, 124);
objc_assign_ivar(0, self, 128);
objc_assign_ivar(0, self, 132);
v2 = objc_msgSend("_NSTreeNodeObservingTracker", "alloc");
v3 = objc_msgSend(self, "class");
v4 = objc_msgSend(v3, "_modelAndProxyKeys");
v5 = objc_msgSend(v2, "initWithModelObserver:availableModelAndProxyKeys:", self, v4, v8, v9);
objc_assign_ivar(v5, self, 100);
objc_msgSend(self->_treeStructureObservers, "setRegistersObservingWithKVOPriorKey:", 1);
objc_assign_ivar(0, self, 136);
v6 = objc_msgSend("NSMutableArray", "alloc");
v7 = objc_msgSend(v6, "init");
objc_assign_ivar(v7, self, 84);
objc_msgSend(self, "_prepareControllerTree");
}
+ (id)_modelAndProxyKeys
//id __cdecl +[NSTreeController _modelAndProxyKeys](struct NSTreeController_meta *self, SEL a2)
{
id result; // eax@1
void *v3; // eax@2
void *v4; // eax@2
result = (id)+[NSTreeController _modelAndProxyKeys]._modelAndProxyKeys;
if ( !+[NSTreeController _modelAndProxyKeys]._modelAndProxyKeys )
{
v3 = objc_msgSend("NSArray", "alloc");
v4 = objc_msgSend(
v3,
"initWithObjects:",
CFSTR("arrangedObjects"),
CFSTR("selection"),
CFSTR("selectedObjects"),
CFSTR("content"),
0);
objc_assign_global(v4, &+[NSTreeController _modelAndProxyKeys]._modelAndProxyKeys);
result = (id)+[NSTreeController _modelAndProxyKeys]._modelAndProxyKeys;
}
return result;
}
- (void)_prepareControllerTree
//void __cdecl -[NSTreeController _prepareControllerTree](struct NSTreeController *self, SEL a2)
{
char v2; // bl@1
bool v3; // zf@2
signed int v4; // ebx@2
void *v5; // eax@3
void *v6; // eax@5
void *v7; // eax@6
void *v8; // eax@6
void *v9; // eax@6
void *v10; // ST38_4@8
void *v11; // ST14_4@8
void *v12; // eax@10
int *v13; // esi@10
char v14; // al@11
void *v15; // edi@16
void *v16; // eax@16
unsigned int v17; // esi@18
void *v18; // eax@21
void *v19; // edi@22
void *v20; // ST34_4@24
SEL v21; // ST30_4@24
int v22; // ST2C_4@24
void *v23; // ST14_4@24
void *v24; // edi@28
char v25; // al@28
int v26; // eax@33
void *v27; // [sp+38h] [bp-100h]@16
int v28; // [sp+44h] [bp-F4h]@17
void *v29; // [sp+48h] [bp-F0h]@16
__int128 v30; // [sp+50h] [bp-E8h]@16
__int128 v31; // [sp+60h] [bp-D8h]@16
jmp_buf v32; // [sp+70h] [bp-C8h]@10
void *v33; // [sp+CCh] [bp-6Ch]@6
char v34; // [sp+D3h] [bp-65h]@1
void *v35; // [sp+D4h] [bp-64h]@1
void *v36; // [sp+D8h] [bp-60h]@1
int v37; // [sp+DCh] [bp-5Ch]@1
SEL v38; // [sp+E0h] [bp-58h]@1
int v39; // [sp+E4h] [bp-54h]@1
char v40; // [sp+E8h] [bp-50h]@16
int v41; // [sp+128h] [bp-10h]@1
v41 = *(_DWORD *)__stack_chk_guard_ptr;
v39 = (int)self;
v38 = a2;
v37 = (int)objc_msgSend(self, "childrenKeyPath");
v36 = 0;
v35 = 0;
v2 = (unsigned int)objc_msgSend(self, "preservesSelection");
v34 = v2;
objc_msgSend(self, "_willChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 1, 1, 1);
if ( self->_rootNode )
{
v3 = v2 == 0;
v4 = 3550589;
if ( !v3 )
{
v5 = objc_msgSend((void *)v39, *(const char **)((char *)&loc_8F3E7B + 3550589));
if ( objc_msgSend(v5, "count") )
v36 = objc_msgSend((void *)v39, "_copySelectedObjectLineages");
}
objc_msgSend(*(void **)(v39 + 108), "_tearDownObserving");
v6 = objc_msgSend(*(void **)(v39 + 108), "representedObject");
objc_msgSend(v6, "removeAllObjects");
}
else
{
v7 = objc_msgSend("NSMutableDictionary", "alloc");
v8 = objc_msgSend(v7, "init");
v33 = v8;
v9 = objc_msgSend((void *)v39, "createChildNodeForRepresentedObject:", v8);
objc_assign_ivar(v9, v39, 108);
objc_msgSend(v33, "release");
v4 = 3550589;
}
objc_msgSend(*(void **)(v39 + 52), *(const char **)(v4 + 9387479));
if ( !*(_DWORD *)(v39 + 84) )
{
v10 = objc_msgSend(*(void **)(v4 + 9469511), *(const char **)(v4 + 9381435));
v11 = objc_msgSend(*(void **)((char *)&loc_907E4B + v4), *(const char **)(v4 + 9381439), (char *)&loc_81119F + v4);
objc_msgSend(v10, *(const char **)(v4 + 9383959), v38, v39, v11, 223, v4 + 9238363, v39);
}
if ( v37 )
{
v12 = objc_msgSend(*(void **)(v39 + 108), *(const char **)(v4 + 9390315));
objc_msgSend(v12, *(const char **)(v4 + 9381343), *(_DWORD *)(v39 + 84), v37);
*(_DWORD *)(v39 + 116) |= 0x100u;
*(_DWORD *)(v39 + 116) |= 0x200u;
v13 = v32;
objc_exception_try_enter(v32);
if ( _setjmp(v32) )
{
v14 = 1;
}
else
{
objc_msgSend(*(void **)(v39 + 108), *(const char **)(v4 + 9444827));
objc_msgSend(*(void **)(v39 + 108), *(const char **)(v4 + 9444831), v37, 0);
objc_exception_try_exit(v32);
v14 = 0;
}
*(_DWORD *)(v39 + 116) &= 0xFFFFFEFF;
*(_DWORD *)(v39 + 116) &= 0xFFFFFDFF;
if ( v14 )
{
LABEL_33:
v26 = objc_exception_extract(v13);
objc_exception_throw(v26);
-[NSTreeController childrenKeyPath](self, a2);
return;
}
if ( v34 )
{
if ( v36 )
{
v15 = objc_msgSend(*(void **)((char *)&loc_907E23 + v4), *(const char **)(v4 + 9380987));
v16 = objc_msgSend(v36, *(const char **)(v4 + 9380979));
v35 = objc_msgSend(v15, *(const char **)((char *)&loc_8F24DB + v4), v16);
v31 = 0LL;
v30 = 0LL;
v29 = v36;
v27 = objc_msgSend(v36, *(const char **)(v4 + 9380983), &v30, &v40, 16);
if ( v27 )
{
v28 = *DWORD2(v30);
do
{
v17 = 0;
do
{
if ( *DWORD2(v30) != v28 )
objc_enumerationMutation(v29);
v18 = objc_msgSend(
*(void **)(v39 + 108),
*(const char **)(v4 + 9444835),
*(_DWORD *)(DWORD1(v30) + 4 * v17));
if ( v18 )
{
v19 = objc_msgSend(v18, *(const char **)(v4 + 9392839));
if ( !v19 || !objc_msgSend(v19, *(const char **)(v4 + 9381495)) )
{
v20 = objc_msgSend(*(void **)(v4 + 9469511), *(const char **)(v4 + 9381435));
v21 = v38;
v22 = v39;
v23 = objc_msgSend(
*(void **)((char *)&loc_907E4B + v4),
*(const char **)(v4 + 9381439),
(char *)&loc_81119F + v4);
objc_msgSend(v20, *(const char **)(v4 + 9383959), v21, v22, v23, 265, v4 + 9238379);
}
objc_msgSend(v35, *(const char **)(v4 + 9381291), v19);
}
++v17;
}
while ( v17 < (unsigned int)v27 );
v27 = objc_msgSend(v29, *(const char **)(v4 + 9380983), &v30, &v40, 16);
}
while ( v27 );
}
}
}
}
objc_msgSend(*(void **)(v39 + 52), *(const char **)(v4 + 9387483));
v13 = (int *)v39;
v24 = v35;
v25 = (unsigned int)objc_msgSend((void *)v39, *(const char **)(v4 + 9387631));
objc_msgSend(v13, *(const char **)(v4 + 9444839), v24, v25, 0);
objc_msgSend((void *)v39, *(const char **)(v4 + 9444843), 1, 1, 1);
if ( v36 )
objc_msgSend(v36, *(const char **)(v4 + 9380995));
if ( v35 )
objc_msgSend(v35, *(const char **)(v4 + 9380995));
if ( *(_DWORD *)__stack_chk_guard_ptr != v41 )
goto LABEL_33;
}
- (void)_willChangeValuesForArrangedKeys:(char) objectKeys:(char) indexPathKeys:(char)
//void __cdecl -[NSTreeController _willChangeValuesForArrangedKeys:objectKeys:indexPathKeys:](struct NSTreeController *self, SEL a2, char a3, char a4, char a5)
{
objc_msgSend(*(void **)&self->superclass_opaque[52], "suppressAllNotificationsFromObject:", self);
if ( a3 || a5 )
{
objc_msgSend(self, "willChangeValueForKey:", CFSTR("canSelectPrevious"));
objc_msgSend(self, "willChangeValueForKey:", CFSTR("canSelectNext"));
}
if ( a5 || a4 )
{
objc_msgSend(self, "willChangeValueForKey:", CFSTR("selection"));
objc_msgSend(self, "willChangeValueForKey:", CFSTR("selectedNodes"));
}
if ( a4 )
objc_msgSend(self, "willChangeValueForKey:", CFSTR("selectedObjects"));
if ( a5 )
{
objc_msgSend(self, "willChangeValueForKey:", CFSTR("canRemove"));
objc_msgSend(self, "willChangeValueForKey:", CFSTR("canInsertChild"));
objc_msgSend(self, "willChangeValueForKey:", CFSTR("canAddChild"));
objc_msgSend(self, "willChangeValueForKey:", CFSTR("selectionIndexPath"));
objc_msgSend(self, "willChangeValueForKey:", CFSTR("selectionIndexPaths"));
}
if ( a3 )
objc_msgSend(self, "willChangeValueForKey:", CFSTR("arrangedObjects"));
}
- (char)_selectObjectsAtIndexPathsNoCopy:(id) avoidsEmptySelection:(char) sendObserverNotifications:(char)
//char __cdecl -[NSTreeController _selectObjectsAtIndexPathsNoCopy:avoidsEmptySelection:sendObserverNotifications:](struct NSTreeController *self, SEL a2, id a3, char a4, char a5)
{
struct NSTreeController *v5; // edi@1
id v6; // ebx@3
void *v7; // eax@6
void *v8; // eax@8
void *v9; // eax@10
char v10; // bl@13
char v11; // al@18
signed int v12; // ecx@18
void *v13; // eax@19
void *v14; // eax@23
signed int v16; // [sp+14h] [bp-14h]@20
v5 = self;
if ( a3 )
{
if ( objc_msgSend(a3, "count") )
{
v5 = self;
v6 = a3;
goto LABEL_12;
}
v5 = self;
v6 = a3;
if ( !a4 )
{
LABEL_12:
if ( objc_msgSend(v6, "count") )
goto LABEL_15;
goto LABEL_13;
}
}
else
{
v6 = 0;
if ( !a4 )
goto LABEL_13;
}
v7 = objc_msgSend(v5->_rootNode, "childNodes");
if ( objc_msgSend(v7, "count") )
{
if ( v6 )
{
v8 = objc_msgSend("NSIndexPath", "indexPathWithIndex:", 0);
objc_msgSend(v6, "addObject:", v8);
goto LABEL_12;
}
v9 = objc_msgSend("NSIndexPath", "indexPathWithIndex:", 0);
v6 = (id)objc_msgSend("NSMutableArray", "arrayWithObject:", v9);
}
if ( v6 )
goto LABEL_12;
LABEL_13:
v10 = 1;
if ( !v5->_selectionIndexPaths )
return v10;
v6 = 0;
LABEL_15:
if ( (unsigned __int8)objc_msgSend(v5, "commitEditing") )
{
objc_msgSend(v5, "_willChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 0, a5, a5);
if ( !(*(_BYTE *)&v5->_treeControllerFlags & 0x80) )
objc_msgSend(v5, "_stopObservingSelectionIfNecessary");
objc_msgSend((void *)v5->_selectedObjects, "release");
objc_assign_ivar(0, v5, 120);
v11 = (unsigned int)objc_msgSend(v6, "isEqualToArray:", v5->_selectionIndexPaths);
v12 = 0;
if ( !v11 )
{
objc_msgSend(v5->_selectionIndexPaths, "release");
v13 = objc_msgSend(v6, "retain");
objc_assign_ivar(v13, v5, 112);
v12 = 1;
}
v16 = v12;
if ( !(*(_BYTE *)&v5->_treeControllerFlags & 0x80) )
objc_msgSend(v5, "_startObservingSelectionIfNecessary");
objc_msgSend(v5, "_didChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 0, a5, a5);
v10 = 1;
if ( v16 )
{
v14 = objc_msgSend(v5, "_bindingAdaptor");
objc_msgSend(v14, "controller:didChangeToSelectionIndexPaths:", v5, v5->_selectionIndexPaths);
}
}
else
{
v10 = 0;
}
return v10;
}
- (void)_didChangeValuesForArrangedKeys:(char) objectKeys:(char) indexPathKeys:(char)
//void __cdecl -[NSTreeController _didChangeValuesForArrangedKeys:objectKeys:indexPathKeys:](struct NSTreeController *self, SEL a2, char a3, char a4, char a5)
{
if ( a3 )
objc_msgSend(self, "didChangeValueForKey:", CFSTR("arrangedObjects"));
if ( a5 )
{
objc_msgSend(self, "didChangeValueForKey:", CFSTR("selectionIndexPaths"));
objc_msgSend(self, "didChangeValueForKey:", CFSTR("selectionIndexPath"));
objc_msgSend(self, "didChangeValueForKey:", CFSTR("canAddChild"));
objc_msgSend(self, "didChangeValueForKey:", CFSTR("canInsertChild"));
objc_msgSend(self, "didChangeValueForKey:", CFSTR("canRemove"));
}
if ( a4 )
{
objc_msgSend(self, "didChangeValueForKey:", CFSTR("selectedObjects"));
goto LABEL_8;
}
if ( a5 )
{
LABEL_8:
objc_msgSend(self, "didChangeValueForKey:", CFSTR("selectedNodes"));
objc_msgSend(self, "didChangeValueForKey:", CFSTR("selection"));
if ( !((unsigned __int8)a3 | (unsigned __int8)a5) )
goto LABEL_12;
goto LABEL_11;
}
if ( a3 )
{
LABEL_11:
objc_msgSend(self, "didChangeValueForKey:", CFSTR("canSelectNext"));
objc_msgSend(self, "didChangeValueForKey:", CFSTR("canSelectPrevious"));
}
LABEL_12:
objc_msgSend(*(void **)&self->superclass_opaque[52], "unsuppressAllNotificationsFromObject:", self);
}
- (void)setChildrenKeyPath:(id)
//void __cdecl -[NSTreeController setChildrenKeyPath:](struct NSTreeController *self, SEL a2, id a3)
{
id v3; // ebx@1
struct NSString *v4; // eax@1
void *v5; // eax@6
v3 = a3;
v4 = self->_childrenKeyPath;
if ( (id)v4 != a3 )
{
if ( self->_rootNode )
{
objc_msgSend(self, "discardEditing");
objc_msgSend(self->_rootNode, "_tearDownObserving");
v4 = self->_childrenKeyPath;
}
objc_msgSend(v4, "release");
if ( !objc_msgSend(a3, "length") )
v3 = 0;
v5 = objc_msgSend(v3, "copy");
objc_assign_ivar(v5, self, 124);
objc_msgSend(self, "_prepareControllerTree");
}
}
- (void)setLeafKeyPath:(id)
//void __cdecl -[NSTreeController setLeafKeyPath:](struct NSTreeController *self, SEL a2, id a3)
{
id v3; // ebx@1
struct NSString *v4; // eax@1
void *v5; // eax@6
v3 = a3;
v4 = self->_leafKeyPath;
if ( (id)v4 != a3 )
{
if ( self->_rootNode )
{
objc_msgSend(self, "discardEditing");
objc_msgSend(self->_rootNode, "_tearDownObserving");
v4 = self->_leafKeyPath;
}
objc_msgSend(v4, "release");
if ( !objc_msgSend(a3, "length") )
v3 = 0;
v5 = objc_msgSend(v3, "copy");
objc_assign_ivar(v5, self, 132);
objc_msgSend(self, "_prepareControllerTree");
}
}
- (void)setCountKeyPath:(id)
//void __cdecl -[NSTreeController setCountKeyPath:](struct NSTreeController *self, SEL a2, id a3)
{
id v3; // ebx@1
struct NSString *v4; // eax@1
void *v5; // eax@6
v3 = a3;
v4 = self->_countKeyPath;
if ( (id)v4 != a3 )
{
if ( self->_rootNode )
{
objc_msgSend(self, "discardEditing");
objc_msgSend(self->_rootNode, "_tearDownObserving");
v4 = self->_countKeyPath;
}
objc_msgSend(v4, "release");
if ( !objc_msgSend(a3, "length") )
v3 = 0;
v5 = objc_msgSend(v3, "copy");
objc_assign_ivar(v5, self, 128);
objc_msgSend(self, "_prepareControllerTree");
}
}
- (void)setContent:(id)
//void __cdecl -[NSTreeController setContent:](struct NSTreeController *self, SEL a2, id a3)
{
id v3; // ebx@1
void *v4; // eax@2
void *v5; // ST18_4@6
void *v6; // ST0C_4@6
void *v7; // eax@8
void *v8; // eax@11
const char *v9; // ecx@11
void *v10; // eax@12
char v11; // ST18_1@12
void *v12; // eax@12
void *v13; // eax@14
const char *v14; // [sp+4h] [bp-24h]@9
int v15; // [sp+8h] [bp-20h]@4
void *v16; // [sp+8h] [bp-20h]@8
int v17; // [sp+Ch] [bp-1Ch]@0
v3 = a3;
if ( a3 || (v4 = *(void **)&self->superclass_opaque[84]) != 0 && objc_msgSend(v4, "count") )
{
objc_msgSend(self, "discardEditing");
objc_msgSend(self, "willChangeValueForKey:", CFSTR("content"));
if ( *(id *)&self->superclass_opaque[84] == a3 )
{
if ( (unsigned __int8)objc_msgSend(self, "usesLazyFetching") )
{
v5 = *(void **)&self->superclass_opaque[84];
v6 = objc_msgSend("_NSLazyFetchingArray", "class");
if ( (unsigned __int8)objc_msgSend(v5, "isKindOfClass:", v6) )
goto LABEL_19;
}
}
objc_msgSend(*(void **)&self->superclass_opaque[84], "autorelease");
if ( !a3 )
{
if ( (unsigned __int8)objc_msgSend(self, "usesLazyFetching") == 1 )
{
v8 = objc_msgSend(self, "_lazyFetchResultProxyForObjects:", 0);
v9 = "retain";
}
else
{
v8 = objc_msgSend("NSMutableArray", "alloc");
v9 = "init";
}
v13 = objc_msgSend(v8, v9, v15, v17);
goto LABEL_18;
}
v7 = objc_msgSend("NSArray", "self");
if ( (unsigned __int8)objc_msgSend(a3, "isKindOfClass:", v7) )
{
v14 = "retain";
}
else
{
v10 = objc_msgSend("NSSet", "self");
v11 = (unsigned int)objc_msgSend(a3, "isKindOfClass:", v10);
v12 = objc_msgSend("NSMutableArray", "alloc");
if ( !v11 )
{
v13 = objc_msgSend(v12, "initWithObjects:", a3, 0);
goto LABEL_18;
}
v3 = (id)v12;
v16 = objc_msgSend(a3, "allObjects");
v14 = "initWithArray:";
}
v13 = objc_msgSend(v3, v14, v16, v17);
LABEL_18:
objc_assign_ivar(v13, self, 84);
LABEL_19:
objc_msgSend(self, "_markHasLoadedData:", 1);
objc_msgSend(self, "_prepareControllerTree");
objc_msgSend(self, "didChangeValueForKey:", CFSTR("content"));
}
}
- (void)addObserver:(id) forKeyPath:(id) options:(unsigned int) context:(void *)
//void __cdecl -[NSTreeController addObserver:forKeyPath:options:context:](struct NSTreeController *self, SEL a2, id a3, id a4, unsigned int a5, void *a6)
{
void *v6; // eax@3
unsigned __int8 v7; // al@3
struct NSTreeController *v8; // [sp+20h] [bp-18h]@1
char *v9; // [sp+24h] [bp-14h]@1
v8 = self;
v9 = objc_class_name_NSTreeController.super_class;
objc_msgSendSuper(&v8, "addObserver:forKeyPath:options:context:", a3, a4, a5, a6);
if ( self->_rootNode )
{
objc_msgSend(self->_treeStructureObservers, "registerObservingForAnalyzableKeyPath:", a4);
if ( !(*(_BYTE *)&self->_treeControllerFlags & 0x80) )
{
v6 = objc_msgSend(self, "_modelAndProxyKeysObserved");
v7 = (unsigned __int8)objc_msgSend(v6, "containsObject:", CFSTR("arrangedObjects")) << 7;
self->_treeControllerFlags = (struct __treeControllerFlags)(v7 | *(_DWORD *)&self->_treeControllerFlags & 0xFFFFFF7F);
if ( v7 )
objc_msgSend(self->_treeStructureObservers, "startObservingModelObjectTree:", self->_rootNode);
}
}
}
+ (id)_nonAutomaticObservingKeys
//id __cdecl +[NSTreeController _nonAutomaticObservingKeys](struct NSTreeController_meta *self, SEL a2)
{
id result; // eax@1
void *v3; // eax@2
void *v4; // eax@2
void *v5; // ebx@2
void *v6; // eax@2
struct NSTreeController_meta *v7; // [sp+40h] [bp-18h]@2
char *v8; // [sp+44h] [bp-14h]@2
result = (id)+[NSTreeController _nonAutomaticObservingKeys].nonObservingKeys;
if ( !+[NSTreeController _nonAutomaticObservingKeys].nonObservingKeys )
{
v3 = objc_msgSend("NSMutableSet", "alloc");
v4 = objc_msgSend(
v3,
"initWithObjects:",
CFSTR("arrangedObjects"),
CFSTR("avoidsEmptySelection"),
CFSTR("canInsert"),
CFSTR("canInsertChild"),
CFSTR("canAddChild"),
CFSTR("canSelectNext"),
CFSTR("canSelectPrevious"),
CFSTR("preservesSelection"),
CFSTR("selectionIndexPath"),
CFSTR("selectionIndexPaths"),
CFSTR("selectsInsertedObjects"),
CFSTR("alwaysUsesMultipleValuesMarker"),
CFSTR("sortDescriptors"),
0);
objc_assign_global(v4, &+[NSTreeController _nonAutomaticObservingKeys].nonObservingKeys);
v5 = (void *)+[NSTreeController _nonAutomaticObservingKeys].nonObservingKeys;
v7 = self;
v8 = stru_CBF458.super_class;
v6 = objc_msgSendSuper(&v7, "_nonAutomaticObservingKeys");
objc_msgSend(v5, "unionSet:", v6);
result = (id)+[NSTreeController _nonAutomaticObservingKeys].nonObservingKeys;
}
return result;
}
- (void)_stopObservingSelectionIfNecessary
//void __cdecl -[NSTreeController _stopObservingSelectionIfNecessary](struct NSTreeController *self, SEL a2)
{
void *v2; // edi@2
int v3; // esi@3
unsigned int v4; // ebx@4
int v5; // eax@9
void *v6; // [sp+18h] [bp-80h]@2
__int128 v7; // [sp+20h] [bp-78h]@2
__int128 v8; // [sp+30h] [bp-68h]@2
char v9; // [sp+48h] [bp-50h]@2
int v10; // [sp+88h] [bp-10h]@1
v10 = *(_DWORD *)__stack_chk_guard_ptr;
if ( self->_selectionIndexPaths )
{
v8 = 0LL;
v7 = 0LL;
v6 = objc_msgSend(self, "selectedNodes");
v2 = objc_msgSend(v6, "countByEnumeratingWithState:objects:count:", &v7, &v9, 16);
if ( v2 )
{
v3 = *DWORD2(v7);
do
{
v4 = 0;
do
{
if ( *DWORD2(v7) != v3 )
objc_enumerationMutation(v6);
objc_msgSend(
*(void **)&self->superclass_opaque[(_DWORD)((char *)&loc_366FF1 - 3567501)],
"stopObservingModelObject:",
*(_DWORD *)(DWORD1(v7) + 4 * v4++));
}
while ( v4 < (unsigned int)v2 );
v2 = objc_msgSend(v6, "countByEnumeratingWithState:objects:count:", &v7, &v9, 16);
}
while ( v2 );
}
}
v5 = *(_DWORD *)__stack_chk_guard_ptr;
}
- (void)_startObservingSelectionIfNecessary
//void __cdecl -[NSTreeController _startObservingSelectionIfNecessary](struct NSTreeController *self, SEL a2)
{
void *v2; // edi@4
unsigned int v3; // ebx@6
void *v4; // edi@12
unsigned int v5; // esi@14
int v6; // eax@19
void *v7; // [sp+18h] [bp-E0h]@2
int v8; // [sp+1Ch] [bp-DCh]@5
int v9; // [sp+1Ch] [bp-DCh]@13
__int128 v10; // [sp+20h] [bp-D8h]@4
__int128 v11; // [sp+30h] [bp-C8h]@4
__int128 v12; // [sp+40h] [bp-B8h]@12
__int128 v13; // [sp+50h] [bp-A8h]@12
char v14; // [sp+68h] [bp-90h]@4
char v15; // [sp+A8h] [bp-50h]@12
int v16; // [sp+E8h] [bp-10h]@1
v16 = *(_DWORD *)__stack_chk_guard_ptr;
if ( self->_selectionIndexPaths )
{
v7 = objc_msgSend(self, "selectedNodes");
if ( (unsigned __int8)objc_msgSend(self, *(const char **)((char *)&loc_8EFA65 + 3567787))
&& objc_msgSend(self->_selectionIndexPaths, "count") != (size_t *)((char *)&dword_0 + 1) )
{
v13 = 0LL;
v12 = 0LL;
v4 = objc_msgSend(v7, "countByEnumeratingWithState:objects:count:", &v12, &v15, 16);
if ( v4 )
{
v9 = *DWORD2(v12);
do
{
v5 = 0;
do
{
if ( *DWORD2(v12) != v9 )
objc_enumerationMutation(v7);
objc_msgSend(
self->_treeStructureObservers,
"stopObservingModelObject:",
*(_DWORD *)(DWORD1(v12) + 4 * v5++));
}
while ( v5 < (unsigned int)v4 );
v4 = objc_msgSend(v7, "countByEnumeratingWithState:objects:count:", &v12, &v15, 16);
}
while ( v4 );
}
}
else
{
v11 = 0LL;
v10 = 0LL;
v2 = objc_msgSend(v7, "countByEnumeratingWithState:objects:count:", &v10, &v14, 16);
if ( v2 )
{
v8 = *DWORD2(v10);
do
{
v3 = 0;
do
{
if ( *DWORD2(v10) != v8 )
objc_enumerationMutation(v7);
objc_msgSend(
self->_treeStructureObservers,
"startObservingModelObject:",
*(_DWORD *)(DWORD1(v10) + 4 * v3++));
}
while ( v3 < (unsigned int)v2 );
v2 = objc_msgSend(v7, "countByEnumeratingWithState:objects:count:", &v10, &v14, 16);
}
while ( v2 );
}
}
}
v6 = *(_DWORD *)__stack_chk_guard_ptr;
}
- (void)observeValueForKeyPath:(id) ofObject:(id) change:(id) context:(void *)
//void __cdecl -[NSTreeController observeValueForKeyPath:ofObject:change:context:](struct NSTreeController *self, SEL a2, id a3, id a4, id a5, void *a6)
{
bool v6; // zf@1
void *v7; // edi@1
struct NSTreeController *v8; // esi@2
void *v9; // eax@4
struct NSTreeController *v10; // ebx@6
void *v11; // eax@10
int v12; // ebx@12
int v13; // ebx@22
int v14; // eax@29
void *v15; // [sp+18h] [bp-170h]@11
void *v16; // [sp+1Ch] [bp-16Ch]@21
struct NSTreeController *v17; // [sp+20h] [bp-168h]@11
struct NSTreeController *v18; // [sp+20h] [bp-168h]@21
struct NSTreeController *v19; // [sp+28h] [bp-160h]@3
int v20; // [sp+2Ch] [bp-15Ch]@3
__int128 v21; // [sp+30h] [bp-158h]@21
__int128 v22; // [sp+40h] [bp-148h]@21
jmp_buf v23; // [sp+58h] [bp-130h]@20
__int128 v24; // [sp+B0h] [bp-D8h]@11
__int128 v25; // [sp+C0h] [bp-C8h]@11
int v26; // [sp+D4h] [bp-B4h]@16
struct NSTreeController *v27; // [sp+D8h] [bp-B0h]@4
char *v28; // [sp+DCh] [bp-ACh]@4
void *v29; // [sp+E0h] [bp-A8h]@1
id v30; // [sp+E4h] [bp-A4h]@1
id v31; // [sp+E8h] [bp-A0h]@1
id v32; // [sp+ECh] [bp-9Ch]@1
SEL v33; // [sp+F0h] [bp-98h]@1
struct NSTreeController *v34; // [sp+F4h] [bp-94h]@1
char v35; // [sp+F8h] [bp-90h]@21
char v36; // [sp+138h] [bp-50h]@11
int v37; // [sp+178h] [bp-10h]@1
v37 = *(_DWORD *)__stack_chk_guard_ptr;
v6 = *(_DWORD *)_NSTreeNodeObservingTrackerValueContext_ptr == (_DWORD)a6;
v33 = a2;
v7 = self;
v34 = self;
v32 = a3;
v31 = a4;
v30 = a5;
v29 = a6;
if ( v6 )
{
v8 = (struct NSTreeController *)objc_msgSend(a3, "substringFromIndex:", 18);
v9 = objc_msgSend(v31, "representedObject");
v27 = self;
v28 = objc_class_name_NSTreeController.super_class;
objc_msgSendSuper(&v27, "observeValueForKeyPath:ofObject:change:context:", v8, v9, v30, 0);
}
else
{
v8 = (struct NSTreeController *)&loc_367B05;
if ( *(void **)_NSTreeNodeObservingTrackerChildNodesContext_ptr[0] == a6 )
goto LABEL_6;
v19 = self;
v20 = *(_DWORD *)((char *)&loc_9303EB + 3570437);
v8 = (struct NSTreeController *)a5;
objc_msgSendSuper(&v19, *(const char **)((char *)&loc_8EDA67 + 3570437), a3, a4, a5, 0);
}
while ( *(_DWORD *)__stack_chk_guard_ptr != v37 )
{
LABEL_6:
v10 = v8;
if ( (unsigned __int8)objc_msgSend(*((void **)v7 + 13), *(const char **)&v8[66911].superclass_opaque[43], v7, 0) )
{
if ( **(_BYTE **)&v8->superclass_opaque[(_DWORD)((char *)&_NSLogObserverProcessingInformation_ptr - 3570437)] )
{
v8 = v34;
v7 = v31;
objc_msgSend(v31, *(const char **)&v10->superclass_opaque[(_DWORD)((char *)&paIndexpath[-892610] + 3)]);
NSLog((char *)v10 + (_DWORD)((char *)CFSTR("Controller %@ ignoring observer notification from treenode %@ at indexPath %@")
- 3570437));
}
}
else
{
if ( !a5 )
goto LABEL_20;
v11 = objc_msgSend(
a5,
*(const char **)&v8->superclass_opaque[(_DWORD)((char *)&paObjectforkey[-892610] + 3)],
**(_DWORD **)&v8->superclass_opaque[(_DWORD)((char *)&NSKeyValueChangeNotificationIsPriorKey_ptr - 3570437)]);
if ( (unsigned __int8)objc_msgSend(
v11,
*(const char **)&v8->superclass_opaque[(_DWORD)((char *)&paBoolvalue[-892610] + 3)]) == 1 )
{
v25 = 0LL;
v24 = 0LL;
v15 = objc_msgSend(
v31,
*(const char **)&v8->superclass_opaque[(_DWORD)((char *)&pa_privatechildn[-892610] + 3)]);
v17 = v8;
v7 = objc_msgSend(
v15,
*(const char **)&v8->superclass_opaque[(_DWORD)((char *)&paCountbyenumera[-892610] + 3)],
&v24,
&v36,
16);
if ( v7 )
{
v12 = *DWORD2(v24);
do
{
v8 = 0;
do
{
if ( *DWORD2(v24) != v12 )
objc_enumerationMutation(v15);
v26 = *(_DWORD *)(DWORD1(v24) + 4 * (_DWORD)v8);
objc_msgSend(v34->_treeStructureObservers, *(const char **)&v17[66950].superclass_opaque[15], v26);
v8 = (struct NSTreeController *)((char *)v8 + 1);
}
while ( v8 < v7 );
v7 = objc_msgSend(v15, *(const char **)&v17->superclass_opaque[(_DWORD)&loc_8ED6EF], &v24, &v36, 16);
}
while ( v7 );
}
}
else
{
v7 = v34;
LABEL_20:
*((_BYTE *)v7 + 117) |= 1u;
v8 = (struct NSTreeController *)v23;
objc_exception_try_enter(v23);
if ( _setjmp(v23) )
{
*(_DWORD *)&v34->_treeControllerFlags &= 0xFFFFFEFF;
v14 = objc_exception_extract(v23);
objc_exception_throw(v14);
-[NSTreeNode mutableChildNodes]((struct NSTreeNode *)self, a2);
return;
}
objc_msgSend(
v34,
*(const char **)&v10->superclass_opaque[(_DWORD)((char *)&pa_willchangeval[-892610] + 3)],
1,
0,
0);
v22 = 0LL;
v21 = 0LL;
v16 = objc_msgSend(
v31,
*(const char **)&v10->superclass_opaque[(_DWORD)((char *)&pa_privatechildn[-892610] + 3)]);
v18 = v10;
v7 = objc_msgSend(
v16,
*(const char **)&v10->superclass_opaque[(_DWORD)((char *)&paCountbyenumera[-892610] + 3)],
&v21,
&v35,
16);
if ( v7 )
{
v13 = *DWORD2(v21);
do
{
v8 = 0;
do
{
if ( *DWORD2(v21) != v13 )
objc_enumerationMutation(v16);
objc_msgSend(
v34->_treeStructureObservers,
*(const char **)&v18[66950].superclass_opaque[47],
*(_DWORD *)(DWORD1(v21) + 4 * (_DWORD)v8));
v8 = (struct NSTreeController *)((char *)v8 + 1);
}
while ( v8 < v7 );
v7 = objc_msgSend(v16, *(const char **)&v18->superclass_opaque[(_DWORD)&loc_8ED6EF], &v21, &v35, 16);
}
while ( v7 );
}
objc_msgSend(v34, *(const char **)&v18[67321].superclass_opaque[55], 1, 0, 0);
objc_exception_try_exit(v23);
*(_DWORD *)&v34->_treeControllerFlags &= 0xFFFFFEFF;
}
}
}
}
- (id)selectedObjects
//id __cdecl -[NSTreeController selectedObjects](struct NSTreeController *self, SEL a2)
{
struct NSTreeController *v2; // esi@1
void *v3; // edi@2
void *v4; // eax@3
void *v5; // esi@3
void *v6; // eax@4
void *v7; // eax@4
void *v8; // eax@7
int v9; // eax@8
void *v10; // eax@8
void *v12; // [sp+14h] [bp-14h]@3
void *v13; // [sp+18h] [bp-10h]@2
v2 = self;
if ( !self->_selectedObjects )
{
v13 = objc_msgSend(self, "selectionIndexPaths");
v3 = objc_msgSend(v13, "count");
if ( v3 )
{
v4 = objc_msgSend("NSMutableArray", "alloc");
v12 = objc_msgSend(v4, "initWithCapacity:", v3);
v5 = 0;
do
{
v6 = objc_msgSend(v13, "objectAtIndex:", v5);
v7 = objc_msgSend(self, "_multipleValuesObjectAtIndexPath:", v6);
if ( v7 )
objc_msgSend(v12, "addObject:", v7);
v5 = (char *)v5 + 1;
}
while ( v3 != v5 );
v8 = objc_msgSend(v12, "copy");
v2 = self;
objc_assign_ivar(v8, self, 120);
objc_msgSend(v12, "release");
}
else
{
v9 = _NSEmptyAndImmutableArray();
v10 = objc_msgSend((void *)v9, "retain");
objc_assign_ivar(v10, self, 120);
}
}
return (id)v2->_selectedObjects;
}
- (id)arrangedObjects
//id __cdecl -[NSTreeController arrangedObjects](struct NSTreeController *self, SEL a2)
{
id result; // eax@2
void *v3; // eax@3
void *v4; // eax@3
int v5; // eax@4
if ( objc_msgSend(self, "childrenKeyPath") )
{
result = self->_arrangedObjects;
if ( !result )
{
v3 = objc_msgSend("_NSControllerTreeProxy", "alloc");
v4 = objc_msgSend(v3, "initWithController:", self);
objc_assign_ivar(v4, self, 104);
result = self->_arrangedObjects;
}
}
else
{
v5 = (int)objc_msgSend(
"NSString",
"stringWithFormat:",
CFSTR("%@ Cannot perform operation because childrenKeyPath is nil"),
self);
_NSHandleBindingException(v5);
result = 0;
}
return result;
}
- (void)_setExplicitlyCannotAdd:(char) insert:(char) remove:(char)
//void __cdecl -[NSTreeController _setExplicitlyCannotAdd:insert:remove:](struct NSTreeController *self, SEL a2, char a3, char a4, char a5)
{
unsigned int v5; // eax@1
struct NSTreeController *v6; // [sp+20h] [bp-18h]@1
char *v7; // [sp+24h] [bp-14h]@1
v6 = self;
v7 = objc_class_name_NSTreeController.super_class;
objc_msgSendSuper(&v6, "_setExplicitlyCannotAdd:remove:", a3, a5);
v5 = (unsigned int)self->_treeControllerFlags;
if ( ((v5 >> 3) & 1) != a4 )
{
objc_msgSend(self, "willChangeValueForKey:", CFSTR("canInsert"));
objc_msgSend(self, "willChangeValueForKey:", CFSTR("canInsertChild"));
self->_treeControllerFlags = (struct __treeControllerFlags)(*(_DWORD *)&self->_treeControllerFlags & 0xFFFFFFE7 | 16 * (a4 & 1) | 8 * (a4 & 1));
objc_msgSend(self, "didChangeValueForKey:", CFSTR("canInsertChild"));
objc_msgSend(self, "didChangeValueForKey:", CFSTR("canInsert"));
v5 = (unsigned int)self->_treeControllerFlags;
}
if ( ((v5 >> 5) & 1) != a3 )
{
objc_msgSend(self, "willChangeValueForKey:", CFSTR("canAddChild"));
self->_treeControllerFlags = (struct __treeControllerFlags)(32 * a3 & 0x20 | *(_DWORD *)&self->_treeControllerFlags & 0xFFFFFFDF);
objc_msgSend(self, "didChangeValueForKey:", CFSTR("canAddChild"));
}
}
- (void)removeObserver:(id) forKeyPath:(id)
//void __cdecl -[NSTreeController removeObserver:forKeyPath:](struct NSTreeController *self, SEL a2, id a3, id a4)
{
struct NSTreeController *v4; // [sp+10h] [bp-18h]@1
char *v5; // [sp+14h] [bp-14h]@1
v4 = self;
v5 = objc_class_name_NSTreeController.super_class;
objc_msgSendSuper(&v4, "removeObserver:forKeyPath:", a3, a4, self, objc_class_name_NSTreeController.super_class);
objc_msgSend(self, "_commonRemoveObserverCleanupForKeyPath:", a4);
}
- (void)_commonRemoveObserverCleanupForKeyPath:(id)
//void __cdecl -[NSTreeController _commonRemoveObserverCleanupForKeyPath:](struct NSTreeController *self, SEL a2, id a3)
{
void *v3; // eax@4
if ( self->_rootNode )
objc_msgSend(self->_treeStructureObservers, "unregisterObservingForAnalyzableKeyPath:", a3);
if ( *(_BYTE *)&self->_treeControllerFlags & 0x80 )
{
v3 = objc_msgSend(self, "_modelAndProxyKeysObserved");
self->_treeControllerFlags = (struct __treeControllerFlags)((unsigned __int8)((unsigned __int8)objc_msgSend(
v3,
"containsObject:",
CFSTR("arrangedObjects")) << 7) | *(_DWORD *)&self->_treeControllerFlags & 0xFFFFFF7F);
}
}
- (id)_singleValueForKeyPath:(id)
//id __cdecl -[NSTreeController _singleValueForKeyPath:](struct NSTreeController *self, SEL a2, id a3)
{
void *v3; // esi@1
void *v4; // ebx@1
void *v5; // eax@4
void *v6; // eax@4
void *v7; // esi@4
void *v8; // eax@6
struct objc_object *v9; // eax@7
int *v10; // eax@9
void *v12; // [sp+18h] [bp-10h]@4
v3 = objc_msgSend(self, "selectionIndexPaths");
v4 = objc_msgSend(v3, "count");
if ( !v4 )
{
v10 = NSNoSelectionMarker_ptr[0];
return (id)*v10;
}
if ( (unsigned __int8)objc_msgSend(self, "alwaysUsesMultipleValuesMarker") && (unsigned int)v4 >= 2 )
{
LABEL_9:
v10 = NSMultipleValuesMarker_ptr[0];
return (id)*v10;
}
v5 = objc_msgSend(v3, "objectEnumerator");
v12 = v5;
v6 = objc_msgSend(v5, "nextObject");
v7 = objc_msgSend(self, "_multipleValueForKeyPath:atIndexPath:", a3, v6);
if ( v7 != (void *)*NSNotApplicableMarker_ptr && (unsigned int)v4 >= 2 )
{
while ( 1 )
{
v8 = objc_msgSend(v12, "nextObject");
if ( !v8 )
break;
v9 = (struct objc_object *)objc_msgSend(self, "_multipleValueForKeyPath:atIndexPath:", a3, v8);
if ( v9 == (struct objc_object *)*NSNotApplicableMarker_ptr )
return v9;
if ( !(unsigned __int8)_NSValuesAreEqual(v7, v9) )
goto LABEL_9;
}
}
return (id)v7;
}
- (void)awakeFromNib
//void __cdecl -[NSTreeController awakeFromNib](struct NSTreeController *self, SEL a2)
{
struct NSTreeController *v2; // [sp+8h] [bp-10h]@1
char *v3; // [sp+Ch] [bp-Ch]@1
v2 = self;
v3 = objc_class_name_NSTreeController.super_class;
objc_msgSendSuper(&v2, "awakeFromNib", self, objc_class_name_NSTreeController.super_class);
if ( !objc_msgSend(self, "childrenKeyPath", v2, v3) && !*_NSBinderInterfaceBuilderMode_ptr )
NSLog(CFSTR("Warning: %@ childrenKeyPath cannot be nil. To eliminate this log message, set the childrenKeyPath attribute in Interface Builder"));
}
- (id)_copySelectedObjectLineages
//id __cdecl -[NSTreeController _copySelectedObjectLineages](struct NSTreeController *self, SEL a2)
{
void *v2; // eax@1
int v3; // esi@3
void *v4; // esi@6
id v5; // edi@6
void *v6; // eax@6
void *v7; // esi@7
void *v8; // edi@8
void *v9; // eax@8
void *v10; // ST0C_4@8
id result; // eax@11
void *v12; // [sp+20h] [bp-98h]@1
int v13; // [sp+24h] [bp-94h]@2
void *v14; // [sp+28h] [bp-90h]@1
unsigned int v15; // [sp+2Ch] [bp-8Ch]@1
int v16; // [sp+30h] [bp-88h]@6
void *v17; // [sp+34h] [bp-84h]@6
void *v18; // [sp+38h] [bp-80h]@6
void *v19; // [sp+3Ch] [bp-7Ch]@6
__int128 v20; // [sp+40h] [bp-78h]@1
__int128 v21; // [sp+50h] [bp-68h]@1
char v22; // [sp+68h] [bp-50h]@1
int v23; // [sp+A8h] [bp-10h]@1
v23 = *(_DWORD *)__stack_chk_guard_ptr;
v12 = objc_msgSend(self, "selectedNodes");
v2 = objc_msgSend("NSMutableArray", "alloc");
v14 = objc_msgSend(v2, "init");
v21 = 0LL;
v20 = 0LL;
v15 = (unsigned int)objc_msgSend(v12, "countByEnumeratingWithState:objects:count:", &v20, &v22, 16);
if ( v15 )
{
v13 = *DWORD2(v20);
do
{
v3 = 0;
do
{
if ( *DWORD2(v20) != v13 )
objc_enumerationMutation(v12);
v16 = v3;
v4 = *(void **)(DWORD1(v20) + 4 * v3);
v5 = self->_rootNode;
v6 = objc_msgSend("NSMutableArray", "alloc");
v19 = objc_msgSend(v6, "init");
v18 = objc_msgSend(v4, "indexPath");
v17 = objc_msgSend(v18, "length");
if ( v17 )
{
v7 = 0;
do
{
v8 = objc_msgSend(v5, "childNodes");
v9 = objc_msgSend(v18, "indexAtPosition:", v7);
v5 = (id)objc_msgSend(v8, "objectAtIndex:", v9);
v10 = objc_msgSend(v5, "representedObject");
objc_msgSend(v19, "addObject:", v10);
v7 = (char *)v7 + 1;
}
while ( v17 != v7 );
}
objc_msgSend(v14, "addObject:", v19);
objc_msgSend(v19, "release");
v3 = v16 + 1;
}
while ( v16 + 1 < v15 );
v15 = (unsigned int)objc_msgSend(v12, "countByEnumeratingWithState:objects:count:", &v20, &v22, 16);
}
while ( v15 );
}
result = *(id *)__stack_chk_guard_ptr;
if ( *(_DWORD *)__stack_chk_guard_ptr == v23 )
result = (id)v14;
return result;
}
- (void)_dealloc
//void __cdecl -[NSTreeController _dealloc](struct NSTreeController *self, SEL a2)
{
struct NSTreeController *v2; // [sp+18h] [bp-10h]@1
char *v3; // [sp+1Ch] [bp-Ch]@1
objc_msgSend(self->_treeStructureObservers, "release");
objc_assign_ivar(0, self, 100);
objc_msgSend(self->_rootNode, "_tearDownObserving");
objc_msgSend(self->_rootNode, "release");
objc_assign_ivar(0, self, 108);
objc_msgSend((void *)self->_sortDescriptors, "release");
objc_assign_ivar(0, self, 136);
objc_msgSend(self->_childrenKeyPath, "release");
objc_msgSend(self->_countKeyPath, "release");
objc_msgSend(self->_leafKeyPath, "release");
objc_assign_ivar(0, self, 132);
objc_assign_ivar(0, self, 128);
objc_assign_ivar(0, self, 124);
objc_msgSend(self->_arrangedObjects, "release");
objc_assign_ivar(0, self, 104);
objc_msgSend(self->_selectionIndexPaths, "release");
objc_assign_ivar(0, self, 112);
objc_msgSend((void *)self->_selectedObjects, "release");
objc_assign_ivar(0, self, 120);
objc_msgSend((void *)self->_modelObservingKeyPaths, "release");
objc_assign_ivar(0, self, 96);
v2 = self;
v3 = objc_class_name_NSTreeController.super_class;
objc_msgSendSuper(&v2, "_dealloc");
}
- (void)encodeWithCoder:(id)
//void __cdecl -[NSTreeController encodeWithCoder:](struct NSTreeController *self, SEL a2, id a3)
{
unsigned __int8 v3; // bh@1
unsigned __int8 v4; // bl@2
char v5; // dl@2
char v6; // bh@4
unsigned __int8 v7; // dl@4
int v8; // ST0C_4@5
unsigned __int8 v9; // bl@5
unsigned __int8 v10; // bh@6
struct NSArray *v11; // eax@10
void *v12; // eax@12
void *v13; // eax@14
void *v14; // eax@16
struct NSTreeController *v15; // [sp+20h] [bp-18h]@1
char *v16; // [sp+24h] [bp-14h]@1
v15 = self;
v16 = objc_class_name_NSTreeController.super_class;
objc_msgSendSuper(&v15, "encodeWithCoder:", a3);
v3 = (unsigned __int8)self->_treeControllerFlags;
if ( (unsigned __int8)objc_msgSend(a3, "allowsKeyedCoding") )
{
v4 = (v3 >> 1) & 1;
v5 = v3 >> 2;
if ( v3 & 1 )
{
objc_msgSend(a3, "encodeBool:forKey:", v3 & 1, CFSTR("NSAvoidsEmptySelection"));
v5 = v3 >> 2;
}
v6 = v3 >> 6;
v7 = v5 & 1;
if ( v4 )
{
v8 = v4;
v9 = v7;
objc_msgSend(a3, "encodeBool:forKey:", v8, CFSTR("NSPreservesSelection"));
v7 = v9;
}
v10 = v6 & 1;
if ( v7 )
objc_msgSend(a3, "encodeBool:forKey:", v7, CFSTR("NSSelectsInsertedObjects"));
if ( v10 )
objc_msgSend(a3, "encodeBool:forKey:", v10, CFSTR("NSAlwaysUsesMultipleValuesMarker"));
v11 = self->_sortDescriptors;
if ( v11 )
objc_msgSend(a3, "encodeObject:forKey:", v11, CFSTR("NSSortDescriptors"));
v12 = objc_msgSend(self, "childrenKeyPath");
if ( v12 )
objc_msgSend(a3, "encodeObject:forKey:", v12, CFSTR("NSTreeContentChildrenKey"));
v13 = objc_msgSend(self, "leafKeyPath");
if ( v13 )
objc_msgSend(a3, "encodeObject:forKey:", v13, CFSTR("NSTreeContentLeafKey"));
v14 = objc_msgSend(self, "countKeyPath");
if ( v14 )
objc_msgSend(a3, "encodeObject:forKey:", v14, CFSTR("NSTreeContentCountKey"));
}
}
- (id)_controllerKeys
//id __cdecl -[NSTreeController _controllerKeys](struct NSTreeController *self, SEL a2)
{
id result; // eax@1
void *v3; // eax@2
void *v4; // eax@2
result = (id)-[NSTreeController _controllerKeys]._controllerKeys;
if ( !-[NSTreeController _controllerKeys]._controllerKeys )
{
v3 = objc_msgSend("NSArray", "alloc");
v4 = objc_msgSend(
v3,
"initWithObjects:",
CFSTR("arrangedObjects"),
CFSTR("selection"),
CFSTR("selectionIndexPaths"),
CFSTR("selectionIndexPath"),
CFSTR("selectedObjects"),
CFSTR("selectedNodes"),
CFSTR("sortDescriptors"),
CFSTR("isEditable"),
CFSTR("canAdd"),
CFSTR("canAddChild"),
CFSTR("canInsert"),
CFSTR("canInsertChild"),
CFSTR("canRemove"),
0);
objc_assign_global(v4, &-[NSTreeController _controllerKeys]._controllerKeys);
result = (id)-[NSTreeController _controllerKeys]._controllerKeys;
}
return result;
}
+ (id)_keyValueBindingAccessPoints
//id __cdecl +[NSTreeController _keyValueBindingAccessPoints](struct NSTreeController_meta *self, SEL a2)
{
id result; // eax@1
void *v3; // eax@2
void *v4; // eax@2
result = (id)+[NSTreeController _keyValueBindingAccessPoints]._accessPoints;
if ( !+[NSTreeController _keyValueBindingAccessPoints]._accessPoints )
{
v3 = objc_msgSend("NSArray", "alloc");
v4 = objc_msgSend(v3, "initWithObjects:", CFSTR("arrangedObjects"), CFSTR("selection"), 0);
objc_assign_global(v4, &+[NSTreeController _keyValueBindingAccessPoints]._accessPoints);
result = (id)+[NSTreeController _keyValueBindingAccessPoints]._accessPoints;
}
return result;
}
- (void)removeObserver:(id) forKeyPath:(id) context:(void *)
//void __cdecl -[NSTreeController removeObserver:forKeyPath:context:](struct NSTreeController *self, SEL a2, id a3, id a4, void *a5)
{
struct NSTreeController *v5; // [sp+20h] [bp-18h]@1
char *v6; // [sp+24h] [bp-14h]@1
v5 = self;
v6 = objc_class_name_NSTreeController.super_class;
objc_msgSendSuper(&v5, "removeObserver:forKeyPath:context:", a3, a4, a5);
objc_msgSend(self, "_commonRemoveObserverCleanupForKeyPath:", a4);
}
- (void)_changeEditable:(char)
//void __cdecl -[NSTreeController _changeEditable:](struct NSTreeController *self, SEL a2, char a3)
{
int v3; // ST10_4@1
struct NSTreeController *v4; // [sp+10h] [bp-18h]@1
char *v5; // [sp+14h] [bp-14h]@1
objc_msgSend(self, "willChangeValueForKey:", CFSTR("canInsert"), CFSTR("canInsert"));
objc_msgSend(self, "willChangeValueForKey:", CFSTR("canInsertChild"));
objc_msgSend(self, "willChangeValueForKey:", CFSTR("canAddChild"));
v4 = self;
v5 = objc_class_name_NSTreeController.super_class;
objc_msgSendSuper(&v4, "_changeEditable:", a3);
objc_msgSend(self, "didChangeValueForKey:", CFSTR("canAddChild"));
objc_msgSend(self, "didChangeValueForKey:", CFSTR("canInsertChild"));
objc_msgSend(self, "didChangeValueForKey:", v3);
}
- (void)setAvoidsEmptySelection:(char)
//void __cdecl -[NSTreeController setAvoidsEmptySelection:](struct NSTreeController *self, SEL a2, char a3)
{
if ( (*(_DWORD *)&self->_treeControllerFlags & 1) != a3 )
{
objc_msgSend(self, "willChangeValueForKey:", CFSTR("avoidsEmptySelection"));
self->_treeControllerFlags = (struct __treeControllerFlags)(a3 & 1 | *(_DWORD *)&self->_treeControllerFlags & 0xFFFFFFFE);
objc_msgSend(self, "didChangeValueForKey:", CFSTR("avoidsEmptySelection"));
}
}
- (void)setAlwaysUsesMultipleValuesMarker:(char)
//void __cdecl -[NSTreeController setAlwaysUsesMultipleValuesMarker:](struct NSTreeController *self, SEL a2, char a3)
{
if ( ((*(unsigned int *)&self->_treeControllerFlags >> 6) & 1) != a3 )
{
objc_msgSend(self, "willChangeValueForKey:", CFSTR("alwaysUsesMultipleValuesMarker"));
self->_treeControllerFlags = (struct __treeControllerFlags)((a3 << 6) & 0x40 | *(_DWORD *)&self->_treeControllerFlags & 0xFFFFFFBF);
objc_msgSend(self, "didChangeValueForKey:", CFSTR("alwaysUsesMultipleValuesMarker"));
}
}
- (void)setPreservesSelection:(char)
//void __cdecl -[NSTreeController setPreservesSelection:](struct NSTreeController *self, SEL a2, char a3)
{
if ( ((*(unsigned int *)&self->_treeControllerFlags >> 1) & 1) != a3 )
{
objc_msgSend(self, "willChangeValueForKey:", CFSTR("preservesSelection"));
self->_treeControllerFlags = (struct __treeControllerFlags)(2 * a3 & 2 | *(_DWORD *)&self->_treeControllerFlags & 0xFFFFFFFD);
objc_msgSend(self, "didChangeValueForKey:", CFSTR("preservesSelection"));
}
}
- (void)setSelectsInsertedObjects:(char)
//void __cdecl -[NSTreeController setSelectsInsertedObjects:](struct NSTreeController *self, SEL a2, char a3)
{
if ( ((*(unsigned int *)&self->_treeControllerFlags >> 2) & 1) != a3 )
{
objc_msgSend(self, "willChangeValueForKey:", CFSTR("selectsInsertedObjects"));
self->_treeControllerFlags = (struct __treeControllerFlags)(4 * a3 & 4 | *(_DWORD *)&self->_treeControllerFlags & 0xFFFFFFFB);
objc_msgSend(self, "didChangeValueForKey:", CFSTR("selectsInsertedObjects"));
}
}
- (void)setSortDescriptors:(id)
//void __cdecl -[NSTreeController setSortDescriptors:](struct NSTreeController *self, SEL a2, id a3)
{
void *v3; // eax@3
void *v4; // eax@4
void *v5; // esi@10
void *v6; // eax@12
int v7; // eax@14
jmp_buf v8; // [sp+18h] [bp-80h]@7
void *v9; // [sp+74h] [bp-24h]@5
void *v10; // [sp+78h] [bp-20h]@4
void *v11; // [sp+7Ch] [bp-1Ch]@4
id v12; // [sp+80h] [bp-18h]@1
SEL v13; // [sp+84h] [bp-14h]@1
struct NSTreeController *v14; // [sp+88h] [bp-10h]@1
v14 = self;
v13 = a2;
v12 = a3;
if ( (id)self->_sortDescriptors != a3 && !(unsigned __int8)objc_msgSend(a3, "isEqualToArray:", self->_sortDescriptors) )
{
objc_msgSend(self, "discardEditing");
objc_msgSend(self, "willChangeValueForKey:", CFSTR("sortDescriptors"));
objc_msgSend((void *)self->_sortDescriptors, "release");
v3 = objc_msgSend(a3, "copy");
objc_assign_ivar(v3, self, 136);
if ( self->_rootNode )
{
v4 = objc_msgSend(self, "selectionIndexPaths");
v11 = v4;
v10 = 0;
if ( v4 )
{
v9 = objc_msgSend(v4, "count");
if ( v9 )
v10 = objc_msgSend(v14, "selectedNodes");
}
objc_msgSend(v14, "_willChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 1, 0, 0);
*((_BYTE *)&v14->_treeControllerFlags + 1) |= 1u;
objc_exception_try_enter(v8);
if ( _setjmp(v8) )
{
*(_DWORD *)&v14->_treeControllerFlags &= 0xFFFFFEFF;
v7 = objc_exception_extract(v8);
objc_exception_throw(v7);
-[NSTreeController _setContentInBackground:](self, a2, a3);
return;
}
objc_msgSend(v14->_rootNode, "sortWithSortDescriptors:recursively:", v14->_sortDescriptors, 1);
objc_exception_try_exit(v8);
*(_DWORD *)&v14->_treeControllerFlags &= 0xFFFFFEFF;
objc_msgSend(v14, "_didChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 1, 0, 0);
if ( v10 )
{
v9 = objc_msgSend(v10, "count");
if ( v9 )
{
v5 = objc_msgSend(v10, "valueForKey:", CFSTR("indexPath"));
if ( !(unsigned __int8)objc_msgSend(v5, "isEqualToArray:", v11) )
objc_msgSend(
v14,
"_selectObjectsAtIndexPathsNoCopy:avoidsEmptySelection:sendObserverNotifications:",
v5,
0,
1);
}
}
}
objc_msgSend(v14, "didChangeValueForKey:", CFSTR("sortDescriptors"));
v6 = objc_msgSend(v14, "_bindingAdaptor");
objc_msgSend(v6, "controller:didChangeToSortDescriptors:", v14, v14->_sortDescriptors);
}
}
- (void)_setContentInBackground:(id)
//void __cdecl -[NSTreeController _setContentInBackground:](struct NSTreeController *self, SEL a2, id a3)
{
void *v3; // eax@1
void *v4; // eax@4
void *v5; // eax@3
objc_msgSend(self, "willChangeValueForKey:", CFSTR("content"));
v3 = *(void **)&self->superclass_opaque[84];
if ( v3 != a3 )
{
objc_msgSend(v3, "autorelease");
if ( a3 )
{
v5 = objc_msgSend(a3, "retain");
}
else
{
v4 = objc_msgSend("NSMutableArray", "alloc");
v5 = objc_msgSend(v4, "init");
}
objc_assign_ivar(v5, self, 84);
}
objc_msgSend(self, "_markHasLoadedData:", 1);
objc_msgSend(self, "_prepareControllerTree");
objc_msgSend(self, "didChangeValueForKey:", CFSTR("content"));
}
- (char)validateUserInterfaceItem:(id)
//char __cdecl -[NSTreeController validateUserInterfaceItem:](struct NSTreeController *self, SEL a2, id a3)
{
char *v3; // eax@1
const char *v5; // eax@5
struct NSTreeController *v6; // [sp+10h] [bp-18h]@4
char *v7; // [sp+14h] [bp-14h]@4
v3 = (char *)objc_msgSend(a3, "action");
if ( v3 == "insert:" )
{
v5 = "canInsert";
}
else if ( v3 == "insertChild:" )
{
v5 = "canInsertChild";
}
else
{
if ( v3 != "addChild:" )
{
v6 = self;
v7 = objc_class_name_NSTreeController.super_class;
return (unsigned int)objc_msgSendSuper(&v6, "validateUserInterfaceItem:", a3);
}
v5 = "canAddChild";
}
return (unsigned int)objc_msgSend(self, v5);
}
- (id)newObject
//id __cdecl -[NSTreeController newObject](struct NSTreeController *self, SEL a2)
{
void *v2; // eax@2
void *v3; // edi@2
void *v4; // esi@2
void *v5; // eax@3
void *v6; // eax@4
id result; // eax@6
struct NSTreeController *v8; // [sp+10h] [bp-18h]@7
char *v9; // [sp+14h] [bp-14h]@7
if ( (unsigned __int8)objc_msgSend(self, "_isManagedController") )
{
v2 = objc_msgSend(self, "_insertionIndexPathAppendChildIndex:", 0);
v3 = objc_msgSend(self, "_multipleValuesObjectAtIndexPath:", v2);
v4 = objc_msgSend(self, "_managedProxy");
if ( v3 && (v5 = objc_msgSend("NSManagedObject", "self"), (unsigned __int8)objc_msgSend(v3, "isKindOfClass:", v5)) )
v6 = objc_msgSend(v3, "entity");
else
v6 = objc_msgSend(v4, "_entity");
result = (id)objc_msgSend(v4, "newInsertedObjectForEntity:", v6);
}
else
{
v8 = self;
v9 = objc_class_name_NSTreeController.super_class;
result = (id)objc_msgSendSuper(&v8, "newObject");
}
return result;
}
- (id)newChildObject
//id __cdecl -[NSTreeController newChildObject](struct NSTreeController *self, SEL a2)
{
void *v2; // esi@2
void *v3; // eax@2
void *v4; // esi@2
void *v5; // edi@3
void *v6; // eax@4
void *v7; // edi@5
void *v8; // eax@5
void *v9; // esi@5
void *v10; // esi@6
void *v11; // edi@7
void *v12; // eax@7
void *v13; // eax@7
void *v14; // esi@8
void *v16; // [sp+14h] [bp-24h]@3
void *v17; // [sp+18h] [bp-20h]@6
void *v18; // [sp+1Ch] [bp-1Ch]@5
struct NSTreeController *v19; // [sp+20h] [bp-18h]@10
char *v20; // [sp+24h] [bp-14h]@10
if ( !(unsigned __int8)objc_msgSend(self, "_isManagedController") )
{
v19 = self;
v20 = objc_class_name_NSTreeController.super_class;
return (id)objc_msgSendSuper(&v19, "newObject");
}
v2 = objc_msgSend(self, "_rootNode");
v3 = objc_msgSend(self, "_insertionIndexPathAppendChildIndex:", 0);
v4 = objc_msgSend(v2, "descendantNodeAtIndexPath:", v3);
if ( v4 )
{
v5 = objc_msgSend(v4, "representedObject");
v16 = objc_msgSend(self, "_managedProxy");
if ( v5 && (v6 = objc_msgSend("NSManagedObject", "self"), (unsigned __int8)objc_msgSend(v5, "isKindOfClass:", v6)) )
{
v7 = objc_msgSend(v5, "entity");
v8 = objc_msgSend(v4, "childrenKeyPath");
v9 = objc_msgSend(v8, "componentsSeparatedByString:", CFSTR("."));
v18 = objc_msgSend(v9, "count");
if ( (signed int)v18 > 0 )
{
v17 = v9;
v10 = 0;
do
{
v11 = objc_msgSend(v7, "relationshipsByName");
v12 = objc_msgSend(v17, "objectAtIndex:", v10);
v13 = objc_msgSend(v11, "objectForKey:", v12);
v7 = objc_msgSend(v13, "destinationEntity");
v10 = (char *)v10 + 1;
}
while ( v18 != v10 );
}
v14 = v16;
if ( v7 )
return (id)objc_msgSend(v14, "newInsertedObjectForEntity:", v7);
}
else
{
v14 = v16;
}
}
else
{
v14 = objc_msgSend(self, "_managedProxy");
}
v7 = objc_msgSend(v14, "_entity");
return (id)objc_msgSend(v14, "newInsertedObjectForEntity:", v7);
}
- (void)_executeAdd:(id) didCommitSuccessfully:(char) actionSender:(id)
//void __cdecl -[NSTreeController _executeAdd:didCommitSuccessfully:actionSender:](struct NSTreeController *self, SEL a2, id a3, char a4, id a5)
{
void *v5; // esi@3
int v6; // esi@5
int v7; // eax@7
void *v8; // eax@9
int v9; // eax@14
jmp_buf v10; // [sp+18h] [bp-80h]@4
void *v11; // [sp+70h] [bp-28h]@1
void *v12; // [sp+74h] [bp-24h]@3
id v13; // [sp+78h] [bp-20h]@1
char v14; // [sp+7Fh] [bp-19h]@1
id v15; // [sp+80h] [bp-18h]@1
SEL v16; // [sp+84h] [bp-14h]@1
struct NSTreeController *v17; // [sp+88h] [bp-10h]@1
v17 = self;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5;
v11 = 0;
if ( (unsigned __int8)objc_msgSend(self, "canAdd") && a4 )
{
v5 = objc_msgSend(self, "newObject");
v12 = v5;
if ( v5 )
{
objc_exception_try_enter(v10);
if ( _setjmp(v10) )
{
v6 = objc_exception_extract(v10);
if ( !objc_exception_match("NSException", v6) )
{
v9 = objc_exception_extract(v10);
objc_exception_throw(v9);
-[NSTreeController add:](self, a2, a3);
return;
}
v11 = (void *)v6;
}
else
{
objc_msgSend(self, "addObject:", v5);
objc_exception_try_exit(v10);
}
v8 = *(void **)&v17->superclass_opaque[88];
if ( v8 )
objc_msgSend(v8, "_useErrorPresenter:", 0);
objc_msgSend(v12, "release");
if ( v11 )
objc_msgSend(v11, "raise");
}
else
{
v7 = (int)objc_msgSend("NSString", "stringWithFormat:", CFSTR("%@ Failed to create new object"), self);
_NSHandleBindingException(v7);
}
}
}
- (void)_executeAddChild:(id) didCommitSuccessfully:(char) actionSender:(id)
//void __cdecl -[NSTreeController _executeAddChild:didCommitSuccessfully:actionSender:](struct NSTreeController *self, SEL a2, id a3, char a4, id a5)
{
void *v5; // eax@4
int v6; // esi@7
int v7; // eax@9
void *v8; // eax@11
int v9; // eax@16
jmp_buf v10; // [sp+18h] [bp-80h]@6
void *v11; // [sp+70h] [bp-28h]@1
void *v12; // [sp+74h] [bp-24h]@3
id v13; // [sp+78h] [bp-20h]@1
char v14; // [sp+7Fh] [bp-19h]@1
id v15; // [sp+80h] [bp-18h]@1
SEL v16; // [sp+84h] [bp-14h]@1
struct NSTreeController *v17; // [sp+88h] [bp-10h]@1
v17 = self;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5;
v11 = 0;
if ( (unsigned __int8)objc_msgSend(self, "canAddChild") && a4 )
{
v12 = objc_msgSend(self, "newChildObject");
if ( v12 )
{
v5 = *(void **)&self->superclass_opaque[88];
if ( v5 )
objc_msgSend(v5, "_useErrorPresenter:", a5);
objc_exception_try_enter(v10);
if ( _setjmp(v10) )
{
v6 = objc_exception_extract(v10);
if ( !objc_exception_match("NSException", v6) )
{
v9 = objc_exception_extract(v10);
objc_exception_throw(v9);
-[NSTreeController addChild:](self, a2, a3);
return;
}
v11 = (void *)v6;
}
else
{
objc_msgSend(v17, "addChildObject:", v12);
objc_exception_try_exit(v10);
}
v8 = *(void **)&v17->superclass_opaque[88];
if ( v8 )
objc_msgSend(v8, "_useErrorPresenter:", 0);
objc_msgSend(v12, "release");
if ( v11 )
objc_msgSend(v11, "raise");
}
else
{
v7 = (int)objc_msgSend("NSString", "stringWithFormat:", CFSTR("%@ Failed to create new object"), self);
_NSHandleBindingException(v7);
}
}
}
- (void)_insertChildOrSibling:(char)
//void __cdecl -[NSTreeController _insertChildOrSibling:](struct NSTreeController *self, SEL a2, char a3)
{
const char *v3; // eax@2
void *v4; // esi@4
void *v5; // eax@5
int v6; // eax@6
if ( a3 )
v3 = "newChildObject";
else
v3 = "newObject";
v4 = objc_msgSend(self, v3);
if ( v4 )
{
v5 = objc_msgSend(self, "_insertionIndexPathAppendChildIndex:", a3);
objc_msgSend(self, "insertObject:atArrangedObjectIndexPath:", v4, v5);
objc_msgSend(v4, "release");
}
else
{
v6 = (int)objc_msgSend(
"NSString",
"stringWithFormat:",
CFSTR("%@ Cannot perform operation because childrenKeyPath is nil"),
self);
_NSHandleBindingException(v6);
}
}
- (void)_executeInsert:(id) didCommitSuccessfully:(char) actionSender:(id)
//void __cdecl -[NSTreeController _executeInsert:didCommitSuccessfully:actionSender:](struct NSTreeController *self, SEL a2, id a3, char a4, id a5)
{
void *v5; // eax@3
int v6; // esi@6
void *v7; // eax@9
int v8; // eax@14
jmp_buf v9; // [sp+18h] [bp-80h]@5
void *v10; // [sp+74h] [bp-24h]@1
id v11; // [sp+78h] [bp-20h]@1
char v12; // [sp+7Fh] [bp-19h]@1
id v13; // [sp+80h] [bp-18h]@1
SEL v14; // [sp+84h] [bp-14h]@1
struct NSTreeController *v15; // [sp+88h] [bp-10h]@1
v15 = self;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = 0;
if ( (unsigned __int8)objc_msgSend(self, "canInsert") && a4 )
{
v5 = *(void **)&self->superclass_opaque[88];
if ( v5 )
objc_msgSend(v5, "_useErrorPresenter:", a5);
objc_exception_try_enter(v9);
if ( _setjmp(v9) )
{
v6 = objc_exception_extract(v9);
if ( !objc_exception_match("NSException", v6) )
{
v8 = objc_exception_extract(v9);
objc_exception_throw(v8);
-[NSTreeController insert:](self, a2, a3);
return;
}
v10 = (void *)v6;
}
else
{
objc_msgSend(v15, *(const char **)((char *)&loc_48A98F + 8233553), 0);
objc_exception_try_exit(v9);
}
v7 = *(void **)&v15->superclass_opaque[88];
if ( v7 )
objc_msgSend(v7, "_useErrorPresenter:", 0);
if ( v10 )
objc_msgSend(v10, *(const char **)((char *)&loc_47B277 + 8233553));
}
}
- (void)_executeInsertChild:(id) didCommitSuccessfully:(char) actionSender:(id)
//void __cdecl -[NSTreeController _executeInsertChild:didCommitSuccessfully:actionSender:](struct NSTreeController *self, SEL a2, id a3, char a4, id a5)
{
void *v5; // eax@3
int v6; // esi@6
void *v7; // eax@9
int v8; // eax@14
jmp_buf v9; // [sp+18h] [bp-80h]@5
void *v10; // [sp+74h] [bp-24h]@1
id v11; // [sp+78h] [bp-20h]@1
char v12; // [sp+7Fh] [bp-19h]@1
id v13; // [sp+80h] [bp-18h]@1
SEL v14; // [sp+84h] [bp-14h]@1
struct NSTreeController *v15; // [sp+88h] [bp-10h]@1
v15 = self;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = 0;
if ( (unsigned __int8)objc_msgSend(self, "canInsertChild") && a4 )
{
v5 = *(void **)&self->superclass_opaque[88];
if ( v5 )
objc_msgSend(v5, "_useErrorPresenter:", a5);
objc_exception_try_enter(v9);
if ( _setjmp(v9) )
{
v6 = objc_exception_extract(v9);
if ( !objc_exception_match("NSException", v6) )
{
v8 = objc_exception_extract(v9);
objc_exception_throw(v8);
-[NSTreeController insertChild:](self, a2, a3);
return;
}
v10 = (void *)v6;
}
else
{
objc_msgSend(v15, *(const char **)((char *)&loc_48A7AA + 8234038), 1);
objc_exception_try_exit(v9);
}
v7 = *(void **)&v15->superclass_opaque[88];
if ( v7 )
objc_msgSend(v7, "_useErrorPresenter:", 0);
if ( v10 )
objc_msgSend(v10, "raise");
}
}
- (void)_insertObject:(id) atArrangedObjectIndexPath:(id) objectHandler:(id)
//void __cdecl -[NSTreeController _insertObject:atArrangedObjectIndexPath:objectHandler:](struct NSTreeController *self, SEL a2, id a3, id a4, id a5)
{
void *v5; // eax@4
id v6; // ST24_4@5
void *v7; // ST0C_4@5
id v8; // edi@5
void *v9; // ST24_4@7
void *v10; // ST20_4@7
void *v11; // eax@7
void *v12; // ST10_4@7
void *v13; // eax@10
const char *v14; // ecx@10
int v15; // eax@11
void *v16; // eax@14
id v17; // [sp+8h] [bp-30h]@4
id v18; // [sp+24h] [bp-14h]@4
int v19; // [sp+28h] [bp-10h]@2
if ( !objc_msgSend(self, "childrenKeyPath") )
{
v15 = (int)objc_msgSend(
"NSString",
"stringWithFormat:",
CFSTR("%@ Cannot perform operation because childrenKeyPath is nil"),
self);
_NSHandleBindingException(v15);
return;
}
objc_msgSend(self, "discardEditing");
objc_msgSend(self, "_willChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 1, 1, 1);
v19 = 0;
if ( a5 && objc_msgSend(a4, "length") == (size_t *)((char *)&dword_0 + 1) )
{
v18 = a4;
v5 = objc_msgSend(a4, "indexAtPosition:", 0);
objc_msgSend(a5, "insertObjectIntoMasterArrayRelationship:atIndex:selectionMode:", a3, v5, &v19);
}
else
{
v18 = a4;
v6 = self->_rootNode;
v7 = objc_msgSend(a4, "indexPathByRemovingLastIndex");
v8 = (id)objc_msgSend(v6, "descendantNodeAtIndexPath:", v7);
if ( !v8 )
v8 = self->_rootNode;
v9 = objc_msgSend(self, "createChildNodeForRepresentedObject:", a3);
objc_msgSend(*(void **)&self->superclass_opaque[52], "suppressAllNotifications");
v10 = objc_msgSend(v8, "mutableChildNodes");
v11 = objc_msgSend(a4, "length");
v12 = objc_msgSend(a4, "indexAtPosition:", (char *)v11 - 1);
objc_msgSend(v10, "insertObject:atIndex:", v9, v12);
objc_msgSend(*(void **)&self->superclass_opaque[52], "unsuppressAllNotifications");
objc_msgSend(v9, "release");
}
if ( v19 != 1 )
{
if ( v19 == 2 )
{
v13 = "NSMutableArray";
v14 = "array";
LABEL_14:
v16 = objc_msgSend(v13, v14, v17);
objc_msgSend(self, "_selectObjectsAtIndexPathsNoCopy:avoidsEmptySelection:sendObserverNotifications:", v16, 0, 0);
goto LABEL_15;
}
if ( (unsigned __int8)objc_msgSend(self, "selectsInsertedObjects") )
{
v13 = "NSMutableArray";
v14 = "arrayWithObject:";
v17 = v18;
goto LABEL_14;
}
}
LABEL_15:
objc_msgSend(self, "_didChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 1, 1, 1);
}
- (void)_removeObjectsAtArrangedObjectIndexPaths:(id) objectHandler:(id)
//void __cdecl -[NSTreeController _removeObjectsAtArrangedObjectIndexPaths:objectHandler:](struct NSTreeController *self, SEL a2, id a3, id a4)
{
signed int v4; // ebx@1
void *v5; // eax@1
id v6; // esi@2
char v7; // dl@2
void *v8; // eax@4
void *v9; // eax@5
void *v10; // edi@6
void *v11; // eax@7
void *v12; // eax@8
int v13; // edi@9
void *v14; // esi@10
void *v15; // eax@11
void *v16; // eax@11
void *v17; // esi@11
void *v18; // eax@17
void *v19; // eax@19
struct NSTreeController *v20; // esi@20
void *v21; // ST40_4@23
void *v22; // ST0C_4@23
int v23; // ST0C_4@23
struct NSTreeController *v24; // esi@29
signed int v25; // esi@30
char v26; // al@30
void *v27; // ecx@30
void *v28; // eax@31
void *v29; // edi@32
void *v30; // ebx@33
void *v31; // ST0C_4@33
signed int v32; // ecx@34
void *v33; // ecx@35
void *v34; // edi@36
int v35; // eax@37
void *v36; // eax@46
char v37; // al@47
void *v38; // eax@48
void *v39; // esi@48
void *v40; // eax@48
void *v41; // edi@48
void *v42; // esi@48
id v43; // eax@50
void *v44; // eax@51
void *v45; // eax@53
void *v46; // eax@53
bool v47; // cf@54
bool v48; // zf@54
int v49; // eax@54
signed int v50; // edi@56
void *v51; // eax@57
void *v52; // eax@63
struct NSTreeController *v53; // [sp+0h] [bp-58h]@36
const char *v54; // [sp+4h] [bp-54h]@36
signed int v55; // [sp+8h] [bp-50h]@2
void *v56; // [sp+8h] [bp-50h]@36
int v57; // [sp+Ch] [bp-4Ch]@36
void *v58; // [sp+1Ch] [bp-3Ch]@6
void *v59; // [sp+28h] [bp-30h]@7
void *v60; // [sp+2Ch] [bp-2Ch]@7
void *v61; // [sp+30h] [bp-28h]@6
void *v62; // [sp+34h] [bp-24h]@4
char v63; // [sp+3Bh] [bp-1Dh]@4
void *v64; // [sp+3Ch] [bp-1Ch]@11
id v65; // [sp+3Ch] [bp-1Ch]@20
void *v66; // [sp+40h] [bp-18h]@11
void *v67; // [sp+44h] [bp-14h]@2
void *v68; // [sp+44h] [bp-14h]@10
void *v69; // [sp+44h] [bp-14h]@31
int v70; // [sp+48h] [bp-10h]@2
v4 = 8235205;
v5 = objc_msgSend(self, "childrenKeyPath");
if ( !v5 )
{
v35 = (int)objc_msgSend(
"NSString",
"stringWithFormat:",
CFSTR("%@ Cannot perform operation because childrenKeyPath is nil"),
self);
_NSHandleBindingException(v35);
return;
}
v67 = v5;
v6 = a3;
objc_msgSend(self, "discardEditing");
objc_msgSend(self, "_willChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 1, 1, 1);
v70 = 0;
v7 = (unsigned int)objc_msgSend(self, "_isManagedController");
if ( a4 )
v7 = (unsigned int)objc_msgSend(a4, "deletesObjectsOnRemove");
v63 = v7;
v8 = 0;
v62 = 0;
if ( v7 )
{
v62 = objc_msgSend(self, "_managedProxy");
v9 = objc_msgSend("NSMutableArray", "alloc");
v8 = objc_msgSend(v9, "init");
}
v61 = v8;
v58 = objc_msgSend(self->_selectionIndexPaths, "mutableCopy");
v10 = objc_msgSend(a3, "count");
if ( v10 )
{
v11 = objc_msgSend(self->_rootNode, "representedObject");
v59 = 0;
v60 = objc_msgSend(v11, "valueForKeyPath:", v67);
if ( a4 )
{
v12 = objc_msgSend("NSMutableIndexSet", "alloc");
v59 = objc_msgSend(v12, "init");
}
v13 = (int)((char *)v10 - 1);
do
{
v14 = objc_msgSend(v6, "objectAtIndex:", v13);
v68 = objc_msgSend(v14, "length");
if ( v68 )
{
v66 = v14;
v15 = objc_msgSend(self->_rootNode, "descendantNodeAtIndexPath:", v14);
v64 = v15;
v16 = objc_msgSend(v15, "representedObject");
v17 = v16;
if ( v63 && v16 )
objc_msgSend(v61, "addObject:", v16);
if ( a4 && v68 == (size_t *)((char *)&dword_0 + 1) )
{
if ( v17 )
{
v18 = objc_msgSend(v60, "indexOfObjectIdenticalTo:", v17);
if ( v18 == (void *)0x7FFFFFFF )
{
v55 = 0x7FFFFFFF;
NSLog(CFSTR("unexpected state: object %@ at arranged object index %lu not in root content objects"));
}
else
{
objc_msgSend(v59, "addIndex:", v18);
}
}
else
{
NSLog(CFSTR("unexpected state: object at arranged object indexPath %@ was nil"));
}
}
else
{
v19 = objc_msgSend(v64, "parentNode");
if ( v19 )
{
v65 = (id)v19;
v20 = self;
}
else
{
v20 = self;
v65 = self->_rootNode;
}
objc_msgSend(*(void **)&v20->superclass_opaque[52], "suppressAllNotifications");
v21 = objc_msgSend(v65, "mutableChildNodes");
v22 = objc_msgSend(v66, "indexAtPosition:", (char *)v68 - 1);
objc_msgSend(v21, "removeObjectAtIndex:", v22);
objc_msgSend(*(void **)&v20->superclass_opaque[52], "unsuppressAllNotifications", v23);
}
}
--v13;
v6 = a3;
}
while ( v13 != -1 );
if ( a4 && v59 )
{
objc_msgSend(a4, "removeObjectsFromMasterArrayRelationshipAtIndexes:selectionMode:", v59, &v70);
objc_msgSend(v59, "release");
}
}
v24 = self;
if ( v63 )
{
v25 = 8235205;
v26 = (unsigned int)objc_msgSend(self, "_isManagedController", v55);
v27 = v61;
if ( v26 )
{
v28 = objc_msgSend(v61, "count");
v27 = v61;
v25 = 8235205;
v69 = v28;
if ( v28 )
{
v29 = 0;
do
{
v30 = v27;
v31 = objc_msgSend(v27, "objectAtIndex:", v29);
objc_msgSend(v62, "deleteObject:", v31);
v27 = v30;
v29 = (char *)v29 + 1;
}
while ( v69 != v29 );
}
}
objc_msgSend(v27, *(const char **)((char *)&loc_47A93B + v25));
v32 = v25;
v24 = self;
v4 = v32;
}
v33 = v58;
if ( v70 == 2 )
{
v34 = v58;
v56 = objc_msgSend((&paNsmutablearray[-2058801])[v4 - 1], (&paArray[-2058801])[v4 - 1], v55);
v54 = (&pa_selectobjec_1[-2058801])[v4 - 1];
v53 = v24;
v57 = 0;
LABEL_43:
objc_msgSend(v53, v54, v56, v57, 0);
v33 = v34;
goto LABEL_44;
}
if ( v70 == 1 )
{
v54 = (&pa_selectobjec_1[-2058801])[v4 - 1];
v53 = v24;
v57 = 0;
v56 = 0;
v34 = v58;
goto LABEL_43;
}
if ( v58 )
{
v34 = v58;
objc_msgSend(v58, (&paRemoveobjectsi[-2058801])[v4 - 1], a3);
if ( !objc_msgSend(v58, (&paCount[-2058801])[v4 - 1]) )
{
v24 = self;
v36 = objc_msgSend(self->_rootNode, (&paChildnodes[-2058801])[v4 - 1]);
if ( objc_msgSend(v36, (&paCount[-2058801])[v4 - 1]) )
{
v37 = (unsigned int)objc_msgSend(self, (&paAvoidsemptysel[-2058801])[v4 - 1]);
v33 = v58;
if ( v37 )
{
v38 = objc_msgSend(a3, (&paObjectatindex[-2058801])[v4 - 1], 0);
v39 = v38;
v40 = objc_msgSend(v38, (&paLength[-2058801])[v4 - 1]);
v41 = objc_msgSend(v39, (&paIndexatpositio[-2058801])[v4 - 1], (char *)v40 - 1);
v42 = objc_msgSend(v39, (&paIndexpathbyrem[-2058801])[v4 - 1]);
if ( v42 && objc_msgSend(v42, (&paLength[-2058801])[v4 - 1]) )
v43 = (id)objc_msgSend(self->_rootNode, (&paDescendantnode[-2058801])[v4 - 1], v42);
else
v43 = self->_rootNode;
v45 = objc_msgSend(v43, (&paChildnodes[-2058801])[v4 - 1]);
v46 = objc_msgSend(v45, (&paCount[-2058801])[v4 - 1]);
if ( v46 )
{
v47 = v46 < v41;
v48 = v46 == v41;
v49 = (int)((char *)v46 - 1);
if ( !v47 && !v48 )
v49 = (int)v41;
v50 = v4;
if ( v42 )
v51 = objc_msgSend(v42, *(const char **)(v4 + 4705719), v49);
else
v51 = objc_msgSend(*(void **)((char *)&loc_4905AB + v4), *(const char **)(v4 + 4760343), v49);
v42 = v51;
}
else if ( v41 )
{
v50 = v4;
NSLog(v4 + 4553955);
}
else
{
v50 = v4;
}
v52 = objc_msgSend(*(void **)((char *)&loc_4902DB + v50), *(const char **)(v50 + 4697027), v42);
v24 = self;
objc_msgSend(self, *(const char **)(v50 + 4760223), v52, 1, 0);
v4 = v50;
v33 = v58;
}
}
else
{
v44 = objc_msgSend((&paNsmutablearray[-2058801])[v4 - 1], (&paArray[-2058801])[v4 - 1]);
objc_msgSend(self, (&pa_selectobjec_1[-2058801])[v4 - 1], v44, 0, 0);
v33 = v58;
}
goto LABEL_44;
}
v24 = self;
v57 = (char)objc_msgSend(self, (&paAvoidsemptysel[-2058801])[v4 - 1]);
v56 = v58;
v54 = (&pa_selectobjec_1[-2058801])[v4 - 1];
v53 = self;
goto LABEL_43;
}
LABEL_44:
objc_msgSend(v33, (&paRelease[-2058801])[v4 - 1], v55);
objc_msgSend(v24, (&pa_didchangevalu[-2058801])[v4 - 1], 1, 1, 1);
}
- (void)remove:(id)
//void __cdecl -[NSTreeController remove:](struct NSTreeController *self, SEL a2, id a3)
{
void *v3; // esi@2
void *v4; // eax@3
int v5; // esi@6
void *v6; // eax@9
int v7; // eax@14
jmp_buf v8; // [sp+18h] [bp-80h]@5
void *v9; // [sp+74h] [bp-24h]@1
void *v10; // [sp+78h] [bp-20h]@2
void *v11; // [sp+7Ch] [bp-1Ch]@2
id v12; // [sp+80h] [bp-18h]@1
SEL v13; // [sp+84h] [bp-14h]@1
struct NSTreeController *v14; // [sp+88h] [bp-10h]@1
v14 = self;
v13 = a2;
v12 = a3;
v9 = 0;
if ( (unsigned __int8)objc_msgSend(self, "canRemove") )
{
v3 = objc_msgSend(self, "selectionIndexPaths");
v10 = v3;
v11 = objc_msgSend(v3, "count");
if ( v11 )
{
v10 = objc_msgSend(v3, "copy");
v4 = *(void **)&self->superclass_opaque[88];
if ( v4 )
objc_msgSend(v4, "_useErrorPresenter:", a3);
objc_exception_try_enter(v8);
if ( _setjmp(v8) )
{
v5 = objc_exception_extract(v8);
if ( !objc_exception_match("NSException", v5) )
{
v7 = objc_exception_extract(v8);
objc_exception_throw(v7);
-[NSTreeController removeObject:](self, a2, a3);
return;
}
v9 = (void *)v5;
}
else
{
objc_msgSend(v14, "removeObjectsAtArrangedObjectIndexPaths:", v10);
objc_exception_try_exit(v8);
}
v6 = *(void **)&v14->superclass_opaque[88];
if ( v6 )
objc_msgSend(v6, "_useErrorPresenter:", 0);
objc_msgSend(v10, "release");
if ( v9 )
objc_msgSend(v9, "raise");
}
}
}
- (void)removeObject:(id)
//void __cdecl -[NSTreeController removeObject:](struct NSTreeController *self, SEL a2, id a3)
{
int v3; // ebx@1
void *v4; // eax@1
int v5; // eax@1
v3 = *(_DWORD *)NSInvalidArgumentException_ptr;
v4 = objc_msgSend(self, "class");
v5 = NSStringFromClass(v4);
objc_msgSend("NSException", "raise:format:", v3, CFSTR("%@ does not implement removeObject:"), v5);
}
- (void)moveNode:(id) toIndexPath:(id)
//void __cdecl -[NSTreeController moveNode:toIndexPath:](struct NSTreeController *self, SEL a2, id a3, id a4)
{
void *v4; // eax@1
id v5; // esi@1
void *v6; // eax@2
char *v7; // ST0C_4@6
void *v8; // eax@6
void *v9; // edi@8
void *v10; // esi@9
void *v11; // eax@10
void *v12; // ST2C_4@12
void *v13; // esi@14
int v14; // [sp+8h] [bp-30h]@1
void *v15; // [sp+1Ch] [bp-1Ch]@5
void *v16; // [sp+20h] [bp-18h]@5
void *v17; // [sp+24h] [bp-14h]@1
void *v18; // [sp+28h] [bp-10h]@1
objc_msgSend(self, "_willChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 1, 0, 1);
objc_msgSend(*(void **)&self->superclass_opaque[52], "suppressAllNotifications");
v17 = objc_msgSend(self, "selectedNodes");
v18 = objc_msgSend(a3, "parentNode");
v4 = objc_msgSend(a4, "length");
v5 = self->_rootNode;
if ( (unsigned int)v4 > 1 )
{
v6 = objc_msgSend(a4, "indexPathByRemovingLastIndex");
v5 = (id)objc_msgSend(v5, "descendantNodeAtIndexPath:", v6);
}
if ( v18 && v5 )
{
v15 = objc_msgSend(a3, "retain");
v16 = objc_msgSend(v5, "mutableChildNodes");
if ( objc_msgSend(a4, "length") )
{
v7 = (char *)objc_msgSend(a4, "length") - 1;
v8 = objc_msgSend(a4, "indexAtPosition:", v7);
}
else
{
v8 = objc_msgSend(v16, "count", v14);
}
v9 = v8;
if ( v18 == v5 )
{
v10 = v15;
v11 = objc_msgSend(v16, "indexOfObjectIdenticalTo:", v15);
if ( v11 != v9 && v11 != (void *)0x7FFFFFFF )
{
v12 = v11;
objc_msgSend(v16, "removeObjectAtIndex:", v11);
objc_msgSend(v16, "insertObject:atIndex:", v15, (char *)v9 - (v12 < v9));
}
}
else
{
v10 = v15;
objc_msgSend(v16, "insertObject:atIndex:", v15, v8);
}
objc_msgSend(v10, "release");
}
v13 = objc_msgSend(v17, "valueForKeyPath:", CFSTR("indexPath"));
objc_msgSend(*(void **)&self->superclass_opaque[52], "unsuppressAllNotifications");
objc_msgSend(self, "_selectObjectsAtIndexPaths:avoidsEmptySelection:sendObserverNotifications:", v13, 0, 0);
objc_msgSend(self, "_didChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 1, 0, 1);
}
- (void)moveNodes:(id) toIndexPath:(id)
//void __cdecl -[NSTreeController moveNodes:toIndexPath:](struct NSTreeController *self, SEL a2, id a3, id a4)
{
void *v4; // eax@1
void *v5; // eax@1
id v6; // edi@1
void *v7; // eax@2
unsigned int v8; // edi@6
int v9; // esi@9
void *v10; // eax@10
void *v11; // eax@10
int v12; // ecx@11
void *v13; // edx@11
void *v14; // edx@13
int v15; // ST0C_4@16
int v16; // esi@16
void *v17; // eax@19
int v18; // eax@19
void *v19; // [sp+14h] [bp-94h]@1
void *v20; // [sp+1Ch] [bp-8Ch]@3
int v21; // [sp+20h] [bp-88h]@5
void *v22; // [sp+24h] [bp-84h]@4
void *v23; // [sp+28h] [bp-80h]@10
int v24; // [sp+2Ch] [bp-7Ch]@1
__int128 v25; // [sp+30h] [bp-78h]@4
__int128 v26; // [sp+40h] [bp-68h]@4
char v27; // [sp+58h] [bp-50h]@4
int v28; // [sp+98h] [bp-10h]@1
v28 = *(_DWORD *)__stack_chk_guard_ptr;
objc_msgSend(self, "_willChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 1, 0, 1);
v19 = objc_msgSend(self, "selectedNodes");
v4 = objc_msgSend(a4, "length");
v24 = (int)objc_msgSend(a4, "indexAtPosition:", (char *)v4 - 1);
v5 = objc_msgSend(a4, "length");
v6 = self->_rootNode;
if ( (unsigned int)v5 > 1 )
{
v7 = objc_msgSend(a4, "indexPathByRemovingLastIndex");
v6 = (id)objc_msgSend(v6, "descendantNodeAtIndexPath:", v7);
}
v20 = v6;
if ( v6 )
{
v26 = 0LL;
v25 = 0LL;
v22 = objc_msgSend(a3, "countByEnumeratingWithState:objects:count:", &v25, &v27, 16);
if ( v22 )
{
v21 = *DWORD2(v25);
do
{
v8 = 0;
do
{
if ( *DWORD2(v25) != v21 )
objc_enumerationMutation(a3);
v9 = *(_DWORD *)(DWORD1(v25) + 4 * v8);
if ( objc_msgSend(*(void **)(DWORD1(v25) + 4 * v8), "parentNode") )
{
v10 = objc_msgSend(v20, "mutableChildNodes");
v23 = v10;
v11 = objc_msgSend(v10, "indexOfObjectIdenticalTo:", v9);
if ( v11 == (void *)0x7FFFFFFF )
{
v12 = v24;
v13 = v23;
}
else
{
if ( (unsigned int)v11 >= v24 )
{
v14 = v23;
if ( v11 == (void *)v24 )
goto LABEL_17;
}
else
{
--v24;
v14 = v23;
}
objc_msgSend(v14, "removeObjectAtIndex:", v11);
v13 = v23;
v12 = v24;
}
v15 = v9;
v16 = v12;
objc_msgSend(v13, "insertObject:atIndex:", v15, v12);
v24 = v16 + 1;
}
LABEL_17:
++v8;
}
while ( v8 < (unsigned int)v22 );
v22 = objc_msgSend(a3, "countByEnumeratingWithState:objects:count:", &v25, &v27, 16);
}
while ( v22 );
}
}
v17 = objc_msgSend(v19, "valueForKeyPath:", CFSTR("indexPath"));
objc_msgSend(self, "_selectObjectsAtIndexPaths:avoidsEmptySelection:sendObserverNotifications:", v17, 0, 0);
objc_msgSend(self, "_didChangeValuesForArrangedKeys:objectKeys:indexPathKeys:", 1, 0, 1);
v18 = *(_DWORD *)__stack_chk_guard_ptr;
}
- (void)_setMultipleValue:(id) forKey:(id) atIndexPath:(id)
//void __cdecl -[NSTreeController _setMultipleValue:forKey:atIndexPath:](struct NSTreeController *self, SEL a2, id a3, id a4, id a5)
{
void *v5; // esi@1
void *v6; // esi@3
int v7; // eax@10
jmp_buf v8; // [sp+18h] [bp-80h]@2
int v9; // [sp+74h] [bp-24h]@1
id v10; // [sp+78h] [bp-20h]@1
int v11; // [sp+7Ch] [bp-1Ch]@1
id v12; // [sp+80h] [bp-18h]@1
SEL v13; // [sp+84h] [bp-14h]@1
struct NSTreeController *v14; // [sp+88h] [bp-10h]@1
v14 = self;
v13 = a2;
v12 = a3;
v11 = (int)a4;
v10 = a5;
v5 = objc_msgSend(self, "_multipleValuesObjectAtIndexPath:", a5);
v9 = (int)v5;
if ( v5 )
{
objc_msgSend(*(void **)&self->superclass_opaque[52], "suppressSpecificNotificationFromObject:keyPath:", v5, a4);
objc_exception_try_enter(v8);
if ( _setjmp(v8) )
{
v6 = (void *)objc_exception_extract(v8);
if ( !objc_exception_match("NSException", v6) )
{
v7 = objc_exception_extract(v8);
objc_exception_throw(v7);
-[NSTreeController _setMultipleValue:forKeyPath:atIndexPath:](self, a2, a3, a4, a5);
return;
}
objc_msgSend(*(void **)&v14->superclass_opaque[52], "unsuppressSpecificNotificationFromObject:keyPath:", v9, v11);
objc_msgSend(v6, "raise");
}
else
{
objc_msgSend(v5, "setValue:forKey:", a3, a4);
objc_exception_try_exit(v8);
}
objc_msgSend(*(void **)&v14->superclass_opaque[52], "unsuppressSpecificNotificationFromObject:keyPath:", v9, v11);
if ( *(_BYTE *)_NSLogObserverRecordingInformation_ptr )
NSLog(CFSTR("Controller %@ recording refresh for arranged index path %@, key %@"));
objc_msgSend(v14, "observeValueForKeyPath:ofObject:change:context:", v11, v9, 0, 0);
objc_msgSend(v14, "_notifyOfAnyContentChange");
}
}
- (void)_setMultipleValue:(id) forKeyPath:(id) atIndexPath:(id)
//void __cdecl -[NSTreeController _setMultipleValue:forKeyPath:atIndexPath:](struct NSTreeController *self, SEL a2, id a3, id a4, id a5)
{
void *v5; // esi@1
void *v6; // esi@3
int v7; // eax@10
jmp_buf v8; // [sp+18h] [bp-80h]@2
int v9; // [sp+74h] [bp-24h]@1
id v10; // [sp+78h] [bp-20h]@1
int v11; // [sp+7Ch] [bp-1Ch]@1
id v12; // [sp+80h] [bp-18h]@1
SEL v13; // [sp+84h] [bp-14h]@1
struct NSTreeController *v14; // [sp+88h] [bp-10h]@1
v14 = self;
v13 = a2;
v12 = a3;
v11 = (int)a4;
v10 = a5;
v5 = objc_msgSend(self, "_multipleValuesObjectAtIndexPath:", a5);
v9 = (int)v5;
if ( v5 )
{
objc_msgSend(*(void **)&self->superclass_opaque[52], "suppressSpecificNotificationFromObject:keyPath:", v5, a4);
objc_exception_try_enter(v8);
if ( _setjmp(v8) )
{
v6 = (void *)objc_exception_extract(v8);
if ( !objc_exception_match("NSException", v6) )
{
v7 = objc_exception_extract(v8);
objc_exception_throw(v7);
-[NSTreeController _setSingleValue:forKey:](self, a2, a3, a4);
return;
}
objc_msgSend(*(void **)&v14->superclass_opaque[52], "unsuppressSpecificNotificationFromObject:keyPath:", v9, v11);
objc_msgSend(v6, "raise");
}
else
{
objc_msgSend(v5, "setValue:forKeyPath:", a3, a4);
objc_exception_try_exit(v8);
}
objc_msgSend(*(void **)&v14->superclass_opaque[52], "unsuppressSpecificNotificationFromObject:keyPath:", v9, v11);
if ( *(_BYTE *)_NSLogObserverRecordingInformation_ptr )
NSLog(CFSTR("Controller %@ recording refresh for arranged index path %@, key path %@"));
objc_msgSend(v14, "observeValueForKeyPath:ofObject:change:context:", v11, v9, 0, 0);
objc_msgSend(v14, "_notifyOfAnyContentChange");
}
}
- (void)_setSingleValue:(id) forKey:(id)
//void __cdecl -[NSTreeController _setSingleValue:forKey:](struct NSTreeController *self, SEL a2, id a3, id a4)
{
int *v4; // ebx@1
struct NSTreeController *v5; // esi@1
void *v6; // eax@1
void *v7; // eax@1
void *v8; // edi@1
void *v9; // eax@1
void *v10; // ST14_4@2
void *v11; // esi@3
void *v12; // eax@3
void *v13; // eax@3
int v14; // eax@4
void *v15; // eax@6
void *v16; // eax@6
unsigned int v17; // edi@12
void *v18; // ecx@18
int v19; // ST0C_4@22
int v20; // ST10_4@22
int v21; // ST14_4@22
int v22; // eax@24
void *v23; // [sp+24h] [bp-104h]@10
int v24; // [sp+28h] [bp-100h]@11
void *v25; // [sp+30h] [bp-F8h]@10
jmp_buf v26; // [sp+38h] [bp-F0h]@15
__int128 v27; // [sp+90h] [bp-98h]@10
__int128 v28; // [sp+A0h] [bp-88h]@10
void *v29; // [sp+B0h] [bp-78h]@3
void *v30; // [sp+B4h] [bp-74h]@1
void *v31; // [sp+B8h] [bp-70h]@6
void *v32; // [sp+BCh] [bp-6Ch]@6
unsigned int v33; // [sp+C0h] [bp-68h]@1
int v34; // [sp+C4h] [bp-64h]@3
int v35; // [sp+C8h] [bp-60h]@1
id v36; // [sp+CCh] [bp-5Ch]@1
SEL v37; // [sp+D0h] [bp-58h]@1
struct NSTreeController *v38; // [sp+D4h] [bp-54h]@1
char v39; // [sp+D8h] [bp-50h]@10
int v40; // [sp+118h] [bp-10h]@1
v4 = (_DWORD *)&loc_7DBF17;
v5 = self;
v40 = *(_DWORD *)__stack_chk_guard_ptr;
v38 = self;
v37 = a2;
v36 = a3;
v35 = (int)a4;
v6 = objc_msgSend(self, "selectionIndexPaths");
v7 = objc_msgSend(v6, "mutableCopy");
v8 = v7;
v30 = v7;
v9 = objc_msgSend(v7, "count");
v33 = (unsigned int)v9;
if ( v9 == (size_t *)((char *)&dword_0 + 1) )
{
v10 = objc_msgSend(v8, "objectAtIndex:", 0);
objc_msgSend(self, "_setMultipleValue:forKey:atIndexPath:", a3, a4, v10);
goto LABEL_23;
}
v11 = v9;
v12 = objc_msgSend("NSMutableArray", "alloc");
v13 = objc_msgSend(v12, "initWithCapacity:", v11);
v29 = v13;
v34 = 0;
if ( v11 )
{
v14 = 0;
while ( 1 )
{
v15 = objc_msgSend(v8, "objectAtIndex:", v14);
v31 = v15;
v16 = objc_msgSend(v38, "_multipleValuesObjectAtIndexPath:", v15);
v32 = v16;
if ( v16 )
objc_msgSend(v29, "addObject:", v16);
v14 = v34 + 1;
v34 = v14;
if ( v14 >= v33 )
break;
v8 = v30;
}
v13 = v29;
}
v25 = v13;
v28 = 0LL;
v27 = 0LL;
v23 = objc_msgSend(v13, "countByEnumeratingWithState:objects:count:", &v27, &v39, 16);
if ( !v23 )
{
v18 = v25;
LABEL_20:
v32 = 0;
objc_msgSend(v18, *(const char **)((char *)v4 + (_DWORD)((char *)&paRelease[-2060230] + 1)));
if ( **(_BYTE **)((char *)v4 + (_DWORD)((char *)&_NSLogObserverRecordingInformation_ptr - 8240919)) )
NSLog((char *)v4 + (_DWORD)((char *)CFSTR("Controller %@ recording refresh for multiple selection, key %@")
- 8240919));
v5 = *(struct NSTreeController **)((char *)v4 + (_DWORD)((char *)&paObservevaluefo[-2060230] + 1));
objc_msgSend(
v38,
*(const char **)((char *)v4 + (_DWORD)((char *)&paObservevaluefo[-2060230] + 1)),
v35,
*(_DWORD *)&v38->superclass_opaque[56],
0,
0);
objc_msgSend(v38, *(const char **)((char *)v4 + (_DWORD)((char *)&pa_notifyofanyco[-2060230] + 1)), v19, v20, v21);
LABEL_23:
objc_msgSend(v30, *(const char **)((char *)v4 + (_DWORD)((char *)&paRelease[-2060230] + 1)));
if ( *(_DWORD *)__stack_chk_guard_ptr == v40 )
return;
goto LABEL_24;
}
v5 = (struct NSTreeController *)&loc_7DBF17;
v24 = *DWORD2(v27);
LABEL_12:
v17 = 0;
while ( 1 )
{
if ( *DWORD2(v27) != v24 )
objc_enumerationMutation(v25);
v32 = *(void **)(DWORD1(v27) + 4 * v17);
v32 = objc_msgSend(v29, "objectAtIndex:", v34);
objc_msgSend(*(void **)&v38->superclass_opaque[52], "suppressSpecificNotificationFromObject:keyPath:", v32, v35);
v4 = v26;
objc_exception_try_enter(v26);
if ( _setjmp(v26) )
break;
objc_msgSend(v32, "setValue:forKey:", v36, v35);
objc_exception_try_exit(v26);
objc_msgSend(*(void **)&v38->superclass_opaque[52], "unsuppressSpecificNotificationFromObject:keyPath:", v32, v35);
++v17;
if ( v17 >= (unsigned int)v23 )
{
v23 = objc_msgSend(v25, "countByEnumeratingWithState:objects:count:", &v27, &v39, 16);
if ( v23 )
goto LABEL_12;
v18 = v29;
v4 = (_DWORD *)&loc_7DBF17;
goto LABEL_20;
}
}
LABEL_24:
objc_msgSend(
*(void **)&v38->superclass_opaque[52],
*(const char **)((char *)&v5[33554]._arrangedObjects + 1),
v32,
v35);
v22 = objc_exception_extract(v4);
objc_exception_throw(v22);
-[NSTreeController _setSingleValue:forKeyPath:](self, a2, a3, a4);
}
- (void)_setSingleValue:(id) forKeyPath:(id)
//void __cdecl -[NSTreeController _setSingleValue:forKeyPath:](struct NSTreeController *self, SEL a2, id a3, id a4)
{
signed int v4; // ebx@1
struct NSTreeController *v5; // esi@1
void *v6; // eax@1
void *v7; // eax@1
int *v8; // edi@1
void *v9; // eax@1
void *v10; // ST14_4@2
void *v11; // esi@3
void *v12; // ST20_4@3
void *v13; // eax@3
void *v14; // esi@3
int v15; // eax@4
void *v16; // eax@6
void *v17; // eax@6
unsigned int v18; // ebx@12
int v19; // ST0C_4@21
int v20; // ST10_4@21
int v21; // ST14_4@21
int v22; // eax@23
void *v23; // [sp+24h] [bp-104h]@10
int v24; // [sp+28h] [bp-100h]@11
void *v25; // [sp+30h] [bp-F8h]@10
jmp_buf v26; // [sp+38h] [bp-F0h]@15
__int128 v27; // [sp+90h] [bp-98h]@10
__int128 v28; // [sp+A0h] [bp-88h]@10
void *v29; // [sp+B0h] [bp-78h]@3
void *v30; // [sp+B4h] [bp-74h]@1
void *v31; // [sp+B8h] [bp-70h]@6
void *v32; // [sp+BCh] [bp-6Ch]@6
unsigned int v33; // [sp+C0h] [bp-68h]@1
int v34; // [sp+C4h] [bp-64h]@3
int v35; // [sp+C8h] [bp-60h]@1
id v36; // [sp+CCh] [bp-5Ch]@1
SEL v37; // [sp+D0h] [bp-58h]@1
struct NSTreeController *v38; // [sp+D4h] [bp-54h]@1
char v39; // [sp+D8h] [bp-50h]@10
int v40; // [sp+118h] [bp-10h]@1
struct objc_object *v41; // [sp+140h] [bp+18h]@0
v4 = 8241931;
v5 = self;
v40 = *(_DWORD *)__stack_chk_guard_ptr;
v38 = self;
v37 = a2;
v36 = a3;
v35 = (int)a4;
v6 = objc_msgSend(self, "selectionIndexPaths");
v7 = objc_msgSend(v6, "mutableCopy");
v8 = (int *)v7;
v30 = v7;
v9 = objc_msgSend(v7, "count");
v33 = (unsigned int)v9;
if ( v9 == (size_t *)((char *)&dword_0 + 1) )
{
v10 = objc_msgSend(v8, "objectAtIndex:", 0);
objc_msgSend(self, "_setMultipleValue:forKeyPath:atIndexPath:", a3, a4, v10);
goto LABEL_22;
}
v11 = v9;
v12 = v9;
v13 = objc_msgSend("NSMutableArray", "alloc");
v14 = objc_msgSend(v13, "initWithCapacity:", v11);
v29 = v14;
v34 = 0;
if ( v12 )
{
v15 = 0;
while ( 1 )
{
v16 = objc_msgSend(v8, "objectAtIndex:", v15);
v31 = v16;
v17 = objc_msgSend(v38, "_multipleValuesObjectAtIndexPath:", v16);
v32 = v17;
if ( v17 )
objc_msgSend(v29, "addObject:", v17);
v15 = v34 + 1;
v34 = v15;
if ( v15 >= v33 )
break;
v8 = (int *)v30;
}
v14 = v29;
}
v25 = v14;
v28 = 0LL;
v27 = 0LL;
v23 = objc_msgSend(v14, "countByEnumeratingWithState:objects:count:", &v27, &v39, 16);
if ( !v23 )
{
LABEL_19:
v32 = 0;
objc_msgSend(v14, (&paRelease[-2060482])[v4 - 3]);
if ( **(_BYTE **)((char *)&_NSLogObserverRecordingInformation_ptr + v4 - 8241931) )
NSLog((char *)CFSTR("Controller %@ recording refresh for multiple selection, key path %@") + v4 - 8241931);
v5 = (struct NSTreeController *)(&paObservevaluefo[-2060482])[v4 - 3];
objc_msgSend(v38, (&paObservevaluefo[-2060482])[v4 - 3], v35, *(_DWORD *)&v38->superclass_opaque[56], 0, 0);
objc_msgSend(v38, (&pa_notifyofanyco[-2060482])[v4 - 3], v19, v20, v21);
LABEL_22:
objc_msgSend(v30, (&paRelease[-2060482])[v4 - 3]);
if ( *(_DWORD *)__stack_chk_guard_ptr == v40 )
return;
goto LABEL_23;
}
v24 = *DWORD2(v27);
LABEL_12:
v5 = (struct NSTreeController *)v4;
v18 = 0;
while ( 1 )
{
if ( *DWORD2(v27) != v24 )
objc_enumerationMutation(v25);
v32 = *(void **)(DWORD1(v27) + 4 * v18);
objc_msgSend(*(void **)&v38->superclass_opaque[52], *(const char **)&v5[33547].superclass_opaque[69], v32, v35);
v8 = v26;
objc_exception_try_enter(v26);
if ( _setjmp(v26) )
break;
objc_msgSend(v32, *(const char **)&v5[33503].superclass_opaque[57], v36, v35);
objc_exception_try_exit(v26);
v8 = *(int **)&v5[33547].superclass_opaque[73];
objc_msgSend(*(void **)&v38->superclass_opaque[52], *(const char **)&v5[33547].superclass_opaque[73], v32, v35);
++v18;
if ( v18 >= (unsigned int)v23 )
{
v4 = (signed int)v5;
v23 = objc_msgSend(
v25,
*(const char **)&v5->superclass_opaque[(_DWORD)((char *)&paCountbyenumera[-2060483] + 1)],
&v27,
&v39,
16);
if ( v23 )
goto LABEL_12;
v14 = v29;
goto LABEL_19;
}
}
LABEL_23:
objc_msgSend(*(void **)&v38->superclass_opaque[52], *(const char **)&v5[33547].superclass_opaque[73], v32, v35);
v22 = objc_exception_extract(v8);
objc_exception_throw(v22);
-[NSTreeController _invokeSingleSelector:withArguments:onKeyPath:](self, a2, a3, a4, v41);
}
- (void)_invokeSingleSelector:(SEL) withArguments:(id) onKeyPath:(id)
//void __cdecl -[NSTreeController _invokeSingleSelector:withArguments:onKeyPath:](struct NSTreeController *self, SEL a2, SEL a3, id a4, id a5)
{
void *v5; // ebx@1
void *v6; // eax@1
void *v7; // edi@1
void *v8; // eax@1
void *v9; // eax@2
void *v10; // edi@2
void *v11; // eax@3
void *v12; // eax@3
int v13; // eax@4
void *v14; // eax@6
void *v15; // eax@6
unsigned int v16; // edi@12
void *v17; // ecx@18
int v18; // eax@24
void *v19; // [sp+28h] [bp-110h]@10
int v20; // [sp+2Ch] [bp-10Ch]@11
void *v21; // [sp+30h] [bp-108h]@10
jmp_buf v22; // [sp+38h] [bp-100h]@11
__int128 v23; // [sp+90h] [bp-A8h]@10
__int128 v24; // [sp+A0h] [bp-98h]@10
void *v25; // [sp+BCh] [bp-7Ch]@3
void *v26; // [sp+C0h] [bp-78h]@1
void *v27; // [sp+C4h] [bp-74h]@6
void *v28; // [sp+C8h] [bp-70h]@6
unsigned int v29; // [sp+CCh] [bp-6Ch]@1
int v30; // [sp+D0h] [bp-68h]@3
id v31; // [sp+D4h] [bp-64h]@1
id v32; // [sp+D8h] [bp-60h]@1
SEL v33; // [sp+DCh] [bp-5Ch]@1
SEL v34; // [sp+E0h] [bp-58h]@1
struct NSTreeController *v35; // [sp+E4h] [bp-54h]@1
char v36; // [sp+E8h] [bp-50h]@10
int v37; // [sp+128h] [bp-10h]@1
struct objc_object *v38; // [sp+154h] [bp+1Ch]@0
v5 = a5;
v37 = *(_DWORD *)__stack_chk_guard_ptr;
v34 = a2;
v35 = self;
v33 = a3;
v32 = a4;
v31 = a5;
v6 = objc_msgSend(self, "selectionIndexPaths");
v7 = v6;
v26 = v6;
v8 = objc_msgSend(v6, "count");
v29 = (unsigned int)v8;
if ( v8 == (size_t *)((char *)&dword_0 + 1) )
{
v9 = objc_msgSend(v7, "objectAtIndex:", 0);
objc_msgSend(self, "_invokeMultipleSelector:withArguments:onKeyPath:atIndexPath:", a3, a4, a5, v9);
v10 = __stack_chk_guard_ptr;
goto LABEL_23;
}
v5 = v8;
v11 = objc_msgSend("NSMutableArray", "alloc");
v12 = objc_msgSend(v11, "initWithCapacity:", v5);
v25 = v12;
v30 = 0;
if ( v5 )
{
v13 = 0;
while ( 1 )
{
v14 = objc_msgSend(v7, "objectAtIndex:", v13);
v27 = v14;
v15 = objc_msgSend(v35, "_multipleValuesObjectAtIndexPath:", v14);
v28 = v15;
if ( v15 )
objc_msgSend(v25, "addObject:", v15);
v13 = v30 + 1;
v30 = v13;
if ( v13 >= v29 )
break;
v7 = v26;
}
v12 = v25;
}
v21 = v12;
v24 = 0LL;
v23 = 0LL;
v19 = objc_msgSend(v12, "countByEnumeratingWithState:objects:count:", &v23, &v36, 16);
if ( !v19 )
{
v10 = __stack_chk_guard_ptr;
v17 = v21;
LABEL_20:
v28 = 0;
objc_msgSend(v17, "release");
if ( *(_BYTE *)_NSLogObserverRecordingInformation_ptr )
NSLog(CFSTR("Controller %@ recording refresh for multiple selection"));
objc_msgSend(
v35,
"observeValueForKeyPath:ofObject:change:context:",
0,
*(_DWORD *)&v35->superclass_opaque[56],
0,
0);
objc_msgSend(v35, "_notifyOfAnyContentChange");
LABEL_23:
if ( *(_DWORD *)v10 == v37 )
return;
goto LABEL_24;
}
v20 = *DWORD2(v23);
v5 = v22;
LABEL_12:
v16 = 0;
while ( 1 )
{
if ( *DWORD2(v23) != v20 )
objc_enumerationMutation(v21);
v28 = *(void **)(DWORD1(v23) + 4 * v16);
objc_msgSend(*(void **)&v35->superclass_opaque[52], "suppressAllNotificationsFromObject:", v28);
objc_exception_try_enter(v22);
if ( _setjmp(v22) )
break;
objc_msgSend(v28, "_invokeSelector:withArguments:onKeyPath:", v33, v32, v31);
objc_exception_try_exit(v22);
objc_msgSend(*(void **)&v35->superclass_opaque[52], "unsuppressAllNotificationsFromObject:", v28);
++v16;
if ( v16 >= (unsigned int)v19 )
{
v19 = objc_msgSend(v21, "countByEnumeratingWithState:objects:count:", &v23, &v36, 16);
if ( v19 )
goto LABEL_12;
v17 = v25;
v10 = __stack_chk_guard_ptr;
goto LABEL_20;
}
}
LABEL_24:
objc_msgSend(*(void **)&v35->superclass_opaque[52], "unsuppressAllNotificationsFromObject:", v28);
v18 = objc_exception_extract(v5);
objc_exception_throw(v18);
-[NSTreeController _invokeMultipleSelector:withArguments:onKeyPath:atIndexPath:](self, a2, a3, a4, a5, v38);
}
- (void)_invokeMultipleSelector:(SEL) withArguments:(id) onKeyPath:(id) atIndexPath:(id)
//void __cdecl -[NSTreeController _invokeMultipleSelector:withArguments:onKeyPath:atIndexPath:](struct NSTreeController *self, SEL a2, SEL a3, id a4, id a5, id a6)
{
void *v6; // esi@1
void *v7; // esi@3
int v8; // eax@10
jmp_buf v9; // [sp+18h] [bp-80h]@2
int v10; // [sp+70h] [bp-28h]@1
id v11; // [sp+74h] [bp-24h]@1
id v12; // [sp+78h] [bp-20h]@1
id v13; // [sp+7Ch] [bp-1Ch]@1
SEL v14; // [sp+80h] [bp-18h]@1
SEL v15; // [sp+84h] [bp-14h]@1
struct NSTreeController *v16; // [sp+88h] [bp-10h]@1
v15 = a2;
v16 = self;
v14 = a3;
v13 = a4;
v12 = a5;
v11 = a6;
v6 = objc_msgSend(self, "_multipleValuesObjectAtIndexPath:", a6);
v10 = (int)v6;
if ( v6 )
{
objc_msgSend(*(void **)&self->superclass_opaque[52], "suppressAllNotificationsFromObject:", v6);
objc_exception_try_enter(v9);
if ( _setjmp(v9) )
{
v7 = (void *)objc_exception_extract(v9);
if ( !objc_exception_match("NSException", v7) )
{
v8 = objc_exception_extract(v9);
objc_exception_throw(v8);
-[NSTreeController _validateMultipleValue:forKeyPath:atIndexPath:error:](self, a2, (id *)a3, a4, a5, (id *)a6);
return;
}
objc_msgSend(*(void **)&v16->superclass_opaque[52], "unsuppressAllNotificationsFromObject:", v10);
objc_msgSend(v7, "raise");
}
else
{
objc_msgSend(v6, "_invokeSelector:withArguments:onKeyPath:", a3, a4, a5);
objc_exception_try_exit(v9);
}
objc_msgSend(*(void **)&v16->superclass_opaque[52], "unsuppressAllNotificationsFromObject:", v10);
if ( *(_BYTE *)_NSLogObserverRecordingInformation_ptr )
NSLog(CFSTR("Controller %@ recording refresh for arranged index path %@"));
objc_msgSend(v16, "observeValueForKeyPath:ofObject:change:context:", 0, v10, 0, 0);
objc_msgSend(v16, "_notifyOfAnyContentChange");
}
}
- (char)_validateSingleValue:(id *) forKeyPath:(id) error:(id *)
//char __cdecl -[NSTreeController _validateSingleValue:forKeyPath:error:](struct NSTreeController *self, SEL a2, id *a3, id a4, id *a5)
{
void *v5; // edi@1
char result; // al@1
unsigned int v7; // esi@2
void *v8; // eax@3
void *v9; // [sp+24h] [bp-14h]@1
id v10; // [sp+28h] [bp-10h]@3
v9 = objc_msgSend(self, "selectionIndexPaths");
v5 = objc_msgSend(v9, "count");
result = 1;
if ( v5 )
{
v7 = 0;
while ( 1 )
{
v10 = *a3;
v8 = objc_msgSend(v9, "objectAtIndex:", v7);
if ( !(unsigned __int8)objc_msgSend(
self,
"_validateMultipleValue:forKeyPath:atIndexPath:error:",
&v10,
a4,
v8,
a5) )
break;
objc_assign_strongCast(v10, a3);
++v7;
if ( v7 >= (unsigned int)v5 )
return 1;
}
result = 0;
}
return result;
}
- (id)_singleValueForKeyPath:(id) operationType:(int)
//id __cdecl -[NSTreeController _singleValueForKeyPath:operationType:](struct NSTreeController *self, SEL a2, id a3, int a4)
{
long double v4; // fst7@0
void *v5; // esi@1
void *v6; // eax@1
struct objc_object *v8; // ecx@3
void *v9; // eax@5
void *v10; // eax@5
void *v11; // ebx@6
void *v12; // esi@8
void *v13; // eax@12
void *v14; // eax@14
void *v15; // eax@15
const char *v16; // ecx@15
int v17; // edx@15
void *v18; // eax@17
const char *v19; // ecx@17
const char *v20; // ecx@20
__int32 v21; // ST0C_4@27
void *v22; // eax@12
void *v23; // eax@38
void *v24; // ST04_4@40
void *v25; // esi@40
void *v26; // ST0C_4@40
void *v27; // eax@44
int v29; // [sp+Ch] [bp-5Ch]@8
int v30; // [sp+10h] [bp-58h]@0
int v31; // [sp+30h] [bp-38h]@5
int v32; // [sp+34h] [bp-34h]@6
void *v33; // [sp+3Ch] [bp-2Ch]@5
v5 = objc_msgSend(self, "selectionIndexPaths");
v6 = objc_msgSend(v5, "count");
if ( a4 == 1 )
return (id)objc_msgSend("NSNumber", "numberWithUnsignedInteger:");
v8 = 0;
if ( v6 )
{
v31 = (int)v6;
v9 = objc_msgSend(v5, "objectEnumerator");
v33 = v9;
v10 = objc_msgSend(v9, "nextObject");
v8 = 0;
if ( v10 )
{
v32 = *(_DWORD *)NSInvalidArgumentException_ptr;
v11 = 0;
do
{
v12 = objc_msgSend(self, "_multipleValueForKeyPath:atIndexPath:", a3, v10);
if ( v12 && v12 != (void *)*NSNotApplicableMarker_ptr )
{
switch ( a4 )
{
case 0:
case 8:
if ( v11 )
{
v13 = _NSNumberFromValue(v4, v12);
objc_msgSend_fpret(v13, "doubleValue");
objc_msgSend_fpret(v11, "doubleValue");
v22 = objc_msgSend("NSNumber", "numberWithDouble:", (double)v4 + (double)v4);
goto LABEL_28;
}
v11 = _NSNumberFromValue(v4, v12);
break;
default:
objc_msgSend("NSException", "raise:format:", v32, CFSTR("Unimplemented request type %ld"), a4);
break;
case 2:
v14 = v11;
if ( v11 )
goto LABEL_32;
v15 = "NSMutableSet";
v16 = "setWithCapacity:";
v17 = v31;
goto LABEL_31;
case 3:
v14 = v11;
if ( v11 )
goto LABEL_36;
v18 = "NSMutableSet";
v19 = "setWithCapacity:";
goto LABEL_35;
case 4:
v14 = v11;
if ( !v11 )
v14 = objc_msgSend("NSMutableSet", "setWithCapacity:", v31);
v20 = "unionSet:";
goto LABEL_37;
case 5:
if ( !v11 || objc_msgSend(v11, "compare:", v12) == (void *)-1 )
goto LABEL_26;
break;
case 6:
if ( !v11 || objc_msgSend(v11, "compare:", v12) == (size_t *)((char *)&dword_0 + 1) )
LABEL_26:
v11 = v12;
break;
case 7:
v21 = random();
v22 = objc_msgSend("NSNumber", "numberWithLong:", v21, v29);
LABEL_28:
v11 = v22;
break;
case 9:
v14 = v11;
if ( !v11 )
{
v15 = "NSMutableArray";
v16 = "arrayWithCapacity:";
v17 = 2 * v31;
LABEL_31:
v14 = objc_msgSend(v15, v16, v17);
}
LABEL_32:
v20 = "addObjectsFromArray:";
goto LABEL_37;
case 10:
v14 = v11;
if ( !v11 )
{
v18 = "NSMutableArray";
v19 = "arrayWithCapacity:";
LABEL_35:
v14 = objc_msgSend(v18, v19, v31);
}
LABEL_36:
v20 = "addObject:";
LABEL_37:
v11 = v14;
objc_msgSend(v14, v20, v12, v29, v30);
break;
case 11:
v23 = v11;
if ( !v11 )
v23 = objc_msgSend("NSMutableArray", "arrayWithCapacity:", 2 * v31);
v24 = v12;
v25 = v23;
v26 = objc_msgSend(v24, "allObjects");
v11 = v25;
objc_msgSend(v25, "addObjectsFromArray:", v26, v29, v30);
break;
}
}
v10 = objc_msgSend(v33, "nextObject");
}
while ( v10 );
v8 = (struct objc_object *)v11;
if ( v11 && !a4 )
{
v27 = _NSNumberFromValue(v4, v11);
objc_msgSend_fpret(v27, "doubleValue");
return (id)objc_msgSend("NSNumber", "numberWithDouble:");
}
if ( v11 && (unsigned int)(a4 - 2) <= 2 )
return (id)objc_msgSend(v11, "allObjects");
}
}
return v8;
}
- (id)_singleValueForKey:(id)
//id __cdecl -[NSTreeController _singleValueForKey:](struct NSTreeController *self, SEL a2, id a3)
{
void *v3; // esi@1
void *v4; // ebx@1
void *v5; // eax@4
void *v6; // eax@4
void *v7; // esi@4
void *v8; // eax@6
struct objc_object *v9; // eax@7
int *v10; // eax@9
void *v12; // [sp+18h] [bp-10h]@4
v3 = objc_msgSend(self, "selectionIndexPaths");
v4 = objc_msgSend(v3, "count");
if ( !v4 )
{
v10 = NSNoSelectionMarker_ptr[0];
return (id)*v10;
}
if ( (unsigned __int8)objc_msgSend(self, "alwaysUsesMultipleValuesMarker") && (unsigned int)v4 >= 2 )
{
LABEL_9:
v10 = NSMultipleValuesMarker_ptr[0];
return (id)*v10;
}
v5 = objc_msgSend(v3, "objectEnumerator");
v12 = v5;
v6 = objc_msgSend(v5, "nextObject");
v7 = objc_msgSend(self, "_multipleValueForKey:atIndexPath:", a3, v6);
if ( v7 != (void *)*NSNotApplicableMarker_ptr && (unsigned int)v4 >= 2 )
{
while ( 1 )
{
v8 = objc_msgSend(v12, "nextObject");
if ( !v8 )
break;
v9 = (struct objc_object *)objc_msgSend(self, "_multipleValueForKey:atIndexPath:", a3, v8);
if ( v9 == (struct objc_object *)*NSNotApplicableMarker_ptr )
return v9;
if ( !(unsigned __int8)_NSValuesAreEqual(v7, v9) )
goto LABEL_9;
}
}
return (id)v7;
}
- (id)_singleMutableArrayValueForKey:(id)
//id __cdecl -[NSTreeController _singleMutableArrayValueForKey:](struct NSTreeController *self, SEL a2, id a3)
{
void *v3; // eax@1
void *v4; // esi@1
void *v5; // eax@1
id result; // eax@2
void *v7; // eax@4
void *v8; // eax@4
void *v9; // eax@5
void *v10; // eax@10
void *v11; // eax@10
int v12; // ST0C_4@10
v3 = objc_msgSend(self, "selectionIndexPaths");
v4 = v3;
v5 = objc_msgSend(v3, "count");
if ( v5 )
{
if ( v5 == (size_t *)((char *)&dword_0 + 1) )
{
v7 = objc_msgSend(v4, "objectAtIndex:", 0);
v8 = objc_msgSend(self, "_multipleValuesObjectAtIndexPath:", v7);
result = (id)objc_msgSend(v8, "mutableArrayValueForKey:", a3);
}
else
{
v9 = objc_msgSend(self, "_singleValueForKey:", a3);
if ( (void *)*NSNoSelectionMarker_ptr[0] == v9
|| (void *)*NSMultipleValuesMarker_ptr[0] == v9
|| (void *)*NSNotApplicableMarker_ptr == v9
|| (void *)*_NSNullMarker_ptr == v9 )
objc_msgSend(
"NSException",
"raise:format:",
*(_DWORD *)NSInternalInconsistencyException_ptr,
CFSTR("Cannot create key value coding array relationship mutator proxy with key %@ for the current selection"),
a3);
v10 = objc_msgSend("_NSControllerTreeProxyMutatorArray", "alloc");
v11 = objc_msgSend(v10, "initWithTreeController:keyPath:", self, a3);
result = (id)objc_msgSend(v11, "autorelease", v12);
}
}
else
{
result = (id)*NSNoSelectionMarker_ptr[0];
}
return result;
}
- (void)_removeSelectionIndexPathsBelowNode:(id)
//void __cdecl -[NSTreeController _removeSelectionIndexPathsBelowNode:](struct NSTreeController *self, SEL a2, id a3)
{
signed int v3; // edi@1
void *v4; // eax@1
void *v5; // ebx@1
void *v6; // eax@1
signed int v7; // esi@3
unsigned int v8; // ebx@3
int v9; // edi@6
void *v10; // esi@10
char v11; // al@11
int v12; // eax@12
void *v13; // [sp+1Ch] [bp-8Ch]@1
void *v14; // [sp+20h] [bp-88h]@1
int v15; // [sp+24h] [bp-84h]@2
void *v16; // [sp+28h] [bp-80h]@1
void *v17; // [sp+2Ch] [bp-7Ch]@1
__int128 v18; // [sp+30h] [bp-78h]@1
__int128 v19; // [sp+40h] [bp-68h]@1
char v20; // [sp+58h] [bp-50h]@1
int v21; // [sp+98h] [bp-10h]@1
v3 = 8246766;
v21 = *(_DWORD *)__stack_chk_guard_ptr;
v4 = objc_msgSend(self, "selectionIndexPaths");
v5 = objc_msgSend(v4, "mutableCopy");
v14 = v5;
v6 = objc_msgSend("NSMutableArray", "alloc");
v13 = objc_msgSend(v6, "init");
v16 = objc_msgSend(a3, "indexPath");
v19 = 0LL;
v18 = 0LL;
v17 = objc_msgSend(v5, "countByEnumeratingWithState:objects:count:", &v18, &v20, 16);
if ( v17 )
{
v15 = *DWORD2(v18);
do
{
v7 = v3;
v8 = 0;
do
{
if ( *DWORD2(v18) != v15 )
objc_enumerationMutation(v14);
v9 = *(_DWORD *)(DWORD1(v18) + 4 * v8);
if ( (unsigned __int8)objc_msgSend(
*(void **)(DWORD1(v18) + 4 * v8),
*(const char **)((char *)&loc_487616 + v7),
v16) == 1 )
objc_msgSend(v13, *(const char **)(v7 + 4685114), v9);
++v8;
}
while ( v8 < (unsigned int)v17 );
v3 = v7;
v5 = v14;
v17 = objc_msgSend(v14, (&paCountbyenumera[-2061691])[v7 - 2], &v18, &v20, 16);
}
while ( v17 );
}
v10 = v13;
if ( objc_msgSend(v13, (&paCount[-2061691])[v3 - 2]) )
{
objc_msgSend(v5, (&paRemoveobjectsi[-2061691])[v3 - 2], v13);
v11 = (unsigned int)objc_msgSend(self, (&paAvoidsemptysel[-2061691])[v3 - 2]);
v10 = v13;
objc_msgSend(self, (&pa_selectobjec_1[-2061691])[v3 - 2], v5, v11, 1);
}
objc_msgSend(v10, (&paRelease[-2061691])[v3 - 2]);
objc_msgSend(v5, (&paRelease[-2061691])[v3 - 2]);
v12 = *(_DWORD *)__stack_chk_guard_ptr;
}
- (id)_singleMutableArrayValueForKeyPath:(id)
//id __cdecl -[NSTreeController _singleMutableArrayValueForKeyPath:](struct NSTreeController *self, SEL a2, id a3)
{
void *v3; // eax@1
void *v4; // esi@1
void *v5; // eax@1
id result; // eax@2
void *v7; // eax@4
void *v8; // eax@4
void *v9; // eax@5
void *v10; // eax@10
void *v11; // eax@10
int v12; // ST0C_4@10
v3 = objc_msgSend(self, "selectionIndexPaths");
v4 = v3;
v5 = objc_msgSend(v3, "count");
if ( v5 )
{
if ( v5 == (size_t *)((char *)&dword_0 + 1) )
{
v7 = objc_msgSend(v4, "objectAtIndex:", 0);
v8 = objc_msgSend(self, "_multipleValuesObjectAtIndexPath:", v7);
result = (id)objc_msgSend(v8, "mutableArrayValueForKeyPath:", a3);
}
else
{
v9 = objc_msgSend(self, "_singleValueForKeyPath:", a3);
if ( (void *)*NSNoSelectionMarker_ptr[0] == v9
|| (void *)*NSMultipleValuesMarker_ptr[0] == v9
|| (void *)*NSNotApplicableMarker_ptr == v9
|| (void *)*_NSNullMarker_ptr == v9 )
objc_msgSend(
"NSException",
"raise:format:",
*(_DWORD *)NSInternalInconsistencyException_ptr,
CFSTR("Cannot create key value coding array relationship mutator proxy with key path %@ for the current selection"),
a3);
v10 = objc_msgSend("_NSControllerTreeProxyMutatorArray", "alloc");
v11 = objc_msgSend(v10, "initWithTreeController:keyPath:", self, a3);
result = (id)objc_msgSend(v11, "autorelease", v12);
}
}
else
{
result = (id)*NSNoSelectionMarker_ptr[0];
}
return result;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment