// File: FFY00[P]uicc/include/uicc.h
// Function: UICC::verifyChv(char, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool verifyChv(char cla, char chv, string pwd) {
        string order;
        order+=cla;
        order+=string(u8"\x20\x00",2);
        order+=chv;
        order+=(char)8;
        order+=pwd;

        for (int i=pwd.size(); i<8 ; i++)
            order+='\xff';

        string answer (u8"\x90\x00",2);
        return send_check(order, answer);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rcx, -0xf0(%rbp)
movb %dl, %al
movb %sil, %dl
movq %rdi, -0x8(%rbp)
movb %dl, -0x9(%rbp)
movb %al, -0xa(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x33f0
movq -0xe0(%rbp), %rdi
movsbl -0x9(%rbp), %esi
callq 0x31b0
jmp 0x1f062
leaq -0x69(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x34d0
movq -0xf8(%rbp), %rcx
leaq 0x424d(%rip), %rsi      # 0x232cd
leaq -0x68(%rbp), %rdi
movl $0x2, %edx
callq 0x3330
jmp 0x1f090
leaq -0x38(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x33b0
jmp 0x1f09f
leaq -0x68(%rbp), %rdi
callq 0x31a0
leaq -0x69(%rbp), %rdi
callq 0x3300
movsbl -0xa(%rbp), %esi
leaq -0x38(%rbp), %rdi
callq 0x31b0
jmp 0x1f0c0
leaq -0x38(%rbp), %rdi
movl $0x8, %esi
callq 0x31b0
jmp 0x1f0d0
movq -0xf0(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x33b0
jmp 0x1f0e2
movq -0xf0(%rbp), %rdi
callq 0x31f0
movl %eax, -0x70(%rbp)
cmpl $0x8, -0x70(%rbp)
jge 0x1f156
leaq -0x38(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x31b0
jmp 0x1f107
jmp 0x1f109
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x1f0f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1f283
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1f148
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x31a0
leaq -0x69(%rbp), %rdi
callq 0x3300
jmp 0x1f283
leaq -0x91(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x34d0
movq -0x100(%rbp), %rcx
leaq 0x40ee(%rip), %rsi      # 0x23265
leaq -0x90(%rbp), %rdi
movl $0x2, %edx
callq 0x3330
jmp 0x1f18a
leaq -0x91(%rbp), %rdi
callq 0x3300
leaq -0xb8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3120
jmp 0x1f1a8
leaq -0xd8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3120
jmp 0x1f1bd
movq -0xe8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0x14f60
movb %al, -0x101(%rbp)
jmp 0x1f1df
leaq -0xd8(%rbp), %rdi
callq 0x31a0
leaq -0xb8(%rbp), %rdi
callq 0x31a0
leaq -0x90(%rbp), %rdi
callq 0x31a0
leaq -0x38(%rbp), %rdi
callq 0x31a0
movb -0x101(%rbp), %al
andb $0x1, %al
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x3300
jmp 0x1f283
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1f277
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1f26b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x31a0
leaq -0xb8(%rbp), %rdi
callq 0x31a0
leaq -0x90(%rbp), %rdi
callq 0x31a0
leaq -0x38(%rbp), %rdi
callq 0x31a0
movq -0x40(%rbp), %rdi
callq 0x34b0
nopw %cs:(%rax,%rax)
nop