// File: Tarstingo[P]rarcrack/crackrar.cpp
// Function: getPara(int, std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>>&)
void getPara(int fd,std::vector<muchar> &salt,std::vector<muchar> &iv,std::vector<muchar> &s)
{
    timespec tmptime,nowtime;
    clock_gettime(CLOCK_REALTIME,&tmptime);

    unsigned char tmp[20];
    unsigned char sa[8],v[16],is[16];
    read(fd,tmp,20);
    read(fd,sa,8);
    read(fd,v,16);
    read(fd,is,16);
    for(int i=0;i<8;i++)
        salt.push_back(sa[i]);
    for(int i=0;i<16;i++)
    {
        iv.push_back(v[i]);
        s.push_back(is[i]);
    }

    clock_gettime(CLOCK_REALTIME,&nowtime);
    printf("\033[31mgetPara\033[m\n");
    if(tmptime.tv_nsec>nowtime.tv_nsec)
    {
        cout<<"0s   "<<1000000000-nowtime.tv_nsec+tmptime.tv_nsec<<" ns"<<endl;
    }
    else
    {
        cout<<"0s   "<<nowtime.tv_nsec-tmptime.tv_nsec<<" ns"<<endl;
    }

    cout<<tmptime.tv_sec<<" "<<tmptime.tv_nsec<<endl;
    cout<<nowtime.tv_sec<<" "<<nowtime.tv_nsec<<endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
xorl %edi, %edi
leaq -0x30(%rbp), %rsi
callq 0x2150
movl -0x4(%rbp), %edi
leaq -0x60(%rbp), %rsi
movl $0x14, %edx
callq 0x21d0
movl -0x4(%rbp), %edi
leaq -0x68(%rbp), %rsi
movl $0x8, %edx
callq 0x21d0
movl -0x4(%rbp), %edi
leaq -0x80(%rbp), %rsi
movl $0x10, %edx
callq 0x21d0
movl -0x4(%rbp), %edi
leaq -0x90(%rbp), %rsi
movl $0x10, %edx
callq 0x21d0
movl $0x0, -0x94(%rbp)
cmpl $0x8, -0x94(%rbp)
jge 0x2897
movq -0x10(%rbp), %rdi
movslq -0x94(%rbp), %rax
leaq -0x68(%rbp), %rsi
addq %rax, %rsi
callq 0x3450
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x2866
movl $0x0, -0x98(%rbp)
cmpl $0x10, -0x98(%rbp)
jge 0x28ec
movq -0x18(%rbp), %rdi
movslq -0x98(%rbp), %rax
leaq -0x80(%rbp), %rsi
addq %rax, %rsi
callq 0x3450
movq -0x20(%rbp), %rdi
movslq -0x98(%rbp), %rax
leaq -0x90(%rbp), %rsi
addq %rax, %rsi
callq 0x3450
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x28a1
xorl %edi, %edi
leaq -0x40(%rbp), %rsi
callq 0x2150
leaq 0x3724(%rip), %rdi      # 0x6022
movb $0x0, %al
callq 0x2040
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jle 0x2957
movq 0x66c2(%rip), %rdi      # 0x8fd8
leaq 0x36fb(%rip), %rsi      # 0x6018
callq 0x2160
movq %rax, %rdi
movl $0x3b9aca00, %esi       # imm = 0x3B9ACA00
subq -0x38(%rbp), %rsi
addq -0x28(%rbp), %rsi
callq 0x2250
movq %rax, %rdi
leaq 0x36dd(%rip), %rsi      # 0x601e
callq 0x2160
movq %rax, %rdi
movq 0x6678(%rip), %rsi      # 0x8fc8
callq 0x21a0
jmp 0x2998
movq 0x667a(%rip), %rdi      # 0x8fd8
leaq 0x36b3(%rip), %rsi      # 0x6018
callq 0x2160
movq %rax, %rdi
movq -0x38(%rbp), %rsi
subq -0x28(%rbp), %rsi
callq 0x2250
movq %rax, %rdi
leaq 0x369a(%rip), %rsi      # 0x601e
callq 0x2160
movq %rax, %rdi
movq 0x6635(%rip), %rsi      # 0x8fc8
callq 0x21a0
movq -0x30(%rbp), %rsi
movq 0x6635(%rip), %rdi      # 0x8fd8
callq 0x2250
movq %rax, %rdi
leaq 0x366a(%rip), %rsi      # 0x601c
callq 0x2160
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0x2250
movq %rax, %rdi
movq 0x65fb(%rip), %rsi      # 0x8fc8
callq 0x21a0
movq -0x40(%rbp), %rsi
movq 0x65fb(%rip), %rdi      # 0x8fd8
callq 0x2250
movq %rax, %rdi
leaq 0x3630(%rip), %rsi      # 0x601c
callq 0x2160
movq %rax, %rdi
movq -0x38(%rbp), %rsi
callq 0x2250
movq %rax, %rdi
movq 0x65c1(%rip), %rsi      # 0x8fc8
callq 0x21a0
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)