// File: FFY00[P]uicc/include/uicc.h
// Function: UICC::encodeISDN(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
vector<string> encodeISDN(string isdn, int recordLenght) {
        vector<string> encoded;
        encoded.push_back("");

        for (int i=0; i < recordLenght-14 ; i++)
            encoded[0]+='\xff';

        encoded[0]+=makeBcd(isdn).size();
        encoded[0]+='\x81'; //add TON field
        encoded[0]+=makeBcd(isdn);

        for (int i=encoded.size(); i<recordLenght; i++)
            encoded[0]+='\xff';

        return encoded;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdx, -0x100(%rbp)
movq %rdi, -0xf8(%rbp)
movq %rdi, %rax
movq %rax, -0xf0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
callq 0xec50
leaq -0x41(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x34d0
movq -0xe8(%rbp), %rdx
leaq 0x143fb(%rip), %rsi     # 0x25c64
leaq -0x40(%rbp), %rdi
callq 0x33e0
jmp 0x11874
movq -0xf8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x11160
jmp 0x11886
leaq -0x40(%rbp), %rdi
callq 0x31a0
leaq -0x41(%rbp), %rdi
callq 0x3300
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0xe, %ecx
cmpl %ecx, %eax
jge 0x1191a
movq -0xf8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf690
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x31b0
jmp 0x118cb
jmp 0x118cd
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1189f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x118fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x31a0
leaq -0x41(%rbp), %rdi
callq 0x3300
jmp 0x11af6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x11af6
movq -0x100(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x3120
jmp 0x1192f
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x7ca0
jmp 0x11948
leaq -0x78(%rbp), %rdi
callq 0x31f0
movq -0xf8(%rbp), %rdi
movl %eax, -0x104(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0xf690
movq %rax, %rdi
movl -0x104(%rbp), %eax
movsbl %al, %esi
callq 0x31b0
jmp 0x1197a
leaq -0x78(%rbp), %rdi
callq 0x31a0
leaq -0x98(%rbp), %rdi
callq 0x31a0
movq -0xf8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf690
movq %rax, %rdi
movl $0xffffff81, %esi       # imm = 0xFFFFFF81
callq 0x31b0
jmp 0x119ae
movq -0x100(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x3120
jmp 0x119c3
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x7ca0
jmp 0x119df
movq -0xf8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf690
movq %rax, %rdi
leaq -0xb8(%rbp), %rsi
callq 0x33b0
jmp 0x11a00
leaq -0xb8(%rbp), %rdi
callq 0x31a0
leaq -0xd8(%rbp), %rdi
callq 0x31a0
movq -0xf8(%rbp), %rdi
callq 0x12e20
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x11ad0
movq -0xf8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf690
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x31b0
jmp 0x11a58
jmp 0x11a5a
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x11a2a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x11a8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x31a0
leaq -0x98(%rbp), %rdi
callq 0x31a0
jmp 0x11af6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x11ac2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x31a0
leaq -0xd8(%rbp), %rdi
callq 0x31a0
jmp 0x11af6
movb $0x1, -0x1d(%rbp)
testb $0x1, -0x1d(%rbp)
jne 0x11ae6
movq -0xf8(%rbp), %rdi
callq 0xf6b0
movq -0xf0(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0xf8(%rbp), %rdi
callq 0xf6b0
movq -0x50(%rbp), %rdi
callq 0x34b0
nopl (%rax,%rax)