40 lines
1.1 KiB
C
40 lines
1.1 KiB
C
/* AgentManager_Release_x64.exe sha256 8fd8ca91725858651a7839d34257b10c2970ac16c97e60c523b8b0c983fcb186
|
|
* Ghidra 12.1.2 decompiler output for 0x14000fcf0 FUN_14000fcf0
|
|
* Pseudocode, not original source. */
|
|
|
|
longlong FUN_14000fcf0(undefined8 *param_1,char *param_2,ulonglong param_3)
|
|
|
|
{
|
|
ulonglong uVar1;
|
|
int iVar2;
|
|
void *_Buf1;
|
|
size_t _MaxCount;
|
|
undefined8 *_Buf;
|
|
|
|
if (param_3 == 0) {
|
|
return 0;
|
|
}
|
|
uVar1 = param_1[2];
|
|
if ((uVar1 != 0) && (param_3 <= uVar1)) {
|
|
_MaxCount = uVar1 + (1 - param_3);
|
|
_Buf = param_1;
|
|
if (0xf < (ulonglong)param_1[3]) {
|
|
_Buf = (undefined8 *)*param_1;
|
|
}
|
|
_Buf1 = memchr(_Buf,(int)*param_2,_MaxCount);
|
|
while (_Buf1 != (void *)0x0) {
|
|
iVar2 = memcmp(_Buf1,param_2,param_3);
|
|
if (iVar2 == 0) {
|
|
if (0xf < (ulonglong)param_1[3]) {
|
|
param_1 = (undefined8 *)*param_1;
|
|
}
|
|
return (longlong)_Buf1 - (longlong)param_1;
|
|
}
|
|
_MaxCount = (longlong)_Buf + ((_MaxCount - 1) - (longlong)_Buf1);
|
|
_Buf = (undefined8 *)((longlong)_Buf1 + 1);
|
|
_Buf1 = memchr(_Buf,(int)*param_2,_MaxCount);
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|