// File: /workspace/github_cpp_makefile_star2_O2/FFY00[P]uicc/include/uicc.h
// Function: USIM::readFileInfo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool readFileInfo(string size) {
        string order(u8"\x00\xc0\x00\x00",4);
        order+=size;
        string good(u8"\x90\x00",2);
        write(order);
        string values=read(size[0] +good.size());

        if ( values[0] != '\x62' || values.substr(values.size()-2) != good)
            return false;

        fileInfo=extractTLV(values, "FCP Template");
        fileDesc=extractTLV(fileInfo, "File Descriptor");
        string fileSizeString=extractTLV(fileInfo, "File Size - Data");
        fileSize=0;

        for (size_t i=0; i<fileSizeString.size(); i++)
            fileSize=fileSize*256+(unsigned char)fileSizeString[i];

        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x90(%rbp), %rax
movq %rax, -0x10(%rax)
movl $0xc000, (%rax)         # imm = 0xC000
movq $0x4, -0x8(%rax)
movb $0x0, 0x4(%rax)
leaq -0xa0(%rbp), %rdi
callq 0x2470
leaq -0x70(%rbp), %rax
movq %rax, -0x10(%rax)
movw $0x90, (%rax)
movq $0x2, -0x8(%rax)
movb $0x0, 0x2(%rax)
leaq -0x180(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x2330
leaq -0x180(%rbp), %rsi
movq %rbx, %rdi
callq 0xb178
leaq -0x180(%rbp), %rdi
callq 0x2120
movq (%r14), %rax
movsbq (%rax), %rdx
addq -0x78(%rbp), %rdx
leaq -0x60(%rbp), %rdi
movq %rbx, %rsi
callq 0xac6e
movq -0x60(%rbp), %rax
cmpb $0x62, (%rax)
jne 0xe52c
leaq -0x60(%rbp), %rsi
movq 0x8(%rsi), %rdx
addq $-0x2, %rdx
leaq -0x40(%rbp), %rdi
pushq $-0x1
popq %rcx
callq 0x2260
leaq -0x40(%rbp), %r14
leaq -0x80(%rbp), %rsi
movq %r14, %rdi
callq 0xa602
movl %eax, %r15d
movq %r14, %rdi
callq 0x2120
testb %r15b, %r15b
je 0xe533
xorl %ebx, %ebx
jmp 0xe693
leaq -0x160(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2330
leaq 0x5662(%rip), %rsi      # 0x13bac
leaq -0x140(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x20f0
leaq -0x40(%rbp), %rdi
leaq -0x160(%rbp), %rsi
leaq -0x140(%rbp), %rdx
callq 0x805b
leaq 0x8(%rbx), %r14
leaq -0x40(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2300
movq %r15, %rdi
callq 0x2120
leaq -0x140(%rbp), %rdi
callq 0x2120
leaq -0x160(%rbp), %rdi
callq 0x2120
leaq -0x120(%rbp), %rdi
movq %r14, %rsi
callq 0x2330
leaq 0x55ff(%rip), %rsi      # 0x13bb9
leaq -0x100(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x20f0
leaq -0x40(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0x805b
leaq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0x2300
movq %r15, %rdi
callq 0x2120
leaq -0x100(%rbp), %rdi
callq 0x2120
leaq -0x120(%rbp), %rdi
callq 0x2120
leaq -0xe0(%rbp), %rdi
movq %r14, %rsi
callq 0x2330
leaq 0x55a6(%rip), %rsi      # 0x13bc9
leaq -0xc0(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x20f0
leaq -0x40(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x805b
leaq -0xc0(%rbp), %rdi
callq 0x2120
leaq -0xe0(%rbp), %rdi
callq 0x2120
andl $0x0, 0x48(%rbx)
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0xe688
shll $0x8, %edx
movzbl (%rax,%rsi), %edi
orl %edi, %edx
movl %edx, 0x48(%rbx)
incq %rsi
jmp 0xe672
leaq -0x40(%rbp), %rdi
callq 0x2120
movb $0x1, %bl
leaq -0x60(%rbp), %rdi
callq 0x2120
leaq -0x80(%rbp), %rdi
callq 0x2120
leaq -0xa0(%rbp), %rdi
callq 0x2120
movl %ebx, %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x2120
jmp 0xe6d5
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
jmp 0xe71a
jmp 0xe723
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x2120
jmp 0xe6f4
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
jmp 0xe71a
jmp 0xe723
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x2120
jmp 0xe713
movq %rax, %rbx
leaq -0x160(%rbp), %rdi
callq 0x2120
jmp 0xe726
jmp 0xe723
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
jmp 0xe738
jmp 0xe73f
movq %rax, %rbx
leaq -0x180(%rbp), %rdi
callq 0x2120
jmp 0xe742
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x2120
leaq -0xa0(%rbp), %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x2400
movq %rax, %rbx
jmp 0xe74b