LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiIsPlayerAliveByName
int apiIsPlayerAliveByName( char *playerName )
{
    int isAlive = 1;

    if  ( apiBPIsActive() ) {
        if ( 0 == strlen( apiNameToCharacter( playerName ) ) )  {
            isAlive = 0;
        }
    }
    return( isAlive );
}

// Assembly:
cmpb $0x1, 0xd834d(%rip)     # 0xe95a0
jne 0x1126c
pushq %rax
callq 0x11166
xorl %eax, %eax
cmpb $0x0, 0xe034c(%rip)     # 0xf15b0
setne %al
addq $0x8, %rsp
retq
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rbx
cmpb $0x1, 0xd8325(%rip)     # 0xe95a0
jne 0x1129b
callq 0x13dcd
cmpb $0x0, (%rax)
je 0x1129b
movq %rax, %rdi
callq 0x11166
xorl %ebx, %ebx
cmpb $0x0, 0xe0318(%rip)     # 0xf15b0
setne %bl
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xd8306(%rip), %rbx     # 0xe95b0
xorl %r14d, %r14d
cmpq $0x40, %r14
je 0x11306
cmpb $0x0, (%rbx)
je 0x112c4
incq %r14
addq $0x100, %rbx            # imm = 0x100
jmp 0x112ad
leaq 0xa659(%rip), %rdx      # 0x1b924
pushq $0x1
popq %rsi
callq 0xed9c
testq %rax, %rax
je 0x11306
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe97a
leaq 0xbb80(%rip), %rsi      # 0x1ce6f
leaq 0xbd8b(%rip), %rdx      # 0x1d081
pushq $0x2
popq %rdi
movq %rbx, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x1920b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $-0x40
popq %r15
leaq 0xd828b(%rip), %r14     # 0xe95b0
movb $0x20, %bpl
testq %r15, %r15
je 0x11355
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8220
testl %eax, %eax
je 0x1134e
cmpb $0x0, (%r14)
je 0x11355
incq %r15
addq $0x100, %r14            # imm = 0x100
jmp 0x11328
addb $-0x7f, %r15b
movl %r15d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiLookupLastObjectiveLetterFromCache
char apiLookupLastObjectiveLetterFromCache( void )
{
    char retChar = ' ';
    int i;

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

// Assembly:
movb $0x20, %al
movb $0x41, %dil
xorl %ecx, %ecx
leaq 0xd8240(%rip), %rdx     # 0xe95b0
cmpq $0x4000, %rcx           # imm = 0x4000
je 0x1138f
cmpb $0x0, (%rcx,%rdx)
je 0x1138f
movl %edi, %esi
leal 0x1(%rsi), %edi
addq $0x100, %rcx            # imm = 0x100
movl %esi, %eax
jmp 0x11370
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xbad2(%rip), %rsi      # 0x1d222
callq 0x83c0
testq %rax, %rax
je 0x117a9
leaq 0xbae7(%rip), %rsi      # 0x1d248
movq %rbx, %rdi
callq 0x83c0
testq %rax, %rax
jne 0x117a9
movb $0x1, 0x14374b(%rip)    # 0x154ec0
callq 0x10b6a
subq 0x143747(%rip), %rax    # 0x154ec8
cmpq $0x2, %rax
ja 0x1178e
movb $0x0, 0x143732(%rip)    # 0x154ec0
leaq 0xb6da(%rip), %rsi      # 0x1ce6f
leaq 0xbab7(%rip), %rdx      # 0x1d253
pushq $0x2
popq %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1920b
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0x143708(%rip)    # 0x154ec0
callq 0x10b6a
movq %rax, 0x143704(%rip)    # 0x154ec8
leaq 0xb6a4(%rip), %rsi      # 0x1ce6f
leaq 0xba9d(%rip), %rdx      # 0x1d26f
pushq $0x2
popq %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1920b
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1234a
pushq $0x2
popq %rdi
callq 0x83b0
leaq 0x1496c4(%rip), %rdi    # 0x15b9e0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0xe97a
callq 0x10b6a
movq %rax, 0x14969b(%rip)    # 0x15b9d0
callq 0x89e4
callq 0x10b6a
movq %rax, 0xc713a(%rip)     # 0xd9480
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xab0a(%rip), %r14      # 0x1ce6d
pushq $0x5
popq %rdi
movq %r14, %rsi
callq 0x1402d
leaq 0x16386b(%rip), %r15    # 0x175be0
movl $0x2000, %edx           # imm = 0x2000
movq %r15, %rdi
movq %rax, %rsi
callq 0xe97a
xorl %ebp, %ebp
movq %rsp, %r12
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0xed9c
testq %rax, %rax
je 0x123bd
incl %ebp
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
movq %rax, %rsi
callq 0xe97a
xorl %edi, %edi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x128e1
jmp 0x1238a
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_O2/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 0x123e3
xorl %edi, %edi
callq 0x82a0
movq %rax, %rdi
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
movq %rax, %rdi
callq 0x8110
leaq 0x1596e6(%rip), %rbx    # 0x16bae0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe97a
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x159763(%rip), %rdi    # 0x16bbe0
callq 0xed98
leaq 0xaf81(%rip), %rdx      # 0x1d40a
leaq 0x1010(%rsp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8190
movq 0xc6fde(%rip), %rdi     # 0xd9488
pushq $0x2
popq %rsi
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movq %r14, %rdx
callq 0x961f
testl %eax, %eax
jne 0x12502
movslq 0xc(%rsp), %r14
movq %rbx, %rdi
callq 0x8120
cmpq %r14, %rax
jae 0x12502
leaq 0xb0ac(%rip), %rdx      # 0x1d588
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0xed9c
testq %rax, %rax
je 0x12502
leaq 0x1596eb(%rip), %rdi    # 0x16bbe0
movl $0x4000, %edx           # imm = 0x4000
movq %rax, %rsi
callq 0xe97a
leaq 0x1596d7(%rip), %rax    # 0x16bbe0
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x15d6b8(%rip), %rdi    # 0x16fbe0
callq 0xed98
leaq 0xaed6(%rip), %rdx      # 0x1d40a
leaq 0x1010(%rsp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8190
movq 0xc6f33(%rip), %rdi     # 0xd9488
pushq $0x2
popq %rsi
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movq %r14, %rdx
callq 0x961f
testl %eax, %eax
jne 0x12596
movslq 0xc(%rsp), %r14
movq %rbx, %rdi
callq 0x8120
cmpq %r14, %rax
jae 0x12596
leaq 0x15d659(%rip), %rdi    # 0x16fbe0
leaq 0x10(%rsp), %rsi
movl $0x4000, %edx           # imm = 0x4000
callq 0xe97a
leaq 0x15d643(%rip), %rax    # 0x16fbe0
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8e38(%rip), %rdi      # 0x1b735
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x17172
testq %rax, %rax
jne 0x12978
testl %ebp, %ebp
je 0x12989
leaq 0xab4b(%rip), %rdx      # 0x1d462
leaq 0x110(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x8190
movq 0xc6b50(%rip), %rdi     # 0xd9488
pushq $0x2
popq %rsi
leaq 0x110(%rsp), %rdx
leaq 0x1110(%rsp), %rcx
leaq 0xc(%rsp), %r8
callq 0x961f
movl %eax, %r15d
leaq 0xa510(%rip), %rsi      # 0x1ce6f
leaq 0xab0f(%rip), %rdx      # 0x1d475
pushq $0x1
popq %rdi
leaq 0x110(%rsp), %rcx
xorl %eax, %eax
callq 0x1920b
movl %r15d, %eax
addq $0x2118, %rsp           # imm = 0x2118
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x13480
cmpl $0x2, %eax
je 0x129a7
cmpl $0x1, %eax
jne 0x12958
leaq 0x82ce(%rip), %rdx      # 0x1ac70
jmp 0x12917
movq %r14, %rdi
callq 0x13dcd
leaq 0x10(%rsp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %rax, %rsi
callq 0xe97a
movq %r14, %rdi
callq 0x8120
cmpq $0x4, %rax
jb 0x12958
leaq 0x8297(%rip), %rdx      # 0x1ac70
leaq 0x110(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movl $0x1000, %esi           # imm = 0x1000
jmp 0x12927
// File: /workspace/github_c_makefile_star2_O2/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, %r15
movq %rdi, %r12
leaq 0x8d2a(%rip), %rdi      # 0x1b735
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x17172
testq %rax, %rax
jne 0x12a78
leaq 0x824f(%rip), %rdx      # 0x1ac70
leaq 0x1010(%rsp), %rbx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
movq %r12, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x8190
movq 0xc6a43(%rip), %rdi     # 0xd9488
pushq $0x2
popq %rsi
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movq %rbx, %rdx
callq 0x961f
movl %eax, %r14d
leaq 0xa40b(%rip), %rsi      # 0x1ce6f
leaq 0xaa1e(%rip), %rdx      # 0x1d489
pushq $0x1
popq %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1920b
movl %r14d, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xdeaf0(%rip), %rdi     # 0xf17c0
movq %r15, %rsi
callq 0x83c0
pushq $0x1
popq %rbx
testq %rax, %rax
je 0x12cec
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x89d9(%rip), %rdi      # 0x1b6cc
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x12ce0
leaq 0xdecba(%rip), %rdi     # 0xf19c0
movq %r14, %rsi
callq 0x83c0
testq %rax, %rax
jne 0x12ce0
pushq $0x6
popq %r13
leaq 0xdfda2(%rip), %r12     # 0xf2ac0
subq $0x1, %r13
jb 0x12d51
leaq -0x600(%r12), %rdi
movq %r14, %rsi
callq 0x83c0
testq %rax, %rax
je 0x12d48
movq %r15, %rdi
movq %r12, %rsi
callq 0x107e4
testl %eax, %eax
jne 0x12ce0
addq $0x10700, %r12          # imm = 0x10700
jmp 0x12d1e
leaq 0xdf168(%rip), %rdi     # 0xf1ec0
movq %r14, %rsi
callq 0x83c0
testq %rax, %rax
je 0x12d77
callq 0x13d00
xorl %ebx, %ebx
cmpl $0x1, %eax
sete %bl
jmp 0x12ce0
xorl %ebx, %ebx
jmp 0x12ce0
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xdea2c(%rip), %rdi     # 0xf17c0
movq %r15, %rsi
callq 0x83c0
pushq $0x1
popq %rbx
testq %rax, %rax
je 0x12db0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x8915(%rip), %rdi      # 0x1b6cc
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x12da4
leaq 0xdedf6(%rip), %rdi     # 0xf1bc0
movq %r14, %rsi
callq 0x83c0
testq %rax, %rax
jne 0x12da4
pushq $0x6
popq %r13
leaq 0xdfcde(%rip), %r12     # 0xf2ac0
subq $0x1, %r13
jb 0x12e15
leaq -0x400(%r12), %rdi
movq %r14, %rsi
callq 0x83c0
testq %rax, %rax
je 0x12e0c
movq %r15, %rdi
movq %r12, %rsi
callq 0x107e4
testl %eax, %eax
jne 0x12da4
addq $0x10700, %r12          # imm = 0x10700
jmp 0x12de2
leaq 0xdf2a4(%rip), %rdi     # 0xf20c0
movq %r14, %rsi
callq 0x83c0
testq %rax, %rax
je 0x12e3b
callq 0x13d00
xorl %ebx, %ebx
cmpl $0x1, %eax
sete %bl
jmp 0x12da4
xorl %ebx, %ebx
jmp 0x12da4
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xde968(%rip), %rdi     # 0xf17c0
movq %r15, %rsi
callq 0x83c0
pushq $0x1
popq %rbx
testq %rax, %rax
je 0x12e74
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
pushq $0x6
popq %r13
leaq 0xdfc41(%rip), %r12     # 0xf2ac0
subq $0x1, %r13
jb 0x12eb2
leaq -0x200(%r12), %rdi
movq %r14, %rsi
callq 0x83c0
testq %rax, %rax
je 0x12ea9
movq %r15, %rdi
movq %r12, %rsi
callq 0x107e4
testl %eax, %eax
jne 0x12e68
addq $0x10700, %r12          # imm = 0x10700
jmp 0x12e7f
leaq 0xdf407(%rip), %rdi     # 0xf22c0
movq %r14, %rsi
callq 0x83c0
testq %rax, %rax
je 0x12ed5
callq 0x13d00
xorl %ebx, %ebx
cmpl $0x1, %eax
sete %bl
jmp 0x12e68
xorl %ebx, %ebx
jmp 0x12e68
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x164cf8(%rip), %rdi    # 0x177be0
callq 0xed98
leaq 0xde8cc(%rip), %rdi     # 0xf17c0
movq %rbx, %rsi
callq 0x83c0
testq %rax, %rax
je 0x12f0a
leaq 0xde9b8(%rip), %rsi     # 0xf18c0
jmp 0x12f4b
leaq 0xdfbaf(%rip), %rsi     # 0xf2ac0
xorl %r14d, %r14d
addq $-0x10700, %r14         # imm = 0xFFFEF900
cmpq $-0x73100, %r14         # imm = 0xFFF8CF00
je 0x12f5c
leaq 0x10700(%rsi), %r15
movq %rbx, %rdi
callq 0x107e4
movq %r15, %rsi
testl %eax, %eax
je 0x12f14
leaq 0xdf47f(%rip), %rsi     # 0xf23c0
subq %r14, %rsi
addq $-0x10700, %rsi         # imm = 0xFFFEF900
leaq 0x164c8e(%rip), %rdi    # 0x177be0
movl $0x100, %edx            # imm = 0x100
callq 0xe97a
leaq 0x164c7d(%rip), %rax    # 0x177be0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movabsq $0x6e776f6e6b6e75, %rax # imm = 0x6E776F6E6B6E75
movq %rax, 0x164d56(%rip)    # 0x177ce0
leaq 0x16b3f(%rip), %rbx     # 0x29ad0
leaq 0xda618(%rip), %r14     # 0xed5b0
cmpb $0x2a, (%rbx)
je 0x12fc9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8360
addq $0x40, %rbx
testq %rax, %rax
je 0x12f98
addq $-0x40, %rbx
leaq 0x164d24(%rip), %rdi    # 0x177ce0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0xe97a
leaq 0x164d10(%rip), %rax    # 0x177ce0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1eff0c(%rip), %rbx    # 0x202ef0
movq %rbx, %rdi
callq 0xed98
xorl %r14d, %r14d
leaq 0x1eaefa(%rip), %r15    # 0x1fdef0
cmpq $0x5000, %r14           # imm = 0x5000
je 0x1302b
cmpb $0x0, (%r14,%r15)
je 0x1302b
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
jmp 0x12ff6
leaq 0x1efebe(%rip), %rax    # 0x202ef0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x408, %edi            # imm = 0x408
leaq 0x164ea1(%rip), %r15    # 0x177ef0
pushq $0x1
popq %rbx
leaq 0x430(%rdi), %r12
cmpq $0x86838, %r12          # imm = 0x86838
je 0x13076
addq %r15, %rdi
movq %r14, %rsi
callq 0x8060
movq %r12, %rdi
testl %eax, %eax
jne 0x13052
jmp 0x13078
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1f0cdf(%rip), %rbx    # 0x203ef0
movq %rbx, %rdi
callq 0xed98
leaq 0x141db0(%rip), %r14    # 0x154fd0
leaq 0x7f27(%rip), %r15      # 0x1b14e
cmpb $0x0, (%r14)
je 0x13253
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe918
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe918
addq $0x50, %r14
jmp 0x13227
leaq 0x1f0c96(%rip), %rbx    # 0x203ef0
movq %rbx, %rdi
callq 0xee76
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xed98
leaq 0xa402(%rip), %r15      # 0x1d68c
movq %r14, %rdi
movq %r15, %rsi
callq 0x8060
movslq %ebp, %r12
testl %eax, %eax
je 0x132e0
xorl %ebp, %ebp
leaq 0x141d2b(%rip), %r15    # 0x154fd0
cmpb $0x0, (%r15)
je 0x132f1
movq %r15, %rdi
movq %r14, %rsi
callq 0x8060
testl %eax, %eax
je 0x132e0
movq %r15, %rdi
movq %r14, %rsi
callq 0x8360
testq %rax, %rax
je 0x132da
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xe97a
incl %ebp
addq $0x50, %r15
jmp 0x132a5
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xe97a
pushq $0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x8120
cmpl $0x41, %eax
je 0x134e5
cmpl $0x11, %eax
je 0x134c0
cmpl $0x10, %eax
jne 0x13512
xorl %r14d, %r14d
pushq $0x3
popq %rbp
cmpq $0x10, %r14
je 0x13514
callq 0x83f0
movq (%rax), %rax
movsbq (%rbx,%r14), %rcx
incq %r14
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x134a1
jmp 0x13512
xorl %r14d, %r14d
pushq $0x1
popq %rbp
cmpq $0x11, %r14
je 0x13514
callq 0x83f0
movq (%rax), %rax
movsbq (%rbx,%r14), %rcx
incq %r14
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x134c6
jmp 0x13512
xorl %r14d, %r14d
pushq $0x2
popq %rbp
cmpq $0x41, %r14
je 0x13514
callq 0x83f0
movsbq (%rbx,%r14), %rcx
incq %r14
cmpq $0x7c, %rcx
je 0x134eb
movq (%rax), %rax
movzwl (%rax,%rcx,2), %eax
andl $0x1000, %eax           # imm = 0x1000
jne 0x134eb
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 $0x118, %rsp            # imm = 0x118
movl %r8d, (%rsp)
movl %edx, 0x4(%rsp)
movl %esi, %r15d
movq %rdi, %r12
movq %rcx, 0x8(%rsp)
movq %rcx, %rdi
callq 0xed98
movq %r12, %rdi
callq 0x8120
movq %rax, %rbp
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
pushq $-0x1
popq %r14
leaq 0x10(%rsp), %rsi
xorl %ebx, %ebx
cmpq %rbp, %rbx
je 0x135cb
movb (%r12,%rbx), %cl
movl %ebx, %eax
cmpb %r15b, %cl
je 0x135c3
cmpb 0x4(%rsp), %cl
setne %al
cmpl $-0x1, %r14d
sete %cl
orb %al, %cl
je 0x1358b
movl %r14d, %eax
jmp 0x135c3
movslq %r14d, %rax
incq %rax
movq %rsi, %rcx
cmpq %rbx, %rax
jge 0x135a7
movb (%r12,%rax), %dl
movb %dl, (%rcx)
incq %rcx
incq %rax
jmp 0x13594
movb $0x0, (%rcx)
movq %rsi, %r13
movq %rsi, %rdi
callq 0x13480
movq %r13, %rsi
movl %eax, %r13d
movl %r14d, %eax
testl %r13d, %r13d
jne 0x135df
incq %rbx
movl %eax, %r14d
jmp 0x13564
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq (%rsp), %rdx
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0xe97a
movl %r13d, %eax
jmp 0x135cd
// File: /workspace/github_c_makefile_star2_O2/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, 0x1f4eb5(%rip) # imm = 0x796164
leaq 0x1f4dae(%rip), %rdi    # 0x208480
leaq 0xa03d(%rip), %rsi      # 0x1d716
callq 0x83c0
testq %rax, %rax
je 0x13722
addq $0xa, %rax
leaq 0xa033(%rip), %rdx      # 0x1d721
movq %rax, %rdi
xorl %esi, %esi
callq 0xed9c
testq %rax, %rax
je 0x13722
leaq 0x1f4e7c(%rip), %rbx    # 0x208580
pushq $0x14
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe97a
movq %rbx, %rdi
callq 0xef49
movq %rbx, %rdi
callq 0xee76
leaq 0x1f4e57(%rip), %rax    # 0x208580
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
leaq 0x1f4a4a(%rip), %rbx    # 0x208180
movq %rbx, %rdi
callq 0xeedb
leaq 0x9fdf(%rip), %rsi      # 0x1d724
movq %rbx, %rdi
callq 0x83c0
testq %rax, %rax
jne 0x1376a
leaq 0x1f4a27(%rip), %rdi    # 0x208180
leaq 0x9fd2(%rip), %rsi      # 0x1d732
callq 0x83c0
testq %rax, %rax
je 0x13773
movsbl 0xd(%rax), %ebx
cmpl $0x20, %ebx
jne 0x137c9
leaq 0x1f4a06(%rip), %r14    # 0x208180
movq %r14, %rdi
callq 0x11310
movl %eax, %ebx
movsbl %al, %ebp
leaq 0x9fb2(%rip), %rsi      # 0x1d740
leaq 0x9fb2(%rip), %rdx      # 0x1d747
pushq $0x2
popq %rdi
movl %ebp, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x1920b
cmpb $0x20, %bpl
jne 0x137e3
leaq 0x9f8f(%rip), %rsi      # 0x1d740
leaq 0xa007(%rip), %rdx      # 0x1d7bf
pushq $0x2
popq %rdi
pushq $0x41
popq %rcx
xorl %eax, %eax
callq 0x1920b
movb $0x41, %bl
jmp 0x137e3
leaq 0x9f70(%rip), %rsi      # 0x1d740
leaq 0x9fb9(%rip), %rdx      # 0x1d790
pushq $0x2
popq %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1920b
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl $0x80, %r14d
leaq 0x1f4e39(%rip), %rbx    # 0x2086a0
subq $0x1, %r14
jb 0x138ab
movq %rbx, %rdi
callq 0xed98
leaq 0x50(%rbx), %rdi
callq 0xed98
leaq 0xa0(%rbx), %rdi
callq 0xed98
leaq 0xf0(%rbx), %rdi
callq 0xed98
leaq 0x140(%rbx), %rdi
callq 0xed98
addq $0x190, %rbx            # imm = 0x190
jmp 0x13867
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1f4ce5(%rip), %rdi    # 0x2085a0
callq 0xed98
leaq 0x1f4ab9(%rip), %rdi    # 0x208380
callq 0xed98
leaq 0x1f47ad(%rip), %rdi    # 0x208080
callq 0xed98
leaq 0x1f48a1(%rip), %rdi    # 0x208180
callq 0xed98
leaq 0x1f4995(%rip), %rdi    # 0x208280
callq 0xed98
popq %rax
jmp 0x13856
// File: /workspace/github_c_makefile_star2_O2/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 0x9ef7(%rip), %rsi      # 0x1d7ff
callq 0x83c0
movq %rax, %rbx
addq $0x50, %rbx
leaq 0xa107(%rip), %r14      # 0x1da22
leaq 0xb08b(%rip), %r15      # 0x1e9ad
xorl %esi, %esi
leal 0x1(%rsi), %ebp
movq %rbx, %rdi
movq %r14, %rdx
callq 0xed9c
movq %r15, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x8180
movl %ebp, %esi
cmpl $0x1f5, %ebp            # imm = 0x1F5
jne 0x13924
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x13cff
movzbl (%rsi), %eax
cmpl $0x7c, %eax
je 0x13cda
cmpl $0x20, %eax
jne 0x13cef
cmpb $0x7c, 0x1(%rsi)
jne 0x13ce2
cmpb $0x20, 0x2(%rsi)
jne 0x13ce2
addq $0x3, %rsi
jmp 0x13cef
xorl %eax, %eax
cmpb $0x20, 0x1(%rsi)
jmp 0x13ce8
xorl %eax, %eax
cmpb $0x7c, 0x1(%rsi)
sete %al
leaq (%rsi,%rax,2), %rsi
pushq %rax
pushq $0x50
popq %rdx
callq 0xe97a
pushq $0x1
popq %rax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl $0x80, %r14d
leaq 0x1f4a2d(%rip), %rbx    # 0x208740
subq $0x1, %r14
jb 0x13d3e
cmpb $0x0, -0xa0(%rbx)
je 0x13d35
movq %rbx, %rdi
callq 0x13480
testl %eax, %eax
je 0x13d35
cmpb $0x1, 0x50(%rbx)
sbbl $-0x1, %ebp
addq $0x190, %rbx            # imm = 0x190
jmp 0x13d13
leaq 0x79ff(%rip), %rdi      # 0x1b744
xorl %esi, %esi
callq 0x17172
testq %rax, %rax
movzbl %al, %eax
cmovel %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x201137(%rip), %rdi    # 0x214ea0
callq 0xed98
leaq 0x1f4a1b(%rip), %rdi    # 0x208790
xorl %r14d, %r14d
addq $-0x190, %r14           # imm = 0xFE70
cmpq $-0xc990, %r14          # imm = 0xFFFF3670
je 0x13dc0
leaq 0x190(%rdi), %r15
movq %rbx, %rsi
callq 0x8220
movq %r15, %rdi
testl %eax, %eax
jne 0x13d78
leaq 0x1f48fb(%rip), %rsi    # 0x2086a0
subq %r14, %rsi
addq $-0x140, %rsi           # imm = 0xFEC0
leaq 0x2010ea(%rip), %rdi    # 0x214ea0
movl $0x100, %edx            # imm = 0x100
callq 0xe97a
leaq 0x2010d9(%rip), %rax    # 0x214ea0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2011c4(%rip), %rdi    # 0x214fa0
callq 0xed98
leaq 0x1f4958(%rip), %rdi    # 0x208740
xorl %r14d, %r14d
addq $-0x190, %r14           # imm = 0xFE70
cmpq $-0xc990, %r14          # imm = 0xFFFF3670
je 0x13e33
leaq 0x190(%rdi), %r15
movq %rbx, %rsi
callq 0x8220
movq %r15, %rdi
testl %eax, %eax
jne 0x13deb
leaq 0x1f4888(%rip), %rsi    # 0x2086a0
subq %r14, %rsi
addq $-0x140, %rsi           # imm = 0xFEC0
leaq 0x201177(%rip), %rdi    # 0x214fa0
movl $0x100, %edx            # imm = 0x100
callq 0xe97a
leaq 0x201166(%rip), %rax    # 0x214fa0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x201251(%rip), %rdi    # 0x2150a0
callq 0xed98
leaq 0x1f48e5(%rip), %rdi    # 0x208740
xorl %r14d, %r14d
addq $-0x190, %r14           # imm = 0xFE70
cmpq $-0xc990, %r14          # imm = 0xFFFF3670
je 0x13ea6
leaq 0x190(%rdi), %r15
movq %rbx, %rsi
callq 0x8220
movq %r15, %rdi
testl %eax, %eax
jne 0x13e5e
leaq 0x1f4815(%rip), %rsi    # 0x2086a0
subq %r14, %rsi
addq $-0xa0, %rsi
leaq 0x201204(%rip), %rdi    # 0x2150a0
movl $0x100, %edx            # imm = 0x100
callq 0xe97a
leaq 0x2011f3(%rip), %rax    # 0x2150a0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2012de(%rip), %rdi    # 0x2151a0
callq 0xed98
leaq 0x1f4822(%rip), %rdi    # 0x2086f0
xorl %r14d, %r14d
addq $-0x190, %r14           # imm = 0xFE70
cmpq $-0xc990, %r14          # imm = 0xFFFF3670
je 0x13f19
leaq 0x190(%rdi), %r15
movq %rbx, %rsi
callq 0x8220
movq %r15, %rdi
testl %eax, %eax
jne 0x13ed1
leaq 0x1f47a2(%rip), %rsi    # 0x2086a0
subq %r14, %rsi
addq $-0xf0, %rsi
leaq 0x201291(%rip), %rdi    # 0x2151a0
movl $0x100, %edx            # imm = 0x100
callq 0xe97a
leaq 0x201280(%rip), %rax    # 0x2151a0
popq %rbx
popq %r14
popq %r15
retq