user: Converte this assembly snippet into its equivalent C code:

```asm
<InitialiseEncryptionComponents>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  lea    D56(%rip),%r13
  push   %r12
  lea    D87(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rsi,0x30(%rsp)
  mov    0xa0(%rsp),%rax
  lea    0x50(%rsp),%r14
  mov    %r13,%rsi
  mov    %rdx,0x8(%rsp)
  lea    0x48(%rsp),%rbx
  mov    %r12,%rdx
  mov    %rcx,0x18(%rsp)
  mov    %r8,0x20(%rsp)
  mov    %r14,%r8
  mov    %r9,0x28(%rsp)
  mov    %rax,0x38(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  movl   $0x0,(%rcx)
  mov    %rbx,%rcx
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x48(%rsp)
  movq   $0x0,0x50(%rsp)
  call   <GetNameValuePair@plt>
  test   %rax,%rax
  je     L121
  movl   $0x0,0x14(%rsp)
  mov    %rax,%rbp
  xor    %r15d,%r15d
  movl   $0x0,0x10(%rsp)
  jmp    L40
  nopl   0x0(%rax,%rax,1)
L147:
  mov    %rbp,%rdi
  mov    %r14,%r8
  mov    %rbx,%rcx
  mov    %r12,%rdx
  mov    %r13,%rsi
  call   <GetNameValuePair@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L124
L40:
  mov    0x48(%rsp),%rdi
  test   %rdi,%rdi
  je     L147
  call   <strlen@plt>
  test   %eax,%eax
  je     L147
  mov    0x48(%rsp),%rdi
  lea    D38(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L45
L196:
  mov    0x48(%rsp),%rdi
  lea    D78(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L141
L135:
  mov    0x48(%rsp),%rdi
  lea    D127(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L228
L245:
  mov    0x48(%rsp),%rdi
  lea    D76(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L229
  mov    0x48(%rsp),%rdi
  lea    D96(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L175
L229:
  mov    0x8(%rsp),%rax
  mov    0x50(%rsp),%rsi
  mov    (%rax),%rdi
  call   <CopyStr@plt>
  mov    %rax,%rdi
  mov    0x8(%rsp),%rax
  mov    %rdi,(%rax)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L153
  call   <strlen@plt>
L153:
  mov    0x18(%rsp),%rdx
  mov    %eax,(%rdx)
L175:
  mov    0x48(%rsp),%rdi
  lea    D7(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L242
L118:
  mov    0x48(%rsp),%rdi
  lea    D104(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L159
  mov    0x48(%rsp),%rdi
  lea    D63(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L29
L159:
  mov    0x50(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  call   <HexStrToBytes@plt>
  mov    0x18(%rsp),%rdx
  mov    %eax,(%rdx)
L29:
  mov    0x48(%rsp),%rdi
  lea    D93(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L147
  mov    0x50(%rsp),%rdi
  lea    D3(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L147
  mov    0x38(%rsp),%rax
  orl    $0x4,(%rax)
  jmp    L147
  nopw   0x0(%rax,%rax,1)
L124:
  mov    0x10(%rsp),%r12d
  movslq 0x14(%rsp),%rbx
  add    %ebx,%r12d
L126:
  xor    %edi,%edi
  mov    %r12d,%esi
  call   <SetStrLen@plt>
  mov    0x14(%rsp),%edx
  mov    %r15,%rsi
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <memcpy@plt>
  mov    0x10(%rsp),%edx
  mov    0x40(%rsp),%rsi
  lea    0x0(%rbp,%rbx,1),%rdi
  call   <memcpy@plt>
  mov    0x20(%rsp),%rdi
  xor    %r8d,%r8d
  mov    %r12d,%ecx
  mov    %rbp,%rdx
  lea    D6(%rip),%rsi
  call   <HashBytes@plt>
  mov    0x28(%rsp),%rbx
  mov    0x48(%rsp),%rdi
  mov    %eax,(%rbx)
  call   <DestroyString@plt>
  mov    0x50(%rsp),%rdi
  call   <DestroyString@plt>
  mov    %rbp,%rdi
  call   <DestroyString@plt>
  mov    0x40(%rsp),%rdi
  call   <DestroyString@plt>
  mov    %r15,%rdi
  call   <DestroyString@plt>
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L197
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L242:
  mov    0x50(%rsp),%rsi
  lea    0x40(%rsp),%rdi
  call   <HexStrToBytes@plt>
  mov    %eax,0x10(%rsp)
  jmp    L118
  nopl   0x0(%rax,%rax,1)
L228:
  mov    0x50(%rsp),%rsi
  mov    %r15,%rdi
  call   <CopyStr@plt>
  movl   $0x0,0x14(%rsp)
  mov    %rax,%r15
  test   %rax,%rax
  je     L245
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,0x14(%rsp)
  jmp    L245
  nopw   0x0(%rax,%rax,1)
L141:
  mov    0x40(%rsp),%rdi
  mov    0x50(%rsp),%rsi
  call   <CopyStr@plt>
  movl   $0x0,0x10(%rsp)
  mov    %rax,0x40(%rsp)
  mov    %rax,%rdi
  test   %rax,%rax
  je     L135
  call   <strlen@plt>
  mov    %eax,0x10(%rsp)
  jmp    L135
  xchg   %ax,%ax
L45:
  mov    0x30(%rsp),%rax
  mov    0x50(%rsp),%rsi
  mov    (%rax),%rdi
  call   <CopyStr@plt>
  mov    0x30(%rsp),%rcx
  mov    %rax,(%rcx)
  jmp    L196
  nop
L121:
  movl   $0x0,0x14(%rsp)
  xor    %r15d,%r15d
  xor    %ebx,%ebx
  xor    %r12d,%r12d
  movl   $0x0,0x10(%rsp)
  jmp    L126
L197:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D56
type_guessed: string
name: read_data
arguments: data_tag: D87
type_guessed: string
name: read_data
arguments: data_tag: D38
type_guessed: string
name: read_data
arguments: data_tag: D78
type_guessed: string
name: read_data
arguments: data_tag: D127
type_guessed: string
name: read_data
arguments: data_tag: D76
type_guessed: string
name: read_data
arguments: data_tag: D96
type_guessed: string
name: read_data
arguments: data_tag: D7
type_guessed: string
name: read_data
arguments: data_tag: D104
type_guessed: string
name: read_data
arguments: data_tag: D63
type_guessed: string
name: read_data
arguments: data_tag: D93
type_guessed: string
name: read_data
arguments: data_tag: D3
type_guessed: string
name: read_data
arguments: data_tag: D6
type_guessed: string

tool: D56: \S

tool: D87: =

tool: D38: Cipher

tool: D78: Key

tool: D127: Salt

tool: D76: iv

tool: D96: InputVector

tool: D7: HexKey

tool: D104: HexIV

tool: D63: HexInputVector

tool: D93: PadBlock

tool: D3: N

tool: D6: md5

assistant: ```c
void InitialiseEncryptionComponents(const char *Args, char **Cipher, char **InputVector, int *IVLen, char **Key, int *KeyLen, int *Flags) {
  char *TmpKey = NULL, *Tempstr = NULL;
  int klen = 0, slen = 0;
  char *Name = NULL, *Value = NULL, *ptr;
  char *Salt = NULL;
  *IVLen = 0;
  ptr = GetNameValuePair(Args, "\\S", "=", &Name, &Value);
  while (ptr) {
    if ((Name ? strlen(Name) : 0)) {
      if (strcasecmp(Name, "Cipher") == 0) {
        *Cipher = CopyStr(*Cipher, Value);
      }
      if (strcasecmp(Name, "Key") == 0) {
        TmpKey = CopyStr(TmpKey, Value);
        klen = (TmpKey ? strlen(TmpKey) : 0);
      }
      if (strcasecmp(Name, "Salt") == 0) {
        Salt = CopyStr(Salt, Value);
        slen = (Salt ? strlen(Salt) : 0);
      }
      if ((strcasecmp(Name, "iv") == 0) || (strcasecmp(Name, "InputVector") == 0)) {
        *InputVector = CopyStr(*InputVector, Value);
        *IVLen = (*InputVector ? strlen(*InputVector) : 0);
      }
      if (strcasecmp(Name, "HexKey") == 0) {
        klen = HexStrToBytes(&TmpKey, Value);
      }
      if ((strcasecmp(Name, "HexIV") == 0) || (strcasecmp(Name, "HexInputVector") == 0)) {
        *IVLen = HexStrToBytes(InputVector, Value);
      }
      if (strcasecmp(Name, "PadBlock") == 0) {
        if (strcasecmp(Value, "N") == 0)
          *Flags |= 4;
      }
    }
    ptr = GetNameValuePair(ptr, "\\S", "=", &Name, &Value);
  }
  Tempstr = SetStrLen(Tempstr, klen + slen);
  memcpy(Tempstr, Salt, slen);
  memcpy(Tempstr + slen, TmpKey, klen);
  *KeyLen = HashBytes(Key, "md5", Tempstr, slen + klen, 0);
  DestroyString(Name);
  DestroyString(Value);
  DestroyString(Tempstr);
  DestroyString(TmpKey);
  DestroyString(Salt);
}
```