// File: /workspace/github_c_makefile_star2_O0/schroeder-lvb[P]sissm/src/piantirush.c
// Function: capRusherPeriodicCheck
static void _capRusherPeriodicCheck( void )
{
    int i;
    char *g, playerGUID[256];   // EPIC

    if ( kickArmed2 && kickArmed && piantirushConfig.autoKickEarlyBreach)  {    // check for master 'armed' status (safety interlock)
        
        for (i = 0; i<SISSM_MAXPLAYERS; i++) {
            if ( 0 != territorialRushers[i].playerCharID[0] ) {

                // check for player exceeding time occupying the zone prematurely
                // 
                if ( territorialRushers[i].playerIsInZone ) {
                    if ( territorialRushers[i].playerEarlyBreachCumulativeTime++ > piantirushConfig.earlyBreachMaxTime ) {
                        if ( NULL != ( g = rosterLookupSteamIDFromName( territorialRushers[i].playerName )) ) {
                            strlcpy( playerGUID, g, 256 );  // EPIC
                            if ( 0 == _localKickOrBan( 0, territorialRushers[i].playerName, playerGUID, piantirushConfig.earlyBreachTimeKickMessage ) ) {
                                _localSay( "'%s' auto-kicked for early breach",  territorialRushers[i].playerName );
                                logPrintf(LOG_LEVEL_WARN, "piantirush", "%s [%s] auto-kicked for early breach", territorialRushers[i].playerName, playerGUID );
                            }

                            // remove the player from cached table in case another player connects and the
                            // system re-uses the same character ID
                            //
                            territorialRushers[i].playerCharID[0] = 0;
                            territorialRushers[i].playerName[0] = 0;
                            territorialRushers[i].playerIsInZone = 0;
                            territorialRushers[i].playerEarlyBreachCount = 0;
                            territorialRushers[i].playerEarlyBreachCumulativeTime = 0;
                        }
                        break;
                    }
                }


                // check for player exceeding number of nuisance "taps" 
                //
                if (( 0 != piantirushConfig.earlyBreachMaxTaps ) &&  
                    ( territorialRushers[i].playerEarlyBreachCount++ > piantirushConfig.earlyBreachMaxTaps ) ) {  // 20211006tap
                    if ( NULL != ( g = rosterLookupSteamIDFromName( territorialRushers[i].playerName )) ) {
                        strlcpy( playerGUID, g, 256 );  // EPIC
                        if ( 0 == _localKickOrBan( 0, territorialRushers[i].playerName, playerGUID, piantirushConfig.earlyBreachTapsKickMessage ) ) {
                            _localSay( "'%s' auto-kicked for nuisance objective tapping",  territorialRushers[i].playerName );
                            logPrintf(LOG_LEVEL_WARN, "piantirush", "%s [%s] auto-kicked for excess objective tapping", territorialRushers[i].playerName, playerGUID );
                        }
                        // remove the player from cached table in case another player connects and the
                        // system re-uses the same character ID
                        //
                        territorialRushers[i].playerCharID[0] = 0;
                        territorialRushers[i].playerName[0] = 0;
                        territorialRushers[i].playerIsInZone = 0;
                        territorialRushers[i].playerEarlyBreachCount = 0;
                        territorialRushers[i].playerEarlyBreachCumulativeTime = 0;
                    }
                    break;
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
cmpl $0x0, 0x15822(%rip)     # 0x31ee4
je 0x1caa8
cmpl $0x0, 0x20b771(%rip)    # 0x227e40
je 0x1caa8
cmpl $0x0, 0x2071ec(%rip)    # 0x2238c8
je 0x1caa8
movl $0x0, -0x4(%rbp)
cmpl $0x40, -0x4(%rbp)
jge 0x1caa6
movslq -0x4(%rbp), %rcx
leaq 0x20b792(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x1ca96
movslq -0x4(%rbp), %rcx
leaq 0x20b770(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x88(%rax)
je 0x1c8e1
movslq -0x4(%rbp), %rax
leaq 0x20b74e(%rip), %rcx    # 0x227e90
imulq $0x8c, %rax, %rax
addq %rax, %rcx
movl 0x84(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x84(%rcx)
cmpl 0x20796d(%rip), %eax    # 0x2240d0
jle 0x1c8df
movslq -0x4(%rbp), %rax
leaq 0x20b71c(%rip), %rdi    # 0x227e90
imulq $0x8c, %rax, %rax
addq %rax, %rdi
addq $0x40, %rdi
callq 0x1a290
movq %rax, %rcx
movq %rcx, -0x10(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
je 0x1c8da
leaq -0x110(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x11bc0
movslq -0x4(%rbp), %rax
leaq 0x20b6d7(%rip), %rsi    # 0x227e90
imulq $0x8c, %rax, %rax
addq %rax, %rsi
addq $0x40, %rsi
leaq -0x110(%rbp), %rdx
xorl %edi, %edi
leaq 0x2030c9(%rip), %rcx    # 0x21f8a0
addq $0x5038, %rcx           # imm = 0x5038
callq 0x1cdf0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1c84c
movslq -0x4(%rbp), %rax
leaq 0x20b69a(%rip), %rsi    # 0x227e90
imulq $0x8c, %rax, %rax
addq %rax, %rsi
addq $0x40, %rsi
leaq 0xaf81(%rip), %rdi      # 0x2778c
movb $0x0, %al
callq 0x1cac0
movslq -0x4(%rbp), %rax
leaq 0x20b673(%rip), %rcx    # 0x227e90
imulq $0x8c, %rax, %rax
addq %rax, %rcx
addq $0x40, %rcx
leaq -0x110(%rbp), %r8
movl $0x1, %edi
leaq 0xa2b4(%rip), %rsi      # 0x26af2
leaq 0xaf69(%rip), %rdx      # 0x277ae
movb $0x0, %al
callq 0x21bf0
movslq -0x4(%rbp), %rcx
leaq 0x20b639(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movslq -0x4(%rbp), %rcx
leaq 0x20b621(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x40(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x20b608(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x88(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x20b5e9(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x80(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x20b5ca(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x84(%rax)
jmp 0x1caa6
jmp 0x1c8e1
xorl %eax, %eax
cmpl 0x2077eb(%rip), %eax    # 0x2240d4
je 0x1ca94
movslq -0x4(%rbp), %rax
leaq 0x20b596(%rip), %rcx    # 0x227e90
imulq $0x8c, %rax, %rax
addq %rax, %rcx
movl 0x80(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x80(%rcx)
cmpl 0x2077b9(%rip), %eax    # 0x2240d4
jle 0x1ca94
movslq -0x4(%rbp), %rax
leaq 0x20b564(%rip), %rdi    # 0x227e90
imulq $0x8c, %rax, %rax
addq %rax, %rdi
addq $0x40, %rdi
callq 0x1a290
movq %rax, %rcx
movq %rcx, -0x10(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
je 0x1ca92
leaq -0x110(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x11bc0
movslq -0x4(%rbp), %rax
leaq 0x20b51f(%rip), %rsi    # 0x227e90
imulq $0x8c, %rax, %rax
addq %rax, %rsi
addq $0x40, %rsi
leaq -0x110(%rbp), %rdx
xorl %edi, %edi
leaq 0x202f11(%rip), %rcx    # 0x21f8a0
addq $0x4c38, %rcx           # imm = 0x4C38
callq 0x1cdf0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1ca04
movslq -0x4(%rbp), %rax
leaq 0x20b4e2(%rip), %rsi    # 0x227e90
imulq $0x8c, %rax, %rax
addq %rax, %rsi
addq $0x40, %rsi
leaq 0xae10(%rip), %rdi      # 0x277d3
movb $0x0, %al
callq 0x1cac0
movslq -0x4(%rbp), %rax
leaq 0x20b4bb(%rip), %rcx    # 0x227e90
imulq $0x8c, %rax, %rax
addq %rax, %rcx
addq $0x40, %rcx
leaq -0x110(%rbp), %r8
movl $0x1, %edi
leaq 0xa0fc(%rip), %rsi      # 0x26af2
leaq 0xae06(%rip), %rdx      # 0x27803
movb $0x0, %al
callq 0x21bf0
movslq -0x4(%rbp), %rcx
leaq 0x20b481(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movslq -0x4(%rbp), %rcx
leaq 0x20b469(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x40(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x20b450(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x88(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x20b431(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x80(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x20b412(%rip), %rax    # 0x227e90
imulq $0x8c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x84(%rax)
jmp 0x1caa6
jmp 0x1ca96
jmp 0x1ca98
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x1c6e9
jmp 0x1caa8
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)