// File: Tarstingo[P]rarcrack/crackrar.cpp
// Function: testKey(std::vector<unsigned char, std::allocator<unsigned char>>, std::vector<unsigned char, std::allocator<unsigned char>>, std::vector<unsigned char, std::allocator<unsigned char>>, unsigned char*)
int testKey(std::vector<muchar> salt,std::vector<muchar> s,std::vector<muchar> iv,muchar *key)
{
    std::vector<muchar> veckey=toWideChar(key);
    std::vector<muchar> M=veckey+salt;
    muchar B[20];
    Bsha1(M,B);
    muchar C[16];
    CAes(B,s,C);
    if(((C[12]^iv[12])==0x20)&&(C[13]==iv[13])&&(C[14]==iv[14])&&(C[15]==iv[15]))
        return 1;
    else
        return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x120(%rbp)
movq %rsi, -0x118(%rbp)
movq %rdx, -0x110(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x2560
movq -0x108(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x3160
jmp 0x2e76
movq -0x120(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x3160
jmp 0x2e8b
leaq -0x58(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x2490
jmp 0x2ea1
leaq -0x98(%rbp), %rdi
callq 0x33d0
leaq -0x70(%rbp), %rdi
callq 0x33d0
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3160
jmp 0x2ec8
leaq -0xc8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x2a20
jmp 0x2edd
leaq -0xc8(%rbp), %rdi
callq 0x33d0
movq -0x118(%rbp), %rsi
leaq -0xb0(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x3160
jmp 0x2f0c
movq -0x128(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x2d30
jmp 0x2f28
leaq -0xf8(%rbp), %rdi
callq 0x33d0
movq -0x110(%rbp), %rdi
movzbl -0xd4(%rbp), %eax
movl %eax, -0x12c(%rbp)
movl $0xc, %esi
callq 0x3510
movq %rax, %rcx
movl -0x12c(%rbp), %eax
movzbl (%rcx), %ecx
xorl %ecx, %eax
cmpl $0x20, %eax
jne 0x3099
movq -0x110(%rbp), %rdi
movzbl -0xd3(%rbp), %eax
movl %eax, -0x130(%rbp)
movl $0xd, %esi
callq 0x3510
movq %rax, %rcx
movl -0x130(%rbp), %eax
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x3099
movq -0x110(%rbp), %rdi
movzbl -0xd2(%rbp), %eax
movl %eax, -0x134(%rbp)
movl $0xe, %esi
callq 0x3510
movq %rax, %rcx
movl -0x134(%rbp), %eax
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x3099
movq -0x110(%rbp), %rdi
movzbl -0xd1(%rbp), %eax
movl %eax, -0x138(%rbp)
movl $0xf, %esi
callq 0x3510
movq %rax, %rcx
movl -0x138(%rbp), %eax
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x3099
movl $0x1, -0x4(%rbp)
movl $0x1, -0xfc(%rbp)
jmp 0x30aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x30d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x304c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x33d0
leaq -0x70(%rbp), %rdi
callq 0x33d0
jmp 0x30d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x30c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x33d0
jmp 0x30c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x33d0
jmp 0x30c8
movl $0x0, -0x4(%rbp)
movl $0x1, -0xfc(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x33d0
leaq -0x40(%rbp), %rdi
callq 0x33d0
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0x33d0
leaq -0x40(%rbp), %rdi
callq 0x33d0
movq -0x78(%rbp), %rdi
callq 0x2240
nopw %cs:(%rax,%rax)