// File: /workspace/github_c_makefile_star2_O2/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 0x20a1c3(%rip), %rdi    # 0x21fe50
callq 0xf1d9
cmpq $0x6, %rax
jl 0x15e63
leaq 0x7317(%rip), %rsi      # 0x1cfba
movq %rbx, %rdi
callq 0x83c0
testq %rax, %rax
je 0x15e63
leaq 0xc0(%rsp), %r14
pushq $0x40
popq %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0xe97a
leaq 0x7f7b(%rip), %rdx      # 0x1dc4c
movq %r14, %rdi
xorl %esi, %esi
callq 0xed9c
testq %rax, %rax
je 0x15e63
movq %rsp, %rdi
pushq $0x40
popq %rdx
movq %rax, %rsi
callq 0xe97a
callq 0x13640
movq %rbx, %rdi
movq %rax, %rsi
callq 0x83c0
testq %rax, %rax
je 0x15e63
movq %rsp, %rdi
callq 0x111d9
leaq 0x80(%rsp), %rbx
pushq $0x40
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe97a
cmpb $0x0, (%rbx)
je 0x15dbb
leaq 0x40(%rsp), %rdi
leaq 0x80(%rsp), %rsi
pushq $0x40
popq %rdx
callq 0xe97a
cmpl $0x0, 0x205b76(%rip)    # 0x21b8c4
je 0x15d75
cmpl $0x0, 0x14189(%rip)     # 0x29ee0
je 0x15d75
testb $0x1, 0x20a0e0(%rip)    # 0x21fe40
je 0x15d75
leaq 0x206f6f(%rip), %rdx    # 0x21ccd8
leaq 0x40(%rsp), %rsi
xorl %eax, %eax
callq 0x15e75
pushq $-0x1
popq %rbp
leaq 0x20a111(%rip), %rbx    # 0x21fe90
xorl %r15d, %r15d
movq %rsp, %r14
xorl %r12d, %r12d
cmpq $0x40, %r12
je 0x15ddb
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x15df9
cmpl $-0x1, %ebp
jne 0x15daf
cmpb (%rbx), %r15b
movl $0x0, %ebp
sbbl %ebp, %ebp
orl %r12d, %ebp
incq %r12
addq $0x8c, %rbx
jmp 0x15d88
leaq 0x7cf8(%rip), %rsi      # 0x1daba
leaq 0x7e8e(%rip), %rdx      # 0x1dc57
pushq $0x3
popq %rdi
movq %rsp, %rcx
xorl %eax, %eax
callq 0x1920b
jmp 0x15e63
cmpl $-0x1, %ebp
jne 0x15dfc
leaq 0x7cd3(%rip), %rsi      # 0x1daba
leaq 0x8a73(%rip), %rdx      # 0x1e861
xorl %edi, %edi
xorl %eax, %eax
callq 0x1920b
jmp 0x15e63
movl %r12d, %ebp
movslq %ebp, %rax
imulq $0x8c, %rax, %r15
leaq 0x20a083(%rip), %r12    # 0x21fe90
leaq (%r12,%r15), %rdi
movq %rsp, %rbx
pushq $0x40
popq %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0xe97a
addq %r12, %r15
addq $0x40, %r15
leaq 0x40(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xe97a
movl $0x1, 0x48(%r15)
leaq 0x7c6e(%rip), %rsi      # 0x1daba
leaq 0x89ed(%rip), %rdx      # 0x1e840
pushq $0x3
popq %rdi
movq %r12, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x1920b
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq