LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0xdf770(%rip), %rdi     # 0xf15b0
callq 0xf829
leaq 0xcf754(%rip), %rbx     # 0xe15a0
movl $0x40, %r15d
leaq 0x100(%rbx), %rsi
movq %r14, %rdi
callq 0x8220
testl %eax, %eax
je 0x11e73
addq $0x200, %rbx            # imm = 0x200
decq %r15
jne 0x11e52
jmp 0x11e87
leaq 0xdf736(%rip), %rdi     # 0xf15b0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0xf384
leaq 0xdf722(%rip), %rax     # 0xf15b0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xdf80d(%rip), %rdi     # 0xf16b0
callq 0xf829
leaq 0xcf6f1(%rip), %rbx     # 0xe15a0
movl $0x40, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x11ed2
addq $0x200, %rbx            # imm = 0x200
decq %r15
jne 0x11eb5
jmp 0x11eed
addq $0x100, %rbx            # imm = 0x100
leaq 0xdf7d0(%rip), %rdi     # 0xf16b0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0xf384
leaq 0xdf7bc(%rip), %rax     # 0xf16b0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0xd7674(%rip)     # 0xe95a0
jne 0x11f4c
callq 0x14d2d
cmpb $0x0, (%rax)
je 0x11f4c
movq %rax, %rdi
callq 0x11e31
xorl %ebx, %ebx
cmpb $0x0, 0xdf667(%rip)     # 0xf15b0
setne %bl
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xd7655(%rip), %rbx     # 0xe95b0
xorl %r14d, %r14d
cmpb $0x0, (%rbx)
je 0x11f75
incq %r14
addq $0x100, %rbx            # imm = 0x100
cmpq $0x40, %r14
jne 0x11f5e
jmp 0x11fbb
leaq 0xa9a0(%rip), %rdx      # 0x1c91c
movl $0x1, %esi
callq 0xf82d
testq %rax, %rax
je 0x11fbb
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf384
leaq 0xbedd(%rip), %rsi      # 0x1de7f
leaq 0xc0e8(%rip), %rdx      # 0x1e091
movl $0x2, %edi
movq %rbx, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x1a3e3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xd75dc(%rip), %r14     # 0xe95b0
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8220
testl %eax, %eax
je 0x12004
cmpb $0x0, (%r14)
movb $0x20, %al
je 0x1200b
leaq 0x1(%r15), %rcx
addq $0x100, %r14            # imm = 0x100
cmpq $0x3f, %r15
movq %rcx, %r15
jb 0x11fd7
jmp 0x1200b
addb $0x41, %r15b
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
cmpb $0x0, 0xd7598(%rip)     # 0xe95b0
je 0x12041
movb $0x40, %al
movl $0x100, %edx            # imm = 0x100
leaq 0xd7588(%rip), %rcx     # 0xe95b0
cmpq $0x4000, %rdx           # imm = 0x4000
je 0x12044
incb %al
cmpb $0x0, (%rdx,%rcx)
leaq 0x100(%rdx), %rdx
jne 0x12028
retq
movb $0x20, %al
retq
movb $-0x80, %al
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbe23(%rip), %rsi      # 0x1e232
callq 0x83b0
testq %rax, %rax
je 0x1246c
leaq 0xbe38(%rip), %rsi      # 0x1e258
movq %rbx, %rdi
callq 0x83b0
testq %rax, %rax
jne 0x1246c
movb $0x1, 0x142a8c(%rip)    # 0x154ec0
xorl %edi, %edi
callq 0x82a0
subq 0x142a86(%rip), %rax    # 0x154ec8
cmpq $0x2, %rax
ja 0x1244f
movb $0x0, 0x142a71(%rip)    # 0x154ec0
leaq 0xba29(%rip), %rsi      # 0x1de7f
leaq 0xbe06(%rip), %rdx      # 0x1e263
movl $0x2, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1a3e3
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x142a45(%rip)    # 0x154ec0
xorl %edi, %edi
callq 0x82a0
movq %rax, 0x142a3f(%rip)    # 0x154ec8
leaq 0xb9ef(%rip), %rsi      # 0x1de7f
leaq 0xbde8(%rip), %rdx      # 0x1e27f
movl $0x2, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1a3e3
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x130ae
movl $0x2, %edi
callq 0x83a0
leaq 0x148964(%rip), %rdi    # 0x15b9e0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0xf384
xorl %edi, %edi
callq 0x82a0
movq %rax, 0x148939(%rip)    # 0x15b9d0
callq 0x89e1
xorl %edi, %edi
callq 0x82a0
movq %rax, 0xc63d6(%rip)     # 0xd9480
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xadb6(%rip), %r14      # 0x1de7d
movl $0x5, %edi
movq %r14, %rsi
callq 0x14f92
leaq 0x162b05(%rip), %r15    # 0x175be0
movl $0x2000, %edx           # imm = 0x2000
movq %r15, %rdi
movq %rax, %rsi
callq 0xf384
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xf82d
testq %rax, %rax
je 0x13144
movl $0x1, %ebp
movq %rsp, %r14
leaq 0x162ad4(%rip), %r15    # 0x175be0
leaq 0xad6a(%rip), %r12      # 0x1de7d
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %rax, %rsi
callq 0xf384
xorl %edi, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x13676
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0xf82d
incl %ebp
testq %rax, %rax
jne 0x13113
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_O3/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 0x1316a
xorl %edi, %edi
callq 0x82a0
movq %rax, %rdi
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
movq %rax, %rdi
callq 0x8110
leaq 0x15895f(%rip), %rbx    # 0x16bae0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf384
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1589da(%rip), %rdi    # 0x16bbe0
callq 0xf829
leaq 0xb208(%rip), %rdx      # 0x1e41a
leaq 0x1010(%rsp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8190
movq 0xc6255(%rip), %rdi     # 0xd9488
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x2, %esi
movq %r14, %rdx
callq 0x972d
testl %eax, %eax
jne 0x1328f
movslq 0xc(%rsp), %r14
movq %rbx, %rdi
callq 0x8120
cmpq %r14, %rax
jae 0x1328f
leaq 0xb331(%rip), %rdx      # 0x1e598
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0xf82d
testq %rax, %rax
je 0x1328f
leaq 0x15895e(%rip), %rdi    # 0x16bbe0
movl $0x4000, %edx           # imm = 0x4000
movq %rax, %rsi
callq 0xf384
leaq 0x15894a(%rip), %rax    # 0x16bbe0
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x15c92b(%rip), %rdi    # 0x16fbe0
callq 0xf829
leaq 0xb159(%rip), %rdx      # 0x1e41a
leaq 0x1010(%rsp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8190
movq 0xc61a6(%rip), %rdi     # 0xd9488
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x2, %esi
movq %r14, %rdx
callq 0x972d
testl %eax, %eax
jne 0x13325
movslq 0xc(%rsp), %r14
movq %rbx, %rdi
callq 0x8120
cmpq %r14, %rax
jae 0x13325
leaq 0x15c8ca(%rip), %rdi    # 0x16fbe0
leaq 0x10(%rsp), %rsi
movl $0x4000, %edx           # imm = 0x4000
callq 0xf384
leaq 0x15c8b4(%rip), %rax    # 0x16fbe0
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x909b(%rip), %rdi      # 0x1c72d
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x181e1
testq %rax, %rax
jne 0x13711
testl %ebp, %ebp
je 0x13722
leaq 0xadc6(%rip), %rdx      # 0x1e472
leaq 0x110(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x8190
movq 0xc5dbb(%rip), %rdi     # 0xd9488
leaq 0x110(%rsp), %rdx
leaq 0x1110(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x2, %esi
callq 0x972d
movl %eax, %r15d
leaq 0xa789(%rip), %rsi      # 0x1de7f
leaq 0xad88(%rip), %rdx      # 0x1e485
leaq 0x110(%rsp), %rcx
movl $0x1, %edi
xorl %eax, %eax
callq 0x1a3e3
movl %r15d, %eax
addq $0x2118, %rsp           # imm = 0x2118
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x14378
cmpl $0x2, %eax
je 0x13740
cmpl $0x1, %eax
jne 0x136ef
leaq 0x8535(%rip), %rdx      # 0x1bc70
jmp 0x136ac
movq %r14, %rdi
callq 0x14d2d
leaq 0x10(%rsp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %rax, %rsi
callq 0xf384
movq %r14, %rdi
callq 0x8120
cmpq $0x4, %rax
jb 0x136ef
leaq 0x84fe(%rip), %rdx      # 0x1bc70
leaq 0x110(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movl $0x1000, %esi           # imm = 0x1000
jmp 0x136bc
// File: /workspace/github_c_makefile_star2_O3/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 0x8f89(%rip), %rdi      # 0x1c72d
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x181e1
testq %rax, %rax
jne 0x13815
leaq 0x84b6(%rip), %rdx      # 0x1bc70
leaq 0x1010(%rsp), %r12
movl $0x1000, %esi           # imm = 0x1000
movq %r12, %rdi
movq %r15, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x8190
movq 0xc5caa(%rip), %rdi     # 0xd9488
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movl $0x2, %esi
movq %r12, %rdx
callq 0x972d
movl %eax, %r14d
leaq 0xa680(%rip), %rsi      # 0x1de7f
leaq 0xac93(%rip), %rdx      # 0x1e499
movl $0x1, %edi
movq %r12, %rcx
xorl %eax, %eax
callq 0x1a3e3
movl %r14d, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xddd4d(%rip), %rdi     # 0xf17c0
movq %r15, %rsi
callq 0x83b0
movl $0x1, %ebx
testq %rax, %rax
je 0x13a96
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8c27(%rip), %rdi      # 0x1c6c4
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x13a85
leaq 0xddf10(%rip), %rdi     # 0xf19c0
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
jne 0x13a85
leaq 0xdeffc(%rip), %r12     # 0xf2ac0
xorl %r13d, %r13d
imulq $0x10700, %r13, %rax    # imm = 0x10700
leaq 0xde8eb(%rip), %rcx     # 0xf23c0
leaq (%rax,%rcx), %rdi
addq $0x100, %rdi            # imm = 0x100
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x13b0f
xorl %ebp, %ebp
leaq (%r12,%rbp), %rdi
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x13a85
addq $0x100, %rbp            # imm = 0x100
cmpq $0x10000, %rbp          # imm = 0x10000
jne 0x13aef
incq %r13
addq $0x10700, %r12          # imm = 0x10700
cmpq $0x6, %r13
jne 0x13ac7
leaq 0xde39a(%rip), %rdi     # 0xf1ec0
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x13b45
callq 0x14c64
xorl %ebx, %ebx
cmpl $0x1, %eax
sete %bl
jmp 0x13a85
xorl %ebx, %ebx
jmp 0x13a85
// File: /workspace/github_c_makefile_star2_O3/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 0xddc5c(%rip), %rdi     # 0xf17c0
movq %r15, %rsi
callq 0x83b0
movl $0x1, %ebx
testq %rax, %rax
je 0x13b87
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8b36(%rip), %rdi      # 0x1c6c4
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x13b76
leaq 0xde01f(%rip), %rdi     # 0xf1bc0
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
jne 0x13b76
leaq 0xdef0b(%rip), %r12     # 0xf2ac0
xorl %r13d, %r13d
imulq $0x10700, %r13, %rax    # imm = 0x10700
leaq 0xde7fa(%rip), %rcx     # 0xf23c0
leaq (%rax,%rcx), %rdi
addq $0x300, %rdi            # imm = 0x300
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x13c00
xorl %ebp, %ebp
leaq (%r12,%rbp), %rdi
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x13b76
addq $0x100, %rbp            # imm = 0x100
cmpq $0x10000, %rbp          # imm = 0x10000
jne 0x13be0
incq %r13
addq $0x10700, %r12          # imm = 0x10700
cmpq $0x6, %r13
jne 0x13bb8
leaq 0xde4a9(%rip), %rdi     # 0xf20c0
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x13c36
callq 0x14c64
xorl %ebx, %ebx
cmpl $0x1, %eax
sete %bl
jmp 0x13b76
xorl %ebx, %ebx
jmp 0x13b76
// File: /workspace/github_c_makefile_star2_O3/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 0xddb6b(%rip), %rdi     # 0xf17c0
movq %r15, %rsi
callq 0x83b0
movl $0x1, %ebx
testq %rax, %rax
je 0x13c78
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdee41(%rip), %r12     # 0xf2ac0
xorl %r13d, %r13d
imulq $0x10700, %r13, %rax    # imm = 0x10700
leaq 0xde730(%rip), %rcx     # 0xf23c0
leaq (%rax,%rcx), %rdi
addq $0x500, %rdi            # imm = 0x500
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x13cca
xorl %ebp, %ebp
leaq (%r12,%rbp), %rdi
movq %r15, %rsi
callq 0x8220
testl %eax, %eax
je 0x13c67
addq $0x100, %rbp            # imm = 0x100
cmpq $0x10000, %rbp          # imm = 0x10000
jne 0x13caa
incq %r13
addq $0x10700, %r12          # imm = 0x10700
cmpq $0x6, %r13
jne 0x13c82
leaq 0xde5df(%rip), %rdi     # 0xf22c0
movq %r14, %rsi
callq 0x83b0
testq %rax, %rax
je 0x13d00
callq 0x14c64
xorl %ebx, %ebx
cmpl $0x1, %eax
sete %bl
jmp 0x13c67
xorl %ebx, %ebx
jmp 0x13c67
// File: /workspace/github_c_makefile_star2_O3/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 0x163ec4(%rip), %rdi    # 0x177be0
callq 0xf829
leaq 0xdda98(%rip), %rdi     # 0xf17c0
movq %rbx, %rsi
callq 0x83b0
testq %rax, %rax
je 0x13d66
leaq 0xddb84(%rip), %r14     # 0xf18c0
leaq 0x163e9d(%rip), %rdi    # 0x177be0
movl $0x100, %edx            # imm = 0x100
movq %r14, %rsi
callq 0xf384
leaq 0x163e89(%rip), %rax    # 0x177be0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xded53(%rip), %r15     # 0xf2ac0
xorl %r12d, %r12d
leaq 0xde649(%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 0x13d3c
addq $0x100, %rbp            # imm = 0x100
cmpq $0x10000, %rbp          # imm = 0x10000
jne 0x13d83
incq %r12
addq $0x10700, %r15          # imm = 0x10700
cmpq $0x6, %r12
jne 0x13d77
jmp 0x13d50
// File: /workspace/github_c_makefile_star2_O3/schroeder-lvb[P]sissm/src/api.c
// Function: apiGetServerMode
char *apiGetServerMode( void )
{
    static char gameMode[256];
    int i;
    static char recognizedModes[16][64] = { 
        "hardcore",   "checkpoint", "frenzy",    "outpost",    "frontline", 
        "domination", "push",       "firefight", "deathmatch", "*" 
    };

    strlcpy( gameMode, "unknown", 256 );

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

// Assembly:
movabsq $0x6e776f6e6b6e75, %rax # imm = 0x6E776F6E6B6E75
movq %rax, 0x163f0e(%rip)    # 0x177ce0
cmpb $0x2a, 0x15cf7(%rip)    # 0x29ad0
je 0x13e24
pushq %r14
pushq %rbx
pushq %rax
leaq 0x15cea(%rip), %rbx     # 0x29ad0
leaq 0xd97c3(%rip), %r14     # 0xed5b0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8350
testq %rax, %rax
jne 0x13e09
cmpb $0x2a, 0x40(%rbx)
leaq 0x40(%rbx), %rbx
jne 0x13ded
jmp 0x13e1d
leaq 0x163ed0(%rip), %rdi    # 0x177ce0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0xf384
addq $0x8, %rsp
popq %rbx
popq %r14
leaq 0x163eb5(%rip), %rax    # 0x177ce0
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1ef0b8(%rip), %rbx    # 0x202ef0
movq %rbx, %rdi
callq 0xf829
xorl %r14d, %r14d
leaq 0x1ea0a6(%rip), %r15    # 0x1fdef0
cmpb $0x0, (%r14,%r15)
je 0x13e7d
leaq (%r15,%r14), %rsi
movl $0xfff, %edx            # imm = 0xFFF
movq %rbx, %rdi
callq 0x81c0
movq %rbx, %rdi
callq 0x8120
movw $0x20, (%rax,%rbx)
addq $0x28, %r14
cmpq $0x5000, %r14           # imm = 0x5000
jne 0x13e4a
leaq 0x1ef06c(%rip), %rax    # 0x202ef0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/schroeder-lvb[P]sissm/src/api.c
// Function: apiIsSupportedGameMode
int apiIsSupportedGameMode( char *candidateMode  )
{
    int isGameMode = 0;
    int j;

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x408, %r14d           # imm = 0x408
leaq 0x164051(%rip), %r15    # 0x177ef0
leaq (%r15,%r14), %rdi
movq %rbx, %rsi
callq 0x8060
testl %eax, %eax
je 0x13ec3
addq $0x430, %r14            # imm = 0x430
cmpq $0x86408, %r14          # imm = 0x86408
jne 0x13e9f
xorl %eax, %eax
jmp 0x13ec8
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1efe82(%rip), %rdi    # 0x203ef0
callq 0xf829
cmpb $0x0, 0x140f56(%rip)    # 0x154fd0
je 0x140bc
leaq 0x140f4d(%rip), %r14    # 0x154fd0
leaq 0x1efe66(%rip), %rbx    # 0x203ef0
leaq 0x80bd(%rip), %r15      # 0x1c14e
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf310
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf310
cmpb $0x0, 0x50(%r14)
leaq 0x50(%r14), %r14
jne 0x14091
leaq 0x1efe2d(%rip), %rbx    # 0x203ef0
movq %rbx, %rdi
callq 0xf92f
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xf829
leaq 0xa5a9(%rip), %rsi      # 0x1e69c
movq %r14, %rdi
callq 0x8060
testl %eax, %eax
je 0x14152
cmpb $0x0, 0x140eca(%rip)    # 0x154fd0
je 0x14161
movslq %ebp, %r15
xorl %ebp, %ebp
leaq 0x140ebc(%rip), %r12    # 0x154fd0
movq %r12, %rdi
movq %r14, %rsi
callq 0x8060
testl %eax, %eax
je 0x14165
movq %r12, %rdi
movq %r14, %rsi
callq 0x8350
testq %rax, %rax
je 0x14143
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xf384
incl %ebp
cmpb $0x0, 0x50(%r12)
leaq 0x50(%r12), %r12
jne 0x14114
jmp 0x14178
movslq %ebp, %rdx
leaq 0xa540(%rip), %rsi      # 0x1e69c
movq %rbx, %rdi
jmp 0x1416e
xorl %ebp, %ebp
jmp 0x14178
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xf384
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterIsValidGUID
int rosterIsValidGUID( char *testGUID )
{
    int i, isValid = 0;
    int len = (int) strlen( testGUID ); 
  
    switch ( len )  { 
    case IDSTEAMID64LEN:                // Steam
        isValid = 1;
        for (i=0; i<IDSTEAMID64LEN; i++) {
            if ( !isdigit( testGUID[i] )) {
                isValid = 0;
                break;
            }
        }
        break;
    case IDEPICIDLEN:                   // EPIC
        isValid = 2;
        for (i=0; i<IDEPICIDLEN; i++) {
            if ( ( !isxdigit( testGUID[i] )) && ( testGUID[i] != '|' ) ) {
                isValid = 0;
                break;
            }
        }
        break;
    case IDWINGDKLEN:                   // WinGDK
        isValid = 3;
        for (i=0; i<IDWINGDKLEN; i++) {
            if ( !isdigit( testGUID[i] )) {
                isValid = 0;
                break;
            }
        }
        break;
    default:
        isValid = 0;
    }

    return( isValid );
}

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

    strclr( foundID );

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %r8d, %ebp
movq %rcx, %rbx
movl %edx, 0x14(%rsp)
movl %esi, 0xc(%rsp)
movq %rdi, %r12
movq %rcx, %rdi
callq 0xf829
movq %r12, %rdi
callq 0x8120
movq %rax, %r13
testl %r13d, %r13d
jle 0x144e4
movl %ebp, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
xorl %r14d, %r14d
movl 0xc(%rsp), %edx
movb (%r12,%r14), %al
cmpb %dl, %al
jne 0x14489
movl %r14d, %r15d
jmp 0x144da
cmpb 0x14(%rsp), %al
setne %al
cmpl $-0x1, %r15d
sete %cl
orb %al, %cl
jne 0x144da
leal 0x1(%r15), %eax
movslq %eax, %rsi
cmpq %rsi, %r14
jle 0x144c1
addq %r12, %rsi
movl %ebp, %ebx
subl %r15d, %ebx
leaq 0x1(%rbx), %rdx
leaq 0x20(%rsp), %rdi
callq 0x8290
incl %ebx
jmp 0x144c3
xorl %ebx, %ebx
movb $0x0, 0x20(%rsp,%rbx)
leaq 0x20(%rsp), %rdi
callq 0x14378
testl %eax, %eax
movl 0xc(%rsp), %edx
jne 0x144fa
incq %r14
incl %ebp
cmpq %r14, %r13
jne 0x1447c
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebx
movslq 0x10(%rsp), %rdx
leaq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0xf384
jmp 0x144e6
// File: /workspace/github_c_makefile_star2_O3/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, 0x1f3f98(%rip) # imm = 0x796164
leaq 0x1f3e91(%rip), %rdi    # 0x208480
leaq 0xa130(%rip), %rsi      # 0x1e726
callq 0x83b0
testq %rax, %rax
je 0x14641
addq $0xa, %rax
leaq 0xa126(%rip), %rdx      # 0x1e731
movq %rax, %rdi
xorl %esi, %esi
callq 0xf82d
testq %rax, %rax
je 0x14641
leaq 0x1f3f5f(%rip), %rbx    # 0x208580
movl $0x14, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf384
movq %rbx, %rdi
callq 0xfa1d
movq %rbx, %rdi
callq 0xf92f
leaq 0x1f3f38(%rip), %rax    # 0x208580
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1f3b2b(%rip), %rbx    # 0x208180
movq %rbx, %rdi
callq 0xf9a9
leaq 0xa0d0(%rip), %rsi      # 0x1e734
movq %rbx, %rdi
callq 0x83b0
testq %rax, %rax
jne 0x14689
leaq 0x1f3b08(%rip), %rdi    # 0x208180
leaq 0xa0c3(%rip), %rsi      # 0x1e742
callq 0x83b0
testq %rax, %rax
je 0x14692
movsbl 0xd(%rax), %ebx
cmpl $0x20, %ebx
jne 0x146ee
leaq 0x1f3ae7(%rip), %r14    # 0x208180
movq %r14, %rdi
callq 0x11fc5
movl %eax, %ebx
movsbl %al, %ebp
leaq 0xa0a3(%rip), %rsi      # 0x1e750
leaq 0xa0a3(%rip), %rdx      # 0x1e757
movl $0x2, %edi
movl %ebp, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x1a3e3
cmpb $0x20, %bpl
jne 0x1470a
leaq 0xa07e(%rip), %rsi      # 0x1e750
leaq 0xa0f6(%rip), %rdx      # 0x1e7cf
movl $0x2, %edi
movl $0x41, %ecx
xorl %eax, %eax
callq 0x1a3e3
movb $0x41, %bl
jmp 0x1470a
leaq 0xa05b(%rip), %rsi      # 0x1e750
leaq 0xa0a4(%rip), %rdx      # 0x1e7a0
movl $0x2, %edi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1a3e3
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterReset
void rosterReset( void )
{
    int i;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1f3f18(%rip), %rbx    # 0x2086a0
movl $0x80, %r14d
movq %rbx, %rdi
callq 0xf829
leaq 0x50(%rbx), %rdi
callq 0xf829
leaq 0xa0(%rbx), %rdi
callq 0xf829
leaq 0xf0(%rbx), %rdi
callq 0xf829
leaq 0x140(%rbx), %rdi
callq 0xf829
addq $0x190, %rbx            # imm = 0x190
decq %r14
jne 0x1478e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1f3dc1(%rip), %rdi    # 0x2085a0
callq 0xf829
leaq 0x1f3b95(%rip), %rdi    # 0x208380
callq 0xf829
leaq 0x1f3889(%rip), %rdi    # 0x208080
callq 0xf829
leaq 0x1f397d(%rip), %rdi    # 0x208180
callq 0xf829
leaq 0x1f3a71(%rip), %rdi    # 0x208280
callq 0xf829
popq %rax
jmp 0x1477d
// File: /workspace/github_c_makefile_star2_O3/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 0x9fe3(%rip), %rsi      # 0x1e80f
callq 0x83b0
movq %rax, %rbx
addq $0x50, %rbx
leaq 0xa1f3(%rip), %r14      # 0x1ea32
leaq 0xb17f(%rip), %r15      # 0x1f9c5
xorl %esi, %esi
leal 0x1(%rsi), %ebp
movq %rbx, %rdi
movq %r14, %rdx
callq 0xf82d
movq %r15, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x8180
movl %ebp, %esi
cmpl $0x1f5, %ebp            # imm = 0x1F5
jne 0x14848
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x14c63
movzbl (%rsi), %eax
cmpl $0x7c, %eax
je 0x14c3a
cmpl $0x20, %eax
jne 0x14c4f
cmpb $0x7c, 0x1(%rsi)
jne 0x14c42
cmpb $0x20, 0x2(%rsi)
jne 0x14c42
addq $0x3, %rsi
jmp 0x14c4f
xorl %eax, %eax
cmpb $0x20, 0x1(%rsi)
jmp 0x14c48
xorl %eax, %eax
cmpb $0x7c, 0x1(%rsi)
sete %al
leaq (%rsi,%rax,2), %rsi
pushq %rax
movl $0x50, %edx
callq 0xf384
movl $0x1, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterCount
int rosterCount( void )
{
    int i, count = 0;
    long devOverride;

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

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

    return count;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebp, %ebp
leaq 0x1f3acf(%rip), %rbx    # 0x208740
movl $0x80, %r14d
cmpb $0x0, -0xa0(%rbx)
je 0x14c93
movq %rbx, %rdi
callq 0x14378
testl %eax, %eax
je 0x14c93
cmpb $0x1, 0x50(%rbx)
sbbl $-0x1, %ebp
addq $0x190, %rbx            # imm = 0x190
decq %r14
jne 0x14c77
leaq 0x7a96(%rip), %rdi      # 0x1c73c
xorl %esi, %esi
callq 0x181e1
testq %rax, %rax
movzbl %al, %eax
cmovel %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2001d6(%rip), %rdi    # 0x214ea0
callq 0xf829
leaq 0x1f3aba(%rip), %r14    # 0x208790
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x14d01
addq $-0x190, %r15           # imm = 0xFE70
addq $0x190, %r14            # imm = 0x190
cmpq $-0xc800, %r15          # imm = 0xFFFF3800
jne 0x14cd9
jmp 0x14d20
leaq 0x1f3998(%rip), %rsi    # 0x2086a0
subq %r15, %rsi
addq $0x50, %rsi
leaq 0x20018a(%rip), %rdi    # 0x214ea0
movl $0x100, %edx            # imm = 0x100
callq 0xf384
leaq 0x200179(%rip), %rax    # 0x214ea0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x200264(%rip), %rdi    # 0x214fa0
callq 0xf829
leaq 0x1f39f8(%rip), %r14    # 0x208740
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x14d73
addq $-0x190, %r15           # imm = 0xFE70
addq $0x190, %r14            # imm = 0x190
cmpq $-0xc800, %r15          # imm = 0xFFFF3800
jne 0x14d4b
jmp 0x14d92
leaq 0x1f3926(%rip), %rsi    # 0x2086a0
subq %r15, %rsi
addq $0x50, %rsi
leaq 0x200218(%rip), %rdi    # 0x214fa0
movl $0x100, %edx            # imm = 0x100
callq 0xf384
leaq 0x200207(%rip), %rax    # 0x214fa0
popq %rbx
popq %r14
popq %r15
retq