// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
movl $0xc000, (%r15)         # imm = 0xC000
movq $0x4, -0x8(%r15)
movb $0x0, 0x4(%r15)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
leaq -0x88(%rbp), %rdi
callq 0x20d0
leaq -0x98(%rbp), %r12
movq %r12, -0x10(%r12)
movw $0x90, (%r12)
movq $0x2, -0x8(%r12)
movb $0x0, 0x2(%r12)
leaq -0x178(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
addq %rsi, %rdx
leaq -0x188(%rbp), %rdi
callq 0x1394e
leaq -0x188(%rbp), %rsi
movq %rbx, %rdi
callq 0xe93c
movq -0x188(%rbp), %rdi
cmpq %r13, %rdi
je 0x12902
callq 0x2220
movq (%r14), %rax
movsbq (%rax), %rdx
addq -0xa0(%rbp), %rdx
leaq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0xe17e
movq -0x68(%rbp), %rsi
cmpb $0x62, (%rsi)
jne 0x12994
leaq -0x68(%rbp), %rsi
movq 0x8(%rsi), %rdx
addq $-0x2, %rdx
leaq -0x48(%rbp), %rdi
movq $-0x1, %rcx
callq 0x2270
movq -0x40(%rbp), %rdx
cmpq -0xa0(%rbp), %rdx
jne 0x1296e
movq -0x48(%rbp), %r14
testq %rdx, %rdx
je 0x12977
movq -0xa8(%rbp), %rsi
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
setne %r13b
jmp 0x1297a
movb $0x1, %r13b
movq -0x48(%rbp), %r14
jmp 0x1297a
xorl %r13d, %r13d
leaq -0x38(%rbp), %rax
cmpq %rax, %r14
je 0x1298b
movq %r14, %rdi
callq 0x2220
movq -0x68(%rbp), %rsi
testb %r13b, %r13b
je 0x1299b
xorl %ebx, %ebx
jmp 0x12b99
leaq -0x158(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %rdi
callq 0x1394e
leaq -0x138(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x6201(%rip), %rsi      # 0x18bcc
leaq 0x6206(%rip), %rdx      # 0x18bd8
leaq -0x148(%rbp), %rdi
callq 0x139ec
leaq -0x48(%rbp), %rdi
leaq -0x168(%rbp), %rsi
leaq -0x148(%rbp), %rdx
callq 0xa7da
leaq 0x8(%rbx), %rdi
leaq -0x48(%rbp), %r14
movq %r14, %rsi
callq 0x2320
movq (%r14), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x12a16
callq 0x2220
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0x12a27
callq 0x2220
movq -0x168(%rbp), %rdi
cmpq %r15, %rdi
je 0x12a38
callq 0x2220
leaq -0x118(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
addq %rsi, %rdx
leaq -0x128(%rbp), %rdi
callq 0x1394e
leaq -0xf8(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x616d(%rip), %rsi      # 0x18bd9
leaq 0x6175(%rip), %rdx      # 0x18be8
leaq -0x108(%rbp), %rdi
callq 0x139ec
leaq -0x48(%rbp), %rdi
leaq -0x128(%rbp), %rsi
leaq -0x108(%rbp), %rdx
callq 0xa7da
leaq 0x28(%rbx), %rdi
movq %r14, %rsi
callq 0x2320
movq (%r14), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x12ab3
callq 0x2220
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0x12ac4
callq 0x2220
movq -0x128(%rbp), %rdi
cmpq %r15, %rdi
je 0x12ad5
callq 0x2220
leaq -0xd8(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
leaq -0x78(%rbp), %r15
callq 0x1394e
leaq -0xb8(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x60dc(%rip), %rsi      # 0x18be9
leaq 0x60e5(%rip), %rdx      # 0x18bf9
leaq -0xc8(%rbp), %rdi
callq 0x139ec
leaq -0x48(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0xc8(%rbp), %rdx
callq 0xa7da
movq -0xc8(%rbp), %rdi
cmpq %r13, %rdi
je 0x12b48
callq 0x2220
movq -0xe8(%rbp), %rdi
cmpq %r14, %rdi
je 0x12b59
callq 0x2220
movl $0x0, 0x48(%rbx)
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x12b85
xorl %ecx, %ecx
xorl %edx, %edx
shll $0x8, %edx
movzbl (%rdi,%rcx), %esi
orl %esi, %edx
movl %edx, 0x48(%rbx)
incq %rcx
cmpq %rcx, %rax
jne 0x12b71
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x12b93
callq 0x2220
movb $0x1, %bl
movq -0x68(%rbp), %rsi
leaq -0x58(%rbp), %rax
cmpq %rax, %rsi
je 0x12baa
movq %rsi, %rdi
callq 0x2220
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0x12bbb
callq 0x2220
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x12bcc
callq 0x2220
movl %ebx, %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r13, %rdi
je 0x12bf9
callq 0x2220
jmp 0x12bf9
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r14, %rdi
jne 0x12c52
jmp 0x12c5e
jmp 0x12c5b
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0x12c22
callq 0x2220
jmp 0x12c22
movq %rax, %rbx
movq -0x128(%rbp), %rdi
jmp 0x12c4d
jmp 0x12c5b
movq %rax, %rbx
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0x12c46
callq 0x2220
jmp 0x12c46
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r15, %rdi
je 0x12c5e
callq 0x2220
jmp 0x12c5e
jmp 0x12c5b
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x12c7e
jmp 0x12c88
jmp 0x12c85
movq %rax, %rbx
movq -0x188(%rbp), %rdi
cmpq %r13, %rdi
je 0x12c88
callq 0x2220
jmp 0x12c88
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0x12c9e
callq 0x2220
jmp 0x12c9e
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x12cb3
callq 0x2220
movq %rbx, %rdi
callq 0x2400
nop