// File: bluesky466[P]ResourcesParser/ResourcesParser.cpp
// Function: ResourcesParser::getStringFromResStringPool[abi:cxx11](std::shared_ptr<ResourcesParser::ResStringPool>, unsigned int)
string ResourcesParser::getStringFromResStringPool(
			ResourcesParser::ResStringPoolPtr pPool,
			uint32_t index) {
	if(index > pPool->header.stringCount) {
		return "???";
	}
	uint32_t offset = *(pPool->pOffsets.get() + index);
	//前两个字节是字符串长度
	char* str = ((char*) (pPool->pStrings.get() + offset + 2));
	return (pPool->header.flags & ResStringPool_header::UTF8_FLAG)
		? str
		: toUtf8((char16_t*) str);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rsi, -0x78(%rbp)
movq %rdi, %rax
movq -0x78(%rbp), %rdi
movq %rax, -0x70(%rbp)
movq %rax, %rcx
movq %rcx, -0x68(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x60(%rbp)
callq 0x65a0
movq %rax, %rcx
movl -0x60(%rbp), %eax
cmpl 0x8(%rcx), %eax
jbe 0xaa3d
leaq -0x15(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x3460
movq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq 0xf85f(%rip), %rsi      # 0x1a26d
callq 0x3360
jmp 0xaa15
leaq -0x15(%rbp), %rdi
callq 0x32a0
jmp 0xabbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x15(%rbp), %rdi
callq 0x32a0
jmp 0xabca
movq -0x78(%rbp), %rdi
callq 0x65a0
movq %rax, %rdi
addq $0x20, %rdi
callq 0xbd90
movq -0x78(%rbp), %rdi
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
callq 0x65a0
movq %rax, %rdi
addq $0x30, %rdi
callq 0xbe30
movq -0x78(%rbp), %rdi
movl -0x28(%rbp), %ecx
addq %rcx, %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
callq 0x65a0
movl 0x10(%rax), %eax
andl $0x100, %eax            # imm = 0x100
movb $0x0, -0x32(%rbp)
movb $0x0, -0x5a(%rbp)
movb $0x0, -0x5b(%rbp)
cmpl $0x0, %eax
je 0xaada
movq -0x30(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x3460
movq -0x70(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movb $0x1, -0x32(%rbp)
callq 0x3360
jmp 0xaad8
jmp 0xab27
movq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0xbb50
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
movb $0x1, -0x5a(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xbb70
jmp 0xab12
movq -0x70(%rbp), %rdi
movb $0x1, -0x5b(%rbp)
leaq -0x58(%rbp), %rsi
callq 0xa920
jmp 0xab25
jmp 0xab27
testb $0x1, -0x5b(%rbp)
jne 0xab2f
jmp 0xab38
leaq -0x58(%rbp), %rdi
callq 0xbc20
testb $0x1, -0x5a(%rbp)
jne 0xab40
jmp 0xab49
leaq -0x59(%rbp), %rdi
callq 0xbc60
testb $0x1, -0x32(%rbp)
jne 0xab51
jmp 0xab5a
leaq -0x31(%rbp), %rdi
callq 0x32a0
jmp 0xabbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xabaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xab97
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
testb $0x1, -0x5b(%rbp)
jne 0xab8c
jmp 0xab95
leaq -0x58(%rbp), %rdi
callq 0xbc20
jmp 0xab97
testb $0x1, -0x5a(%rbp)
jne 0xab9f
jmp 0xaba8
leaq -0x59(%rbp), %rdi
callq 0xbc60
jmp 0xabaa
testb $0x1, -0x32(%rbp)
jne 0xabb2
jmp 0xabbb
leaq -0x31(%rbp), %rdi
callq 0x32a0
jmp 0xabca
movq -0x68(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3450
nopw %cs:(%rax,%rax)