// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/piantirush.c
// Function: piantirushObjTouchCB
int piantirushObjTouchCB( char *strIn )
{
    char *w, *n, m[64];
    char charID[64], tmpCharID[64], playerName[64]; 

    // First check if the time is within the territory  protection window zone (i.e., "too early")
    //
    if ( alarmStatus( tPtr ) > 5 ) {
        //  Get charcter ID
        //
        if ( NULL != (w = strstr( strIn, "BP_Character_Player" ))  ) {
            strlcpy( tmpCharID, w, 64 );
            if ( NULL != (n = getWord( tmpCharID, 0, ". " ) )) {
                strlcpy( charID, n, 64 );
                if ( NULL != strstr( strIn, rosterGetObjective() )) {
                    // Convert Character ID to player Name
                    //
                    strlcpy(m, apiCharacterToName( charID ), 64 );
                    if ( 0 != strlen( m )) {
                        strlcpy( playerName, m, 64 );

                        if ( (piantirushConfig.earlyBreachShow) && ( kickArmed2 && kickArmed )) {
                            _localSayThrottled( "'%s' %s", playerName, piantirushConfig.earlyBreachWarn );
                        }

                        // call the cap-rush algo submodule here
                        //
                        _capRusherEnterZone( charID, playerName );
                    }
                    else {
                        logPrintf(LOG_LEVEL_DEBUG, "piantirush", "**Internal error - unable to match char to name ::%s::", charID );
                    }
                }
            }
        } 
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
movq 0x2093f2(%rip), %rdi    # 0x21fe50
callq 0xf97e
cmpq $0x6, %rax
jl 0x16c4c
leaq 0x7566(%rip), %rsi      # 0x1dfda
movq %rbx, %rdi
callq 0x83b0
testq %rax, %rax
je 0x16c4c
leaq 0xc0(%rsp), %r14
movl $0x40, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0xf038
leaq 0x81d8(%rip), %rdx      # 0x1ec7c
movq %r14, %rdi
xorl %esi, %esi
callq 0xf4e1
testq %rax, %rax
je 0x16c4c
movq %rsp, %rdi
movl $0x40, %edx
movq %rax, %rsi
callq 0xf038
callq 0x1423e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x83b0
testq %rax, %rax
je 0x16c4c
movq %rsp, %rdi
callq 0x11b1b
leaq 0x80(%rsp), %rbx
movl $0x40, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf038
cmpb $0x0, (%rbx)
je 0x16c16
leaq 0x40(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl $0x40, %edx
callq 0xf038
cmpl $0x0, 0x204d9d(%rip)    # 0x21b8c4
je 0x16b4e
cmpl $0x0, 0x133b0(%rip)     # 0x29ee0
je 0x16b4e
testb $0x1, 0x209307(%rip)    # 0x21fe40
je 0x16b4e
leaq 0x206196(%rip), %rdx    # 0x21ccd8
leaq 0x40(%rsp), %rsi
xorl %eax, %eax
callq 0x16c5e
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x209336(%rip), %rbx    # 0x21fe90
xorl %r12d, %r12d
movq %rsp, %r14
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x16b9a
cmpl $-0x1, %ebp
jne 0x16b84
cmpb (%rbx), %r12b
movl $0x0, %ebp
sbbl %ebp, %ebp
orl %r15d, %ebp
incq %r15
addq $0x8c, %rbx
cmpq $0x40, %r15
jne 0x16b63
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $-0x1, %r15d
cmovnel %r15d, %ebp
cmpl $-0x1, %ebp
je 0x16c35
movslq %ebp, %rax
imulq $0x8c, %rax, %r14
leaq 0x2092d4(%rip), %r15    # 0x21fe90
leaq (%r15,%r14), %rdi
movq %rsp, %rbx
movl $0x40, %edx
movq %rbx, %rsi
callq 0xf038
addq %r15, %r14
addq $0x40, %r14
leaq 0x40(%rsp), %r15
movl $0x40, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0xf038
movl $0x1, 0x48(%r14)
leaq 0x7eef(%rip), %rsi      # 0x1eaea
leaq 0x8c6e(%rip), %rdx      # 0x1f870
movl $0x3, %edi
movq %r15, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x1a227
jmp 0x16c4c
leaq 0x7ecd(%rip), %rsi      # 0x1eaea
leaq 0x8063(%rip), %rdx      # 0x1ec87
movq %rsp, %rcx
movl $0x3, %edi
xorl %eax, %eax
callq 0x1a227
jmp 0x16c4c
leaq 0x7eae(%rip), %rsi      # 0x1eaea
leaq 0x8c4e(%rip), %rdx      # 0x1f891
xorl %edi, %edi
xorl %eax, %eax
callq 0x1a227
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq