LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/alarm.c
// Function: alarmCreate
alarmObj *alarmCreate( int (*alarmCBfunc)( char * ) )
{
    alarmObj *aPtr = NULL;
    int i;

    aPtr = calloc( 1, sizeof( alarmObj ));
    if ( aPtr != NULL ) {
        aPtr->alarmTime = 0L;
        aPtr->alarmCallbackFunction = alarmCBfunc;

        for (i = 0; i<SISSM_MAXALARMS; i++) {
            if ( alarmTable[ i ] == NULL ) {
                alarmTable[ i ] = aPtr;
                aPtr->usedIndex = i;
                break;
            }
        }
    }
    return aPtr;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x8210
testq %rax, %rax
je 0xf184
movq %rbx, 0x8(%rax)
leaq 0xb993c(%rip), %rdx     # 0xc8aa0
xorl %ecx, %ecx
cmpq $0x80, %rcx
je 0xf184
cmpq $0x0, (%rdx)
je 0xf17e
incq %rcx
addq $0x8, %rdx
jmp 0xf166
movq %rax, (%rdx)
movl %ecx, 0x10(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/alarm.c
// Function: alarmDestroy
int alarmDestroy( alarmObj *aPtr )
{
    int errCode = 1;
    if ( NULL != aPtr ) {
        if ( aPtr->usedIndex != -1 ) {
            alarmTable[ aPtr->usedIndex ] = NULL;
            free( aPtr );
            errCode = 0;
        }
    }
    return errCode;
}

// Assembly:
pushq $0x1
popq %rax
testq %rdi, %rdi
je 0xf1b0
movslq 0x10(%rdi), %rcx
cmpq $-0x1, %rcx
je 0xf1b0
pushq %rax
leaq 0xb9900(%rip), %rax     # 0xc8aa0
andq $0x0, (%rax,%rcx,8)
callq 0x8040
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/alarm.c
// Function: alarmDispatch
void alarmDispatch( void )
{
    alarmObj *aPtr;
    unsigned long timeNow;
    int i;
 
    timeNow = (unsigned long) time(NULL);

    for (i = 0; i<SISSM_MAXALARMS; i++) {
        aPtr = alarmTable[ i ];
        if ( aPtr != NULL ) {
            if ( aPtr->alarmTime != 0L ) {
                if ( aPtr->alarmTime <= timeNow ) {
                    aPtr->alarmTime = 0L;
                    if ( aPtr->alarmCallbackFunction != NULL ) {
                        (aPtr->alarmCallbackFunction)("alarm");
                    }
                }
            }
        }
    }
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x82a0
movq %rax, %rbx
leaq 0xb9885(%rip), %r12     # 0xc8aa0
leaq 0x10342(%rip), %r14     # 0x1f564
cmpq $0x400, %r15            # imm = 0x400
je 0xf257
movq (%r15,%r12), %rax
testq %rax, %rax
je 0xf251
movq (%rax), %rcx
decq %rcx
cmpq %rbx, %rcx
jae 0xf251
andq $0x0, (%rax)
movq 0x8(%rax), %rax
testq %rax, %rax
je 0xf251
movq %r14, %rdi
callq *%rax
addq $0x8, %r15
jmp 0xf222
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/pioverride.c
// Function: pokeCvar
static void _pokeCvar( void )
{
    int i;
    char cvarStr[256], cvarVal[256];
    char *w1, *w2;

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

        w1 = getWord( pioverrideConfig.cvar[i], 0, " " );
        w2 = getWord( pioverrideConfig.cvar[i], 1, " " );

	if (( w1 != NULL ) && ( w2 != NULL )) {
            strlcpy( cvarStr, w1, 256);
            strlcpy( cvarVal, w2, 256);

	    if ( (0 != strlen(cvarStr)) && (0 != strlen(cvarVal)) ) {
                apiGameModePropertySet( cvarStr, cvarVal );
	        logPrintf( LOG_LEVEL_INFO, "pioverride", "Setting ::%s:: to ::%s::", cvarStr, cvarVal );
	    }
        }
    }
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
pushq $0x4
popq %rbp
leaq 0xbcd3(%rip), %rbx      # 0x1b14e
leaq 0x100(%rsp), %r14
movq %rsp, %r15
cmpq $0x2804, %rbp           # imm = 0x2804
je 0xf537
leaq 0xb9a06(%rip), %rax     # 0xc8ea0
leaq (%rax,%rbp), %r13
movq %r13, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xed9c
movq %rax, %r12
movq %r13, %rdi
pushq $0x1
popq %rsi
movq %rbx, %rdx
callq 0xed9c
movq %rax, %r13
testq %r12, %r12
setne %al
testq %r13, %r13
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xf52b
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %r12, %rsi
callq 0xe97a
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
movq %r13, %rsi
callq 0xe97a
cmpb $0x0, 0x100(%rsp)
je 0xf52b
cmpb $0x0, (%rsp)
je 0xf52b
movq %r14, %rdi
movq %r15, %rsi
callq 0x12464
pushq $0x2
popq %rdi
leaq 0xd20e(%rip), %rsi      # 0x1c725
leaq 0xd212(%rip), %rdx      # 0x1c730
movq %r14, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x1920b
addq $0x400, %rbp            # imm = 0x400
jmp 0xf486
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/pioverride.c
// Function: pioverrideInstallPlugin
int pioverrideInstallPlugin( void )
{
    // Read the plugin-specific variables from the .cfg file 
    // 
    pioverrideInitConfig();

    // if plugin is disabled in the .cfg file then do not activate
    //
    if ( pioverrideConfig.pluginState == 0 ) return 0;

    // Install Event-driven CallBack hooks so the plugin gets
    // notified for various happenings.  A complete list is here,
    // but comment out what is not needed for your plug-in.
    // 
    eventsRegister( SISSM_EV_CLIENT_ADD,           pioverrideClientAddCB );
    eventsRegister( SISSM_EV_CLIENT_DEL,           pioverrideClientDelCB );
    eventsRegister( SISSM_EV_INIT,                 pioverrideInitCB );
    eventsRegister( SISSM_EV_RESTART,              pioverrideRestartCB );
    eventsRegister( SISSM_EV_MAPCHANGE,            pioverrideMapChangeCB );
    eventsRegister( SISSM_EV_GAME_START,           pioverrideGameStartCB );
    eventsRegister( SISSM_EV_GAME_END,             pioverrideGameEndCB );
    eventsRegister( SISSM_EV_ROUND_START,          pioverrideRoundStartCB );
    eventsRegister( SISSM_EV_ROUND_END,            pioverrideRoundEndCB );
    eventsRegister( SISSM_EV_OBJECTIVE_CAPTURED,   pioverrideCapturedCB );
    eventsRegister( SISSM_EV_PERIODIC,             pioverridePeriodicCB );
    return 0;
}

// Assembly:
pushq %rax
callq 0xf264
cmpl $0x0, 0xb9928(%rip)     # 0xc8ea0
je 0xf623
leaq -0x13e(%rip), %rsi      # 0xf447
pushq $0x3
popq %rdi
callq 0xcba7
leaq -0x14a(%rip), %rsi      # 0xf44a
pushq $0x4
popq %rdi
callq 0xcba7
leaq -0x156(%rip), %rsi      # 0xf44d
pushq $0x1
popq %rdi
callq 0xcba7
leaq -0x162(%rip), %rsi      # 0xf450
pushq $0x2
popq %rdi
callq 0xcba7
leaq -0x16e(%rip), %rsi      # 0xf453
pushq $0x5
popq %rdi
callq 0xcba7
leaq -0x17a(%rip), %rsi      # 0xf456
pushq $0x6
popq %rdi
callq 0xcba7
leaq -0x96(%rip), %rsi       # 0xf549
pushq $0x7
popq %rdi
callq 0xcba7
leaq -0xa2(%rip), %rsi       # 0xf54c
pushq $0x8
popq %rdi
callq 0xcba7
leaq -0x9b(%rip), %rsi       # 0xf562
pushq $0x9
popq %rdi
callq 0xcba7
leaq -0xa7(%rip), %rsi       # 0xf565
pushq $0xa
popq %rdi
callq 0xcba7
leaq -0xb3(%rip), %rsi       # 0xf568
pushq $0xb
popq %rdi
callq 0xcba7
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/pisoloplayer.c
// Function: pisoloplayerInitConfig
int pisoloplayerInitConfig( void )
{
    cfsPtr cP;

    cP = cfsCreate( sissmGetConfigPath() );

    // read "pisoloplayer.pluginstate" variable from the .cfg file
    pisoloplayerConfig.pluginState = (int) cfsFetchNum( cP, "pisoloplayer.pluginState", 0.0 );  // disabled by default

    // how players constitute "solo"?  Typically '1' but you may override to higher player count
    //
    pisoloplayerConfig.soloPlayerThreshold = (int) cfsFetchNum( cP, "pisoloplayer.soloPlayerThreshold", 1.0 ); 

    strlcpy( pisoloplayerConfig.soloWarning, 
        cfsFetchStr( cP, "pisoloplayer.soloWarning", "Counterattack disabled for a single player" ), CFS_FETCH_MAX);
    strlcpy( pisoloplayerConfig.multiWarning, 
        cfsFetchStr( cP, "pisoloplayer.multiWarning", "Counterattack enabled for multi-players" ), CFS_FETCH_MAX);
    strlcpy( pisoloplayerConfig.defendTimer, 
        cfsFetchStr( cP, "pisoloplayer.defendTimer", "90" ), CFS_FETCH_MAX);

    cfsDestroy( cP );
    return 0;
}

// Assembly:
pushq %rbx
callq 0x8973
movq %rax, %rdi
callq 0x8f80
movq %rax, %rbx
leaq 0xd109(%rip), %rsi      # 0x1c749
xorpd %xmm0, %xmm0
movq %rax, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbc052(%rip)     # 0xcb6a8
leaq 0xd105(%rip), %rsi      # 0x1c762
movsd 0xa9c3(%rip), %xmm0     # 0x1a028
movq %rbx, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbc035(%rip)     # 0xcb6ac
leaq 0xd105(%rip), %rsi      # 0x1c783
leaq 0xd117(%rip), %rdx      # 0x1c79c
movq %rbx, %rdi
callq 0x8ff5
leaq 0xbc41c(%rip), %rdi     # 0xcbab0
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xe97a
leaq 0xd11f(%rip), %rsi      # 0x1c7c7
leaq 0xd132(%rip), %rdx      # 0x1c7e1
movq %rbx, %rdi
callq 0x8ff5
leaq 0xbbff2(%rip), %rdi     # 0xcb6b0
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xe97a
leaq 0xd137(%rip), %rsi      # 0x1c809
leaq 0xd149(%rip), %rdx      # 0x1c822
movq %rbx, %rdi
callq 0x8ff5
leaq 0xbc7c8(%rip), %rdi     # 0xcbeb0
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xe97a
movq %rbx, %rdi
callq 0x8fd6
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/pisoloplayer.c
// Function: singlePlayerNoCounter
static int _singlePlayerNoCounter( void )
{
    char *w;

    w = apiGetServerMode();
    if ((0==strcmp( w, "checkpoint" )) || (0==strcmp( w, "hardcore")) )  {
        if ( pisoloplayerConfig.soloPlayerThreshold >= apiPlayersGetCount() ) {
            apiGameModePropertySet( "DefendTimer", "3");
	    apiSay( pisoloplayerConfig.soloWarning );
            logPrintf( LOG_LEVEL_INFO, "pisoloplayer", "Counterattack disabled for a single player" );
        }
        else {
            apiGameModePropertySet( "DefendTimer", pisoloplayerConfig.defendTimer);  // default "90"
	    apiSay( pisoloplayerConfig.multiWarning );
            logPrintf( LOG_LEVEL_INFO, "pisoloplayer", "Counterattack enabled for multi-players" );
        }
    }

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x12f75
movq %rax, %rbx
leaq 0xc89d(%rip), %rsi      # 0x1bfbb
movq %rax, %rdi
callq 0x8220
testl %eax, %eax
je 0xf745
leaq 0xb8c6(%rip), %rsi      # 0x1aff7
movq %rbx, %rdi
callq 0x8220
testl %eax, %eax
je 0xf745
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0xbbf61(%rip), %ebx     # 0xcb6ac
callq 0x12ab4
cmpl %eax, %ebx
leaq 0xbc757(%rip), %rax     # 0xcbeb0
leaq 0xf24a(%rip), %rsi      # 0x1e9aa
cmovlq %rax, %rsi
leaq 0xbbf45(%rip), %rax     # 0xcb6b0
leaq 0xbc33e(%rip), %rbx     # 0xcbab0
cmovlq %rax, %rbx
leaq 0xd064(%rip), %rax      # 0x1c7e1
leaq 0xd018(%rip), %r14      # 0x1c79c
cmovlq %rax, %r14
leaq 0xd096(%rip), %rdi      # 0x1c825
callq 0x12464
movq %rbx, %rdi
xorl %eax, %eax
callq 0x125a8
leaq 0xd08c(%rip), %rsi      # 0x1c831
pushq $0x2
popq %rdi
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1920b
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/pisoloplayer.c
// Function: pisoloplayerInstallPlugin
int pisoloplayerInstallPlugin( void )
{
    // Read the plugin-specific variables from the .cfg file 
    // 
    pisoloplayerInitConfig();

    // if plugin is disabled in the .cfg file then do not activate
    //
    if ( pisoloplayerConfig.pluginState == 0 ) return 0;

    // Install Event-driven CallBack hooks so the plugin gets
    // notified for various happenings.  A complete list is here,
    // but comment out what is not needed for your plug-in.
    // 
    eventsRegister( SISSM_EV_CLIENT_ADD,           pisoloplayerClientAddCB );
    eventsRegister( SISSM_EV_CLIENT_DEL,           pisoloplayerClientDelCB );
    eventsRegister( SISSM_EV_INIT,                 pisoloplayerInitCB );
    eventsRegister( SISSM_EV_RESTART,              pisoloplayerRestartCB );
    eventsRegister( SISSM_EV_MAPCHANGE,            pisoloplayerMapChangeCB );
    eventsRegister( SISSM_EV_GAME_START,           pisoloplayerGameStartCB );
    eventsRegister( SISSM_EV_GAME_END,             pisoloplayerGameEndCB );
    eventsRegister( SISSM_EV_ROUND_START,          pisoloplayerRoundStartCB );
    eventsRegister( SISSM_EV_ROUND_END,            pisoloplayerRoundEndCB );
    eventsRegister( SISSM_EV_OBJECTIVE_CAPTURED,   pisoloplayerCapturedCB );
    eventsRegister( SISSM_EV_PERIODIC,             pisoloplayerPeriodicCB );

    return 0;
}

// Assembly:
pushq %rax
callq 0xf628
cmpl $0x0, 0xbbea8(%rip)     # 0xcb6a8
je 0xf8ab
leaq -0x10c(%rip), %rsi      # 0xf701
pushq $0x3
popq %rdi
callq 0xcba7
leaq -0x63(%rip), %rsi       # 0xf7b9
pushq $0x4
popq %rdi
callq 0xcba7
leaq -0x68(%rip), %rsi       # 0xf7c3
pushq $0x1
popq %rdi
callq 0xcba7
leaq -0x74(%rip), %rsi       # 0xf7c6
pushq $0x2
popq %rdi
callq 0xcba7
leaq -0x80(%rip), %rsi       # 0xf7c9
pushq $0x5
popq %rdi
callq 0xcba7
leaq -0x85(%rip), %rsi       # 0xf7d3
pushq $0x6
popq %rdi
callq 0xcba7
leaq -0x8a(%rip), %rsi       # 0xf7dd
pushq $0x7
popq %rdi
callq 0xcba7
leaq -0x96(%rip), %rsi       # 0xf7e0
pushq $0x8
popq %rdi
callq 0xcba7
leaq -0x9b(%rip), %rsi       # 0xf7ea
pushq $0x9
popq %rdi
callq 0xcba7
leaq -0xa7(%rip), %rsi       # 0xf7ed
pushq $0xa
popq %rdi
callq 0xcba7
leaq -0xb3(%rip), %rsi       # 0xf7f0
pushq $0xb
popq %rdi
callq 0xcba7
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/piwebgen.c
// Function: convertNameToHyperlink
char *_convertNameToHyperlink( char *identString )
{
    static char retStr[256];
    char playerID[80], playerName[64], *q;
    int nameIndex, formatOfID = 0;

    //    internal test injection
    //    strlcpy( identString, "fe6c0000000000000000000000000001|20000000000000000000000000000003 111.001.034.025 Random Person", 256 );
    //    strlcpy( identString,  "0123456789012345 111.001.034.025 Random Person", 256 );

    // Get the first word of identString and check if Steam or EPIC
    //
    if ( NULL != (q = getWord( identString, 0, " " ))) {
        strlcpy( playerID, q, 80 );
        formatOfID = rosterIsValidGUID( playerID );
    }

    switch( formatOfID ) {
    case 1: // Steam
        nameIndex = 34;
        strlcpy( playerName, &identString[nameIndex], 64 );
        snprintf( retStr, 256, PROFILE_STEAM, playerID, playerName );
        break;
    case 2: // EPIC
        nameIndex = 82;
        strlcpy( playerName, &identString[nameIndex], 64 );
        snprintf( retStr, 256, PROFILE_EPIC, playerID, playerName );
        break;
    case 3: // WinGDK
        nameIndex = 33;
        strlcpy( playerName, &identString[nameIndex], 64 );
        snprintf( retStr, 256, PROFILE_WINGDK, playerID, playerName );
        break;
    default:
        strlcpy( retStr, "*InternalError*", 256 );
        break;
    }

    return( retStr );
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0xb5fb(%rip), %rdx      # 0x1b14e
xorl %esi, %esi
callq 0xed9c
testq %rax, %rax
je 0xfbae
movq %rsp, %r14
pushq $0x50
popq %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0xe97a
movq %r14, %rdi
callq 0x13480
cmpl $0x3, %eax
je 0xfbe5
cmpl $0x2, %eax
je 0xfbbe
cmpl $0x1, %eax
jne 0xfbae
addq $0x22, %rbx
leaq 0x50(%rsp), %r14
pushq $0x40
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe97a
leaq 0xbd5cb(%rip), %rdi     # 0xcd170
leaq 0xce3f(%rip), %rdx      # 0x1c9eb
jmp 0xfc0a
movups 0xcefe(%rip), %xmm0     # 0x1cab3
movaps %xmm0, 0xbd5b4(%rip)    # 0xcd170
jmp 0xfc1c
addq $0x52, %rbx
leaq 0x50(%rsp), %r14
pushq $0x40
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe97a
leaq 0xbd594(%rip), %rdi     # 0xcd170
leaq 0xce50(%rip), %rdx      # 0x1ca33
jmp 0xfc0a
addq $0x21, %rbx
leaq 0x50(%rsp), %r14
pushq $0x40
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe97a
leaq 0xbd56d(%rip), %rdi     # 0xcd170
leaq 0xce69(%rip), %rdx      # 0x1ca73
movq %rsp, %rcx
movl $0x100, %esi            # imm = 0x100
movq %r14, %r8
xorl %eax, %eax
callq 0x8190
leaq 0xbd54d(%rip), %rax     # 0xcd170
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/piwebgen.c
// Function: htmlSafeFilter
char *_htmlSafeFilter( char *strIn )
{
    int i;
    static char strOut[ PIWEBGEN_MAXROSTER ];

    strlcpy( strOut, strIn, PIWEBGEN_MAXROSTER );

    // replace metatag or escape-sequence characters
    // with something benign (antihack)
    //
    for (i=0; i< (int) strlen( strOut ); i++) {
        switch (strOut[i]) {
            case '<':   strOut[i] = '[';  break;
            case '>':   strOut[i] = ']';  break;
            case '/':   case '\\':  strOut[i] = '|';  break;
        }
    }

    // If utf-8 encoding is NOT declared, then assume ascii.
    // replace any non-printable encodings wtih asterisks.
    // 
    if ( 0 == piwebgenConfig.utf8Encoding ) {
        for (i=0; i< (int) strlen( strOut ); i++) {
            if ( strOut[i] != '\011' )  {
                if (!isprint( (int) strOut[i] )) strOut[i] = '*';
            }
        }
    }

    return( strOut );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rsi
leaq 0xbd633(%rip), %rbx     # 0xcd270
movl $0x4000, %edx           # imm = 0x4000
movq %rbx, %rdi
callq 0xe97a
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x8120
cltq
cmpq %rax, %r14
jge 0xfc88
movzbl (%r14,%rbx), %eax
cmpl $0x2f, %eax
je 0xfc79
cmpl $0x3c, %eax
je 0xfc7d
cmpl $0x5c, %eax
je 0xfc79
cmpl $0x3e, %eax
jne 0xfc83
movb $0x5d, %al
jmp 0xfc7f
movb $0x7c, %al
jmp 0xfc7f
movb $0x5b, %al
movb %al, (%r14,%rbx)
incq %r14
jmp 0xfc4d
cmpl $0x0, 0xbc625(%rip)     # 0xcc2b4
je 0xfc9e
leaq 0xbd5d8(%rip), %rax     # 0xcd270
popq %rbx
popq %r14
popq %r15
retq
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x8120
cltq
cmpq %rax, %r14
jge 0xfc91
movsbq (%r14,%rbx), %r15
cmpq $0x9, %r15
je 0xfcd0
callq 0x83f0
movq (%rax), %rax
testb $0x40, 0x1(%rax,%r15,2)
jne 0xfcd0
movb $0x2a, (%r14,%rbx)
incq %r14
jmp 0xfca1
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/piwebgen.c
// Function: piwebgenSigtermCB
int piwebgenSigtermCB( char *strIn )
{
    FILE *fpw;

    if (NULL != (fpw = fopen( piwebgenConfig.webFileName, "wt" ))) {

	if ( 0 != piwebgenConfig.autoRefreshHeader ) 
            fprintf( fpw, "<meta http-equiv=\"refresh\" content=\"14\" /> \n" );

        fprintf( fpw, "<br><br>SISSM shut down at: &nbsp; %s\n", apiTimeGetHuman(0L) );
        fclose( fpw );
    }

    return 0;
}

// Assembly:
pushq %rbx
leaq 0xbbfd2(%rip), %rdi     # 0xcc2b8
leaq 0xc7df(%rip), %rsi      # 0x1cacc
callq 0x8330
testq %rax, %rax
je 0x1033b
movq %rax, %rbx
cmpl $0x0, 0xbcc43(%rip)     # 0xccf44
je 0x10318
leaq 0xc7c5(%rip), %rdi      # 0x1cacf
pushq $0x2c
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x83a0
xorl %edi, %edi
callq 0x123cf
leaq 0xc7d6(%rip), %rsi      # 0x1cafc
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8250
movq %rbx, %rdi
callq 0x8100
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/piwebgen.c
// Function: piwebgenInstallPlugin
int piwebgenInstallPlugin( void )
{
    // Read the plugin-specific variables from the .cfg file 
    // 
    piwebgenInitConfig();

    // if plugin is disabled in the .cfg file then do not activate
    //
    if ( piwebgenConfig.pluginState == 0 ) return 0;

    // Install Event-driven CallBack hooks so the plugin gets
    // notified for various happenings.  A complete list is here,
    // but comment out what is not needed for your plug-in.
    // 
    eventsRegister( SISSM_EV_CLIENT_ADD,           piwebgenClientAddCB );
    eventsRegister( SISSM_EV_CLIENT_DEL,           piwebgenClientDelCB );
    eventsRegister( SISSM_EV_INIT,                 piwebgenInitCB );
    eventsRegister( SISSM_EV_RESTART,              piwebgenRestartCB );
    eventsRegister( SISSM_EV_MAPCHANGE,            piwebgenMapChangeCB );
    eventsRegister( SISSM_EV_GAME_START,           piwebgenGameStartCB );
    eventsRegister( SISSM_EV_GAME_END,             piwebgenGameEndCB );
    eventsRegister( SISSM_EV_ROUND_START,          piwebgenRoundStartCB );
    eventsRegister( SISSM_EV_ROUND_END,            piwebgenRoundEndCB );
    eventsRegister( SISSM_EV_OBJECTIVE_CAPTURED,   piwebgenCapturedCB );
    eventsRegister( SISSM_EV_PERIODIC,             piwebgenPeriodicCB );
    eventsRegister( SISSM_EV_SIGTERM,              piwebgenSigtermCB );

    return 0;
}

// Assembly:
pushq %rax
callq 0xf8b0
cmpl $0x0, 0xbbf64(%rip)     # 0xcc2b0
je 0x10406
leaq -0x684(%rip), %rsi      # 0xfcd5
pushq $0x3
popq %rdi
callq 0xcba7
leaq -0x21d(%rip), %rsi      # 0x1014b
pushq $0x4
popq %rdi
callq 0xcba7
leaq -0x216(%rip), %rsi      # 0x10161
pushq $0x1
popq %rdi
callq 0xcba7
leaq -0x20f(%rip), %rsi      # 0x10177
pushq $0x2
popq %rdi
callq 0xcba7
leaq -0x21b(%rip), %rsi      # 0x1017a
pushq $0x5
popq %rdi
callq 0xcba7
leaq -0x214(%rip), %rsi      # 0x10190
pushq $0x6
popq %rdi
callq 0xcba7
leaq -0x213(%rip), %rsi      # 0x101a0
pushq $0x7
popq %rdi
callq 0xcba7
leaq -0x21f(%rip), %rsi      # 0x101a3
pushq $0x8
popq %rdi
callq 0xcba7
leaq -0x22b(%rip), %rsi      # 0x101a6
pushq $0x9
popq %rdi
callq 0xcba7
leaq -0x237(%rip), %rsi      # 0x101a9
pushq $0xa
popq %rdi
callq 0xcba7
leaq -0x243(%rip), %rsi      # 0x101ac
pushq $0xb
popq %rdi
callq 0xcba7
leaq -0x120(%rip), %rsi      # 0x102de
pushq $0xf
popq %rdi
callq 0xcba7
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiRemoveCodes
void apiRemoveCodes( char *apiSayString )
{
    int j = 0;
    char *w;
    char removeWord[ API_LINE_STRING_MAX ];

    if ( 0 != strlen( removeCodes ) ) {
        while ( 1 == 1 ) {
            w = getWord( removeCodes, j++, " " );
            if ( w == NULL ) break;
            if ( 0 == strlen( w ) ) break;
            strlcpy( removeWord, w, API_LINE_STRING_MAX );
            strRemoveInPlace( apiSayString, removeWord );
        };
    };
    return;
}

// Assembly:
cmpb $0x0, 0xc0e6d(%rip)     # 0xd1280
je 0x1047f
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
xorl %ebp, %ebp
leaq 0xc0e50(%rip), %r14     # 0xd1280
leaq 0xad17(%rip), %r15      # 0x1b14e
movq %rsp, %r12
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xed9c
testq %rax, %rax
je 0x10470
cmpb $0x0, (%rax)
je 0x10470
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
movq %rax, %rsi
callq 0xe97a
movq %rbx, %rdi
movq %r12, %rsi
callq 0xeefe
incl %ebp
jmp 0x1043a
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: apiWordListRead
int apiWordListRead( char *listFile, wordList_t wordList )
{
    int i;
    char tmpLine[1024];
    FILE *fpr;

    for (i=0; i<WORDLISTMAXELEM; i++) strclr( wordList[i] );

    i = -1;
    if (NULL != (fpr = fopen( listFile, "rt" ))) {
        i = 0;
        while (!feof( fpr )) { 
            if (NULL != fgets( tmpLine, 1024, fpr )) {
                tmpLine[ strlen( tmpLine ) - 1] = 0;
                strTrimInPlace( tmpLine );
                if ( 0 != strlen( tmpLine ) ) {
                    // strToLowerInPlace( tmpLine ); 
                    strlcpy( wordList[ i ], tmpLine, WORDLISTMAXSTRSZ );
                    if ( (++i) > WORDLISTMAXELEM) break;
                }
            }
        }
        fclose( fpr );
    }
    return( i );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
cmpq $0x8000, %r15           # imm = 0x8000
je 0x104b2
leaq (%rbx,%r15), %rdi
callq 0xed98
addq $0x20, %r15
jmp 0x1049a
leaq 0xa9d2(%rip), %rsi      # 0x1ae8b
movq %r14, %rdi
callq 0x8330
testq %rax, %rax
je 0x10544
movq %rax, %r14
xorl %r13d, %r13d
movq %rsp, %r15
pushq $0x20
popq %r12
movq %r14, %rdi
callq 0x8270
testl %eax, %eax
jne 0x10537
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x8200
testq %rax, %rax
je 0x104d3
movq %r15, %rdi
callq 0x8120
movb $0x0, -0x1(%rax,%r15)
movq %r15, %rdi
callq 0xee76
cmpb $0x0, (%rsp)
je 0x104d3
movl %r13d, %edi
shlq $0x5, %rdi
addq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xe97a
leal 0x1(%r13), %ebp
cmpl $0x400, %r13d           # imm = 0x400
movl %ebp, %r13d
jb 0x104d3
jmp 0x1053a
movl %r13d, %ebp
movq %r14, %rdi
callq 0x8100
jmp 0x10547
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiWordListCheck
int apiWordListCheck( char *stringTested, wordList_t wordList )
{
    int i;
    int isMatch = 0;

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

        if ( wordList[i][0] == 0 ) break;
        if ( NULL != strcasestr( stringTested, wordList[i] )) {
            isMatch = 1;
            break;
        }
    }
    return( isMatch );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
pushq $0x1
popq %rbp
xorl %esi, %esi
leaq 0x20(%rsi), %r12
cmpq $0x8020, %r12           # imm = 0x8020
je 0x10599
cmpb $0x0, (%r14,%rsi)
je 0x10599
addq %r14, %rsi
movq %r15, %rdi
callq 0x8360
movq %r12, %rsi
testq %rax, %rax
je 0x10570
movl %ebp, %ebx
movl %ebx, %eax
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: apiWordListCheckExact
int apiWordListCheckExact( char *stringTested, wordList_t wordList )
{
    int i;
    int isMatch = 0;

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

        if ( wordList[i][0] == 0 ) break;
        if ( 0 == strncmp( stringTested, wordList[i], WORDLISTMAXSTRSZ ) ) {
            isMatch = 1;
            break;
        }
    }
    return( isMatch );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
pushq $0x20
popq %r12
pushq $0x1
popq %rbp
xorl %esi, %esi
leaq 0x20(%rsi), %r13
cmpq $0x8020, %r13           # imm = 0x8020
je 0x105eb
cmpb $0x0, (%r14,%rsi)
je 0x105eb
addq %r14, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x8080
movq %r13, %rsi
testl %eax, %eax
jne 0x105c0
movl %ebp, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiIdListAdd
int apiIdListAdd( char *connectID, idList_t idList ) 
{
    int i, j;
 
    for ( j = -1, i = 0; i<IDLISTMAXELEM; i++ ) {
        if ( 0 == strlen( idList[i] )) {   // found an empty slot
            j = i;
            break;
        }
    }
    if (( j != -1 ) && ( connectID != NULL ))
        strlcpy( idList[j], connectID, IDLISTMAXSTRSZ );

    return j;
}

// Assembly:
pushq %rbx
movq %rdi, %rcx
xorl %ebx, %ebx
pushq $-0x1
popq %rax
cmpq $0x100, %rbx            # imm = 0x100
je 0x10636
cmpb $0x0, (%rsi)
je 0x1061f
incq %rbx
addq $0x100, %rsi            # imm = 0x100
jmp 0x10605
testq %rcx, %rcx
je 0x10634
movl $0x100, %edx            # imm = 0x100
movq %rsi, %rdi
movq %rcx, %rsi
callq 0xe97a
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiIdListClear
int apiIdListClear( idList_t idList )
{
    int i;

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

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq $0x10000, %r14          # imm = 0x10000
je 0x1065d
leaq (%rbx,%r14), %rdi
callq 0xed98
addq $0x100, %r14            # imm = 0x100
jmp 0x10642
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: apiIdListGet
char *apiIdListGet( idList_t idList, int index )
{
    static char retStr[IDLISTMAXSTRSZ];
     
    strclr( retStr );
    if ( index < IDLISTMAXELEM ) {
        strlcpy( retStr, idList[ index ], IDLISTMAXSTRSZ );
    }
    return retStr;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xc0d0a(%rip), %rdi     # 0xd1380
callq 0xed98
cmpl $0xff, %ebp
jg 0x106a1
movslq %ebp, %rax
shlq $0x8, %rax
addq %rax, %rbx
leaq 0xc0cec(%rip), %rdi     # 0xd1380
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0xe97a
leaq 0xc0cd8(%rip), %rax     # 0xd1380
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiIdListRead
int apiIdListRead( char *listFile, idList_t idList )
{
    int  i, idType;
    char tmpLine[1024], testGUID[256]; //  *w;
    FILE *fpr;

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

    // EPIC

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x508, %rsp            # imm = 0x508
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
cmpq $0x10000, %r15          # imm = 0x10000
je 0x106e4
leaq (%rbx,%r15), %rdi
callq 0xed98
addq $0x100, %r15            # imm = 0x100
jmp 0x106c9
leaq 0xa7a0(%rip), %rsi      # 0x1ae8b
movq %r14, %rdi
callq 0x8330
testq %rax, %rax
je 0x107b1
movq %rax, %r14
xorl %ebp, %ebp
leaq 0x100(%rsp), %r15
movq %rsp, %r12
pushq $0x42
popq %r13
movq %r14, %rdi
callq 0x8270
testl %eax, %eax
jne 0x107a7
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x8200
testq %rax, %rax
je 0x10710
movq %r15, %rdi
callq 0x8120
movb $0x0, -0x1(%rax,%r15)
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xe97a
movq %r12, %rdi
callq 0x13480
movq %r13, %rdx
cmpl $0x2, %eax
je 0x10787
movq %r12, %rdi
movq %r15, %rsi
pushq $0x12
popq %r13
movq %r13, %rdx
callq 0xe97a
movq %r12, %rdi
callq 0x13480
movq %r13, %rdx
pushq $0x42
popq %r13
cmpl $0x1, %eax
jne 0x1079b
movslq %ebp, %rdi
incl %ebp
shlq $0x8, %rdi
addq %rbx, %rdi
movq %r12, %rsi
callq 0xe97a
cmpl $0xff, %ebp
jl 0x10710
movq %r14, %rdi
callq 0x8100
jmp 0x107b4
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x508, %rsp            # imm = 0x508
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiIdListCheck
int apiIdListCheck( char *connectID, idList_t idList )
{
    int i;
    int isMatch = 0;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
pushq $0x1
popq %rbp
xorl %edi, %edi
leaq 0x100(%rdi), %r12
cmpq $0x10100, %r12          # imm = 0x10100
je 0x1081d
addq %r14, %rdi
movq %r15, %rsi
callq 0x8220
movq %r12, %rdi
testl %eax, %eax
jne 0x107f9
movl %ebp, %ebx
movl %ebx, %eax
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: apiIdListMatch
int apiIdListMatch( char *connectID, idList_t idList )
{
    int i;
    int isMatch = 0;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
pushq $0x1
popq %rbp
xorl %esi, %esi
leaq 0x100(%rsi), %r12
cmpq $0x10100, %r12          # imm = 0x10100
je 0x10869
cmpb $0x0, (%r14,%rsi)
je 0x10869
addq %r14, %rsi
movq %r15, %rdi
callq 0x8360
movq %r12, %rsi
testq %rax, %rax
je 0x1083d
movl %ebp, %ebx
movl %ebx, %eax
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: apiSyntheticObjDispatch
int _apiSyntheticObjDispatch(char *activeObjectRaw )   
{
    char strOut[API_LINE_STRING_MAX], *w;
    int i, errCode = 0;

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

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

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

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
movabsq $0x424f48544e59537e, %rax # imm = 0x424F48544E59537E
movq %rsp, %r14
movq %rax, (%r14)
movl $0x7e4a42, 0x7(%r14)    # imm = 0x7E4A42
xorl %ebp, %ebp
leaq 0xc53d(%rip), %r15      # 0x1ce68
leaq 0xa81c(%rip), %r12      # 0x1b14e
cmpl $0x5, %ebp
je 0x10974
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xed9c
testq %rax, %rax
je 0x10a1f
movq %rax, %r13
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %r12, %rsi
callq 0xe918
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %r13, %rsi
callq 0xe918
incl %ebp
jmp 0x10932
leaq 0xa7d3(%rip), %r14      # 0x1b14e
movq %rsp, %rbx
pushq $0x3
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0xed9c
movq %rax, %rdi
callq 0x13650
pushq $0x5
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0xed9c
movq %rax, %r12
pushq $0x1
popq %r13
movq %rbx, %rdi
movl %r13d, %esi
movq %r14, %rdx
callq 0xed9c
movq %r12, %rdi
movq %rax, %rsi
callq 0x13613
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0xed9c
movq %rax, %r12
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0xed9c
movq %rax, %r15
movq %rbx, %rdi
movl %r13d, %esi
movq %r14, %rdx
callq 0xed9c
leaq 0xc471(%rip), %rsi      # 0x1ce6f
leaq 0xc46e(%rip), %rdx      # 0x1ce73
movl %ebp, %edi
movq %r12, %rcx
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x1920b
movq %rbx, %rdi
callq 0xcc89
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiFetchGameState
static int _apiFetchGameState( void )
{
    int errCode = 1;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xcb33(%rip), %rdi      # 0x1d6af
callq 0x12469
leaq 0x146e48(%rip), %rdi    # 0x1579d0
leaq 0x15b051(%rip), %rsi    # 0x16bbe0
movl $0x4000, %edx           # imm = 0x4000
callq 0xe97a
cmpb $0x0, 0x146e30(%rip)    # 0x1579d0
je 0x10c05
callq 0x10b6a
leaq 0xdca02(%rip), %rdi     # 0xed5b0
leaq 0x146e1b(%rip), %rsi    # 0x1579d0
movl $0x4000, %edx           # imm = 0x4000
callq 0x8080
testl %eax, %eax
je 0x10c0a
leaq 0xdc9e6(%rip), %r14     # 0xed5b0
leaq 0x146dff(%rip), %rsi    # 0x1579d0
movl $0x4000, %edx           # imm = 0x4000
movq %r14, %rdi
callq 0xe97a
leaq 0xc28a(%rip), %rsi      # 0x1ce6f
leaq 0xcad3(%rip), %rdx      # 0x1d6bf
xorl %ebx, %ebx
pushq $0x2
popq %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x1920b
movq %r14, %rdi
callq 0x108f6
jmp 0x10c0c
pushq $0x1
popq %rbx
jmp 0x10c0c
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiGetServerNameRCON
char *apiGetServerNameRCON( int forceCacheRefresh )
{
    static char hostName[256];
    static unsigned long timeLastRead = 0;

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

// Assembly:
testl %edi, %edi
jne 0x10c28
cmpq $0x0, 0x1672be(%rip)    # 0x177ee0
jne 0x10cb0
pushq %rax
leaq 0xc8ba(%rip), %rdi      # 0x1d4ea
callq 0x12469
leaq 0x1671a4(%rip), %rdi    # 0x177de0
leaq 0x15af9d(%rip), %rsi    # 0x16bbe0
movl $0x100, %edx            # imm = 0x100
callq 0xe97a
cmpb $0x0, 0x16718c(%rip)    # 0x177de0
je 0x10c83
callq 0x10b6a
movq %rax, 0x16727e(%rip)    # 0x177ee0
leaq 0xc206(%rip), %rsi      # 0x1ce6f
leaq 0xc889(%rip), %rdx      # 0x1d4f9
leaq 0x167169(%rip), %rcx    # 0x177de0
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x1920b
jmp 0x10cac
movabsq $0x6e776f6e6b6e55, %rax # imm = 0x6E776F6E6B6E55
movq %rax, 0x16714c(%rip)    # 0x177de0
leaq 0xc1d4(%rip), %rsi      # 0x1ce6f
leaq 0xc885(%rip), %rdx      # 0x1d527
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x1920b
addq $0x8, %rsp
leaq 0x167129(%rip), %rax    # 0x177de0
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiSessionLogCB
int _apiSessionLogCB( char *strIn )
{
    char _currSession[API_LINE_STRING_MAX];

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

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

// Assembly:
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsp, %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdx
callq 0x14732
movq %rbx, %rdi
callq 0x135f7
leaq 0xc121(%rip), %rsi      # 0x1ce6f
leaq 0xc218(%rip), %rdx      # 0x1cf6d
pushq $0x2
popq %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1920b
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiBPCharInitCB
int _apiBPCharInitCB( char *strIn )
{
    int i;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xd0728(%rip), %rdi     # 0xe14a0
callq 0xed98
pushq $0x40
popq %r14
leaq 0xd0818(%rip), %rbx     # 0xe15a0
subq $0x1, %r14
jb 0x10dab
movq %rbx, %rdi
callq 0xed98
leaq 0x100(%rbx), %rdi
callq 0xed98
addq $0x200, %rbx            # imm = 0x200
jmp 0x10d88
leaq 0xc0bd(%rip), %rsi      # 0x1ce6f
leaq 0xc1c6(%rip), %rdx      # 0x1cf7f
pushq $0x2
popq %rdi
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: apiBPPlayerCount
int apiBPPlayerCount( void )
{
    int i;
    int countPlayers = 0;
    long devOverride = 0L;

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

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

    return countPlayers;
}

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

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

    if ( n != NULL ) {

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

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xaa08(%rip), %rsi      # 0x1ba15
callq 0x83c0
testq %rax, %rax
je 0x110ab
leaq 0xbf98(%rip), %rsi      # 0x1cfba
movq %rbx, %rdi
callq 0x83c0
testq %rax, %rax
je 0x110ab
leaq 0xbf98(%rip), %rdx      # 0x1cfce
movq %rax, %rdi
xorl %esi, %esi
callq 0xed9c
testq %rax, %rax
je 0x110ab
movq %rax, %rbx
pushq $0x40
popq %r15
leaq 0xd054d(%rip), %r14     # 0xe15a0
leaq 0xbf90(%rip), %r12      # 0x1cfea
pushq $0x2
popq %rbp
subq $0x1, %r15
jb 0x110ab
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8220
testl %eax, %eax
jne 0x110a2
leaq 0x100(%r14), %r13
movl %ebp, %edi
leaq 0xbded(%rip), %rsi      # 0x1ce6f
movq %r12, %rdx
movq %rbx, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x1920b
movq %r14, %rdi
callq 0xed98
movq %r13, %rdi
callq 0xed98
addq $0x200, %r14            # imm = 0x200
jmp 0x1105d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/api.c
// Function: apiMapChangeCB
int _apiMapChangeCB( char *strIn )
{
    char _currMap[API_LINE_STRING_MAX];
    int   i;
    int errCode;

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

    _apiBPCharInitCB( strIn );

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


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

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsp, %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdx
callq 0x1479b
movq %rbx, %rdi
callq 0xeedb
movq %rbx, %rdi
callq 0x13650
callq 0x10d6d
xorl %ebx, %ebx
leaq 0xd84b5(%rip), %r14     # 0xe95b0
cmpq $0x4000, %rbx           # imm = 0x4000
je 0x11116
leaq (%r14,%rbx), %rdi
callq 0xed98
addq $0x100, %rbx            # imm = 0x100
jmp 0x110fb
leaq 0xbd52(%rip), %rbx      # 0x1ce6f
leaq 0xbee4(%rip), %rdx      # 0x1d008
pushq $0x2
popq %rbp
movq %rsp, %rcx
movl %ebp, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1920b
callq 0x10b71
leaq 0xbf07(%rip), %rdx      # 0x1d049
leaq 0xdc467(%rip), %rcx     # 0xed5b0
movl %ebp, %edi
movq %rbx, %rsi
movl %eax, %r8d
xorl %eax, %eax
callq 0x1920b
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, %rbx
leaq 0xe043b(%rip), %rdi     # 0xf15b0
callq 0xed98
leaq 0xd051f(%rip), %rsi     # 0xe16a0
xorl %r14d, %r14d
addq $-0x200, %r14           # imm = 0xFE00
cmpq $-0x8200, %r14          # imm = 0xFFFF7E00
je 0x111cc
leaq 0x200(%rsi), %r15
movq %rbx, %rdi
callq 0x8220
movq %r15, %rsi
testl %eax, %eax
jne 0x11184
leaq 0xd03ef(%rip), %rsi     # 0xe15a0
subq %r14, %rsi
addq $-0x200, %rsi           # imm = 0xFE00
leaq 0xe03ee(%rip), %rdi     # 0xf15b0
movl $0x100, %edx            # imm = 0x100
callq 0xe97a
leaq 0xe03dd(%rip), %rax     # 0xf15b0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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, %rbx
leaq 0xe04c8(%rip), %rdi     # 0xf16b0
callq 0xed98
leaq 0xd03ac(%rip), %rsi     # 0xe15a0
xorl %r14d, %r14d
addq $-0x200, %r14           # imm = 0xFE00
cmpq $-0x8200, %r14          # imm = 0xFFFF7E00
je 0x1123f
leaq 0x200(%rsi), %r15
movq %rbx, %rdi
callq 0x8220
movq %r15, %rsi
testl %eax, %eax
jne 0x111f7
leaq 0xd037c(%rip), %rsi     # 0xe15a0
subq %r14, %rsi
addq $-0x100, %rsi
leaq 0xe047b(%rip), %rdi     # 0xf16b0
movl $0x100, %edx            # imm = 0x100
callq 0xe97a
leaq 0xe046a(%rip), %rax     # 0xf16b0
popq %rbx
popq %r14
popq %r15
retq