LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiGetServerMode
char *apiGetServerMode( void )
{
    static char gameMode[256];
    int i;
    static char recognizedModes[16][64] = { 
        "hardcore",   "checkpoint", "frenzy",    "outpost",    "frontline", 
        "domination", "push",       "firefight", "deathmatch", "*" 
    };

    strlcpy( gameMode, "unknown", 256 );

    for ( i=0 ; ; i++ ) {
        if ( recognizedModes[i][0] == '*' ) break;
        if ( NULL != strcasestr( gameStatePrevious, recognizedModes[i] ) ) {
            strlcpy( gameMode, recognizedModes[i], 256 );
            break;
        }
    }
    return( gameMode );
}

// Assembly:
movabsq $0x6e776f6e6b6e75, %rax # imm = 0x6E776F6E6B6E75
movq %rax, 0x164259(%rip)    # 0x177ce0
cmpb $0x2a, 0x16042(%rip)    # 0x29ad0
je 0x13ad9
pushq %r14
pushq %rbx
pushq %rax
leaq 0x16035(%rip), %rbx     # 0x29ad0
leaq 0xd9b0e(%rip), %r14     # 0xed5b0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8350
testq %rax, %rax
jne 0x13abe
cmpb $0x2a, 0x40(%rbx)
leaq 0x40(%rbx), %rbx
jne 0x13aa2
jmp 0x13ad2
leaq 0x16421b(%rip), %rdi    # 0x177ce0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0xf038
addq $0x8, %rsp
popq %rbx
popq %r14
leaq 0x164200(%rip), %rax    # 0x177ce0
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiMapList
char *apiMapList( void )
{
    int j;
    static char mapList[4096];

    strclr( mapList );
    for ( j = 0; j<API_MAXMAPS; j++ ) {
        if ( 0 == strlen( mapNameMerged[j] ) ) break;
        strncat( mapList, mapNameMerged[j], 4095 );
        strncat( mapList, " ",              4095 );
    }
    return( mapList );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x1ef403(%rip), %rbx    # 0x202ef0
movq %rbx, %rdi
callq 0xf4dd
xorl %r14d, %r14d
leaq 0x1ea3f1(%rip), %r15    # 0x1fdef0
cmpb $0x0, (%r14,%r15)
je 0x13b32
leaq (%r15,%r14), %rsi
movl $0xfff, %edx            # imm = 0xFFF
movq %rbx, %rdi
callq 0x81c0
movq %rbx, %rdi
callq 0x8120
movw $0x20, (%rax,%rbx)
addq $0x28, %r14
cmpq $0x5000, %r14           # imm = 0x5000
jne 0x13aff
leaq 0x1ef3b7(%rip), %rax    # 0x202ef0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiIsSupportedGameMode
int apiIsSupportedGameMode( char *candidateMode  )
{
    int isGameMode = 0;
    int j;

    for ( j = 0; j<API_MAXMAPS; j++ ) {
        if ( 0 == strcasecmp( mapCycleList[j].gameMode, candidateMode ) ) {
            isGameMode = 1;
            break;
        }
    }
    return( isGameMode );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x408, %r14d           # imm = 0x408
leaq 0x16439c(%rip), %r15    # 0x177ef0
leaq (%r15,%r14), %rdi
movq %rbx, %rsi
callq 0x8060
testl %eax, %eax
je 0x13b78
addq $0x430, %r14            # imm = 0x430
cmpq $0x86408, %r14          # imm = 0x86408
jne 0x13b54
xorl %eax, %eax
jmp 0x13b7d
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiMutList
char *apiMutList( void )
{
    static char lineBuffer[ API_LINE_STRING_MAX ];
    int j = 0;
 
    strclr( lineBuffer );
    while ( 1 == 1 ) {
        if ( 0 == strlen( mutAllowedList[j] )) break;
        strlcat ( lineBuffer, mutAllowedList[j], API_LINE_STRING_MAX );
        strlcat ( lineBuffer, " ", API_LINE_STRING_MAX );
        j++;
    }
    strTrimInPlace( lineBuffer );
    return( lineBuffer );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x1f01be(%rip), %rdi    # 0x203ef0
callq 0xf4dd
cmpb $0x0, 0x141292(%rip)    # 0x154fd0
je 0x13d80
leaq 0x141289(%rip), %r14    # 0x154fd0
leaq 0x1f01a2(%rip), %rbx    # 0x203ef0
leaq 0x8401(%rip), %r15      # 0x1c156
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefc4
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %r15, %rsi
callq 0xefc4
cmpb $0x0, 0x50(%r14)
leaq 0x50(%r14), %r14
jne 0x13d55
leaq 0x1f0169(%rip), %rbx    # 0x203ef0
movq %rbx, %rdi
callq 0xf5e3
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiMutLookup
int apiMutLookup( char *partialString, char *fullString, int maxStringSize )
{
    int j, returnCount = 0;

    // Clear the return string
    // 
    strclr( fullString );
    returnCount = 0;

    // Special exemption for 'none' which acts as a reset mutator
    //
    if ( 0 == strcasecmp( partialString, "none" ) ) {
        strlcpy( fullString, "none", maxStringSize );
        returnCount = 1;
    }
 
    // All other cases, search through the allowed mutator list for 
    // substring match.
    //
    else { 
    
        // Look for match and multiple-matches
        //
        j = 0;
        while ( 1 == 1 ) {
            if ( 0 == strlen( mutAllowedList[j] )) break;
           
            // Exact match has the highest prescedence
            // ignore all other substring matches
            // 
            if ( 0 == strcasecmp( mutAllowedList[j], partialString ) ) {
                strlcpy( fullString, mutAllowedList[j], maxStringSize );
                returnCount = 1;
                break;
            }

            // Substring match casee.  Count them in case there are more
            // than one matches.
            // 
            if ( NULL != strcasestr( mutAllowedList[j], partialString ) ) {
                strlcpy( fullString, mutAllowedList[j], maxStringSize );
                returnCount++;
            }
            j++;
        }
    }
    return returnCount;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xf4dd
leaq 0xa8f2(%rip), %r15      # 0x1e6ac
movq %r14, %rdi
movq %r15, %rsi
callq 0x8060
testl %eax, %eax
je 0x13e1c
cmpb $0x0, 0x141200(%rip)    # 0x154fd0
je 0x13e32
movslq %ebp, %r13
xorl %r12d, %r12d
leaq 0x1411f1(%rip), %r15    # 0x154fd0
movq %r15, %rdi
movq %r14, %rsi
callq 0x8060
testl %eax, %eax
je 0x13e1c
movq %r15, %rdi
movq %r14, %rsi
callq 0x8350
testq %rax, %rax
je 0x13e0f
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xf038
incl %r12d
cmpb $0x0, 0x50(%r15)
leaq 0x50(%r15), %r15
jne 0x13ddf
jmp 0x13e35
movslq %ebp, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf038
movl $0x1, %r12d
jmp 0x13e35
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterIsValidGUID
int rosterIsValidGUID( char *testGUID )
{
    int i, isValid = 0;
    int len = (int) strlen( testGUID ); 
  
    switch ( len )  { 
    case IDSTEAMID64LEN:                // Steam
        isValid = 1;
        for (i=0; i<IDSTEAMID64LEN; i++) {
            if ( !isdigit( testGUID[i] )) {
                isValid = 0;
                break;
            }
        }
        break;
    case IDEPICIDLEN:                   // EPIC
        isValid = 2;
        for (i=0; i<IDEPICIDLEN; i++) {
            if ( ( !isxdigit( testGUID[i] )) && ( testGUID[i] != '|' ) ) {
                isValid = 0;
                break;
            }
        }
        break;
    case IDWINGDKLEN:                   // WinGDK
        isValid = 3;
        for (i=0; i<IDWINGDKLEN; i++) {
            if ( !isdigit( testGUID[i] )) {
                isValid = 0;
                break;
            }
        }
        break;
    default:
        isValid = 0;
    }

    return( isValid );
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x8120
movq %rax, %rcx
cmpl $0x41, %ecx
je 0x140ad
cmpl $0x11, %ecx
je 0x14085
xorl %eax, %eax
cmpl $0x10, %ecx
jne 0x140de
callq 0x83e0
movq (%rax), %rcx
xorl %eax, %eax
xorl %edx, %edx
movsbq (%rbx,%rdx), %rsi
testb $0x8, 0x1(%rcx,%rsi,2)
je 0x140de
incq %rdx
cmpq $0x10, %rdx
jne 0x14069
movl $0x3, %eax
jmp 0x140de
callq 0x83e0
movq (%rax), %rcx
xorl %eax, %eax
xorl %edx, %edx
movsbq (%rbx,%rdx), %rsi
testb $0x8, 0x1(%rcx,%rsi,2)
je 0x140de
incq %rdx
cmpq $0x11, %rdx
jne 0x14091
movl $0x1, %eax
jmp 0x140de
callq 0x83e0
movq (%rax), %rcx
xorl %eax, %eax
xorl %edx, %edx
movsbq (%rbx,%rdx), %rsi
cmpq $0x7c, %rsi
je 0x140d0
movzwl (%rcx,%rsi,2), %esi
andl $0x1000, %esi           # imm = 0x1000
je 0x140de
incq %rdx
cmpq $0x41, %rdx
jne 0x140b9
movl $0x2, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterFindFirstID
int rosterFindFirstID(  char *lineIn, char symOpen, char symClose, char *foundID, int maxString  )
{
    int lastOpen = -1, i, j, k, foundCode = 0;
    char testString[256];

    strclr( foundID );

    for ( i = 0; i < (int) strlen( lineIn ); i++ ) {

        if ( lineIn[i] == symOpen ) {
            lastOpen = i;
        }
        else if ( lineIn[i] == symClose ) {
            if ( lastOpen == -1 ) continue;

            // extract string between 'lastOpen' and 'i' and check
            //
            for ( j = lastOpen+1, k = 0; j<i; j++ ) {
                testString[ k++ ] = lineIn[ j ];
            }
            testString[ k ] = 0;

            // test the 'test string' -- if valid then exit as found
            //
            if ( 0 != ( foundCode = rosterIsValidGUID( testString )) ) {
                strlcpy( foundID, testString, maxString );
                break;
            }
        }
    }
    return( foundCode );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %r8d, %ebp
movq %rcx, %rbx
movl %edx, 0x14(%rsp)
movl %esi, 0xc(%rsp)
movq %rdi, %r12
movq %rcx, %rdi
callq 0xf4dd
movq %r12, %rdi
callq 0x8120
movq %rax, %r13
testl %r13d, %r13d
jle 0x141c9
movl %ebp, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl 0xc(%rsp), %edx
movb (%r12,%r14), %cl
movl %r14d, %eax
cmpb %dl, %cl
je 0x141b8
cmpb 0x14(%rsp), %cl
setne %al
cmpl $-0x1, %r15d
sete %cl
orb %al, %cl
je 0x14162
movl %r15d, %eax
jmp 0x141b8
leal 0x1(%r15), %eax
movslq %eax, %rsi
cmpq %rsi, %r14
jle 0x1419a
addq %r12, %rsi
movl %r14d, %edx
subl %r15d, %edx
addl $-0x2, %edx
incq %rdx
leaq 0x20(%rsp), %rdi
callq 0x8290
movl %ebp, %eax
subl %r15d, %eax
xorl %ecx, %ecx
incq %rcx
cmpq %rcx, %rax
jne 0x1418e
movl %ecx, %eax
jmp 0x1419c
xorl %eax, %eax
movb $0x0, 0x20(%rsp,%rax)
leaq 0x20(%rsp), %rdi
callq 0x1403c
movl %eax, %ebx
movl %r15d, %eax
testl %ebx, %ebx
movl 0xc(%rsp), %edx
jne 0x141df
incq %r14
incl %ebp
movl %eax, %r15d
cmpq %r13, %r14
jne 0x14140
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq 0x10(%rsp), %rdx
leaq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0xf038
jmp 0x141cb
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterGetLighting
char *rosterGetLighting( void )
{
    static char retStr[20];
    char *w, *v;

    // default return "day"
    strlcpy( retStr, "day", 20 );

    // find the "?lighting=" substring position 
    if ( NULL != (w = strstr( rosterTravel, MATCH_LIGHTING ) )) {
        // point to first letter after the "=" sign
        w += strlen( MATCH_LIGHTING );
        // parse the lighting parameter
        if ( NULL != (v = getWord( w, 0, "? " )) ) {
            strlcpy( retStr, v, 20 );
            strToLowerInPlace( retStr );
            strTrimInPlace( retStr );
        } 
    }
    return( retStr );
}

// Assembly:
pushq %rbx
movl $0x796164, 0x1f42b5(%rip) # imm = 0x796164
leaq 0x1f41ae(%rip), %rdi    # 0x208480
leaq 0xa45d(%rip), %rsi      # 0x1e736
callq 0x83b0
testq %rax, %rax
je 0x14324
addq $0xa, %rax
leaq 0xa453(%rip), %rdx      # 0x1e741
movq %rax, %rdi
xorl %esi, %esi
callq 0xf4e1
testq %rax, %rax
je 0x14324
leaq 0x1f427c(%rip), %rbx    # 0x208580
movl $0x14, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf038
movq %rbx, %rdi
callq 0xf6d1
movq %rbx, %rdi
callq 0xf5e3
leaq 0x1f4255(%rip), %rax    # 0x208580
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterGetCoopObjectiveLetter
char rosterGetCoopObjectiveLetter( void )
{
    char retVal = ' ';
    char *w = NULL;

    strClean( rosterObjective );
    if ( NULL == (w = strstr( rosterObjective, "ODCheckpoint_" ) ) ) {
        if ( NULL == (w = strstr( rosterObjective, "OCCheckpoint_" ) ) )  {
            retVal = ' ';
        }
    }

    if ( w != NULL ) {
        retVal = w[ 13 ];  // extract 'A' from "OxCheckpoint_A_0"
    }

    // Third party maps do not necessarily follow the NWI objective convension.
    // This alternate lookup method uses dummp of objective name after map change
    // found in Insurgency.log file.
    //
    if ( retVal == ' ' ) {
        retVal = apiLookupObjectiveLetterFromCache( rosterObjective );
        logPrintf( LOG_LEVEL_INFO, "roster", "Using objective list cache and found objective letter ::%c:: from ::%s::", retVal, rosterObjective );
    }
    else {
        logPrintf( LOG_LEVEL_INFO, "roster", "Using parser and found objective letter ::%c::", retVal );
    }

    // At start of the server, the data from activeobjective seems unreliable.
    // This is a kluge to assume unreadable objective is 'A'
    //
    if ( retVal == ' ' ) {
        retVal = 'A';
        logPrintf( LOG_LEVEL_INFO, "roster", "Unnown Objective letter - Assuming ::%c::", retVal );
    }

    return( retVal );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1f3e48(%rip), %rbx    # 0x208180
movq %rbx, %rdi
callq 0xf65d
leaq 0xa3fd(%rip), %rsi      # 0x1e744
movq %rbx, %rdi
callq 0x83b0
testq %rax, %rax
jne 0x14367
leaq 0x1f3e25(%rip), %rdi    # 0x208180
leaq 0xa3f0(%rip), %rsi      # 0x1e752
callq 0x83b0
testq %rax, %rax
je 0x14371
movb 0xd(%rax), %bl
jmp 0x14373
movb $0x20, %bl
cmpb $0x20, %bl
jne 0x143ab
leaq 0x1f3e01(%rip), %r14    # 0x208180
movq %r14, %rdi
callq 0x11c4c
movl %eax, %ebx
movsbl %al, %ecx
leaq 0xa3cd(%rip), %rsi      # 0x1e760
leaq 0xa3cd(%rip), %rdx      # 0x1e767
movl $0x2, %edi
movq %r14, %r8
xorl %eax, %eax
callq 0x1a227
jmp 0x143c8
movsbl %bl, %ecx
leaq 0xa3ab(%rip), %rsi      # 0x1e760
leaq 0xa3f4(%rip), %rdx      # 0x1e7b0
movl $0x2, %edi
xorl %eax, %eax
callq 0x1a227
cmpb $0x20, %bl
jne 0x143ee
leaq 0xa38c(%rip), %rsi      # 0x1e760
leaq 0xa404(%rip), %rdx      # 0x1e7df
movl $0x2, %edi
movl $0x41, %ecx
xorl %eax, %eax
callq 0x1a227
movb $0x41, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterReset
void rosterReset( void )
{
    int i;

    for (i=0; i<ROSTER_MAX; i++) {
        strclr( masterRoster[i].netID );
        strclr( masterRoster[i].playerName );
        strclr( masterRoster[i].steamID );
        strclr( masterRoster[i].IPaddress );
        strclr( masterRoster[i].score );
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1f4231(%rip), %rbx    # 0x2086a0
movl $0x80, %r14d
movq %rbx, %rdi
callq 0xf4dd
leaq 0x50(%rbx), %rdi
callq 0xf4dd
leaq 0xa0(%rbx), %rdi
callq 0xf4dd
leaq 0xf0(%rbx), %rdi
callq 0xf4dd
leaq 0x140(%rbx), %rdi
callq 0xf4dd
addq $0x190, %rbx            # imm = 0x190
decq %r14
jne 0x14475
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterInit
void rosterInit( void )
{
    strclr( rosterServerName    );
    strclr( rosterMapName       );
    strclr( rosterSessionID     );
    strclr( rosterObjective     );
    strclr( rosterObjectiveType );
    rosterReset();
    return;
}

// Assembly:
pushq %rax
leaq 0x1f40da(%rip), %rdi    # 0x2085a0
callq 0xf4dd
leaq 0x1f3eae(%rip), %rdi    # 0x208380
callq 0xf4dd
leaq 0x1f3ba2(%rip), %rdi    # 0x208080
callq 0xf4dd
leaq 0x1f3c96(%rip), %rdi    # 0x208180
callq 0xf4dd
leaq 0x1f3d8a(%rip), %rdi    # 0x208280
callq 0xf4dd
popq %rax
jmp 0x14464
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: tabDumpDebug
int tabDumpDebug( unsigned char *buf, int n )
{
    int i;
    char *headStr, *recdStr;

    headStr = strstr( (char * ) &buf[32], "========================" );         // start separator
    recdStr = &headStr[80];                                      // look for start of first record

    i = 0;
    while ( 1 == 1 ) {
        printf("::%s::\n", getWord( recdStr, i++, "\011"));
        if (i > 500) break;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
addq $0x20, %rdi
leaq 0xa30c(%rip), %rsi      # 0x1e81f
callq 0x83b0
movq %rax, %rbx
addq $0x50, %rbx
leaq 0xa51c(%rip), %r14      # 0x1ea42
leaq 0xb4b0(%rip), %r15      # 0x1f9dd
xorl %esi, %esi
leal 0x1(%rsi), %ebp
movq %rbx, %rdi
movq %r14, %rdx
callq 0xf4e1
movq %r15, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x8180
movl %ebp, %esi
cmpl $0x1f5, %ebp            # imm = 0x1F5
jne 0x1452f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: copy3
static int _copy3( char *dst, char *src, int maxChars )
{
    int validFlag = 0;

    if ((src != NULL) && (dst != NULL)) {
        validFlag = 1;
        if      (0 == strncmp( src, " | ", 3)) strlcpy( dst, &src[3], maxChars );
        else if (0 == strncmp( src, "| ",  2)) strlcpy( dst, &src[2], maxChars );
        else if (0 == strncmp( src, " |",  2)) strlcpy( dst, &src[2], maxChars );
        else                                   strlcpy( dst,  src,    maxChars );  
    }
    return( validFlag );
}

// Assembly:
testq %rsi, %rsi
sete %cl
testq %rdi, %rdi
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x1499f
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xa14b(%rip), %rsi      # 0x1ea7a
movl $0x3, %edx
movq %rbx, %rdi
callq 0x8080
testl %eax, %eax
je 0x14979
leaq 0xa134(%rip), %rsi      # 0x1ea7b
movl $0x2, %edx
movq %rbx, %rdi
callq 0x8080
testl %eax, %eax
je 0x1497f
leaq 0xa11f(%rip), %rsi      # 0x1ea7e
movl $0x2, %edx
movq %rbx, %rdi
callq 0x8080
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leaq (%rbx,%rcx,2), %rbx
jmp 0x14983
addq $0x3, %rbx
jmp 0x14983
addq $0x2, %rbx
movl $0x50, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xf038
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterCount
int rosterCount( void )
{
    int i, count = 0;
    long devOverride;

    for (i=0; i<ROSTER_MAX; i++) {
        if ( strlen( masterRoster[i].netID ) ) {
            if (( rosterIsValidGUID(  masterRoster[i].steamID)) && ( 0 != strlen( masterRoster[i].IPaddress )) )  { 
                count++;
            }
        }
    }

    if ( 0L != (devOverride = p2pGetL( "dev.p2p.humans", 0L )) ) {
        count = 0xffL & devOverride;
    }

    return count;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebp, %ebp
leaq 0x1f3d93(%rip), %rbx    # 0x208740
movl $0x80, %r14d
cmpb $0x0, -0xa0(%rbx)
je 0x149cf
movq %rbx, %rdi
callq 0x1403c
testl %eax, %eax
je 0x149cf
cmpb $0x1, 0x50(%rbx)
sbbl $-0x1, %ebp
addq $0x190, %rbx            # imm = 0x190
decq %r14
jne 0x149b3
leaq 0x7d80(%rip), %rdi      # 0x1c762
xorl %esi, %esi
callq 0x18004
testq %rax, %rax
movzbl %al, %eax
cmovel %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterLookupNameFromIP
char *rosterLookupNameFromIP( char *playerIP )
{
    static char playerName[256];
    int i;
    strclr( playerName );
    for (i=0; i<ROSTER_MAX; i++) {
        if ( 0 == strcmp( masterRoster[i].IPaddress, playerIP )) {
            strlcpy( playerName, masterRoster[i].playerName, 256 ); 
            break;
        }
    }
    return( playerName );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x20049a(%rip), %rdi    # 0x214ea0
callq 0xf4dd
leaq 0x1f3d7e(%rip), %r14    # 0x208790
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x14a3d
addq $-0x190, %r15           # imm = 0xFE70
addq $0x190, %r14            # imm = 0x190
cmpq $-0xc800, %r15          # imm = 0xFFFF3800
jne 0x14a15
jmp 0x14a5c
leaq 0x1f3c5c(%rip), %rsi    # 0x2086a0
subq %r15, %rsi
addq $0x50, %rsi
leaq 0x20044e(%rip), %rdi    # 0x214ea0
movl $0x100, %edx            # imm = 0x100
callq 0xf038
leaq 0x20043d(%rip), %rax    # 0x214ea0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterLookupNameFromGUID
char *rosterLookupNameFromGUID( char *playerGUID )
{
    static char playerName[256];
    int i;
    strclr( playerName );
    for (i=0; i<ROSTER_MAX; i++) {
        if ( 0 == strcmp( masterRoster[i].steamID, playerGUID )) {
            strlcpy( playerName, masterRoster[i].playerName, 256 );
            break;
        }
    }
    return( playerName );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x200528(%rip), %rdi    # 0x214fa0
callq 0xf4dd
leaq 0x1f3cbc(%rip), %r14    # 0x208740
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x14aaf
addq $-0x190, %r15           # imm = 0xFE70
addq $0x190, %r14            # imm = 0x190
cmpq $-0xc800, %r15          # imm = 0xFFFF3800
jne 0x14a87
jmp 0x14ace
leaq 0x1f3bea(%rip), %rsi    # 0x2086a0
subq %r15, %rsi
addq $0x50, %rsi
leaq 0x2004dc(%rip), %rdi    # 0x214fa0
movl $0x100, %edx            # imm = 0x100
callq 0xf038
leaq 0x2004cb(%rip), %rax    # 0x214fa0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterLookupIPFromGUID
char *rosterLookupIPFromGUID( char *playerGUID )
{
    static char playerIP[256];
    int i;
    strclr( playerIP );
    for (i=0; i<ROSTER_MAX; i++) {
        if ( 0 == strcmp( masterRoster[i].steamID, playerGUID )) {
            strlcpy( playerIP, masterRoster[i].IPaddress, 256 );
            break;
        }
    }
    return( playerIP );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2005b6(%rip), %rdi    # 0x2150a0
callq 0xf4dd
leaq 0x1f3c4a(%rip), %r14    # 0x208740
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x14b21
addq $-0x190, %r15           # imm = 0xFE70
addq $0x190, %r14            # imm = 0x190
cmpq $-0xc800, %r15          # imm = 0xFFFF3800
jne 0x14af9
jmp 0x14b43
leaq 0x1f3b78(%rip), %rsi    # 0x2086a0
subq %r15, %rsi
addq $0xf0, %rsi
leaq 0x200567(%rip), %rdi    # 0x2150a0
movl $0x100, %edx            # imm = 0x100
callq 0xf038
leaq 0x200556(%rip), %rax    # 0x2150a0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterLookupSteamIDFromName
char *rosterLookupSteamIDFromName( char *playerName )
{
    static char steamID[256];
    int i;

    strclr( steamID );
    for (i=0; i<ROSTER_MAX; i++) {
        if ( 0 == strcmp( masterRoster[i].playerName, playerName )) {
            strlcpy( steamID, masterRoster[i].steamID, 256 ); 
            break;
        }
    }
    return( steamID );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x200641(%rip), %rdi    # 0x2151a0
callq 0xf4dd
leaq 0x1f3b85(%rip), %r14    # 0x2086f0
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x14b96
addq $-0x190, %r15           # imm = 0xFE70
addq $0x190, %r14            # imm = 0x190
cmpq $-0xc800, %r15          # imm = 0xFFFF3800
jne 0x14b6e
jmp 0x14bb8
leaq 0x1f3b03(%rip), %rsi    # 0x2086a0
subq %r15, %rsi
addq $0xa0, %rsi
leaq 0x2005f2(%rip), %rdi    # 0x2151a0
movl $0x100, %edx            # imm = 0x100
callq 0xf038
leaq 0x2005e1(%rip), %rax    # 0x2151a0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterLookupSteamIDFromPartialName
char *rosterLookupSteamIDFromPartialName( char *partialName, int minChars  )
{
    static char steamID[256];
    int i, matchCount = 0;

    if ( (int) strlen( partialName ) >= minChars ) {
        strclr( steamID );
        for (i=0; i<ROSTER_MAX; i++) {
            if ( NULL != strcasestr( masterRoster[i].playerName, partialName )) {
                strlcpy( steamID, masterRoster[i].steamID, 256 ); 
                matchCount++;
                break;
            }
        }
    }
    if ( matchCount != 1 ) strclr( steamID );

    return( steamID );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x8120
cmpl %ebp, %eax
jl 0x14c17
leaq 0x2006bf(%rip), %rdi    # 0x2152a0
callq 0xf4dd
leaq 0x1f3b03(%rip), %r14    # 0x2086f0
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8350
testq %rax, %rax
jne 0x14c25
addq $-0x190, %r15           # imm = 0xFE70
addq $0x190, %r14            # imm = 0x190
cmpq $-0xc800, %r15          # imm = 0xFFFF3800
jne 0x14bf0
leaq 0x200682(%rip), %rdi    # 0x2152a0
callq 0xf4dd
jmp 0x14c47
leaq 0x1f3a74(%rip), %rsi    # 0x2086a0
subq %r15, %rsi
addq $0xa0, %rsi
leaq 0x200663(%rip), %rdi    # 0x2152a0
movl $0x100, %edx            # imm = 0x100
callq 0xf038
leaq 0x200652(%rip), %rax    # 0x2152a0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterLookupIPFromName
char *rosterLookupIPFromName( char *playerName )
{
    static char playerIP[256];
    int i;
    strclr( playerIP );
    for (i=0; i<ROSTER_MAX; i++) {
        if ( 0 == strcmp( masterRoster[i].playerName, playerName )) {
            strlcpy( playerIP, masterRoster[i].IPaddress, 256 ); 
            break;
        }
    }
    return( playerIP );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x200738(%rip), %rdi    # 0x2153a0
callq 0xf4dd
leaq 0x1f3a7c(%rip), %r14    # 0x2086f0
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x14c9f
addq $-0x190, %r15           # imm = 0xFE70
addq $0x190, %r14            # imm = 0x190
cmpq $-0xc800, %r15          # imm = 0xFFFF3800
jne 0x14c77
jmp 0x14cc1
leaq 0x1f39fa(%rip), %rsi    # 0x2086a0
subq %r15, %rsi
addq $0xf0, %rsi
leaq 0x2006e9(%rip), %rdi    # 0x2153a0
movl $0x100, %edx            # imm = 0x100
callq 0xf038
leaq 0x2006d8(%rip), %rax    # 0x2153a0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterDump
void rosterDump( int humanFlag, int npcFlag )
{
    int i, isNPC, isPrintable;

    for (i=0; i<ROSTER_MAX; i++) {
        if ( strlen( masterRoster[i].netID ) ) {
            isNPC = 0;
            isPrintable = 0;
            if (0==strcmp( masterRoster[i].netID, "0")) isNPC = 1;

            if (npcFlag && isNPC)    isPrintable = 1;
            if (humanFlag && !isNPC) isPrintable = 1;

            printf("%d::%s::%s::%s::%s::%s\n", 
                isPrintable,
                masterRoster[i].netID, 
                masterRoster[i].playerName,
                masterRoster[i].steamID,
                masterRoster[i].IPaddress,
                masterRoster[i].score );
        }
    }
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movl %edi, 0x14(%rsp)
leaq 0x1f3845(%rip), %r13    # 0x2086a0
leaq 0x6cae(%rip), %r14      # 0x1bb10
leaq 0x9a85(%rip), %r15      # 0x1e8ee
xorl %ebp, %ebp
cmpb $0x0, (%rbp,%r13)
je 0x14ec4
movq %r13, %r12
addq %rbp, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x8220
movl %ebx, %ecx
testl %eax, %eax
je 0x14e8e
movl 0x14(%rsp), %ecx
xorl %esi, %esi
testl %ecx, %ecx
setne %sil
leaq 0x50(%rbp,%r13), %rcx
leaq 0xa0(%rbp,%r13), %r8
leaq 0xf0(%rbp,%r13), %r9
leaq 0x140(%rbp,%r13), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x8180
addq $0x190, %rbp            # imm = 0x190
cmpq $0xc800, %rbp           # imm = 0xC800
jne 0x14e6b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterParseCacheDestroyed
void rosterParseCacheDestroyed( char *destroyString, int maxChars, char *playerName, char *playerGUID, char *playerIP )
{
    char localBuffer[ 8092 ];         // EPIC size incresae
    char *p;

    strlcpy( localBuffer, destroyString, 8092 );  

    strclr( playerName );
    strclr( playerGUID );
    strclr( playerIP );

    // set p to point to start of destruct search string
    p = strstr( localBuffer, DESTROY1_STRING );
    if ( p == NULL ) 
        p = strstr( localBuffer, DESTROY2_STRING );

    if ( p != NULL ) { 
        // set p to point to start of player info
        p += strlen( DESTROY1_STRING );
    }

    if ( p != NULL ) { 
        if ( 0 != rosterFindFirstID(  p, '[', ']', playerGUID, maxChars )) { 
            strlcpy( playerIP,   rosterLookupIPFromGUID( playerGUID ), maxChars );
            strlcpy( playerName, rosterLookupNameFromGUID( playerGUID ), maxChars );
        }
    }

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1fa0, %rsp           # imm = 0x1FA0
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %rsi
movq %rsp, %r12
movl $0x1f9c, %edx           # imm = 0x1F9C
movq %r12, %rdi
callq 0xf038
movq %rbx, %rdi
callq 0xf4dd
movq %r14, %rdi
callq 0xf4dd
movq %r15, %rdi
callq 0xf4dd
leaq 0x99d7(%rip), %rsi      # 0x1e906
movq %r12, %rdi
callq 0x83b0
testq %rax, %rax
jne 0x14f4b
leaq 0x99f0(%rip), %rsi      # 0x1e933
movq %rsp, %rdi
callq 0x83b0
testq %rax, %rax
je 0x14fa7
addq $0x2c, %rax
movq %rax, %rdi
movl $0x5b, %esi
movl $0x5d, %edx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x140e0
testl %eax, %eax
je 0x14fa7
movq %r14, %rdi
callq 0x14adb
movslq %ebp, %r12
leaq 0x20011e(%rip), %rsi    # 0x2150a0
movq %r15, %rdi
movq %r12, %rdx
callq 0xf038
movq %r14, %rdi
callq 0x14a69
leaq 0x200004(%rip), %rsi    # 0x214fa0
movq %rbx, %rdi
movq %r12, %rdx
callq 0xf038
addq $0x1fa0, %rsp           # imm = 0x1FA0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterParsePlayerSynthConn
void rosterParsePlayerSynthConn( char *connectString, int maxSize, char *playerName, char *playerGUID, char *playerIP )
{
    int i, j = 0, spaceCount = 0;

    // strlcpy( playerName, &connectString[ 45 ], maxSize );  // old code
    strlcpy( playerGUID, getWord( connectString, 1, " " ), maxSize );
    strlcpy( playerIP,   getWord( connectString, 2, " " ), maxSize );

    // look for 3rd <space> for beginning of player name
    // recoded for EPIC ID, also for WinGDK
    // 
    strclr( playerName );
    for (i=0; i < (int) strlen( connectString ); i++) {
        if ( connectString[i] == ' ' ) spaceCount++;
        if ( spaceCount == 3 ) {
            j = i + 1;
            break;
        }
    }
    if ( j != 0 ) strlcpy( playerName, &connectString[ j ], maxSize );

    logPrintf( LOG_LEVEL_DEBUG, "roster-synconn", "Connect String ::%s::\n", connectString);
    logPrintf( LOG_LEVEL_DEBUG, "roster-synconn", "Parsed String  ::%s::%s::%s::\n", playerName, playerGUID, playerIP );
    
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r13
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r12
leaq 0x717f(%rip), %rbx      # 0x1c156
movl $0x1, %esi
movq %rbx, %rdx
callq 0xf4e1
movslq %ebp, %rbp
movq %r14, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0xf038
movq %r12, %rdi
movl $0x2, %esi
movq %rbx, %rdx
callq 0xf4e1
movq %r13, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0xf038
movq %r15, %rdi
callq 0xf4dd
movq %r12, %rdi
callq 0x8120
testl %eax, %eax
jle 0x1504b
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
xorl %edx, %edx
movl %edx, %esi
xorl %edx, %edx
cmpb $0x20, (%r12,%rcx)
sete %dl
addl %esi, %edx
cmpl $0x3, %edx
je 0x1504f
incq %rcx
cmpq %rcx, %rax
jne 0x15030
xorl %ecx, %ecx
jmp 0x15051
incl %ecx
testl %ecx, %ecx
je 0x15066
movslq %ecx, %rsi
addq %r12, %rsi
movq %r15, %rdi
movq %rbp, %rdx
callq 0xf038
leaq 0x98f3(%rip), %rbx      # 0x1e960
leaq 0x98fb(%rip), %rdx      # 0x1e96f
movl $0x3, %edi
movq %rbx, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0x1a227
leaq 0x98f9(%rip), %rdx      # 0x1e986
movl $0x3, %edi
movq %rbx, %rsi
movq %r15, %rcx
movq %r14, %r8
movq %r13, %r9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1a227
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterParsePlayerSynthDisConn
void rosterParsePlayerSynthDisConn( char *connectString, int maxSize,  char *playerName, char *playerGUID, char *playerIP )
{
    int i, j = 0, spaceCount = 0;

    // strlcpy( playerName, &connectString[ 45 ], maxSize );  // old code
    strlcpy( playerGUID, getWord( connectString, 1, " " ), maxSize );
    strlcpy( playerIP,   getWord( connectString, 2, " " ), maxSize );

    // look for 3rd <space> for beginning of player name
    // recoded for EPIC ID, also for WinGDK
    // 
    strclr( playerName );
    for (i=0; i < (int) strlen( connectString ); i++) {
        if ( connectString[i] == ' ' ) spaceCount++;
        if ( spaceCount == 3 ) {
            j = i + 1;
            break;
        }
    }
    if ( j != 0 ) strlcpy( playerName, &connectString[ j ], maxSize );
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x7083(%rip), %r15      # 0x1c156
movl $0x1, %esi
movq %r15, %rdx
callq 0xf4e1
movslq %ebp, %rbp
movq %r13, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0xf038
movq %r14, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0xf4e1
movq %r12, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0xf038
movq %rbx, %rdi
callq 0xf4dd
movq %r14, %rdi
callq 0x8120
testl %eax, %eax
jle 0x15147
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
xorl %edx, %edx
movl %edx, %esi
xorl %edx, %edx
cmpb $0x20, (%r14,%rcx)
sete %dl
addl %esi, %edx
cmpl $0x3, %edx
je 0x1514b
incq %rcx
cmpq %rcx, %rax
jne 0x1512c
xorl %ecx, %ecx
jmp 0x1514d
incl %ecx
testl %ecx, %ecx
je 0x15173
movslq %ecx, %rax
addq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf038
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterParsePlayerConn
void rosterParsePlayerConn( char *connectString, int maxSize,  char *playerName, char *playerGUID, char *playerIP )
{
    // Refresh the roster from RCON first, THEN call this routine
    //
    char *w;

    // parse the log string for connect - only has playerName
    // Example:  [2019.07.26-01.45.36:776][792]LogNet: Join succeeded: PlayerName
    //
    w = strstr( connectString, "Join succeeded: " );
    if ( w != NULL ) {
        strlcpy( playerName, &w[ 16 ], maxSize );
        playerName[ strlen( playerName ) - 1] = 0;    // get rid of trailing LF/CR

        // Do a lookup of playerGUID and playerID
        //
        strlcpy( playerGUID, rosterLookupSteamIDFromName( playerName ), maxSize );
        strlcpy( playerIP,   rosterLookupIPFromName( playerName ), maxSize );
    }
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
leaq 0x9809(%rip), %rsi      # 0x1e9a5
callq 0x83b0
testq %rax, %rax
je 0x15205
addq $0x10, %rax
movslq %ebp, %r12
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0xf038
movq %r14, %rdi
callq 0x8120
movb $0x0, -0x1(%r14,%rax)
movq %r14, %rdi
callq 0x14b50
leaq 0x1fffc8(%rip), %rsi    # 0x2151a0
movq %r15, %rdi
movq %r12, %rdx
callq 0xf038
movq %r14, %rdi
callq 0x14c59
leaq 0x2001ae(%rip), %rsi    # 0x2153a0
movq %rbx, %rdi
movq %r12, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf038
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterParsePlayerDisConn
void rosterParsePlayerDisConn( char *connectString, int maxSize, char *playerName, char *playerGUID, char *playerIP )
{
    // Call this first THEN refresh the roster from RCON
    //
    char *w, *v;

    // parse the log string for disconnect - only has IP:port available
    // Example: [2019.07.26-01.47.06:457][106]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. 
    //     Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 12.123.123.12:12345, 
    //     Name: IpConnection_3, Driver: GameNetDriver IpNetDriver_0, IsServer: YES, PC: INSPlayerController_2, 
    //     Owner: INSPlayerController_2, UniqueId: SteamNWI:UNKNOWN [0x7F6B5A5BC340]

    w = strstr( connectString, "RemoteAddr: " );
    if ( w != NULL ) {
        // extract player IP# (no port#)
        if ( NULL != ( v = getWord( w, 1, " :," ))) 
            strlcpy( playerIP, v, maxSize);
        else 
            strlcpy( playerIP, "", maxSize );

        // Do a lookup of playerGUID and playerName
        strlcpy( playerName, rosterLookupNameFromIP( playerIP ), maxSize );
        strlcpy( playerGUID, rosterLookupSteamIDFromName( playerName ), maxSize );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
leaq 0x978e(%rip), %rsi      # 0x1e9b6
callq 0x83b0
testq %rax, %rax
je 0x1529e
leaq 0x978a(%rip), %rdx      # 0x1e9c3
movq %rax, %rdi
movl $0x1, %esi
callq 0xf4e1
testq %rax, %rax
movslq %ebp, %r12
leaq 0x64be(%rip), %rsi      # 0x1b711
cmovneq %rax, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0xf038
movq %r15, %rdi
callq 0x149f7
leaq 0x1ffc2f(%rip), %rsi    # 0x214ea0
movq %r14, %rdi
movq %r12, %rdx
callq 0xf038
movq %r14, %rdi
callq 0x14b50
leaq 0x1fff15(%rip), %rsi    # 0x2151a0
movq %rbx, %rdi
movq %r12, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf038
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterParseSessionID
void rosterParseSessionID( char *sessionLogString, int maxChars, char *sessionID )
{
    char *w;
    int i, j;

    strclr( sessionID );
    w = strstr( sessionLogString, "SessionName:" );
    if ( w != NULL ) {
        strlcpy( sessionID, &w[13], maxChars );
        i = (int) strlen( sessionID );
        if ( i >= 1 )  {
            for (j = 0; j<i; j++)  {
                if ( sessionID[j] == 0x0d ) {
                    sessionID[j] = 0;
                    break;
                }
            }
        }
    }
    // if ( w != NULL ) strlcpy( sessionID, &w[13], 37 );

    return;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq %rdx, %rdi
callq 0xf4dd
leaq 0x75a2(%rip), %rsi      # 0x1c9de
movq %r14, %rdi
callq 0x83b0
testq %rax, %rax
je 0x15482
addq $0xd, %rax
movslq %ebp, %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf038
movq %rbx, %rdi
callq 0x8120
testl %eax, %eax
jle 0x15482
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
cmpb $0xd, (%rbx,%rcx)
je 0x1547e
incq %rcx
cmpq %rcx, %rax
jne 0x1546e
jmp 0x15482
movb $0x0, (%rbx,%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/roster.c
// Function: parseKillerKilled
static int _parseKillerKilled( char *killerKilled, int maxChars, char *playerName, char *playerID )
{
    char tmpStr[ 1024 ], *u = NULL, *w = NULL;
    int i, errCode;

    // -----------------
    // This local method parses "[clan]Player Name[12341234123]"  to playerName and playerID
    // -----------------

    strlcpy( tmpStr, killerKilled, 1024 );

    // Do a backward search and terminate the string at the last '['
    // which seprates player name from player ID.
    //
    errCode = 1;
    for (i = (int) strlen( tmpStr ); i>=1; i--) {
        if ( tmpStr[i] == '[' ) {
            w = &tmpStr[i];      // w is the pivot
            *w = 0;              // terminate this string in the middle
            errCode = 0;
            break;
        }
    }

    // Copy two substrings (first half, second half) to
    // respective return values, and get rid of [] surrounding
    // the player ID.
    //
    if ( errCode == 0 ) {
        errCode = 1;
        strlcpy( playerName, tmpStr, maxChars );
        strlcpy( playerID, w+1, maxChars );
        if ( NULL != ( u = strstr( playerID, "]" ))) {
            *u = 0;
            errCode = 0;
        }
    }
    return( errCode );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rsi
movq %rsp, %r15
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
callq 0xf038
movq %r15, %rdi
callq 0x8120
testl %eax, %eax
setg %cl
jle 0x15726
movl %eax, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpb $0x5b, (%rsp,%rdx)
je 0x1571c
xorl %r15d, %r15d
movl %eax, %edx
cmpl $0x2, %edx
setge %cl
jl 0x15729
decl %edx
cmpb $0x5b, (%rsp,%rdx)
jne 0x1570c
leaq (%rsp,%rdx), %r15
movb $0x0, (%r15)
jmp 0x15729
xorl %r15d, %r15d
movl $0x1, %r12d
testb %cl, %cl
je 0x1576d
movslq %ebp, %r13
movq %rsp, %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0xf038
incq %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xf038
movq %rbx, %rdi
movl $0x5d, %esi
callq 0x8170
testq %rax, %rax
je 0x1576d
movb $0x0, (%rax)
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/piantirush.c
// Function: capRusherClear
static void _capRusherClear( void )
{
    int i;
    for (i = 0; i<SISSM_MAXPLAYERS; i++) {
        strclr( territorialRushers[i].playerCharID );        
        strclr( territorialRushers[i].playerName );
        territorialRushers[i].playerEarlyBreachCount = 0;
        territorialRushers[i].playerEarlyBreachCumulativeTime = 0;
        territorialRushers[i].playerIsInZone = 0;
    }

    kickArmed = 0;

    return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x209fbd(%rip), %rbx    # 0x21fe90
movl $0x40, %r14d
movq %rbx, %rdi
callq 0xf4dd
leaq 0x40(%rbx), %rdi
callq 0xf4dd
movq $0x0, 0x80(%rbx)
movl $0x0, 0x88(%rbx)
addq $0x8c, %rbx
decq %r14
jne 0x15ed9
movb $0x0, 0x209f2e(%rip)    # 0x21fe40
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/piantirush.c
// Function: piantirushGameEndCB
int piantirushGameEndCB( char *strIn )
{
    // clear the training mode if "on", but not if "perm" - it is important to call this
    // before _startOfEverything() below.
    //
    if ( 1L == p2pGetL( "piantirush.p2p.training", 0L ) )  // check if "on", not "perm"
        p2pSetL( "piantirush.p2p.training", 0L );

    _captureSpeedForceNext();
    return 0;
}

// Assembly:
pushq %rax
leaq 0x5988(%rip), %rdi      # 0x1b912
xorl %esi, %esi
callq 0x18004
cmpq $0x1, %rax
jne 0x15fa5
leaq 0x5974(%rip), %rdi      # 0x1b912
xorl %esi, %esi
callq 0x17ea8
movl $0xffffffff, 0x13f35(%rip) # imm = 0xFFFFFFFF
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/piantirush.c
// Function: piantirushRoundStartCB
int piantirushRoundStartCB( char *strIn )
{
    // Clear the 'last' objective letter ID 'A', 'B', 'C', etc.  -- this is used to suppress 
    // extra printing of fast prompt message to screen during counterattacks.
    //
    _lastObjLetter = '~';

    kickArmed = 0;
    _captureSpeedForceNext();
    _startOfEverything();
    alarmReset( dPtr, piantirushConfig.warnRusherDelaySec );

    // Handle condition for early territorial cap rushers [TRUSH]
    //  
    if ( NULL != strstr( rosterGetObjectiveType(), "Capturable" )) {
        alarmReset( tPtr, alarmStatus( aPtr ) );    // copy from cap rate "slow down" timer 
    }
    else {
        alarmCancel( tPtr );
    }

    // clear the cumulative territorial zone antirush data structure
    //
    _capRusherClear();


    // if in training mode, announce it
    //
    if ( 0L != p2pGetL( "piantirush.p2p.training", 0L ) )  
       apiSay( piantirushConfig.trainingModeMsg );

    // clear the bot-spawnkill detector timer
    //
    alarmCancel( sPtr );

    return 0;
}

// Assembly:
pushq %rbx
movb $0x7e, 0x13f15(%rip)    # 0x29ed0
movb $0x0, 0x209e7e(%rip)    # 0x21fe40
movl $0xffffffff, 0x13f18(%rip) # imm = 0xFFFFFFFF
callq 0x15934
movq 0x209e70(%rip), %rdi    # 0x21fe48
movslq 0x2044d5(%rip), %rsi    # 0x21a4b4
callq 0xf953
callq 0x14246
leaq 0x8ef4(%rip), %rsi      # 0x1eee4
movq %rax, %rdi
callq 0x83b0
movq 0x209e51(%rip), %rbx    # 0x21fe50
testq %rax, %rax
je 0x1601d
movq 0x209915(%rip), %rdi    # 0x21f920
callq 0xf97e
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf953
jmp 0x16025
movq %rbx, %rdi
callq 0xf974
callq 0x15ec8
leaq 0x58e1(%rip), %rdi      # 0x1b912
xorl %esi, %esi
callq 0x18004
testq %rax, %rax
je 0x1604b
leaq 0x2078c0(%rip), %rdi    # 0x21d904
xorl %eax, %eax
callq 0x12fba
movq 0x209de6(%rip), %rdi    # 0x21fe38
callq 0xf974
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/piantirush.c
// Function: localSay
static int _localSay( const char * format, ... )
{
    static char buffer[API_T_BUFSIZE];
    int errCode = 0;
    char *v;

    // a wedge code to disable this plugin if non-Checkpoint mode is running
    //
    v = apiGetServerMode();
    if (! ((0==strcmp( v, "checkpoint" )) || (0==strcmp( v, "hardcore"))) )  return 0;

    if ( 0 == _localMute ) {
        va_list args;
        va_start( args, format );
        vsnprintf( buffer, (API_T_BUFSIZE >= API_MAXSAY) ? API_MAXSAY : API_T_BUFSIZE, format, args );
        errCode = apiSay( buffer );
        va_end (args);
    }
    return errCode;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x165b5
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
callq 0x13a76
movq %rax, %r14
leaq 0x6a17(%rip), %rsi      # 0x1cfdb
movq %rax, %rdi
callq 0x8220
testl %eax, %eax
je 0x165e3
leaq 0x5a28(%rip), %rsi      # 0x1bfff
movq %r14, %rdi
callq 0x8220
testl %eax, %eax
jne 0x16632
cmpb $0x0, 0x20987e(%rip)    # 0x21fe68
jne 0x16632
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0x20bb78(%rip), %r14    # 0x222190
movl $0x50, %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x80c0
movq %r14, %rdi
xorl %eax, %eax
callq 0x12fba
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/piantirush.c
// Function: piantirushSigKillCB
int piantirushSigKillCB( char *strIn )
{
    logPrintf( LOG_LEVEL_INFO, "piantirush", "Restoring Normal Capture Rate before shutdown" );

    _captureSpeedForceNext();
    _captureSpeed( 0 );

    return 0;
}

// Assembly:
pushq %rax
leaq 0x84a5(%rip), %rsi      # 0x1eaea
leaq 0x8582(%rip), %rdx      # 0x1ebce
movl $0x2, %edi
xorl %eax, %eax
callq 0x1a227
movl $0xffffffff, 0x13882(%rip) # imm = 0xFFFFFFFF
xorl %edi, %edi
callq 0x15a74
xorl %eax, %eax
popq %rcx
retq