// File: corecodec[P]coremake/coremake.c
// Function: generate_msuid
void generate_msuid(char *msuid,const char *srcstr)
{
	int i;
    union
    {
        unsigned int d[4];
        unsigned char b[16];
    } code;

    for (i=0;i<4;++i)
        code.d[i] = 1;

    for (i=0;srcstr[i];++i)
    {
        unsigned char ch = (unsigned char)srcstr[i];
        code.d[0] = (code.d[0] + 0x33299112 + code.d[2] * ch) ^ code.d[3];
        code.d[1] = (code.d[1] + 0x1345AF22 + code.d[3] * ch) ^ code.d[2];
        code.d[2] = (code.d[2] + 0x73A92332 + code.d[0] * ch) ^ code.d[1];
        code.d[3] = (code.d[3] + 0x5123ABC1 + code.d[1] * ch) ^ code.d[0];
    }

    sprintf(msuid,"{%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
        code.b[0],code.b[1],code.b[2],code.b[3],
        code.b[4],code.b[5],code.b[6],code.b[7],
        code.b[8],code.b[9],code.b[10],code.b[11],
        code.b[12],code.b[13],code.b[14],code.b[15]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
jge 0xf0e0
movslq -0x3c(%rbp), %rax
movl $0x1, -0x4c(%rbp,%rax,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xf0c3
movl $0x0, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0xf17d
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x4d(%rbp)
movl -0x4c(%rbp), %eax
addl $0x33299112, %eax       # imm = 0x33299112
movl -0x44(%rbp), %ecx
movzbl -0x4d(%rbp), %edx
imull %edx, %ecx
addl %ecx, %eax
xorl -0x40(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x48(%rbp), %eax
addl $0x1345af22, %eax       # imm = 0x1345AF22
movl -0x40(%rbp), %ecx
movzbl -0x4d(%rbp), %edx
imull %edx, %ecx
addl %ecx, %eax
xorl -0x44(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
addl $0x73a92332, %eax       # imm = 0x73A92332
movl -0x4c(%rbp), %ecx
movzbl -0x4d(%rbp), %edx
imull %edx, %ecx
addl %ecx, %eax
xorl -0x48(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
addl $0x5123abc1, %eax       # imm = 0x5123ABC1
movl -0x48(%rbp), %ecx
movzbl -0x4d(%rbp), %edx
imull %edx, %ecx
addl %ecx, %eax
xorl -0x4c(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xf0e7
movq -0x30(%rbp), %rdi
movzbl -0x4c(%rbp), %edx
movzbl -0x4b(%rbp), %ecx
movzbl -0x4a(%rbp), %r8d
movzbl -0x49(%rbp), %r9d
movzbl -0x48(%rbp), %eax
movzbl -0x47(%rbp), %esi
movl %esi, -0x60(%rbp)
movzbl -0x46(%rbp), %esi
movl %esi, -0x5c(%rbp)
movzbl -0x45(%rbp), %esi
movl %esi, -0x58(%rbp)
movzbl -0x44(%rbp), %r13d
movzbl -0x43(%rbp), %r12d
movzbl -0x42(%rbp), %r15d
movzbl -0x41(%rbp), %r14d
movzbl -0x40(%rbp), %ebx
movzbl -0x3f(%rbp), %r11d
movzbl -0x3e(%rbp), %r10d
movzbl -0x3d(%rbp), %esi
movl %esi, -0x54(%rbp)
leaq 0x7e48(%rip), %rsi      # 0x17024
movl %eax, (%rsp)
movl -0x60(%rbp), %eax
movl %eax, 0x8(%rsp)
movl -0x5c(%rbp), %eax
movl %eax, 0x10(%rsp)
movl -0x58(%rbp), %eax
movl %eax, 0x18(%rsp)
movl -0x54(%rbp), %eax
movl %r13d, 0x20(%rsp)
movl %r12d, 0x28(%rsp)
movl %r15d, 0x30(%rsp)
movl %r14d, 0x38(%rsp)
movl %ebx, 0x40(%rsp)
movl %r11d, 0x48(%rsp)
movl %r10d, 0x50(%rsp)
movl %eax, 0x58(%rsp)
movb $0x0, %al
callq 0x2300
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)