// File: /workspace/github_c_makefile_star2_O0/inflex[P]ripMIME/tnef/tnef.c
// Function: handle_props
int handle_props(uint8 *tsp)
{
	int bytes = 0;
	uint32 num_props = 0;
	uint32 x = 0;


	RT32(&num_props, tsp);
	bytes += sizeof(num_props);

	while (x < num_props)
	{
		uint32 prop_tag;
		uint32 num;
		char filename[256];

		RT32(&prop_tag, tsp+bytes);
		bytes += sizeof(prop_tag);

		switch (prop_tag & PROP_TYPE_MASK)
		{
			case PT_BINARY:
				RT32(&num, tsp+bytes);
				bytes += sizeof(num);
				RT32(&num, tsp+bytes);
				bytes += sizeof(num);
				if (prop_tag == PR_RTF_COMPRESSED)
				{
					sprintf (filename, "XAM_%d.rtf", TNEF_glb.file_num);
					TNEF_glb.file_num++;
					save_attach_data(filename, tsp+bytes, num);
				}
				/* num + PAD */
				bytes += num + ((num % 4) ? (4 - num%4) : 0);
				break;
			case PT_STRING8:
				RT32(&num, tsp+bytes);
				bytes += sizeof(num);
				RT32(&num, tsp+bytes);
				bytes += sizeof(num);
				make_string(tsp+bytes,num);
				bytes += num + ((num % 4) ? (4 - num%4) : 0);
				break;
			case PT_UNICODE:
			case PT_OBJECT:
				break;
			case PT_I2:
				bytes += 2;
				break;
			case PT_LONG:
				bytes += 4;
				break;
			case PT_R4:
				bytes += 4;
				break;
			case PT_DOUBLE:
				bytes += 8;
				break;
			case PT_CURRENCY:
			case PT_APPTIME:
			case PT_ERROR:
				bytes += 4;
				break;
			case PT_BOOLEAN:
				bytes += 4;
				break;
			case PT_I8:
				bytes += 8;
			case PT_SYSTIME:
				bytes += 8;
				break;
		}
		x++;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0xf0b0
cmpl $-0x1, %eax
jne 0xf432
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xf77d
movslq -0x14(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x14(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0xf776
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0xf0b0
cmpl $-0x1, %eax
jne 0xf46e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xf77d
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
movzwl -0x20(%rbp), %eax
movl %eax, -0x134(%rbp)
subl $0x2, %eax
je 0xf714
jmp 0xf48c
movl -0x134(%rbp), %eax
subl $0x3, %eax
je 0xf71f
jmp 0xf49d
movl -0x134(%rbp), %eax
subl $0x4, %eax
je 0xf72a
jmp 0xf4ae
movl -0x134(%rbp), %eax
subl $0x5, %eax
je 0xf735
jmp 0xf4bf
movl -0x134(%rbp), %eax
addl $-0x6, %eax
subl $0x2, %eax
jb 0xf740
jmp 0xf4d3
movl -0x134(%rbp), %eax
subl $0xa, %eax
je 0xf740
jmp 0xf4e4
movl -0x134(%rbp), %eax
subl $0xb, %eax
je 0xf74b
jmp 0xf4f5
movl -0x134(%rbp), %eax
subl $0xd, %eax
je 0xf712
jmp 0xf506
movl -0x134(%rbp), %eax
subl $0x14, %eax
je 0xf756
jmp 0xf517
movl -0x134(%rbp), %eax
subl $0x1e, %eax
je 0xf656
jmp 0xf528
movl -0x134(%rbp), %eax
subl $0x1f, %eax
je 0xf712
jmp 0xf539
movl -0x134(%rbp), %eax
subl $0x40, %eax
je 0xf75f
jmp 0xf54a
movl -0x134(%rbp), %eax
subl $0x102, %eax            # imm = 0x102
jne 0xf768
jmp 0xf55d
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
leaq -0x24(%rbp), %rdi
callq 0xf0b0
cmpl $-0x1, %eax
jne 0xf582
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xf77d
movslq -0x14(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
leaq -0x24(%rbp), %rdi
callq 0xf0b0
cmpl $-0x1, %eax
jne 0xf5b2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xf77d
movslq -0x14(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x14(%rbp)
cmpl $0x10090102, -0x20(%rbp) # imm = 0x10090102
jne 0xf60a
leaq -0x130(%rbp), %rdi
movl 0x25cfd(%rip), %edx     # 0x352d0
leaq 0xeee8(%rip), %rsi      # 0x1e4c2
movb $0x0, %al
callq 0x2350
movl 0x25ce9(%rip), %eax     # 0x352d0
addl $0x1, %eax
movl %eax, 0x25ce0(%rip)     # 0x352d0
leaq -0x130(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
movl -0x24(%rbp), %edx
callq 0xf310
movl -0x24(%rbp), %eax
movl %eax, -0x138(%rbp)
movl -0x24(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xf633
movl -0x24(%rbp), %ecx
andl $0x3, %ecx
movl $0x4, %eax
subl %ecx, %eax
movl %eax, -0x13c(%rbp)
jmp 0xf63d
xorl %eax, %eax
movl %eax, -0x13c(%rbp)
jmp 0xf63d
movl -0x138(%rbp), %eax
movl -0x13c(%rbp), %ecx
addl %ecx, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xf768
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
leaq -0x24(%rbp), %rdi
callq 0xf0b0
cmpl $-0x1, %eax
jne 0xf67b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xf77d
movslq -0x14(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
leaq -0x24(%rbp), %rdi
callq 0xf0b0
cmpl $-0x1, %eax
jne 0xf6ab
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xf77d
movslq -0x14(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rax
addq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0xf2d0
movl -0x24(%rbp), %eax
movl %eax, -0x140(%rbp)
movl -0x24(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xf6f2
movl -0x24(%rbp), %ecx
andl $0x3, %ecx
movl $0x4, %eax
subl %ecx, %eax
movl %eax, -0x144(%rbp)
jmp 0xf6fc
xorl %eax, %eax
movl %eax, -0x144(%rbp)
jmp 0xf6fc
movl -0x140(%rbp), %eax
movl -0x144(%rbp), %ecx
addl %ecx, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xf768
jmp 0xf768
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0xf768
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
jmp 0xf768
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
jmp 0xf768
movl -0x14(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x14(%rbp)
jmp 0xf768
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
jmp 0xf768
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
jmp 0xf768
movl -0x14(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x14(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xf43d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopl (%rax)