LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiIdListRead
int apiIdListRead( char *listFile, idList_t idList )
{
    int  i, idType;
    char tmpLine[1024], testGUID[256]; //  *w;
    FILE *fpr;

    for (i=0; i<IDLISTMAXELEM; i++) strclr( idList[i] );

    // EPIC

    i = -1;
    if (NULL != (fpr = fopen( listFile, "rt" ))) {
        i = 0;
        while (!feof( fpr )) {
            if (NULL != fgets( tmpLine, 1024, fpr )) {
                tmpLine[ strlen( tmpLine ) - 1] = 0;

                strlcpy( testGUID, tmpLine, IDEPICIDLEN+1 );           // 65-char EPIC ID + terminator
                if ( 2 == ( idType = rosterIsValidGUID( testGUID ) )) {
                    strlcpy( idList[i++], testGUID, IDEPICIDLEN+1 );
                }
                else {
                    strlcpy( testGUID, tmpLine, IDSTEAMID64LEN+1 );   // 17-char Steam ID + terminator
                    if ( 1 == ( idType = rosterIsValidGUID ( testGUID ))) { 
                        strlcpy( idList[i++], testGUID, IDSTEAMID64LEN+1 );
                    }
                } 
                if ( i >= (IDLISTMAXELEM-1) ) break;    // check for overflow
            }
        }
        fclose( fpr );
    }
    return( i );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x508, %rsp            # imm = 0x508
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
leaq (%rbx,%r15), %rdi
callq 0xf4dd
addq $0x100, %r15            # imm = 0x100
cmpq $0x10000, %r15          # imm = 0x10000
jne 0x10fa2
leaq 0xaed1(%rip), %rsi      # 0x1be93
movq %r14, %rdi
callq 0x8320
testq %rax, %rax
je 0x11097
movq %rax, %r14
movq %rax, %rdi
callq 0x8270
xorl %ebp, %ebp
testl %eax, %eax
jne 0x1108d
xorl %ebp, %ebp
leaq 0x100(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x8200
testq %rax, %rax
je 0x1107d
movq %r15, %rdi
callq 0x8120
movb $0x0, -0x1(%rax,%r15)
movl $0x42, %r13d
movl $0x42, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0xf038
movq %r12, %rdi
callq 0x1403c
cmpl $0x2, %eax
je 0x1105e
movl $0x12, %r13d
movl $0x12, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0xf038
movq %r12, %rdi
callq 0x1403c
cmpl $0x1, %eax
jne 0x11075
movslq %ebp, %rdi
incl %ebp
shlq $0x8, %rdi
addq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xf038
cmpl $0xfe, %ebp
jg 0x1108d
movq %r14, %rdi
callq 0x8270
testl %eax, %eax
je 0x10ff5
movq %r14, %rdi
callq 0x8100
jmp 0x1109c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x508, %rsp            # imm = 0x508
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/api.c
// Function: apiBadNameCheck
int apiBadNameCheck( char *nameIn, int exactMatch )
{
    if ( exactMatch ) 
        return (apiWordListCheckExact( nameIn, badWordsList )); 
    else
        return (apiWordListCheck( nameIn, badWordsList )); 
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
testl %esi, %esi
je 0x110d9
leaq 0xc03ba(%rip), %rsi     # 0xd1480
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x10e71
xorl %ebx, %ebx
leaq 0xc039e(%rip), %r15     # 0xd1480
xorl %r12d, %r12d
cmpb $0x0, (%r12,%r15)
je 0x11111
leaq (%r15,%r12), %rsi
movq %r14, %rdi
callq 0x8350
testq %rax, %rax
jne 0x1110c
addq $0x20, %r12
cmpq $0x8000, %r12           # imm = 0x8000
jne 0x110e5
jmp 0x11111
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiIdListCheck
int apiIdListCheck( char *connectID, idList_t idList )
{
    int i;
    int isMatch = 0;

    for (i=0; i<IDLISTMAXELEM; i++) {
        if (0 == strcmp( idList[i], connectID )) {
            isMatch = 1;
            break;
        }
    }
    return( isMatch );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
leaq (%rbx,%r15), %rdi
movq %r14, %rsi
callq 0x8220
testl %eax, %eax
je 0x11151
addq $0x100, %r15            # imm = 0x100
cmpq $0x10000, %r15          # imm = 0x10000
jne 0x1112d
xorl %eax, %eax
jmp 0x11156
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: apiIdListMatch
int apiIdListMatch( char *connectID, idList_t idList )
{
    int i;
    int isMatch = 0;

    for ( i=0; i<IDLISTMAXELEM; i++ ) {
        if ( 0 == strlen( idList[i] )) 
            break;
        if (NULL != strcasestr( connectID, idList[i] )) {
            isMatch = 1;
            break;
        }
    }
    return( isMatch );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
xorl %r12d, %r12d
cmpb $0x0, (%r14,%r12)
je 0x1119e
leaq (%r14,%r12), %rsi
movq %r15, %rdi
callq 0x8350
testq %rax, %rax
jne 0x11199
addq $0x100, %r12            # imm = 0x100
cmpq $0x10000, %r12          # imm = 0x10000
jne 0x1116f
jmp 0x1119e
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiSyntheticObjDispatch
int _apiSyntheticObjDispatch(char *activeObjectRaw )   
{
    char strOut[API_LINE_STRING_MAX], *w;
    int i, errCode = 0;

    // Repackage the log line into something we can use -
    // a space delimited parameters that we can parse easily
    //
    strlcpy( strOut, "~SYNTHOBJ~", API_LINE_STRING_MAX ); 
    for (i=0; i<5; i++) {
        w = getWord( activeObjectRaw, i, " =\"\'.:" );
        if  ( w != NULL )  {
            strlcat( strOut, " ", API_LINE_STRING_MAX );
            strlcat( strOut, w,   API_LINE_STRING_MAX );
        }
        else  {
            errCode = 1;
            break;
        }
    }

    // Update some internal variables and finally call a Synthetic 
    // dispatcher to signal the plugins // something has updated.
    //
    if ( !errCode ) {
        // Update the database with ActiveObject content just decoded.
        // 
        rosterSetMapName( getWord( strOut, 3, " " ));
        rosterSetObjective( getWord( strOut, 5, " " ), getWord( strOut, 1, " " ));
        logPrintf( LOG_LEVEL_DEBUG, "api", "Updating DB with ActiveObject ::%s::%s::%s::", 
            getWord( strOut, 3, " " ), getWord( strOut, 5, " " ), getWord( strOut, 1, " " ) );

        // Generate a Synthetic event signalling change in ActiveObject content
        // 
        eventsDispatch( strOut );                        // dispatch subscribed plugin Callbacks 
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
movabsq $0x424f48544e59537e, %rax # imm = 0x424F48544E59537E
movq %rsp, %r14
movq %rax, (%r14)
movl $0x7e4a42, 0x7(%r14)    # imm = 0x7E4A42
xorl %ebp, %ebp
leaq 0xcc25(%rip), %r15      # 0x1de88
leaq 0xaeec(%rip), %r12      # 0x1c156
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xf4e1
testq %rax, %rax
je 0x1135b
movq %rax, %r13
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %r12, %rsi
callq 0xefc4
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %r13, %rsi
callq 0xefc4
incl %ebp
cmpl $0x5, %ebp
jne 0x1126a
leaq 0xaea5(%rip), %r14      # 0x1c156
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %rdx
callq 0xf4e1
movq %rax, %rdi
callq 0x1424e
movq %rbx, %rdi
movl $0x5, %esi
movq %r14, %rdx
callq 0xf4e1
movq %rax, %r15
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0xf4e1
movq %r15, %rdi
movq %rax, %rsi
callq 0x14211
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %rdx
callq 0xf4e1
movq %rax, %r15
movq %rbx, %rdi
movl $0x5, %esi
movq %r14, %rdx
callq 0xf4e1
movq %rax, %r12
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0xf4e1
leaq 0xcb58(%rip), %rsi      # 0x1de8f
leaq 0xcb55(%rip), %rdx      # 0x1de93
movl $0x3, %edi
movq %r15, %rcx
movq %r12, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x1a227
movq %rbx, %rdi
callq 0xd1bc
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
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/api.c
// Function: apiFetchGameState
static int _apiFetchGameState( void )
{
    int errCode = 1;

    strlcpy( gameStateCurrent, apiGameModePropertyGet( "activeobjective" ), API_ROSTER_STRING_MAX );
    if ( 0 != strlen( gameStateCurrent ) ) {
        lastGameStateSuccessTime = apiTimeGet();   // record last time value read succesfully
        errCode = 0;
        if ( 0 != strncmp( gameStatePrevious, gameStateCurrent, API_ROSTER_STRING_MAX )) {
            strlcpy( gameStatePrevious, gameStateCurrent, API_ROSTER_STRING_MAX );
            logPrintf( LOG_LEVEL_INFO, "api", "ActiveObjective ::%s::", gameStatePrevious );
            _apiSyntheticObjDispatch( gameStatePrevious );
        }
    }
    return errCode;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xd20b(%rip), %rdi      # 0x1e6cf
callq 0x12e75
leaq 0x146500(%rip), %rdi    # 0x1579d0
leaq 0x15a709(%rip), %rsi    # 0x16bbe0
movl $0x4000, %edx           # imm = 0x4000
callq 0xf038
cmpb $0x0, 0x1464e8(%rip)    # 0x1579d0
je 0x11553
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x82a0
leaq 0xdc0b6(%rip), %rdi     # 0xed5b0
leaq 0x1464cf(%rip), %rsi    # 0x1579d0
movl $0x4000, %edx           # imm = 0x4000
callq 0x8080
testl %eax, %eax
je 0x11558
leaq 0xdc09a(%rip), %r14     # 0xed5b0
leaq 0x1464b3(%rip), %rsi    # 0x1579d0
movl $0x4000, %edx           # imm = 0x4000
movq %r14, %rdi
callq 0xf038
leaq 0xc95e(%rip), %rsi      # 0x1de8f
leaq 0xd1a7(%rip), %rdx      # 0x1e6df
xorl %ebx, %ebx
movl $0x2, %edi
movq %r14, %rcx
xorl %eax, %eax
callq 0x1a227
movq %r14, %rdi
callq 0x1122e
jmp 0x11558
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiGetServerNameRCON
char *apiGetServerNameRCON( int forceCacheRefresh )
{
    static char hostName[256];
    static unsigned long timeLastRead = 0;

    // check to see if this is a first-time call, or caller is forcing a refrehs
    //
    if ( (timeLastRead == 0L) || forceCacheRefresh ) {
    
        // fetch from RCON.  apiGameModePropertyGet returns an empty string
        // (not NULL) on interface error.
        //
        strlcpy( hostName, apiGameModePropertyGet( "serverhostname" ), 256 ); 
        if ( strlen( hostName ) != 0 )  {
            timeLastRead = apiTimeGet();
            logPrintf( LOG_LEVEL_INFO, "api", "RCON successful read of serverhostname ::%s::", hostName );
        }
        else {
            strlcpy( hostName, "Unknown", 256 );
            logPrintf( LOG_LEVEL_INFO, "api", "RCON Error! -- Failed to read serverhostname." );
        }
    }
    return ( hostName );
}

// Assembly:
testl %edi, %edi
jne 0x11574
cmpq $0x0, 0x166972(%rip)    # 0x177ee0
jne 0x11602
pushq %rax
leaq 0xcf8e(%rip), %rdi      # 0x1e50a
callq 0x12e75
leaq 0x166858(%rip), %rdi    # 0x177de0
leaq 0x15a651(%rip), %rsi    # 0x16bbe0
movl $0x100, %edx            # imm = 0x100
callq 0xf038
cmpb $0x0, 0x166840(%rip)    # 0x177de0
je 0x115d3
xorl %edi, %edi
callq 0x82a0
movq %rax, 0x166930(%rip)    # 0x177ee0
leaq 0xc8d8(%rip), %rsi      # 0x1de8f
leaq 0xcf5b(%rip), %rdx      # 0x1e519
leaq 0x16681b(%rip), %rcx    # 0x177de0
movl $0x2, %edi
xorl %eax, %eax
callq 0x1a227
jmp 0x115fe
movabsq $0x6e776f6e6b6e55, %rax # imm = 0x6E776F6E6B6E55
movq %rax, 0x1667fc(%rip)    # 0x177de0
leaq 0xc8a4(%rip), %rsi      # 0x1de8f
leaq 0xcf55(%rip), %rdx      # 0x1e547
movl $0x2, %edi
xorl %eax, %eax
callq 0x1a227
addq $0x8, %rsp
leaq 0x1667d7(%rip), %rax    # 0x177de0
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiSessionLogCB
int _apiSessionLogCB( char *strIn )
{
    char _currSession[API_LINE_STRING_MAX];

    rosterParseSessionID( strIn, API_LINE_STRING_MAX, _currSession );
    rosterSetSessionID( _currSession );

    logPrintf( LOG_LEVEL_INFO, "api", "SessionID: ::%s::", _currSession );
    return 0;
}

// Assembly:
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsp, %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdx
callq 0x15421
movq %rbx, %rdi
callq 0x141f5
leaq 0xc7eb(%rip), %rsi      # 0x1de8f
leaq 0xc8e2(%rip), %rdx      # 0x1df8d
movl $0x2, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1a227
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiBPCharInitCB
int _apiBPCharInitCB( char *strIn )
{
    int i;

    strclr( _cachedName );
    for ( i=0; i<API_MAXENTITIES; i++ ) {
        strclr( soldierTranslate[ i ].charID );
        strclr( soldierTranslate[ i ].playerName );
    }
    logPrintf( LOG_LEVEL_INFO, "api", "BPChar Translation Table cleared" );
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xcfdd0(%rip), %rdi     # 0xe14a0
callq 0xf4dd
leaq 0xcfec4(%rip), %rbx     # 0xe15a0
movl $0x40, %r14d
movq %rbx, %rdi
callq 0xf4dd
leaq 0x100(%rbx), %rdi
callq 0xf4dd
addq $0x200, %rbx            # imm = 0x200
decq %r14
jne 0x116e2
leaq 0xc786(%rip), %rsi      # 0x1de8f
leaq 0xc88f(%rip), %rdx      # 0x1df9f
movl $0x2, %edi
xorl %eax, %eax
callq 0x1a227
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiBPPlayerCount
int apiBPPlayerCount( void )
{
    int i;
    int countPlayers = 0;
    long devOverride = 0L;

    for ( i=0; i<API_MAXENTITIES; i++ ) {
        if (0 != strlen( soldierTranslate[ i ].playerName ) ) countPlayers++;
    }

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

    return countPlayers;
}

// Assembly:
pushq %rbx
xorl %eax, %eax
leaq 0xcfe68(%rip), %rcx     # 0xe15a0
xorl %ebx, %ebx
cmpb $0x1, 0x100(%rax,%rcx)
sbbl $-0x1, %ebx
addq $0x200, %rax            # imm = 0x200
cmpq $0x8000, %rax           # imm = 0x8000
jne 0x1173a
leaq 0xb008(%rip), %rdi      # 0x1c762
xorl %esi, %esi
callq 0x18004
testq %rax, %rax
movzbl %al, %eax
cmovel %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiBPCharDisconnectCB
int _apiBPCharDisconnectCB( char *strIn )
{
    char *w, *n = NULL;
    int i;

    if ( NULL != (w = strstr( strIn, SS_SUBSTR_BP_PLAYER_DISCONN ) )) {
        w = strstr( strIn, "BP_Character_Player" );
        if ( w != NULL ) {
            if ( NULL != (n = getWord( w, 0, " .'" )) ) {
                // printf("\nDisconnect ::%s::\n", n);
                ;
            }
        }
    }

    if ( n != NULL ) {

        // Remove from translation database
        // Check all entries and remove duplicates to be safe
        //
        for ( i = 0; i<API_MAXENTITIES; i++ )  {
            if ( 0 == strcmp( n, soldierTranslate[ i ].charID )) {
                logPrintf( LOG_LEVEL_INFO, "api", "BPChar '%s' unbound from '%s'", n, soldierTranslate[ i ].playerName );
                strclr( soldierTranslate[ i ].charID     );
                strclr( soldierTranslate[ i ].playerName );
            }
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb0d4(%rip), %rsi      # 0x1ca33
callq 0x83b0
testq %rax, %rax
je 0x11993
leaq 0xc66a(%rip), %rsi      # 0x1dfda
movq %rbx, %rdi
callq 0x83b0
testq %rax, %rax
je 0x11993
leaq 0xc66a(%rip), %rdx      # 0x1dfee
movq %rax, %rdi
xorl %esi, %esi
callq 0xf4e1
movq %rax, %rbx
jmp 0x11995
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x119fe
leaq 0xcfbff(%rip), %r14     # 0xe15a0
movl $0x40, %ebp
leaq 0xc4e2(%rip), %r15      # 0x1de8f
leaq 0xc656(%rip), %r12      # 0x1e00a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8220
testl %eax, %eax
jne 0x119f2
leaq 0x100(%r14), %r13
movl $0x2, %edi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x1a227
movq %r14, %rdi
callq 0xf4dd
movq %r13, %rdi
callq 0xf4dd
addq $0x200, %r14            # imm = 0x200
decq %rbp
jne 0x119b4
xorl %eax, %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/api.c
// Function: apiMapChangeCB
int _apiMapChangeCB( char *strIn )
{
    char _currMap[API_LINE_STRING_MAX];
    int   i;
    int errCode;

    // There are two ways to find the current map.  The code below works by watching
    // the Insurgency.log file which works for all game modes.  For Co-op this is 
    // later superceded by synthetic map change event, reading data from activeobjectives
    // gamemodeproperty.
    //
    rosterParseMapname( strIn, API_LINE_STRING_MAX, _currMap );
    strClean( _currMap );
    rosterSetMapName( _currMap );

    _apiBPCharInitCB( strIn );

    // on map change, clear the objectives
    //
    for (i=0; i<API_OBJECTIVES_MAX; i++) strclr( _objectiveListCache[i]) ;
    logPrintf(LOG_LEVEL_INFO, "api", "Map change to ::%s:: and resetting the internal objectives cache", _currMap );


    // Update the change in GameState.  This may fail on some slower servers, so the following
    // routine is also called by the periodic CB. 
    // 
    errCode = _apiFetchGameState();
    logPrintf( LOG_LEVEL_INFO, "api", "MapChange ActiveObjective update::%s:: and Error ::%d::", gameStatePrevious, errCode );

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsp, %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdx
callq 0x15487
movq %rbx, %rdi
callq 0xf65d
movq %rbx, %rdi
callq 0x1424e
callq 0x116c5
xorl %ebx, %ebx
leaq 0xd7b63(%rip), %r14     # 0xe95b0
leaq (%r14,%rbx), %rdi
callq 0xf4dd
addq $0x100, %rbx            # imm = 0x100
cmpq $0x4000, %rbx           # imm = 0x4000
jne 0x11a4d
leaq 0xc422(%rip), %rbx      # 0x1de8f
leaq 0xc5b4(%rip), %rdx      # 0x1e028
movq %rsp, %rcx
movl $0x2, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1a227
callq 0x114b9
leaq 0xc5d7(%rip), %rdx      # 0x1e069
leaq 0xdbb17(%rip), %rcx     # 0xed5b0
movl $0x2, %edi
movq %rbx, %rsi
movl %eax, %r8d
xorl %eax, %eax
callq 0x1a227
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiNameToCharacter
char *apiNameToCharacter( char *playerName )
{
    int i;
    static char w[ 256 ];

    strclr( w );
    for ( i = 0; i<API_MAXENTITIES; i++ )  {
        if ( 0 == strcmp( playerName, soldierTranslate[ i ].playerName )) {
            strlcpy( w, soldierTranslate[ i ].charID, 256 );
            break;
        }
    }
    return( w );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0xdfae9(%rip), %rdi     # 0xf15b0
callq 0xf4dd
leaq 0xcfacd(%rip), %rbx     # 0xe15a0
movl $0x40, %r15d
leaq 0x100(%rbx), %rsi
movq %r14, %rdi
callq 0x8220
testl %eax, %eax
je 0x11afa
addq $0x200, %rbx            # imm = 0x200
decq %r15
jne 0x11ad9
jmp 0x11b0e
leaq 0xdfaaf(%rip), %rdi     # 0xf15b0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0xf038
leaq 0xdfa9b(%rip), %rax     # 0xf15b0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiCharacterToName
char *apiCharacterToName( char *characterID )
{
    int i;
    static char w[ 256 ];

    strclr( w );
    for ( i = 0; i<API_MAXENTITIES; i++ )  {
        if ( 0 == strcmp( characterID, soldierTranslate[ i ].charID )) {
            strlcpy( w, soldierTranslate[ i ].playerName, 256 );
            break;
        }
    }
    return( w );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0xdfb86(%rip), %rdi     # 0xf16b0
callq 0xf4dd
leaq 0xcfa6a(%rip), %rbx     # 0xe15a0
movl $0x40, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x11b59
addq $0x200, %rbx            # imm = 0x200
decq %r15
jne 0x11b3c
jmp 0x11b74
addq $0x100, %rbx            # imm = 0x100
leaq 0xdfb49(%rip), %rdi     # 0xf16b0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0xf038
leaq 0xdfb35(%rip), %rax     # 0xf16b0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiIsPlayerAliveByGUID
int apiIsPlayerAliveByGUID( char *playerGUID )
{
    int isAlive = 1;
    char *playerName;

    if  ( apiBPIsActive() ) {
        playerName = rosterLookupNameFromGUID( playerGUID );       // returns empty if not found
        if ( 0 != strlen( playerName ) )  {
            if ( 0 == strlen( apiNameToCharacter( playerName )) )  {
                isAlive = 0;
            }
        }
    }
    return( isAlive );
}

// Assembly:
pushq %rbx
movl $0x1, %ebx
cmpb $0x1, 0xd79ed(%rip)     # 0xe95a0
jne 0x11bd3
callq 0x14a69
cmpb $0x0, (%rax)
je 0x11bd3
movq %rax, %rdi
callq 0x11ab8
xorl %ebx, %ebx
cmpb $0x0, 0xdf9e0(%rip)     # 0xf15b0
setne %bl
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiMapObjectiveCB
int _apiMapObjectiveCB( char *strIn )
{
    int i;
    char *w;

    for (i = 0; i<API_OBJECTIVES_MAX; i++) {

        if ( 0 == strlen( _objectiveListCache[i] )) {

            w = getWord( strIn, 1, "'" );
            if ( w != NULL ) {
                strlcpy( _objectiveListCache[i], w, API_LINE_STRING_MAX );
                logPrintf(LOG_LEVEL_INFO, "api", "Reading map objectives list ::%s:: index %d", _objectiveListCache[i], i );
            }
            break;

        }
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xd79ce(%rip), %rbx     # 0xe95b0
xorl %r14d, %r14d
cmpb $0x0, (%rbx)
je 0x11bfc
incq %r14
addq $0x100, %rbx            # imm = 0x100
cmpq $0x40, %r14
jne 0x11be5
jmp 0x11c42
leaq 0xad3f(%rip), %rdx      # 0x1c942
movl $0x1, %esi
callq 0xf4e1
testq %rax, %rax
je 0x11c42
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf038
leaq 0xc266(%rip), %rsi      # 0x1de8f
leaq 0xc471(%rip), %rdx      # 0x1e0a1
movl $0x2, %edi
movq %rbx, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x1a227
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiLookupObjectiveLetterFromCache
char apiLookupObjectiveLetterFromCache( char *objectiveName ) 
{
    char retChar = ' ';
    int i;

    for ( i = 0; i<API_OBJECTIVES_MAX; i++ ) {
       if ( 0 == strcmp( objectiveName, _objectiveListCache[i] )) {
           retChar = i + 'A';
           break;
       }
       if ( 0 == strlen( _objectiveListCache[i] )) {
           break;
       }
    }
    return retChar;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xd7955(%rip), %r14     # 0xe95b0
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8220
testl %eax, %eax
je 0x11c8b
cmpb $0x0, (%r14)
movb $0x20, %al
je 0x11c92
leaq 0x1(%r15), %rcx
addq $0x100, %r14            # imm = 0x100
cmpq $0x3f, %r15
movq %rcx, %r15
jb 0x11c5e
jmp 0x11c92
addb $0x41, %r15b
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiCounterStartCB
int _apiCounterStartCB( char *strIn )
{
    // if ( NULL != strstr( strIn, "Advancing spawns for faction" ) ) {
    if ( NULL != strstr( strIn, "LogGameplayEvents: Display: Objective" ) ) {

        if ( NULL == strstr( strIn, "reset from" ) ) {    // exception case final obj breach

            _inCounterAttack = 1;

            // Take care of reverse or simultaneous reporting by NWI.
            // this happens when system decides to NOT issue counterattack
            //
            if (( apiTimeGet() - _inCounterTime ) < 3L ) {
                _inCounterAttack = 0;
            }
            logPrintf( LOG_LEVEL_INFO, "api", "In CounterAttack State '%s'", strIn );
        }

    }
    // logPrintf( LOG_LEVEL_INFO, "api", "StartCB - ACTIVITY '%s'", strIn );
    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xc1b0(%rip), %rsi      # 0x1e242
callq 0x83b0
testq %rax, %rax
je 0x120ef
leaq 0xc1c5(%rip), %rsi      # 0x1e268
movq %rbx, %rdi
callq 0x83b0
testq %rax, %rax
jne 0x120ef
movb $0x1, 0x142e09(%rip)    # 0x154ec0
xorl %edi, %edi
callq 0x82a0
subq 0x142e03(%rip), %rax    # 0x154ec8
cmpq $0x2, %rax
ja 0x120d2
movb $0x0, 0x142dee(%rip)    # 0x154ec0
leaq 0xbdb6(%rip), %rsi      # 0x1de8f
leaq 0xc193(%rip), %rdx      # 0x1e273
movl $0x2, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1a227
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiCounterStopCB
int _apiCounterStopCB( char *strIn )
{
    _inCounterAttack = 0;
    _inCounterTime = apiTimeGet();  // EPOC resolution 1s
    logPrintf( LOG_LEVEL_INFO, "api", "Out of CounterAttack State '%s'", strIn );

    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0x142dc2(%rip)    # 0x154ec0
xorl %edi, %edi
callq 0x82a0
movq %rax, 0x142dbc(%rip)    # 0x154ec8
leaq 0xbd7c(%rip), %rsi      # 0x1de8f
leaq 0xc175(%rip), %rdx      # 0x1e28f
movl $0x2, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1a227
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiServerRestart
int apiServerRestart( char *rebootReason )
{
    // Notify and force disconnect on all active players on roster
    //
    apiKickAll( rebootReason );
    sleep( 2 );    // wait for handshake
   
    // Save the reason & time for analytics and web 
    //
    strlcpy( lastRebootReason, rebootReason, 256 );
    lastRebootTime = apiTimeGet();
   
    // invoke system restart
    // 
    sissmServerRestart();
    lastRosterSuccessTime = apiTimeGet();      
    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x12d31
movl $0x2, %edi
callq 0x83a0
leaq 0x148ce1(%rip), %rdi    # 0x15b9e0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0xf038
xorl %edi, %edi
callq 0x82a0
movq %rax, 0x148cb6(%rip)    # 0x15b9d0
callq 0x89da
xorl %edi, %edi
callq 0x82a0
movq %rax, 0xc6753(%rip)     # 0xd9480
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiKickAll
int apiKickAll( char *reason )
{
    static char playerList[8192]; 
    char playerGUID[256], *p;
    int playerIndex = 0;

    strlcpy( playerList, rosterPlayerList( 5, ":" ), 8192 );

    // HAL9000 loop, kill all live humans
    //
    while ( 1 == 1 ) {

        if ( NULL == ( p = getWord( playerList, playerIndex++, ":" ) )) 
            break;

        strlcpy( playerGUID, p, 256 );
        apiKickOrBan(0, playerGUID, reason );
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
leaq 0xb143(%rip), %r14      # 0x1de8d
movl $0x5, %edi
movq %r14, %rsi
callq 0x14cce
leaq 0x162e82(%rip), %r15    # 0x175be0
movl $0x2000, %edx           # imm = 0x2000
movq %r15, %rdi
movq %rax, %rsi
callq 0xf038
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xf4e1
testq %rax, %rax
je 0x12dc7
movl $0x1, %ebp
movq %rsp, %r14
leaq 0x162e51(%rip), %r15    # 0x175be0
leaq 0xb0f7(%rip), %r12      # 0x1de8d
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %rax, %rsi
callq 0xf038
xorl %edi, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x132ff
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0xf4e1
incl %ebp
testq %rax, %rax
jne 0x12d96
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiTimeGetHuman
char *apiTimeGetHuman( unsigned long timeMark )
{
    static char humanTime[API_LINE_STRING_MAX];
    time_t current_time;

   
    if ( timeMark == 0L ) 
        current_time = time( NULL );
    else
        current_time = (time_t) timeMark;

    strlcpy( humanTime, ctime( &current_time ), API_LINE_STRING_MAX );

    return( humanTime );
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
jne 0x12ded
xorl %edi, %edi
callq 0x82a0
movq %rax, %rdi
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
movq %rax, %rdi
callq 0x8110
leaq 0x158cdc(%rip), %rbx    # 0x16bae0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf038
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiGameModePropertyGet
char *apiGameModePropertyGet( char *gameModeProperty )
{
    static char value[16*1024];
    char rconCmd[API_T_BUFSIZE], rconResp[API_R_BUFSIZE], *w;
    int bytesRead, errCode;

    strclr( value );

    snprintf( rconCmd, API_T_BUFSIZE, "gamemodeproperty %s", gameModeProperty );
    if ( 0 == (errCode = rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead ))) {
        if ( ((size_t) bytesRead) > strlen( gameModeProperty )) {
            // extract the value field.  This command will fail esp during
            // map change when rcon response is not honored, so check for this!
            w = getWord( rconResp, 1, "\"" );    
            if ( w != NULL ) 
                strlcpy( value, w, sizeof( value ));   
        }
    }

    return( value );
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rdi, %rbx
leaq 0x158d57(%rip), %rdi    # 0x16bbe0
callq 0xf4dd
leaq 0xb595(%rip), %rdx      # 0x1e42a
leaq 0x1010(%rsp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8190
movq 0xc65d2(%rip), %rdi     # 0xd9488
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x2, %esi
movq %r14, %rdx
callq 0x9748
testl %eax, %eax
jne 0x12f12
movslq 0xc(%rsp), %r14
movq %rbx, %rdi
callq 0x8120
cmpq %r14, %rax
jae 0x12f12
leaq 0xb6be(%rip), %rdx      # 0x1e5a8
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0xf4e1
testq %rax, %rax
je 0x12f12
leaq 0x158cdb(%rip), %rdi    # 0x16bbe0
movl $0x4000, %edx           # imm = 0x4000
movq %rax, %rsi
callq 0xf038
leaq 0x158cc7(%rip), %rax    # 0x16bbe0
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiGameModePropertyGetRaw
char *apiGameModePropertyGetRaw( char *gameModeProperty )
{
    static char value[16*1024];
    char rconCmd[API_T_BUFSIZE], rconResp[API_R_BUFSIZE];
    int bytesRead, errCode;

    strclr( value );

    snprintf( rconCmd, API_T_BUFSIZE, "gamemodeproperty %s", gameModeProperty );
    if ( 0 == (errCode = rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead ))) {
        if ( ((size_t) bytesRead) > strlen( gameModeProperty )) {
            strlcpy( value, rconResp, sizeof( value ));   
        }
    }
    return( value );
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rdi, %rbx
leaq 0x15cca8(%rip), %rdi    # 0x16fbe0
callq 0xf4dd
leaq 0xb4e6(%rip), %rdx      # 0x1e42a
leaq 0x1010(%rsp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8190
movq 0xc6523(%rip), %rdi     # 0xd9488
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x2, %esi
movq %r14, %rdx
callq 0x9748
testl %eax, %eax
jne 0x12fa8
movslq 0xc(%rsp), %r14
movq %rbx, %rdi
callq 0x8120
cmpq %r14, %rax
jae 0x12fa8
leaq 0x15cc47(%rip), %rdi    # 0x16fbe0
leaq 0x10(%rsp), %rsi
movl $0x4000, %edx           # imm = 0x4000
callq 0xf038
leaq 0x15cc31(%rip), %rax    # 0x16fbe0
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiSay
int apiSay( const char * format, ... )
{
    static char buffer[API_T_BUFSIZE];
    char rconCmd[API_T_BUFSIZE], rconResp[API_R_BUFSIZE];
    int bytesRead, errCode;
    int triplePrint = 0;

    va_list args;
    va_start( args, format ); 
    vsnprintf( buffer, (API_T_BUFSIZE >= API_MAXSAY) ? API_MAXSAY : API_T_BUFSIZE, format, args );

    apiRemoveCodes( buffer );                         // remove color codes if mod is not installed

    if ( snprintf( rconCmd, API_T_BUFSIZE, "say %s%s%s", sayPrefix, buffer, sayPostfix ) < 0) 
        logPrintf( LOG_LEVEL_WARN, "api", "Overflow warning at apiSay" );
    if ( 0 != strlen( buffer ) )  {  // say only when something to be said
        if ( buffer[0] == '*' ) triplePrint = 1;
        if ( 0 == (int) p2pGetF("api.p2p.sayDisable", 0.0 ) ) {
            errCode = rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead ); 
            if ( triplePrint ) errCode |= rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead ); 
            if ( triplePrint ) errCode |= rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead ); 
        }
    }
    va_end (args);
    return errCode;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x20e8, %rsp           # imm = 0x20E8
movq %rdi, %r10
leaq 0x30(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x1301e
movapd %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
leaq 0x10(%rsp), %rcx
movq %rdi, 0x10(%rcx)
leaq 0x2100(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0x160b99(%rip), %rbx    # 0x173be0
movl $0x50, %esi
movq %rbx, %rdi
movq %r10, %rdx
callq 0x80c0
movq %rbx, %rdi
callq 0x10ca4
leaq 0xb3d8(%rip), %rdx      # 0x1e43e
leaq 0x144763(%rip), %rcx    # 0x1577d0
leaq 0x14485c(%rip), %r9     # 0x1578d0
leaq 0xe0(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %r8
xorl %eax, %eax
callq 0x8190
testl %eax, %eax
jns 0x130a9
leaq 0xadf9(%rip), %rsi      # 0x1de8f
leaq 0xb3ac(%rip), %rdx      # 0x1e449
movl $0x1, %edi
xorl %eax, %eax
callq 0x1a227
cmpb $0x0, 0x160b30(%rip)    # 0x173be0
je 0x1315f
movb 0x160b23(%rip), %bpl    # 0x173be0
leaq 0x8e03(%rip), %rdi      # 0x1bec7
xorpd %xmm0, %xmm0
callq 0x17f65
cvttsd2si %xmm0, %eax
testl %eax, %eax
jne 0x1315f
movq 0xc63a8(%rip), %rdi     # 0xd9488
leaq 0xe0(%rsp), %rdx
leaq 0x10e0(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x2, %esi
callq 0x9748
movl %eax, %ebx
cmpb $0x2a, %bpl
jne 0x1312f
movq 0xc637a(%rip), %rdi     # 0xd9488
leaq 0xe0(%rsp), %rdx
leaq 0x10e0(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x2, %esi
callq 0x9748
orl %eax, %ebx
cmpb $0x2a, %bpl
jne 0x1315f
movq 0xc634c(%rip), %rdi     # 0xd9488
leaq 0xe0(%rsp), %rdx
leaq 0x10e0(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x2, %esi
callq 0x9748
orl %eax, %ebx
jmp 0x1315f
movl %ebx, %eax
addq $0x20e8, %rsp           # imm = 0x20E8
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiKickOrBan
int apiKickOrBan( int isBan, char *playerGUID, char *reason )
{
    char rconCmd[API_T_BUFSIZE], rconResp[API_R_BUFSIZE], playerName[256];
    int bytesRead, errCode, guidType = 0;

    // "stub" for dev testing - do not kick or ban
    //
    if ( 0L != p2pGetL( "dev.p2p.nokick", 0L )) {
        return 0;
    }

    if ( isBan ) {
        snprintf( rconCmd, API_T_BUFSIZE, "banid \"%s\" -1 \"%s\"", playerGUID, reason );
        errCode = rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead );
    }
    else {

        guidType = rosterIsValidGUID( playerGUID ) ;
        switch ( guidType ) {
        case 1:         // Steam - kick by Steam ID
            snprintf( rconCmd, API_T_BUFSIZE, "kick \"%s\" \"%s\"", playerGUID, reason );
            errCode = rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead );
            break;
        case 2:         // EPIC - kick by Name:  bug workaround 
            strlcpy( playerName, rosterLookupNameFromGUID( playerGUID ), 256 ); 
            if ( strlen( playerName ) > 3 ) {
                snprintf( rconCmd, API_T_BUFSIZE, "kick \"%s\" \"%s\"", playerName, reason );
                errCode = rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead );
            }
            break;
        } 
    }

    logPrintf( LOG_LEVEL_WARN, "api", "apiKickOrBan ::%s::", rconCmd );
 
    return errCode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2118, %rsp           # imm = 0x2118
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
leaq 0x9438(%rip), %rdi      # 0x1c753
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x18004
testq %rax, %rax
jne 0x1339a
testl %ebp, %ebp
je 0x133ab
leaq 0xb14d(%rip), %rdx      # 0x1e482
leaq 0x110(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x8190
movq 0xc6132(%rip), %rdi     # 0xd9488
leaq 0x110(%rsp), %rdx
leaq 0x1110(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x2, %esi
callq 0x9748
movl %eax, %r15d
leaq 0xab10(%rip), %rsi      # 0x1de8f
leaq 0xb10f(%rip), %rdx      # 0x1e495
leaq 0x110(%rsp), %rcx
movl $0x1, %edi
xorl %eax, %eax
callq 0x1a227
movl %r15d, %eax
addq $0x2118, %rsp           # imm = 0x2118
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x1403c
cmpl $0x2, %eax
je 0x133c9
cmpl $0x1, %eax
jne 0x13378
leaq 0x88b4(%rip), %rdx      # 0x1bc78
jmp 0x13335
movq %r14, %rdi
callq 0x14a69
leaq 0x10(%rsp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %rax, %rsi
callq 0xf038
movq %r14, %rdi
callq 0x8120
cmpq $0x4, %rax
jb 0x13378
leaq 0x887d(%rip), %rdx      # 0x1bc78
leaq 0x110(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movl $0x1000, %esi           # imm = 0x1000
jmp 0x13345
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiKick
int apiKick( char *playerNameOrGUID, char *reason )
{
    char rconCmd[API_T_BUFSIZE], rconResp[API_R_BUFSIZE];
    int bytesRead, errCode;

    // "stub" for dev testing - do not kick or ban
    //
    if ( 0L != p2pGetL( "dev.p2p.nokick", 0L )) {
        return 0;
    }

    // Process kick
    //
    snprintf( rconCmd, API_T_BUFSIZE, "kick \"%s\" \"%s\"", playerNameOrGUID, reason );
    errCode = rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead );
    logPrintf( LOG_LEVEL_WARN, "api", "apiKick ::%s::", rconCmd );
 
    return errCode;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x9326(%rip), %rdi      # 0x1c753
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x18004
testq %rax, %rax
jne 0x1349e
leaq 0x8835(%rip), %rdx      # 0x1bc78
leaq 0x1010(%rsp), %r12
movl $0x1000, %esi           # imm = 0x1000
movq %r12, %rdi
movq %r15, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x8190
movq 0xc6021(%rip), %rdi     # 0xd9488
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x2, %esi
movq %r12, %rdx
callq 0x9748
movl %eax, %r14d
leaq 0xaa07(%rip), %rsi      # 0x1de8f
leaq 0xb01a(%rip), %rdx      # 0x1e4a9
movl $0x1, %edi
movq %r12, %rcx
xorl %eax, %eax
callq 0x1a227
movl %r14d, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiAuthIsAllowedCommand
int apiAuthIsAllowedCommand( char *playerGUID, char *command )
{
    int i, isAuthorized = 0;

    // check if playerGUID is 'root'
    //
    if ( NULL != strstr( rootguids, playerGUID )) {
        isAuthorized = 1;
    }
    
    // check if command is from 'RCON' if so grant 'root' priv
    //
    else if ( 0 == strcmp( "00000000000000000", playerGUID ) ) {
        isAuthorized = 1;
    }

    // check if command is for 'everyone'
    //
    else if ( NULL != strstr( everyoneCmds, command ))  {
        isAuthorized = 1;
    }

    // check the priv tables to see if guid-command pair is authorized
    //
    else {
        for (i=0; i<API_MAX_GROUPS; i++) {
            if ( NULL != strstr( groups[i].groupcmds, command )) {
                if ( apiIdListCheck( playerGUID, groups[i].groupIdList ) ) {
                    isAuthorized = 1;
                    break;
                }
            }
        }
    }

    // check if a player is solo, if so grant special privilege "soloadmin"
    //
    if ( !isAuthorized ) {
        if ( NULL != strstr( soloAdminCmds, command )) {
            if ( 1 == apiPlayersGetCount() ) {
                isAuthorized = 1;
            }
        }
    }
 
    return( isAuthorized );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
leaq 0xde0c6(%rip), %rdi     # 0xf17c0
movq %r15, %rsi
callq 0x83b0
movl $0x1, %ebx
testq %rax, %rax
je 0x1371d
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8fc6(%rip), %rdi      # 0x1c6ea
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x1370c
leaq 0xde289(%rip), %rdi     # 0xf19c0
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
jne 0x1370c
leaq 0xdf375(%rip), %r12     # 0xf2ac0
xorl %r13d, %r13d
imulq $0x10700, %r13, %rax    # imm = 0x10700
leaq 0xdec64(%rip), %rcx     # 0xf23c0
leaq (%rax,%rcx), %rdi
addq $0x100, %rdi            # imm = 0x100
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x137a1
xorl %ebp, %ebp
leaq (%r12,%rbp), %rdi
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x13799
leaq 0x100(%rbp), %rcx
cmpq $0xff00, %rbp           # imm = 0xFF00
movq %rcx, %rbp
jne 0x13776
testl %eax, %eax
je 0x1370c
incq %r13
addq $0x10700, %r12          # imm = 0x10700
cmpq $0x6, %r13
jne 0x1374e
leaq 0xde708(%rip), %rdi     # 0xf1ec0
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x137d7
callq 0x149a0
xorl %ebx, %ebx
cmpl $0x1, %eax
sete %bl
jmp 0x1370c
xorl %ebx, %ebx
jmp 0x1370c
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiAuthIsAllowedMacro
int apiAuthIsAllowedMacro( char *playerGUID, char *command )
{
    int i, isAuthorized = 0;

    // check if playerGUID is 'root'
    //
    if ( NULL != strstr( rootguids, playerGUID )) {
        isAuthorized = 1;
    }

    // check if command is for 'RCON'
    //
    else if ( 0 == strcmp( "00000000000000000", playerGUID ) ) {
        isAuthorized = 1;
    }

    // check if command is for 'everyone'
    //
    else if ( NULL != strstr( everyoneMacros, command ))  {
        isAuthorized = 1;
    }

    // check the priv tables to see if guid-command pair is authorized
    //
    else {
        for (i=0; i<API_MAX_GROUPS; i++) {
            if ( NULL != strstr( groups[i].groupmacros, command )) {
                if ( apiIdListCheck( playerGUID, groups[i].groupIdList ) ) {
                    isAuthorized = 1;
                    break;
                }
            }
        }
    }

    // check if a player is solo, if so grant special privilege "soloadmin"
    //
    if ( !isAuthorized ) {
        if ( NULL != strstr( soloAdminMacros, command )) {
            if ( 1 == apiPlayersGetCount() ) {
                isAuthorized = 1;
            }
        }
    }
    return( isAuthorized );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
leaq 0xddfca(%rip), %rdi     # 0xf17c0
movq %r15, %rsi
callq 0x83b0
movl $0x1, %ebx
testq %rax, %rax
je 0x13819
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8eca(%rip), %rdi      # 0x1c6ea
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x13808
leaq 0xde38d(%rip), %rdi     # 0xf1bc0
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
jne 0x13808
leaq 0xdf279(%rip), %r12     # 0xf2ac0
xorl %r13d, %r13d
imulq $0x10700, %r13, %rax    # imm = 0x10700
leaq 0xdeb68(%rip), %rcx     # 0xf23c0
leaq (%rax,%rcx), %rdi
addq $0x300, %rdi            # imm = 0x300
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x1389d
xorl %ebp, %ebp
leaq (%r12,%rbp), %rdi
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x13895
leaq 0x100(%rbp), %rcx
cmpq $0xff00, %rbp           # imm = 0xFF00
movq %rcx, %rbp
jne 0x13872
testl %eax, %eax
je 0x13808
incq %r13
addq $0x10700, %r12          # imm = 0x10700
cmpq $0x6, %r13
jne 0x1384a
leaq 0xde80c(%rip), %rdi     # 0xf20c0
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x138d3
callq 0x149a0
xorl %ebx, %ebx
cmpl $0x1, %eax
sete %bl
jmp 0x13808
xorl %ebx, %ebx
jmp 0x13808
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiAuthIsAttribute
int apiAuthIsAttribute( char *playerGUID, char *attribute )
{
    int i, isAuthorized = 0;

    // check if playerGUID is 'root'
    //
    if ( NULL != strstr( rootguids, playerGUID )) {
        isAuthorized = 1;
    }
    else {
        for (i=0; i<API_MAX_GROUPS; i++) {
            if ( NULL != strstr( groups[i].groupattr, attribute)) {
                if ( apiIdListCheck( playerGUID, groups[i].groupIdList ) ) {
                    isAuthorized = 1;
                    break;
                }
            }
        }
    }
    // check if a player is solo, if so grant special privilege "soloadmin"
    //
    if ( !isAuthorized ) {
        if ( NULL != strstr( soloAdminAttr, attribute )) {
            if ( 1 == apiPlayersGetCount() ) {
                isAuthorized = 1;
            }
        }
    }
    return( isAuthorized );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
leaq 0xddece(%rip), %rdi     # 0xf17c0
movq %r15, %rsi
callq 0x83b0
movl $0x1, %ecx
testq %rax, %rax
je 0x13915
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdf1a4(%rip), %r12     # 0xf2ac0
xorl %r13d, %r13d
leaq 0xdea9a(%rip), %rbp     # 0xf23c0
imulq $0x10700, %r13, %rax    # imm = 0x10700
leaq (%rax,%rbp), %rdi
addq $0x500, %rdi            # imm = 0x500
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x1396e
xorl %ebx, %ebx
leaq (%r12,%rbx), %rdi
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x1396a
leaq 0x100(%rbx), %rcx
cmpq $0xff00, %rbx           # imm = 0xFF00
movq %rcx, %rbx
jne 0x13947
testl %eax, %eax
je 0x139a4
incq %r13
addq $0x10700, %r12          # imm = 0x10700
cmpq $0x6, %r13
jne 0x13926
leaq 0xde93b(%rip), %rdi     # 0xf22c0
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x139ae
callq 0x149a0
xorl %ecx, %ecx
cmpl $0x1, %eax
sete %cl
jmp 0x13904
movl $0x1, %ecx
jmp 0x13904
xorl %ecx, %ecx
jmp 0x13904
// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiAuthGetRank
char *apiAuthGetRank( char *playerGUID )
{
    static char rank[ 256 ];
    int i;

    // check if playerGUID is 'root'
    //
    strclr( rank );
    if ( NULL != strstr( rootguids, playerGUID )) {
        strlcpy( rank, rootname, 256 );
    }
    else {
        for (i=0; i<API_MAX_GROUPS; i++) {
            if ( apiIdListCheck( playerGUID, groups[i].groupIdList ) ) {
                strlcpy( rank, groups[i].groupname, 256 );
                break;
            }
        }
    }
    return( rank );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x164216(%rip), %rdi    # 0x177be0
callq 0xf4dd
leaq 0xdddea(%rip), %rdi     # 0xf17c0
movq %rbx, %rsi
callq 0x83b0
testq %rax, %rax
je 0x13a14
leaq 0xdded6(%rip), %r14     # 0xf18c0
leaq 0x1641ef(%rip), %rdi    # 0x177be0
movl $0x100, %edx            # imm = 0x100
movq %r14, %rsi
callq 0xf038
leaq 0x1641db(%rip), %rax    # 0x177be0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdf0a5(%rip), %r15     # 0xf2ac0
xorl %r12d, %r12d
leaq 0xde99b(%rip), %r13     # 0xf23c0
imulq $0x10700, %r12, %r14    # imm = 0x10700
addq %r13, %r14
xorl %ebp, %ebp
leaq (%r15,%rbp), %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x13a54
leaq 0x100(%rbp), %rcx
cmpq $0xff00, %rbp           # imm = 0xFF00
movq %rcx, %rbp
jne 0x13a31
testl %eax, %eax
je 0x139ea
incq %r12
addq $0x10700, %r15          # imm = 0x10700
cmpq $0x6, %r12
jne 0x13a25
jmp 0x139fe