// File: 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
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rsi, -0x238(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x34d0
movq -0x228(%rbp), %rcx
leaq 0x6892(%rip), %rsi      # 0x23295
leaq -0x38(%rbp), %rdi
movl $0x4, %edx
callq 0x3330
jmp 0x1ca13
leaq -0x39(%rbp), %rdi
callq 0x3300
movq -0x238(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x33b0
jmp 0x1ca2e
leaq -0x71(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0x34d0
movq -0x240(%rbp), %rcx
leaq 0x6819(%rip), %rsi      # 0x23265
leaq -0x70(%rbp), %rdi
movl $0x2, %edx
callq 0x3330
jmp 0x1ca5c
leaq -0x71(%rbp), %rdi
callq 0x3300
leaq -0x98(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3120
jmp 0x1ca77
movq -0x230(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x14a30
jmp 0x1ca8c
leaq -0x98(%rbp), %rdi
callq 0x31a0
movq -0x238(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3520
movq %rax, -0x248(%rbp)
jmp 0x1cab1
movq -0x248(%rbp), %rax
movsbq (%rax), %rax
movq %rax, -0x250(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x31f0
movq -0x250(%rbp), %rdx
movq -0x230(%rbp), %rsi
addq %rax, %rdx
leaq -0xb8(%rbp), %rdi
callq 0x13fd0
jmp 0x1caeb
movb $0x0, -0xd9(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0xb8(%rbp), %rdi
callq 0x3520
movq %rax, -0x258(%rbp)
jmp 0x1cb0b
movq -0x258(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x62, %ecx
movb %al, -0x259(%rbp)
jne 0x1cb75
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x31f0
movq -0x268(%rbp), %rsi
movq %rax, %rdx
addq $-0x2, %rdx
leaq -0xd8(%rbp), %rdi
movq $-0x1, %rcx
callq 0x32c0
jmp 0x1cb58
movb $0x1, -0xd9(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x12e40
movb %al, -0x259(%rbp)
movb -0x259(%rbp), %al
movb %al, -0x269(%rbp)
testb $0x1, -0xd9(%rbp)
jne 0x1cb8c
jmp 0x1cb98
leaq -0xd8(%rbp), %rdi
callq 0x31a0
movb -0x269(%rbp), %al
testb $0x1, %al
jne 0x1cba7
jmp 0x1cc3e
movb $0x0, -0x1(%rbp)
movl $0x1, -0xe0(%rbp)
jmp 0x1cfcb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x3300
jmp 0x1d015
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1d00c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x71(%rbp), %rdi
callq 0x3300
jmp 0x1d00c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1d003
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x31a0
jmp 0x1d003
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1cff7
leaq -0x120(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3120
jmp 0x1cc53
leaq -0x141(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x34d0
movq -0x278(%rbp), %rdx
leaq 0x9445(%rip), %rsi      # 0x260b9
leaq -0x140(%rbp), %rdi
callq 0x33e0
jmp 0x1cc82
leaq -0x100(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x140(%rbp), %rdx
callq 0xe260
jmp 0x1cc9e
movq -0x230(%rbp), %rdi
addq $0x8, %rdi
movq %rdi, -0x280(%rbp)
leaq -0x100(%rbp), %rsi
movq %rsi, -0x288(%rbp)
callq 0x3390
movq -0x288(%rbp), %rdi
callq 0x31a0
leaq -0x140(%rbp), %rdi
callq 0x31a0
leaq -0x141(%rbp), %rdi
callq 0x3300
leaq -0x120(%rbp), %rdi
callq 0x31a0
movq -0x280(%rbp), %rsi
leaq -0x188(%rbp), %rdi
callq 0x3120
jmp 0x1cd08
leaq -0x1a9(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x34d0
movq -0x290(%rbp), %rdx
leaq 0x939d(%rip), %rsi      # 0x260c6
leaq -0x1a8(%rbp), %rdi
callq 0x33e0
jmp 0x1cd37
leaq -0x168(%rbp), %rdi
leaq -0x188(%rbp), %rsi
leaq -0x1a8(%rbp), %rdx
callq 0xe260
jmp 0x1cd53
movq -0x230(%rbp), %rdi
addq $0x28, %rdi
leaq -0x168(%rbp), %rsi
movq %rsi, -0x298(%rbp)
callq 0x3390
movq -0x298(%rbp), %rdi
callq 0x31a0
leaq -0x1a8(%rbp), %rdi
callq 0x31a0
leaq -0x1a9(%rbp), %rdi
callq 0x3300
leaq -0x188(%rbp), %rdi
callq 0x31a0
movq -0x230(%rbp), %rsi
addq $0x8, %rsi
leaq -0x1f0(%rbp), %rdi
callq 0x3120
jmp 0x1cdba
leaq -0x211(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x34d0
movq -0x2a0(%rbp), %rdx
leaq 0x92fb(%rip), %rsi      # 0x260d6
leaq -0x210(%rbp), %rdi
callq 0x33e0
jmp 0x1cde9
leaq -0x1d0(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
leaq -0x210(%rbp), %rdx
callq 0xe260
jmp 0x1ce05
leaq -0x210(%rbp), %rdi
callq 0x31a0
leaq -0x211(%rbp), %rdi
callq 0x3300
leaq -0x1f0(%rbp), %rdi
callq 0x31a0
movq -0x230(%rbp), %rax
movl $0x0, 0x48(%rax)
movq $0x0, -0x220(%rbp)
movq -0x220(%rbp), %rax
movq %rax, -0x2a8(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x31f0
movq %rax, %rcx
movq -0x2a8(%rbp), %rax
cmpq %rcx, %rax
jae 0x1cfb1
movq -0x230(%rbp), %rax
movl 0x48(%rax), %eax
shll $0x8, %eax
movl %eax, -0x2b4(%rbp)
movq -0x220(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x3520
movq %rax, -0x2b0(%rbp)
jmp 0x1ce9e
movq -0x230(%rbp), %rax
movl -0x2b4(%rbp), %ecx
movq -0x2b0(%rbp), %rdx
movzbl (%rdx), %edx
addl %edx, %ecx
movl %ecx, 0x48(%rax)
movq -0x220(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x220(%rbp)
jmp 0x1ce42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1cef7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x31a0
leaq -0x141(%rbp), %rdi
callq 0x3300
leaq -0x120(%rbp), %rdi
callq 0x31a0
jmp 0x1cff7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1cf3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x31a0
leaq -0x1a9(%rbp), %rdi
callq 0x3300
leaq -0x188(%rbp), %rdi
callq 0x31a0
jmp 0x1cff7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1cf7d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x31a0
leaq -0x211(%rbp), %rdi
callq 0x3300
leaq -0x1f0(%rbp), %rdi
callq 0x31a0
jmp 0x1cff7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x31a0
jmp 0x1cff7
movb $0x1, -0x1(%rbp)
movl $0x1, -0xe0(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x31a0
leaq -0xb8(%rbp), %rdi
callq 0x31a0
leaq -0x70(%rbp), %rdi
callq 0x31a0
leaq -0x38(%rbp), %rdi
callq 0x31a0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
leaq -0xb8(%rbp), %rdi
callq 0x31a0
leaq -0x70(%rbp), %rdi
callq 0x31a0
leaq -0x38(%rbp), %rdi
callq 0x31a0
movq -0x48(%rbp), %rdi
callq 0x34b0
nop