LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/aes.c
// Function: AES_Encrypt
void AES_Encrypt(const AES_Ctx *Ctx, const unsigned char *Pt, size_t Length, unsigned char *Ct)
{
	const size_t blockCount = Length / 0x10;

	for (size_t i = 0; i < blockCount; ++i) {
		rijndaelEncrypt(Ctx->RoundKeys, Ctx->Rounds, Pt, Ct);
		Pt += 0x10;
		Ct += 0x10;
	}

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x4, %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x64b7
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1f0(%rax), %esi
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x2ee0
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x646c
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/aes.c
// Function: AES_Decrypt
void AES_Decrypt(const AES_Ctx *Ctx, const unsigned char *Ct, size_t Length, unsigned char *Pt)
{
	const size_t blockCount = Length / 0x10;

	for (size_t i = 0; i < blockCount; ++i) {
		rijndaelDecrypt(Ctx->RoundKeys, Ctx->Rounds, Ct, Pt);
		Pt += 16;
		Ct += 16;
	}

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x4, %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x6537
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1f0(%rax), %esi
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x4940
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x64ec
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/aes.c
// Function: AES_EncryptCBC
void AES_EncryptCBC(const AES_Ctx *Ctx, const unsigned char *Pt, size_t Length, unsigned char *Ct)
{
	unsigned char oneBlock[16];
	const size_t blockCount = Length / 16;

	memcpy(oneBlock, Pt, sizeof(oneBlock));
	_XOR16B(oneBlock, Ctx->IV);
	rijndaelEncrypt(Ctx->RoundKeys, Ctx->Rounds, oneBlock, Ct);
	Pt += 0x10;
	Ct += 0x10;
	for (size_t i = 1; i < blockCount; ++i) {
		memcpy(oneBlock, Pt, sizeof(oneBlock));
		_XOR16B(oneBlock, Ct - 0x10);
		rijndaelEncrypt(Ctx->RoundKeys, Ctx->Rounds, oneBlock, Ct);
		Pt += 0x10;
		Ct += 0x10;
	}

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x4, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
leaq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x1e0, %rsi            # imm = 0x1E0
callq 0x6640
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1f0(%rax), %esi
leaq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x2ee0
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
movq $0x1, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x6635
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
leaq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $-0x10, %rsi
callq 0x6640
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1f0(%rax), %esi
leaq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x2ee0
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x65c6
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/aes.c
// Function: AES_DecryptCBC
void AES_DecryptCBC(const AES_Ctx *Ctx, const unsigned char *Ct, size_t Length, unsigned char *Pt)
{
	const size_t blockCount = Length / 0x10;

	for (size_t i = 0; i < blockCount; ++i)
		rijndaelDecrypt(Ctx->RoundKeys, Ctx->Rounds, Ct + i*0x10, Pt + i*0x10);

	_XOR16B(Pt, Ctx->IV);
	for (size_t i = 1; i < blockCount; ++i)
		_XOR16B(Pt + i * 0x10, Ct + (i - 1) * 0x10);

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x4, %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x6705
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1f0(%rax), %esi
movq -0x10(%rbp), %rdx
movq -0x30(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdx
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
callq 0x4940
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x66bc
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x1e0, %rsi            # imm = 0x1E0
callq 0x6640
movq $0x1, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x6760
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rax
subq $0x1, %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x6640
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6721
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/aes.c
// Function: AES_EncryptECB
void AES_EncryptECB(const AES_Ctx *Ctx, const unsigned char *Pt, size_t Length, unsigned char *Ct)
{
	const size_t blockCount = Length / 0x10;

	for (size_t i = 0; i < blockCount; ++i)
		rijndaelEncrypt(Ctx->RoundKeys, Ctx->Rounds, Pt + i * 0x10, Ct + i * 0x10);

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x4, %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x67e5
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1f0(%rax), %esi
movq -0x10(%rbp), %rdx
movq -0x30(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdx
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
callq 0x2ee0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x679c
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/aes.c
// Function: AES_DecryptECB
void AES_DecryptECB(const AES_Ctx *Ctx, const unsigned char *Ct, size_t Length, unsigned char *Pt)
{
	const size_t blockCount = Length / 0x10;

	for (size_t i = 0; i < blockCount; ++i)
		rijndaelDecrypt(Ctx->RoundKeys, Ctx->Rounds, Ct + i * 0x10, Pt + i * 0x10);

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x4, %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x6865
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1f0(%rax), %esi
movq -0x10(%rbp), %rdx
movq -0x30(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdx
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
callq 0x4940
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x681c
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/aes.c
// Function: AESDecryptCTS
void AESDecryptCTS(const AES_Ctx *Ctx, const unsigned char *Ct, size_t Length, unsigned char *Pt)
{
	const size_t blockCount = (Length + 15) / 16;
	const size_t lastLen = (Length % 16) ? (Length % 16) : 16;
	unsigned char buffer[32];
	unsigned char buffer2[32];

	if (blockCount > 2)
		AES_DecryptCBC(Ctx, Ct, (blockCount - 2)*16, Pt);

	Pt += (blockCount - 2) * 16;
	memset(buffer, 0, sizeof(buffer));
	memcpy(buffer, Pt, lastLen + 16);
	AES_Decrypt(Ctx, buffer, 16, buffer2);
	memcpy(buffer, buffer2, 16);
	_XOR16B(buffer, buffer + 16);
	memcpy(buffer + 16 + lastLen, buffer + lastLen, 16 - lastLen);
	AES_Decrypt(Ctx, buffer + 16, 16, buffer2);
	_XOR16B(buffer2, Ct + 16*(blockCount - 2));
	memcpy(Pt, buffer2, 16);
	memcpy(Pt + 16, buffer, lastLen);

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0xf, %rax
shrq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x68b7
movq -0x18(%rbp), %rax
andq $0xf, %rax
movq %rax, -0x78(%rbp)
jmp 0x68c2
movl $0x10, %eax
movq %rax, -0x78(%rbp)
jmp 0x68c2
movq -0x78(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x2, -0x28(%rbp)
jbe 0x68ee
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
subq $0x2, %rdx
shlq $0x4, %rdx
movq -0x20(%rbp), %rcx
callq 0x6690
movq -0x28(%rbp), %rax
subq $0x2, %rax
shlq $0x4, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x2100
leaq -0x50(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq $0x10, %rdx
callq 0x2170
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x70(%rbp), %rcx
movl $0x10, %edx
callq 0x64c0
movq -0x70(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x50(%rbp), %rsi
addq $0x10, %rsi
callq 0x6640
leaq -0x50(%rbp), %rdi
addq $0x10, %rdi
addq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
addq -0x30(%rbp), %rsi
movl $0x10, %edx
subq -0x30(%rbp), %rdx
callq 0x2170
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
addq $0x10, %rsi
leaq -0x70(%rbp), %rcx
movl $0x10, %edx
callq 0x64c0
leaq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rax
subq $0x2, %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x6640
movq -0x20(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x2170
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/auth.c
// Function: AuthKeyGen
void AuthKeyGen(const char *Password, unsigned char *Salt, unsigned int SaltLen, uint32_t IterationCount, unsigned char Key[16])
{
	sha256_ctx ctx;
	unsigned char digest[256/8];

	sha256_init(&ctx);
	sha256_update(&ctx, Salt, SaltLen);
	sha256_update(&ctx, (unsigned char *)Password, (unsigned int)strlen(Password));
	for (size_t i = 0; i < IterationCount - 1; ++i) {
		sha256_final(&ctx, digest);
		sha256_init(&ctx);
		sha256_update(&ctx, Salt, SaltLen);
		sha256_update(&ctx, digest, sizeof(digest));
	}

	sha256_final(&ctx, digest);
	memcpy(Key, digest, 0x10);

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x95a0
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0xc8(%rbp), %rdi
callq 0x9600
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20c0
movq -0x100(%rbp), %rsi
movl %eax, %edx
leaq -0xc8(%rbp), %rdi
callq 0x9600
movq $0x0, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movl -0x18(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x6ad2
leaq -0xf0(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x9710
leaq -0xc8(%rbp), %rdi
callq 0x95a0
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0xc8(%rbp), %rdi
callq 0x9600
leaq -0xf0(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
movl $0x20, %edx
callq 0x9600
movq -0xf8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
jmp 0x6a60
leaq -0xf0(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x9710
movq -0x20(%rbp), %rax
movq -0xf0(%rbp), %rcx
movq %rcx, (%rax)
movq -0xe8(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/auth.c
// Function: increment16
static void _increment16(unsigned char Block[16])
{
	unsigned char *b = Block + 16;

	do {
		--b;
		++*b;
	} while (b != Block && *b == 0);

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb (%rax), %cl
addb $0x1, %cl
movb %cl, (%rax)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x11(%rbp)
je 0x705a
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x7024
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/logging.c
// Function: LogMsg
void LogMsg(uint32_t Level, const char *Format, ...)
{
	va_list vs;
	char msg[4096];

	if (_loggingFlags & Level) {
		if (_logStream == NULL)
			_logStream = stderr;

		memset(msg, 0, sizeof(msg));
		va_start(vs, Format);
		vsnprintf(msg, sizeof(msg), Format, vs);
		fputs(msg, _logStream);
		fflush(_logStream);
		va_end(vs);
	}

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10e0, %rsp           # imm = 0x10E0
testb %al, %al
je 0x70b7
movaps %xmm0, -0x10b0(%rbp)
movaps %xmm1, -0x10a0(%rbp)
movaps %xmm2, -0x1090(%rbp)
movaps %xmm3, -0x1080(%rbp)
movaps %xmm4, -0x1070(%rbp)
movaps %xmm5, -0x1060(%rbp)
movaps %xmm6, -0x1050(%rbp)
movaps %xmm7, -0x1040(%rbp)
movq %r9, -0x10b8(%rbp)
movq %r8, -0x10c0(%rbp)
movq %rcx, -0x10c8(%rbp)
movq %rdx, -0x10d0(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl 0xc070(%rip), %eax      # 0x13150
andl -0x4(%rbp), %eax
cmpl $0x0, %eax
je 0x717a
cmpq $0x0, 0xc9c4(%rip)      # 0x13ab8
jne 0x7107
movq 0xbefb(%rip), %rax      # 0x12ff8
movq (%rax), %rax
movq %rax, 0xc9b1(%rip)      # 0x13ab8
leaq -0x1030(%rbp), %rdi
xorl %esi, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2100
leaq -0x30(%rbp), %rax
leaq -0x10e0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x1030(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movl $0x1000, %esi           # imm = 0x1000
callq 0x2070
leaq -0x1030(%rbp), %rdi
movq 0xc953(%rip), %rsi      # 0x13ab8
callq 0x20f0
movq 0xc947(%rip), %rdi      # 0x13ab8
callq 0x2190
leaq -0x30(%rbp), %rax
addq $0x10e0, %rsp           # imm = 0x10E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/logging.c
// Function: LogSetFile
int LogSetFile(const char *FileName)
{
	int ret = 0;

	_logStream = fopen(FileName, "wb");
	if (_logStream == NULL)
		ret = errno;

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x909c(%rip), %rsi      # 0x1024a
callq 0x21f0
movq %rax, 0xc8fe(%rip)      # 0x13ab8
cmpq $0x0, 0xc8f6(%rip)      # 0x13ab8
jne 0x71ce
callq 0x2050
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/netpipe.c
// Function: recv_fixed
static int _recv_fixed(SOCKET Socket, void *Buffer, size_t Length, int Flags)
{
	int ret = 0;

	if ((size_t)recv(Socket, Buffer, Length, Flags) != Length) {
		ret = errno;
		if (ret == 0)
			ret = EINTR;
	}

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x2040
cmpq -0x18(%rbp), %rax
je 0x8f1f
callq 0x2050
movl (%rax), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x8f1d
movl $0x4, -0x20(%rbp)
jmp 0x8f1f
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/netpipe.c
// Function: StreamData
static int _StreamData(SOCKET Source, SOCKET Dest, uint32_t Flags)
{
	int ret = 0;
	ssize_t len = 0;
	char dataBuffer[4096];

	do {
		len = recv(Source, dataBuffer, sizeof(dataBuffer), 0);
		if (len > 0) {
			LogPacket("<<< %zu bytes received", len);
			len = send(Dest, dataBuffer, len, 0);
			if (len >= 0)
				LogPacket(">>> %zu bytes sent", len);
		}

		if (len == -1)
			ret = -1;
	} while (len > 0);

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1020, %rsp           # imm = 0x1020
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl -0x4(%rbp), %edi
leaq -0x1020(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
xorl %ecx, %ecx
callq 0x2040
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jle 0x8fda
callq 0x2090
movl %eax, %edx
movq -0x18(%rbp), %rcx
addq $0x0, %rcx
movl $0x8, %edi
leaq 0x7fea(%rip), %rsi      # 0x10f79
movb $0x0, %al
callq 0x7070
movl -0x8(%rbp), %edi
leaq -0x1020(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x20d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jl 0x8fd8
callq 0x2090
movl %eax, %edx
movq -0x18(%rbp), %rcx
addq $0x0, %rcx
movl $0x8, %edi
leaq 0x7fc6(%rip), %rsi      # 0x10f97
movb $0x0, %al
callq 0x7070
jmp 0x8fda
cmpq $-0x1, -0x18(%rbp)
jne 0x8fe8
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
jmp 0x8fea
cmpq $0x0, -0x18(%rbp)
jg 0x8f53
movl -0x10(%rbp), %eax
addq $0x1020, %rsp           # imm = 0x1020
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/randomness.c
// Function: RandomBuffer
int RandomBuffer(void *Buffer, uint32_t Size)
{
	int ret = 0;
#ifdef _WIN32
	HCRYPTPROV hCryptProv = 0;

	if (CryptAcquireContextW(&hCryptProv, NULL, L"Microsoft Base Cryptographic Provider v1.0", PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
		if (!CryptGenRandom(hCryptProv, Size, Buffer))
			ret = GetLastError();

		CryptReleaseContext(hCryptProv, 0);
	} else ret = GetLastError();
#else
	FILE *f = NULL;

	f = fopen("/dev/urandom", "r");
	if (f == NULL) {
		ret = errno;
		goto Exit;
	}

	if (fread(Buffer, 1, Size, f) != Size)
		ret = errno;

	fclose(f);
Exit:
#endif
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
leaq 0x7f4c(%rip), %rdi      # 0x10fb1
leaq 0x7680(%rip), %rsi      # 0x106ec
callq 0x21f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x9088
callq 0x2050
movl (%rax), %eax
movl %eax, -0x10(%rbp)
jmp 0x90ba
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, %edx
movq -0x18(%rbp), %rcx
movl $0x1, %esi
callq 0x2060
movl -0xc(%rbp), %ecx
cmpq %rcx, %rax
je 0x90b1
callq 0x2050
movl (%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20a0
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/sha2.c
// Function: sha256_init
void sha256_init(sha256_ctx *ctx)
{
#ifndef UNROLL_LOOPS
    int i;
    for (i = 0; i < 8; i++) {
        ctx->h[i] = sha256_h0[i];
    }
#else
    ctx->h[0] = sha256_h0[0]; ctx->h[1] = sha256_h0[1];
    ctx->h[2] = sha256_h0[2]; ctx->h[3] = sha256_h0[3];
    ctx->h[4] = sha256_h0[4]; ctx->h[5] = sha256_h0[5];
    ctx->h[6] = sha256_h0[6]; ctx->h[7] = sha256_h0[7];
#endif /* !UNROLL_LOOPS */

    ctx->len = 0;
    ctx->tot_len = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x8, -0xc(%rbp)
jge 0x95dd
movslq -0xc(%rbp), %rcx
leaq 0xa0d0(%rip), %rax      # 0x13690
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl %edx, 0x88(%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x95af
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/sha2.c
// Function: sha256_update
void sha256_update(sha256_ctx *ctx, const unsigned char *message,
                   unsigned int len)
{
    unsigned int block_nb;
    unsigned int new_len, rem_len, tmp_len;
    const unsigned char *shifted_message;

    tmp_len = SHA256_BLOCK_SIZE - ctx->len;
    rem_len = len < tmp_len ? len : tmp_len;

    memcpy(&ctx->block[ctx->len], message, rem_len);

    if (ctx->len + len < SHA256_BLOCK_SIZE) {
        ctx->len += len;
        return;
    }

    new_len = len - rem_len;
    block_nb = new_len / SHA256_BLOCK_SIZE;

    shifted_message = message + rem_len;

    sha256_transf(ctx, ctx->block, 1);
    sha256_transf(ctx, shifted_message, block_nb);

    rem_len = new_len % SHA256_BLOCK_SIZE;

    memcpy(ctx->block, &shifted_message[block_nb << 6],
           rem_len);

    ctx->len = rem_len;
    ctx->tot_len += (block_nb + 1) << 6;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rcx
movl $0x40, %eax
subl 0x4(%rcx), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x9632
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x9638
movl -0x24(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x20(%rbp), %eax
movl %eax, %edx
callq 0x2170
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x14(%rbp), %eax
cmpl $0x40, %eax
jae 0x967f
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x970a
movl -0x14(%rbp), %eax
subl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
movl $0x1, %edx
callq 0x90d0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0x90d0
movl -0x1c(%rbp), %eax
andl $0x3f, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %eax
shll $0x6, %eax
movl %eax, %eax
addq %rax, %rsi
movl -0x20(%rbp), %eax
movl %eax, %edx
callq 0x2170
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x18(%rbp), %ecx
addl $0x1, %ecx
shll $0x6, %ecx
movq -0x8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/sha2.c
// Function: sha512_init
void sha512_init(sha512_ctx *ctx)
{
#ifndef UNROLL_LOOPS
    int i;
    for (i = 0; i < 8; i++) {
        ctx->h[i] = sha512_h0[i];
    }
#else
    ctx->h[0] = sha512_h0[0]; ctx->h[1] = sha512_h0[1];
    ctx->h[2] = sha512_h0[2]; ctx->h[3] = sha512_h0[3];
    ctx->h[4] = sha512_h0[4]; ctx->h[5] = sha512_h0[5];
    ctx->h[6] = sha512_h0[6]; ctx->h[7] = sha512_h0[7];
#endif /* !UNROLL_LOOPS */

    ctx->len = 0;
    ctx->tot_len = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x8, -0xc(%rbp)
jge 0x9eaf
movslq -0xc(%rbp), %rcx
leaq 0x9860(%rip), %rax      # 0x136f0
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, 0x108(%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9e7f
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/sha2.c
// Function: sha512_update
void sha512_update(sha512_ctx *ctx, const unsigned char *message,
                   unsigned int len)
{
    unsigned int block_nb;
    unsigned int new_len, rem_len, tmp_len;
    const unsigned char *shifted_message;

    tmp_len = SHA512_BLOCK_SIZE - ctx->len;
    rem_len = len < tmp_len ? len : tmp_len;

    memcpy(&ctx->block[ctx->len], message, rem_len);

    if (ctx->len + len < SHA512_BLOCK_SIZE) {
        ctx->len += len;
        return;
    }

    new_len = len - rem_len;
    block_nb = new_len / SHA512_BLOCK_SIZE;

    shifted_message = message + rem_len;

    sha512_transf(ctx, ctx->block, 1);
    sha512_transf(ctx, shifted_message, block_nb);

    rem_len = new_len % SHA512_BLOCK_SIZE;

    memcpy(ctx->block, &shifted_message[block_nb << 7],
           rem_len);

    ctx->len = rem_len;
    ctx->tot_len += (block_nb + 1) << 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rcx
movl $0x80, %eax
subl 0x4(%rcx), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x9f02
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x9f08
movl -0x24(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x20(%rbp), %eax
movl %eax, %edx
callq 0x2170
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x14(%rbp), %eax
cmpl $0x80, %eax
jae 0x9f51
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x9fdc
movl -0x14(%rbp), %eax
subl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0x7, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
movl $0x1, %edx
callq 0x98b0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0x98b0
movl -0x1c(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %eax
shll $0x7, %eax
movl %eax, %eax
addq %rax, %rsi
movl -0x20(%rbp), %eax
movl %eax, %edx
callq 0x2170
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x18(%rbp), %ecx
addl $0x1, %ecx
shll $0x7, %ecx
movq -0x8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/sha2.c
// Function: sha384_init
void sha384_init(sha384_ctx *ctx)
{
#ifndef UNROLL_LOOPS
    int i;
    for (i = 0; i < 8; i++) {
        ctx->h[i] = sha384_h0[i];
    }
#else
    ctx->h[0] = sha384_h0[0]; ctx->h[1] = sha384_h0[1];
    ctx->h[2] = sha384_h0[2]; ctx->h[3] = sha384_h0[3];
    ctx->h[4] = sha384_h0[4]; ctx->h[5] = sha384_h0[5];
    ctx->h[6] = sha384_h0[6]; ctx->h[7] = sha384_h0[7];
#endif /* !UNROLL_LOOPS */

    ctx->len = 0;
    ctx->tot_len = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x8, -0xc(%rbp)
jge 0xa2bf
movslq -0xc(%rbp), %rcx
leaq 0x9410(%rip), %rax      # 0x136b0
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, 0x108(%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa28f
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/sha2.c
// Function: sha384_update
void sha384_update(sha384_ctx *ctx, const unsigned char *message,
                   unsigned int len)
{
    unsigned int block_nb;
    unsigned int new_len, rem_len, tmp_len;
    const unsigned char *shifted_message;

    tmp_len = SHA384_BLOCK_SIZE - ctx->len;
    rem_len = len < tmp_len ? len : tmp_len;

    memcpy(&ctx->block[ctx->len], message, rem_len);

    if (ctx->len + len < SHA384_BLOCK_SIZE) {
        ctx->len += len;
        return;
    }

    new_len = len - rem_len;
    block_nb = new_len / SHA384_BLOCK_SIZE;

    shifted_message = message + rem_len;

    sha512_transf(ctx, ctx->block, 1);
    sha512_transf(ctx, shifted_message, block_nb);

    rem_len = new_len % SHA384_BLOCK_SIZE;

    memcpy(ctx->block, &shifted_message[block_nb << 7],
           rem_len);

    ctx->len = rem_len;
    ctx->tot_len += (block_nb + 1) << 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rcx
movl $0x80, %eax
subl 0x4(%rcx), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xa312
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xa318
movl -0x24(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x20(%rbp), %eax
movl %eax, %edx
callq 0x2170
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x14(%rbp), %eax
cmpl $0x80, %eax
jae 0xa361
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0xa3ec
movl -0x14(%rbp), %eax
subl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0x7, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
movl $0x1, %edx
callq 0x98b0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0x98b0
movl -0x1c(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %eax
shll $0x7, %eax
movl %eax, %eax
addq %rax, %rsi
movl -0x20(%rbp), %eax
movl %eax, %edx
callq 0x2170
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x18(%rbp), %ecx
addl $0x1, %ecx
shll $0x7, %ecx
movq -0x8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/sha2.c
// Function: sha224_init
void sha224_init(sha224_ctx *ctx)
{
#ifndef UNROLL_LOOPS
    int i;
    for (i = 0; i < 8; i++) {
        ctx->h[i] = sha224_h0[i];
    }
#else
    ctx->h[0] = sha224_h0[0]; ctx->h[1] = sha224_h0[1];
    ctx->h[2] = sha224_h0[2]; ctx->h[3] = sha224_h0[3];
    ctx->h[4] = sha224_h0[4]; ctx->h[5] = sha224_h0[5];
    ctx->h[6] = sha224_h0[6]; ctx->h[7] = sha224_h0[7];
#endif /* !UNROLL_LOOPS */

    ctx->len = 0;
    ctx->tot_len = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x8, -0xc(%rbp)
jge 0xa6cd
movslq -0xc(%rbp), %rcx
leaq 0x8fc0(%rip), %rax      # 0x13670
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl %edx, 0x88(%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa69f
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MartinDrab[P]netpipe/utils.c
// Function: UtilsSetTimeouts
int UtilsSetTimeouts(SOCKET Socket, uint32_t Miliseconds)
{
	int ret = 0;
#ifdef _WIN32
	uint32_t timeout;
#else
	struct timeval timeout;
#endif

	memset(&timeout, 0, sizeof(timeout));
#ifdef _WIN32
	timeout = Miliseconds;
#else
	timeout.tv_sec = Miliseconds / 1000;
	timeout.tv_usec = (Miliseconds * 1000) % 1000000;
#endif
	ret = setsockopt(Socket, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout));
	if (ret != 0) {
		ret = errno;
		goto Exit;
	}

	ret = setsockopt(Socket, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout, sizeof(timeout));
	if (ret != 0) {
		ret = errno;
		goto Exit;
	}

Exit:
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x2100
movl -0x8(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divl %ecx
movl %eax, %eax
movq %rax, -0x20(%rbp)
imull $0x3e8, -0x8(%rbp), %eax # imm = 0x3E8
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divl %ecx
movl %edx, %eax
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %edi
movl $0x1, %esi
movl $0x14, %edx
leaq -0x20(%rbp), %rcx
movl $0x10, %r8d
callq 0x2080
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xaa1e
callq 0x2050
movl (%rax), %eax
movl %eax, -0xc(%rbp)
jmp 0xaa51
movl -0x4(%rbp), %edi
movl $0x1, %esi
movl $0x15, %edx
leaq -0x20(%rbp), %rcx
movl $0x10, %r8d
callq 0x2080
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xaa4f
callq 0x2050
movl (%rax), %eax
movl %eax, -0xc(%rbp)
jmp 0xaa51
jmp 0xaa51
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Sigabort42[P]WoodyWoodPacker/main.c
// Function: run
int	run(char *file, char *payload, char *name)
{
  t_env		env;
  int		r;
  
  env.name_output = ft_strdup(name);
  if ((env.fd = open(file, O_RDWR)) < 0)
    return (1);
  if (fstat(env.fd, &env.buf) < 0)
    return (2);
  if ((env.ptr = mmap(0, env.buf.st_size, PROT_READ | PROT_WRITE,
  MAP_PRIVATE, env.fd, 0)) == MAP_FAILED)
    return (3);
  if (ft_strcmp(payload, ""))
    {
      if ((env.fd2 = open(payload, O_RDWR)) < 0)
	return (4);
      if (fstat(env.fd2, &env.buf_payload) < 0)
	return (5);
      if ((env.ptr_payload = mmap(0, env.buf_payload.st_size,
      PROT_READ | PROT_WRITE, MAP_PRIVATE, env.fd2, 0)) == MAP_FAILED)
	return (6);
    }
  r = woody(&env);
  if (munmap(env.ptr, env.buf.st_size) < 0)
    return (7);
  return (r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x6fc0
movq %rax, -0x190(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
movb $0x0, %al
callq 0x10c0
movl %eax, -0x28(%rbp)
cmpl $0x0, %eax
jge 0x122b
movl $0x1, -0x4(%rbp)
jmp 0x1364
movl -0x28(%rbp), %edi
leaq -0x190(%rbp), %rsi
addq $0x8, %rsi
callq 0x10d0
cmpl $0x0, %eax
jge 0x124f
movl $0x2, -0x4(%rbp)
jmp 0x1364
movq -0x158(%rbp), %rsi
movl -0x28(%rbp), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0x2, %ecx
movq %r9, %rdi
callq 0x1060
movq %rax, -0x68(%rbp)
movq $-0x1, %rcx
cmpq %rcx, %rax
jne 0x128d
movl $0x3, -0x4(%rbp)
jmp 0x1364
movq -0x18(%rbp), %rdi
leaq 0x8dc1(%rip), %rsi      # 0xa059
callq 0x6f20
cmpl $0x0, %eax
je 0x132b
movq -0x18(%rbp), %rdi
movl $0x2, %esi
movb $0x0, %al
callq 0x10c0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jge 0x12ca
movl $0x4, -0x4(%rbp)
jmp 0x1364
movl -0x24(%rbp), %edi
leaq -0x190(%rbp), %rsi
addq $0x98, %rsi
callq 0x10d0
cmpl $0x0, %eax
jge 0x12ee
movl $0x5, -0x4(%rbp)
jmp 0x1364
movq -0xc8(%rbp), %rsi
movl -0x24(%rbp), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0x2, %ecx
movq %r9, %rdi
callq 0x1060
movq %rax, -0x60(%rbp)
movq $-0x1, %rcx
cmpq %rcx, %rax
jne 0x1329
movl $0x6, -0x4(%rbp)
jmp 0x1364
jmp 0x132b
leaq -0x190(%rbp), %rdi
callq 0x16b0
movl %eax, -0x194(%rbp)
movq -0x68(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x10b0
cmpl $0x0, %eax
jge 0x135b
movl $0x7, -0x4(%rbp)
jmp 0x1364
movl -0x194(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Sigabort42[P]WoodyWoodPacker/main.c
// Function: main
int	main(int ac, char **av)
{	
  if (ac < 2)
    {
      ft_printf("%s FILE [PAYLOAD] [NAME OUTPUT]", av[0]);
      return (1);
    }
  else if (ac > 3)
    return run(av[1], av[2], av[3]);
  else if (ac > 2)
    return run(av[1], av[2], "woody");
  else
    return run(av[1], "", "woody");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x13aa
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x8c6a(%rip), %rdi      # 0xa004
movb $0x0, %al
callq 0x2120
movl $0x1, -0x4(%rbp)
jmp 0x1417
cmpl $0x3, -0x8(%rbp)
jle 0x13d2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x11e0
movl %eax, -0x4(%rbp)
jmp 0x1417
cmpl $0x2, -0x8(%rbp)
jle 0x13f9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x8c35(%rip), %rdx      # 0xa024
callq 0x11e0
movl %eax, -0x4(%rbp)
jmp 0x1417
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x8c51(%rip), %rsi      # 0xa059
leaq 0x8c15(%rip), %rdx      # 0xa024
callq 0x11e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Sigabort42[P]WoodyWoodPacker/woody.c
// Function: find_section
Elf64_Shdr      *find_section(void *data, char *name)
{
  char		*sname;
  int		i;
  Elf64_Ehdr	*elf_hdr;
  Elf64_Shdr	*shdr;
  Elf64_Shdr	*sh_strtab;
  char		*sh_strtab_p;
  
  elf_hdr = (Elf64_Ehdr *)data;
  shdr = (Elf64_Shdr *)(data + elf_hdr->e_shoff);
  sh_strtab = &shdr[elf_hdr->e_shstrndx];
  sh_strtab_p = data + sh_strtab->sh_offset;
  ft_printf ("+ %d section in file. Looking for section '%s'\n", elf_hdr->e_shnum, name);
  for (i = 0; i < elf_hdr->e_shnum; i++)
    {
      sname = (char*) (sh_strtab_p + shdr[i].sh_name);
      if (!strcmp (sname, name))
	  return &shdr[i];
    }

  return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
addq 0x28(%rcx), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movzwl 0x3e(%rcx), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq 0x18(%rcx), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movzwl 0x3c(%rax), %esi
movq -0x18(%rbp), %rdx
leaq 0x8b58(%rip), %rdi      # 0xa02a
movb $0x0, %al
callq 0x2120
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x30(%rbp), %rcx
movzwl 0x3c(%rcx), %ecx
cmpl %ecx, %eax
jge 0x153f
movq -0x48(%rbp), %rax
movq -0x38(%rbp), %rcx
movslq -0x24(%rbp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1080
cmpl $0x0, %eax
jne 0x1532
movq -0x38(%rbp), %rax
movslq -0x24(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x1547
jmp 0x1534
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x14e0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Sigabort42[P]WoodyWoodPacker/woody.c
// Function: packing64
int	packing64(t_env *env)
{
  Elf64_Phdr    *seg;
  int           i;

  i = 0;
  seg = (Elf64_Phdr*)((char*)env->ptr + (unsigned int)env->elf64->e_phoff);
  env->old_vaddr64 = env->elf64->e_entry;
  while (i < env->elf64->e_phnum)
    {
      if (seg->p_type == PT_LOAD && seg->p_flags & PF_W)
	break;
      seg = (Elf64_Phdr*)((char*)seg + (unsigned int) env->elf64->e_phentsize);
      i++;
    }
  env->sec64 = find_section(env->ptr_payload, ".text");
  //  xor_block (env->ptr + env->sec64->sh_offset, env->sec64->sh_size);
  if ((i = inject(env)) != 0)
    return (i);
  ft_printf("++ FILE CREATED: %s\n++ KEY: %s\n", key, env->name_output);
  return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x138(%rcx), %rcx
movq 0x20(%rcx), %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x148(%rax)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x138(%rcx), %rcx
movzwl 0x38(%rcx), %ecx
cmpl %ecx, %eax
jge 0x1637
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x1610
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1610
jmp 0x1637
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x138(%rcx), %rcx
movzwl 0x36(%rcx), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x15e0
movq -0x10(%rbp), %rax
movq 0x130(%rax), %rdi
leaq 0x8a23(%rip), %rsi      # 0xa06c
callq 0x1470
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x140(%rax)
movq -0x10(%rbp), %rdi
callq 0x1ba0
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x1675
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1698
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x89ef(%rip), %rdi      # 0xa072
leaq 0xb9f6(%rip), %rsi      # 0xd080
movb $0x0, %al
callq 0x2120
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Sigabort42[P]WoodyWoodPacker/woody.c
// Function: woody
int     woody(t_env *env)
{
  env->elf64 = (Elf64_Ehdr*)env->ptr;
  if (env->elf64->e_ident[0] == ELFMAG0 &&
      env->elf64->e_ident[1] == ELFMAG1 &&
      env->elf64->e_ident[2] == ELFMAG2 &&
      env->elf64->e_ident[3] == ELFMAG3 &&
      env->elf64->e_type == ET_EXEC)
    {
      if (env->elf64->e_ident[EI_CLASS] == ELFCLASS64)
	return packing64(env);
      else if (env->elf64->e_ident[EI_CLASS] == ELFCLASS32)
	return packing32(env);
    }
  else
    {
      ft_printf("%s\n", "Error: File is not ELF Executable or PIE activate");
      return (-1);
    }
  return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x138(%rax)
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
movzbl (%rax), %eax
cmpl $0x7f, %eax
jne 0x1785
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
movzbl 0x1(%rax), %eax
cmpl $0x45, %eax
jne 0x1785
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
movzbl 0x2(%rax), %eax
cmpl $0x4c, %eax
jne 0x1785
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
movzbl 0x3(%rax), %eax
cmpl $0x46, %eax
jne 0x1785
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
movzwl 0x10(%rax), %eax
cmpl $0x2, %eax
jne 0x1785
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
movzbl 0x4(%rax), %eax
cmpl $0x2, %eax
jne 0x175f
movq -0x10(%rbp), %rdi
callq 0x1590
movl %eax, -0x4(%rbp)
jmp 0x17aa
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
movzbl 0x4(%rax), %eax
cmpl $0x1, %eax
jne 0x1781
movq -0x10(%rbp), %rdi
callq 0x1560
movl %eax, -0x4(%rbp)
jmp 0x17aa
jmp 0x1783
jmp 0x17a3
leaq 0x8902(%rip), %rdi      # 0xa08e
leaq 0x88ff(%rip), %rsi      # 0xa092
movb $0x0, %al
callq 0x2120
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17aa
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Sigabort42[P]WoodyWoodPacker/inject.c
// Function: infect_section
void		infect_section(t_env *env, Elf64_Addr text_end,
			       Elf64_Addr payload_vaddr)
{
  Elf64_Shdr* shdr;
  int		payload_len;

  payload_len = env->sec64->sh_size;
  shdr = (Elf64_Shdr*) (env->ptr + env->elf64->e_shoff);
  env->elf64->e_shoff += PAGE_SZ64;
  for(int i=0; i < env->elf64->e_shnum; i++)
    {
      if(shdr[i].sh_offset > text_end)
	shdr[i].sh_offset += PAGE_SZ64;       
      else if(shdr[i].sh_addr + shdr[i].sh_size == payload_vaddr)
	shdr[i].sh_size += payload_len;
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x140(%rax), %rax
movq 0x20(%rax), %rax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x138(%rcx), %rcx
addq 0x28(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rax
movq 0x28(%rax), %rcx
addq $0x2000, %rcx           # imm = 0x2000
movq %rcx, 0x28(%rax)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x138(%rcx), %rcx
movzwl 0x3c(%rcx), %ecx
cmpl %ecx, %eax
jge 0x18cd
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
cmpq -0x10(%rbp), %rax
jbe 0x1874
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rcx
addq $0x2000, %rcx           # imm = 0x2000
movq %rcx, 0x18(%rax)
jmp 0x18bd
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movslq -0x28(%rbp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
addq 0x20(%rcx), %rax
cmpq -0x18(%rbp), %rax
jne 0x18bb
movslq -0x24(%rbp), %rcx
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rdx
shlq $0x6, %rdx
addq %rdx, %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
jmp 0x18bd
jmp 0x18bf
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1821
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Sigabort42[P]WoodyWoodPacker/inject.c
// Function: infect_segment
Elf64_Addr	infect_segment(t_env *env, Elf64_Addr *text_end)
{
  Elf64_Phdr	*phdr;
  Elf64_Addr	payload_vaddr;
  int		payload_len;

  payload_vaddr = 0;
  payload_len = env->sec64->sh_size;
  phdr = (Elf64_Phdr*) (env->ptr + env->elf64->e_phoff);
  for(int i=0; i < env->elf64->e_phnum; i++)
    {
      if(phdr[i].p_type == PT_LOAD && phdr[i].p_flags == (PF_R | PF_X))
	{
	  *text_end = phdr[i].p_offset + phdr[i].p_filesz;
	  payload_vaddr = phdr[i].p_vaddr + phdr[i].p_filesz;
	  env->elf64->e_entry = payload_vaddr;
	  phdr[i].p_filesz += payload_len;
	  phdr[i].p_memsz += payload_len;
	  for(int j=i+1; j < env->elf64->e_phnum; j++)
	    phdr[j].p_offset += PAGE_SZ64;
	  break;
	}
    }
  return (payload_vaddr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x140(%rax), %rax
movq 0x20(%rax), %rax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x138(%rcx), %rcx
addq 0x20(%rcx), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x138(%rcx), %rcx
movzwl 0x38(%rcx), %ecx
cmpl %ecx, %eax
jge 0x1a60
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x1a50
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x5, 0x4(%rax)
jne 0x1a50
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rdx
imulq $0x38, %rdx, %rdx
addq %rdx, %rax
addq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x28(%rbp), %rdx
imulq $0x38, %rdx, %rdx
addq %rdx, %rcx
addq 0x20(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rax
movq %rcx, 0x18(%rax)
movslq -0x24(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rdx
imulq $0x38, %rdx, %rdx
addq %rdx, %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
movslq -0x24(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rdx
imulq $0x38, %rdx, %rdx
addq %rdx, %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x138(%rcx), %rcx
movzwl 0x38(%rcx), %ecx
cmpl %ecx, %eax
jge 0x1a4e
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
addq $0x2000, %rcx           # imm = 0x2000
movq %rcx, 0x8(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1a0f
jmp 0x1a60
jmp 0x1a52
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x191b
movq -0x20(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)