
/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void __regparm3 smb_format_message(connectdata *conn,smb_header *h,uchar cmd,size_t len)

{
  void *pvVar1;
  __pid_t _Var2;
  uint uVar3;
  undefined4 *puVar4;
  
  puVar4 = (undefined4 *)((uint)h->magic & 0xfffffffc);
  pvVar1 = (conn->data->req).protop;
  h->nbt_type = '\0';
  h->nbt_flags = '\0';
  h->nbt_length = 0;
  h->uid = 0;
  h->mid = 0;
  uVar3 = (uint)((int)h + (0x24 - (int)puVar4)) >> 2;
  for (; uVar3 != 0; uVar3 = uVar3 - 1) {
    *puVar4 = 0;
    puVar4 = puVar4 + 1;
  }
  h->magic[0] = 0xff;
  h->magic[1] = 'S';
  h->magic[2] = 'M';
  h->magic[3] = 'B';
  h->flags = '\x18';
  h->nbt_length = ((short)len + 0x20U) * 0x100 | (ushort)((short)len + 0x20U) >> 8;
  h->command = cmd;
  h->flags2 = 0x41;
  h->uid = (conn->proto).smbc.uid;
  h->tid = *(ushort *)((int)pvVar1 + 8);
  _Var2 = getpid();
  h->pid = (ushort)_Var2;
  h->pid_high = (ushort)((uint)_Var2 >> 0x10);
  return;
}



void FUN_00065040(short param_1)

{
  int iVar1;
  __pid_t _Var2;
  undefined1 extraout_CL;
  uint uVar3;
  undefined4 *puVar4;
  undefined4 *puVar5;
  byte bVar6;
  undefined8 uVar7;
  
  bVar6 = 0;
  uVar7 = FUN_0001e6b4();
  puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);
  iVar1 = *(int *)(*(int *)uVar7 + 0x148);
  *puVar4 = 0;
  puVar4[8] = 0;
  puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);
  for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;
      uVar3 != 0; uVar3 = uVar3 - 1) {
    *puVar5 = 0;
    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;
  }
  puVar4[1] = 0x424d53ff;
  *(undefined1 *)((int)puVar4 + 0xd) = 0x18;
  *(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;
  *(undefined1 *)(puVar4 + 2) = extraout_CL;
  *(undefined2 *)((int)puVar4 + 0xe) = 0x41;
  *(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];
  *(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);
  _Var2 = getpid();
  *(short *)((int)puVar4 + 0x1e) = (short)_Var2;
  *(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);
  return;
}


PUSH EBP
CALL 0x0001e6b4
ADD EBP,0x4b79a
PUSH EDI
PUSH ESI
MOV ESI,EDX
PUSH EBX
MOV EBX,EAX
LEA EDI,[ESI + 0x4]
AND EDI,0xfffffffc
SUB ESP,0x1c
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESP + 0xc],ECX
MOV EDX,dword ptr [EAX + 0x148]
MOV EAX,ESI
MOV dword ptr [ESI],0x0
SUB EAX,EDI
MOV dword ptr [ESI + 0x20],0x0
MOV ECX,EAX
XOR EAX,EAX
ADD ECX,0x24
SHR ECX,0x2
STOSD.REP ES:EDI
MOV dword ptr [ESI + 0x4],0x424d53ff
MOV byte ptr [ESI + 0xd],0x18
MOVZX EAX,word ptr [ESP + 0x30]
ADD EAX,0x20
ROL AX,0x8
MOV word ptr [ESI + 0x2],AX
MOVZX EAX,byte ptr [ESP + 0xc]
MOV byte ptr [ESI + 0x8],AL
MOV EAX,0x41
MOV word ptr [ESI + 0xe],AX
MOVZX EAX,word ptr [EBX + 0x4c0]
MOV EBX,EBP
MOV word ptr [ESI + 0x20],AX
MOVZX EAX,word ptr [EDX + 0x8]
MOV word ptr [ESI + 0x1c],AX
CALL 0x00018610
MOV EDX,EAX
MOV word ptr [ESI + 0x1e],AX
SHR EDX,0x10
MOV word ptr [ESI + 0x10],DX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "void FUN_00065040(short param_1)\n\n{\n  int iVar1;\n  __pid_t _Var2;\n  undefined1 extraout_CL;\n  uint uVar3;\n  undefined4 *puVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  undefined8 uVar7;\n  \n  bVar6 = 0;\n  uVar7 = FUN_0001e6b4();\n  puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);\n  iVar1 = *(int *)(*(int *)uVar7 + 0x148);\n  *puVar4 = 0;\n  puVar4[8] = 0;\n  puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);\n  for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;\n      uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }\n  puVar4[1] = 0x424d53ff;\n  *(undefined1 *)((int)puVar4 + 0xd) = 0x18;\n  *(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;\n  *(undefined1 *)(puVar4 + 2) = extraout_CL;\n  *(undefined2 *)((int)puVar4 + 0xe) = 0x41;\n  *(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];\n  *(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);\n  _Var2 = getpid();\n  *(short *)((int)puVar4 + 0x1e) = (short)_Var2;\n  *(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);\n  return;\n}\n\n" (function_definition "void FUN_00065040(short param_1)\n\n{\n  int iVar1;\n  __pid_t _Var2;\n  undefined1 extraout_CL;\n  uint uVar3;\n  undefined4 *puVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  undefined8 uVar7;\n  \n  bVar6 = 0;\n  uVar7 = FUN_0001e6b4();\n  puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);\n  iVar1 = *(int *)(*(int *)uVar7 + 0x148);\n  *puVar4 = 0;\n  puVar4[8] = 0;\n  puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);\n  for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;\n      uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }\n  puVar4[1] = 0x424d53ff;\n  *(undefined1 *)((int)puVar4 + 0xd) = 0x18;\n  *(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;\n  *(undefined1 *)(puVar4 + 2) = extraout_CL;\n  *(undefined2 *)((int)puVar4 + 0xe) = 0x41;\n  *(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];\n  *(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);\n  _Var2 = getpid();\n  *(short *)((int)puVar4 + 0x1e) = (short)_Var2;\n  *(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);\n  return;\n}" primitive_type (function_declarator "FUN_00065040(short param_1)" identifier (parameter_list "(short param_1)" ( (parameter_declaration "short param_1" (sized_type_specifier "short" short) identifier) ))) (compound_statement "{\n  int iVar1;\n  __pid_t _Var2;\n  undefined1 extraout_CL;\n  uint uVar3;\n  undefined4 *puVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  undefined8 uVar7;\n  \n  bVar6 = 0;\n  uVar7 = FUN_0001e6b4();\n  puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);\n  iVar1 = *(int *)(*(int *)uVar7 + 0x148);\n  *puVar4 = 0;\n  puVar4[8] = 0;\n  puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);\n  for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;\n      uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }\n  puVar4[1] = 0x424d53ff;\n  *(undefined1 *)((int)puVar4 + 0xd) = 0x18;\n  *(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;\n  *(undefined1 *)(puVar4 + 2) = extraout_CL;\n  *(undefined2 *)((int)puVar4 + 0xe) = 0x41;\n  *(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];\n  *(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);\n  _Var2 = getpid();\n  *(short *)((int)puVar4 + 0x1e) = (short)_Var2;\n  *(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "__pid_t _Var2;" type_identifier identifier ;) (declaration "undefined1 extraout_CL;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "byte bVar6;" type_identifier identifier ;) (declaration "undefined8 uVar7;" type_identifier identifier ;) (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" identifier = number_literal) ;) (expression_statement "uVar7 = FUN_0001e6b4();" (assignment_expression "uVar7 = FUN_0001e6b4()" identifier = (call_expression "FUN_0001e6b4()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);" (assignment_expression "puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20)" identifier = (cast_expression "(undefined4 *)((ulonglong)uVar7 >> 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulonglong)uVar7 >> 0x20)" ( (binary_expression "(ulonglong)uVar7 >> 0x20" (cast_expression "(ulonglong)uVar7" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "iVar1 = *(int *)(*(int *)uVar7 + 0x148);" (assignment_expression "iVar1 = *(int *)(*(int *)uVar7 + 0x148)" identifier = (pointer_expression "*(int *)(*(int *)uVar7 + 0x148)" * (cast_expression "(int *)(*(int *)uVar7 + 0x148)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)uVar7 + 0x148)" ( (binary_expression "*(int *)uVar7 + 0x148" (pointer_expression "*(int *)uVar7" * (cast_expression "(int *)uVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "puVar4[8] = 0;" (assignment_expression "puVar4[8] = 0" (subscript_expression "puVar4[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);" (assignment_expression "puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(puVar4 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar4 + 1) & 0xfffffffc" (call_expression "(uint)(puVar4 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar4 + 1)" ( (binary_expression "puVar4 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;\n      uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }" for ( (assignment_expression "uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2" identifier = (binary_expression "(uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc)))" ( (binary_expression "(int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))" ( (binary_expression "0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc)" number_literal - (cast_expression "(int)((uint)(puVar4 + 1) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(puVar4 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar4 + 1) & 0xfffffffc" (call_expression "(uint)(puVar4 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar4 + 1)" ( (binary_expression "puVar4 + 1" identifier + number_literal) ))) & number_literal) )))) ))) ))) >> number_literal)) ; (binary_expression "uVar3 != 0" identifier != number_literal) ; (assignment_expression "uVar3 = uVar3 - 1" identifier = (binary_expression "uVar3 - 1" identifier - number_literal)) ) (compound_statement "{\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }" { (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (expression_statement "puVar5 = puVar5 + (uint)bVar6 * -2 + 1;" (assignment_expression "puVar5 = puVar5 + (uint)bVar6 * -2 + 1" identifier = (binary_expression "puVar5 + (uint)bVar6 * -2 + 1" (binary_expression "puVar5 + (uint)bVar6 * -2" identifier + (binary_expression "(uint)bVar6 * -2" (cast_expression "(uint)bVar6" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "puVar4[1] = 0x424d53ff;" (assignment_expression "puVar4[1] = 0x424d53ff" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined1 *)((int)puVar4 + 0xd) = 0x18;" (assignment_expression "*(undefined1 *)((int)puVar4 + 0xd) = 0x18" (pointer_expression "*(undefined1 *)((int)puVar4 + 0xd)" * (cast_expression "(undefined1 *)((int)puVar4 + 0xd)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + 0xd)" ( (binary_expression "(int)puVar4 + 0xd" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;" (assignment_expression "*(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8" (pointer_expression "*(ushort *)((int)puVar4 + 2)" * (cast_expression "(ushort *)((int)puVar4 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + 2)" ( (binary_expression "(int)puVar4 + 2" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "(param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8" (binary_expression "(param_1 + 0x20U) * 0x100" (parenthesized_expression "(param_1 + 0x20U)" ( (binary_expression "param_1 + 0x20U" identifier + number_literal) )) * number_literal) | (binary_expression "(ushort)(param_1 + 0x20U) >> 8" (call_expression "(ushort)(param_1 + 0x20U)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(param_1 + 0x20U)" ( (binary_expression "param_1 + 0x20U" identifier + number_literal) ))) >> number_literal))) ;) (expression_statement "*(undefined1 *)(puVar4 + 2) = extraout_CL;" (assignment_expression "*(undefined1 *)(puVar4 + 2) = extraout_CL" (pointer_expression "*(undefined1 *)(puVar4 + 2)" * (cast_expression "(undefined1 *)(puVar4 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 2)" ( (binary_expression "puVar4 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined2 *)((int)puVar4 + 0xe) = 0x41;" (assignment_expression "*(undefined2 *)((int)puVar4 + 0xe) = 0x41" (pointer_expression "*(undefined2 *)((int)puVar4 + 0xe)" * (cast_expression "(undefined2 *)((int)puVar4 + 0xe)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + 0xe)" ( (binary_expression "(int)puVar4 + 0xe" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];" (assignment_expression "*(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130]" (pointer_expression "*(short *)(puVar4 + 8)" * (cast_expression "(short *)(puVar4 + 8)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 8)" ( (binary_expression "puVar4 + 8" identifier + number_literal) )))) = (cast_expression "(short)((int *)uVar7)[0x130]" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (subscript_expression "((int *)uVar7)[0x130]" (parenthesized_expression "((int *)uVar7)" ( (cast_expression "(int *)uVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )) [ number_literal ]))) ;) (expression_statement "*(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);" (assignment_expression "*(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8)" (pointer_expression "*(undefined2 *)(puVar4 + 7)" * (cast_expression "(undefined2 *)(puVar4 + 7)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 7)" ( (binary_expression "puVar4 + 7" identifier + number_literal) )))) = (pointer_expression "*(undefined2 *)(iVar1 + 8)" * (cast_expression "(undefined2 *)(iVar1 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) ))))) ;) (expression_statement "_Var2 = getpid();" (assignment_expression "_Var2 = getpid()" identifier = (call_expression "getpid()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(short *)((int)puVar4 + 0x1e) = (short)_Var2;" (assignment_expression "*(short *)((int)puVar4 + 0x1e) = (short)_Var2" (pointer_expression "*(short *)((int)puVar4 + 0x1e)" * (cast_expression "(short *)((int)puVar4 + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + 0x1e)" ( (binary_expression "(int)puVar4 + 0x1e" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (cast_expression "(short)_Var2" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "*(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);" (assignment_expression "*(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10)" (pointer_expression "*(short *)(puVar4 + 4)" * (cast_expression "(short *)(puVar4 + 4)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 4)" ( (binary_expression "puVar4 + 4" identifier + number_literal) )))) = (cast_expression "(short)((uint)_Var2 >> 0x10)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((uint)_Var2 >> 0x10)" ( (binary_expression "(uint)_Var2 >> 0x10" (cast_expression "(uint)_Var2" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid __regparm3 smb_format_message(connectdata *conn,smb_header *h,uchar cmd,size_t len)\n\n{\n  void *pvVar1;\n  __pid_t _Var2;\n  uint uVar3;\n  undefined4 *puVar4;\n  \n  puVar4 = (undefined4 *)((uint)h->magic & 0xfffffffc);\n  pvVar1 = (conn->data->req).protop;\n  h->nbt_type = '\0';\n  h->nbt_flags = '\0';\n  h->nbt_length = 0;\n  h->uid = 0;\n  h->mid = 0;\n  uVar3 = (uint)((int)h + (0x24 - (int)puVar4)) >> 2;\n  for (; uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar4 = 0;\n    puVar4 = puVar4 + 1;\n  }\n  h->magic[0] = 0xff;\n  h->magic[1] = 'S';\n  h->magic[2] = 'M';\n  h->magic[3] = 'B';\n  h->flags = '\x18';\n  h->nbt_length = ((short)len + 0x20U) * 0x100 | (ushort)((short)len + 0x20U) >> 8;\n  h->command = cmd;\n  h->flags2 = 0x41;\n  h->uid = (conn->proto).smbc.uid;\n  h->tid = *(ushort *)((int)pvVar1 + 8);\n  _Var2 = getpid();\n  h->pid = (ushort)_Var2;\n  h->pid_high = (ushort)((uint)_Var2 >> 0x10);\n  return;\n}\n\n" comment comment (function_definition "void __regparm3 smb_format_message(connectdata *conn,smb_header *h,uchar cmd,size_t len)\n\n{\n  void *pvVar1;\n  __pid_t _Var2;\n  uint uVar3;\n  undefined4 *puVar4;\n  \n  puVar4 = (undefined4 *)((uint)h->magic & 0xfffffffc);\n  pvVar1 = (conn->data->req).protop;\n  h->nbt_type = '\0';\n  h->nbt_flags = '\0';\n  h->nbt_length = 0;\n  h->uid = 0;\n  h->mid = 0;\n  uVar3 = (uint)((int)h + (0x24 - (int)puVar4)) >> 2;\n  for (; uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar4 = 0;\n    puVar4 = puVar4 + 1;\n  }\n  h->magic[0] = 0xff;\n  h->magic[1] = 'S';\n  h->magic[2] = 'M';\n  h->magic[3] = 'B';\n  h->flags = '\x18';\n  h->nbt_length = ((short)len + 0x20U) * 0x100 | (ushort)((short)len + 0x20U) >> 8;\n  h->command = cmd;\n  h->flags2 = 0x41;\n  h->uid = (conn->proto).smbc.uid;\n  h->tid = *(ushort *)((int)pvVar1 + 8);\n  _Var2 = getpid();\n  h->pid = (ushort)_Var2;\n  h->pid_high = (ushort)((uint)_Var2 >> 0x10);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "smb_format_message(connectdata *conn,smb_header *h,uchar cmd,size_t len)" identifier (parameter_list "(connectdata *conn,smb_header *h,uchar cmd,size_t len)" ( (parameter_declaration "connectdata *conn" type_identifier (pointer_declarator "*conn" * identifier)) , (parameter_declaration "smb_header *h" type_identifier (pointer_declarator "*h" * identifier)) , (parameter_declaration "uchar cmd" type_identifier identifier) , (parameter_declaration "size_t len" primitive_type identifier) ))) (compound_statement "{\n  void *pvVar1;\n  __pid_t _Var2;\n  uint uVar3;\n  undefined4 *puVar4;\n  \n  puVar4 = (undefined4 *)((uint)h->magic & 0xfffffffc);\n  pvVar1 = (conn->data->req).protop;\n  h->nbt_type = '\0';\n  h->nbt_flags = '\0';\n  h->nbt_length = 0;\n  h->uid = 0;\n  h->mid = 0;\n  uVar3 = (uint)((int)h + (0x24 - (int)puVar4)) >> 2;\n  for (; uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar4 = 0;\n    puVar4 = puVar4 + 1;\n  }\n  h->magic[0] = 0xff;\n  h->magic[1] = 'S';\n  h->magic[2] = 'M';\n  h->magic[3] = 'B';\n  h->flags = '\x18';\n  h->nbt_length = ((short)len + 0x20U) * 0x100 | (ushort)((short)len + 0x20U) >> 8;\n  h->command = cmd;\n  h->flags2 = 0x41;\n  h->uid = (conn->proto).smbc.uid;\n  h->tid = *(ushort *)((int)pvVar1 + 8);\n  _Var2 = getpid();\n  h->pid = (ushort)_Var2;\n  h->pid_high = (ushort)((uint)_Var2 >> 0x10);\n  return;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "__pid_t _Var2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "puVar4 = (undefined4 *)((uint)h->magic & 0xfffffffc);" (assignment_expression "puVar4 = (undefined4 *)((uint)h->magic & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)h->magic & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)h->magic & 0xfffffffc)" ( (binary_expression "(uint)h->magic & 0xfffffffc" (cast_expression "(uint)h->magic" ( (type_descriptor "uint" type_identifier) ) (field_expression "h->magic" identifier -> field_identifier)) & number_literal) )))) ;) (expression_statement "pvVar1 = (conn->data->req).protop;" (assignment_expression "pvVar1 = (conn->data->req).protop" identifier = (field_expression "(conn->data->req).protop" (parenthesized_expression "(conn->data->req)" ( (field_expression "conn->data->req" (field_expression "conn->data" identifier -> field_identifier) -> field_identifier) )) . field_identifier)) ;) (expression_statement "h->nbt_type = '\0';" (assignment_expression "h->nbt_type = '\0'" (field_expression "h->nbt_type" identifier -> field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "h->nbt_flags = '\0';" (assignment_expression "h->nbt_flags = '\0'" (field_expression "h->nbt_flags" identifier -> field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "h->nbt_length = 0;" (assignment_expression "h->nbt_length = 0" (field_expression "h->nbt_length" identifier -> field_identifier) = number_literal) ;) (expression_statement "h->uid = 0;" (assignment_expression "h->uid = 0" (field_expression "h->uid" identifier -> field_identifier) = number_literal) ;) (expression_statement "h->mid = 0;" (assignment_expression "h->mid = 0" (field_expression "h->mid" identifier -> field_identifier) = number_literal) ;) (expression_statement "uVar3 = (uint)((int)h + (0x24 - (int)puVar4)) >> 2;" (assignment_expression "uVar3 = (uint)((int)h + (0x24 - (int)puVar4)) >> 2" identifier = (binary_expression "(uint)((int)h + (0x24 - (int)puVar4)) >> 2" (call_expression "(uint)((int)h + (0x24 - (int)puVar4))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)h + (0x24 - (int)puVar4))" ( (binary_expression "(int)h + (0x24 - (int)puVar4)" (cast_expression "(int)h" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x24 - (int)puVar4)" ( (binary_expression "0x24 - (int)puVar4" number_literal - (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) >> number_literal)) ;) (for_statement "for (; uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar4 = 0;\n    puVar4 = puVar4 + 1;\n  }" for ( ; (binary_expression "uVar3 != 0" identifier != number_literal) ; (assignment_expression "uVar3 = uVar3 - 1" identifier = (binary_expression "uVar3 - 1" identifier - number_literal)) ) (compound_statement "{\n    *puVar4 = 0;\n    puVar4 = puVar4 + 1;\n  }" { (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) })) (expression_statement "h->magic[0] = 0xff;" (assignment_expression "h->magic[0] = 0xff" (subscript_expression "h->magic[0]" (field_expression "h->magic" identifier -> field_identifier) [ number_literal ]) = number_literal) ;) (expression_statement "h->magic[1] = 'S';" (assignment_expression "h->magic[1] = 'S'" (subscript_expression "h->magic[1]" (field_expression "h->magic" identifier -> field_identifier) [ number_literal ]) = (char_literal "'S'" ' character ')) ;) (expression_statement "h->magic[2] = 'M';" (assignment_expression "h->magic[2] = 'M'" (subscript_expression "h->magic[2]" (field_expression "h->magic" identifier -> field_identifier) [ number_literal ]) = (char_literal "'M'" ' character ')) ;) (expression_statement "h->magic[3] = 'B';" (assignment_expression "h->magic[3] = 'B'" (subscript_expression "h->magic[3]" (field_expression "h->magic" identifier -> field_identifier) [ number_literal ]) = (char_literal "'B'" ' character ')) ;) (expression_statement "h->flags = '\x18';" (assignment_expression "h->flags = '\x18'" (field_expression "h->flags" identifier -> field_identifier) = (char_literal "'\x18'" ' escape_sequence ')) ;) (expression_statement "h->nbt_length = ((short)len + 0x20U) * 0x100 | (ushort)((short)len + 0x20U) >> 8;" (assignment_expression "h->nbt_length = ((short)len + 0x20U) * 0x100 | (ushort)((short)len + 0x20U) >> 8" (field_expression "h->nbt_length" identifier -> field_identifier) = (binary_expression "((short)len + 0x20U) * 0x100 | (ushort)((short)len + 0x20U) >> 8" (binary_expression "((short)len + 0x20U) * 0x100" (parenthesized_expression "((short)len + 0x20U)" ( (binary_expression "(short)len + 0x20U" (cast_expression "(short)len" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) + number_literal) )) * number_literal) | (binary_expression "(ushort)((short)len + 0x20U) >> 8" (call_expression "(ushort)((short)len + 0x20U)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((short)len + 0x20U)" ( (binary_expression "(short)len + 0x20U" (cast_expression "(short)len" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) + number_literal) ))) >> number_literal))) ;) (expression_statement "h->command = cmd;" (assignment_expression "h->command = cmd" (field_expression "h->command" identifier -> field_identifier) = identifier) ;) (expression_statement "h->flags2 = 0x41;" (assignment_expression "h->flags2 = 0x41" (field_expression "h->flags2" identifier -> field_identifier) = number_literal) ;) (expression_statement "h->uid = (conn->proto).smbc.uid;" (assignment_expression "h->uid = (conn->proto).smbc.uid" (field_expression "h->uid" identifier -> field_identifier) = (field_expression "(conn->proto).smbc.uid" (field_expression "(conn->proto).smbc" (parenthesized_expression "(conn->proto)" ( (field_expression "conn->proto" identifier -> field_identifier) )) . field_identifier) . field_identifier)) ;) (expression_statement "h->tid = *(ushort *)((int)pvVar1 + 8);" (assignment_expression "h->tid = *(ushort *)((int)pvVar1 + 8)" (field_expression "h->tid" identifier -> field_identifier) = (pointer_expression "*(ushort *)((int)pvVar1 + 8)" * (cast_expression "(ushort *)((int)pvVar1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 8)" ( (binary_expression "(int)pvVar1 + 8" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "_Var2 = getpid();" (assignment_expression "_Var2 = getpid()" identifier = (call_expression "getpid()" identifier (argument_list "()" ( )))) ;) (expression_statement "h->pid = (ushort)_Var2;" (assignment_expression "h->pid = (ushort)_Var2" (field_expression "h->pid" identifier -> field_identifier) = (cast_expression "(ushort)_Var2" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (expression_statement "h->pid_high = (ushort)((uint)_Var2 >> 0x10);" (assignment_expression "h->pid_high = (ushort)((uint)_Var2 >> 0x10)" (field_expression "h->pid_high" identifier -> field_identifier) = (call_expression "(ushort)((uint)_Var2 >> 0x10)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((uint)_Var2 >> 0x10)" ( (binary_expression "(uint)_Var2 >> 0x10" (cast_expression "(uint)_Var2" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00065040(short param_1)\n\n{\n  int iVar1;\n  __pid_t _Var2;\n  undefined1 extraout_CL;\n  uint uVar3;\n  undefined4 *puVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  undefined8 uVar7;\n  \n  bVar6 = 0;\n  uVar7 = FUN_0001e6b4();\n  puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);\n  iVar1 = *(int *)(*(int *)uVar7 + 0x148);\n  *puVar4 = 0;\n  puVar4[8] = 0;\n  puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);\n  for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;\n      uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }\n  puVar4[1] = 0x424d53ff;\n  *(undefined1 *)((int)puVar4 + 0xd) = 0x18;\n  *(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;\n  *(undefined1 *)(puVar4 + 2) = extraout_CL;\n  *(undefined2 *)((int)puVar4 + 0xe) = 0x41;\n  *(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];\n  *(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);\n  _Var2 = getpid();\n  *(short *)((int)puVar4 + 0x1e) = (short)_Var2;\n  *(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);\n  return;\n}\n\n" (function_definition "void FUN_00065040(short param_1)\n\n{\n  int iVar1;\n  __pid_t _Var2;\n  undefined1 extraout_CL;\n  uint uVar3;\n  undefined4 *puVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  undefined8 uVar7;\n  \n  bVar6 = 0;\n  uVar7 = FUN_0001e6b4();\n  puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);\n  iVar1 = *(int *)(*(int *)uVar7 + 0x148);\n  *puVar4 = 0;\n  puVar4[8] = 0;\n  puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);\n  for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;\n      uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }\n  puVar4[1] = 0x424d53ff;\n  *(undefined1 *)((int)puVar4 + 0xd) = 0x18;\n  *(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;\n  *(undefined1 *)(puVar4 + 2) = extraout_CL;\n  *(undefined2 *)((int)puVar4 + 0xe) = 0x41;\n  *(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];\n  *(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);\n  _Var2 = getpid();\n  *(short *)((int)puVar4 + 0x1e) = (short)_Var2;\n  *(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);\n  return;\n}" primitive_type (function_declarator "FUN_00065040(short param_1)" identifier (parameter_list "(short param_1)" ( (parameter_declaration "short param_1" (sized_type_specifier "short" short) identifier) ))) (compound_statement "{\n  int iVar1;\n  __pid_t _Var2;\n  undefined1 extraout_CL;\n  uint uVar3;\n  undefined4 *puVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  undefined8 uVar7;\n  \n  bVar6 = 0;\n  uVar7 = FUN_0001e6b4();\n  puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);\n  iVar1 = *(int *)(*(int *)uVar7 + 0x148);\n  *puVar4 = 0;\n  puVar4[8] = 0;\n  puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);\n  for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;\n      uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }\n  puVar4[1] = 0x424d53ff;\n  *(undefined1 *)((int)puVar4 + 0xd) = 0x18;\n  *(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;\n  *(undefined1 *)(puVar4 + 2) = extraout_CL;\n  *(undefined2 *)((int)puVar4 + 0xe) = 0x41;\n  *(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];\n  *(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);\n  _Var2 = getpid();\n  *(short *)((int)puVar4 + 0x1e) = (short)_Var2;\n  *(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "__pid_t _Var2;" type_identifier identifier ;) (declaration "undefined1 extraout_CL;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "byte bVar6;" type_identifier identifier ;) (declaration "undefined8 uVar7;" type_identifier identifier ;) (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" identifier = number_literal) ;) (expression_statement "uVar7 = FUN_0001e6b4();" (assignment_expression "uVar7 = FUN_0001e6b4()" identifier = (call_expression "FUN_0001e6b4()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);" (assignment_expression "puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20)" identifier = (cast_expression "(undefined4 *)((ulonglong)uVar7 >> 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulonglong)uVar7 >> 0x20)" ( (binary_expression "(ulonglong)uVar7 >> 0x20" (cast_expression "(ulonglong)uVar7" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "iVar1 = *(int *)(*(int *)uVar7 + 0x148);" (assignment_expression "iVar1 = *(int *)(*(int *)uVar7 + 0x148)" identifier = (pointer_expression "*(int *)(*(int *)uVar7 + 0x148)" * (cast_expression "(int *)(*(int *)uVar7 + 0x148)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)uVar7 + 0x148)" ( (binary_expression "*(int *)uVar7 + 0x148" (pointer_expression "*(int *)uVar7" * (cast_expression "(int *)uVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "puVar4[8] = 0;" (assignment_expression "puVar4[8] = 0" (subscript_expression "puVar4[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);" (assignment_expression "puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(puVar4 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar4 + 1) & 0xfffffffc" (call_expression "(uint)(puVar4 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar4 + 1)" ( (binary_expression "puVar4 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;\n      uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }" for ( (assignment_expression "uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2" identifier = (binary_expression "(uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc)))" ( (binary_expression "(int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))" ( (binary_expression "0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc)" number_literal - (cast_expression "(int)((uint)(puVar4 + 1) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(puVar4 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar4 + 1) & 0xfffffffc" (call_expression "(uint)(puVar4 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar4 + 1)" ( (binary_expression "puVar4 + 1" identifier + number_literal) ))) & number_literal) )))) ))) ))) >> number_literal)) ; (binary_expression "uVar3 != 0" identifier != number_literal) ; (assignment_expression "uVar3 = uVar3 - 1" identifier = (binary_expression "uVar3 - 1" identifier - number_literal)) ) (compound_statement "{\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }" { (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (expression_statement "puVar5 = puVar5 + (uint)bVar6 * -2 + 1;" (assignment_expression "puVar5 = puVar5 + (uint)bVar6 * -2 + 1" identifier = (binary_expression "puVar5 + (uint)bVar6 * -2 + 1" (binary_expression "puVar5 + (uint)bVar6 * -2" identifier + (binary_expression "(uint)bVar6 * -2" (cast_expression "(uint)bVar6" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "puVar4[1] = 0x424d53ff;" (assignment_expression "puVar4[1] = 0x424d53ff" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined1 *)((int)puVar4 + 0xd) = 0x18;" (assignment_expression "*(undefined1 *)((int)puVar4 + 0xd) = 0x18" (pointer_expression "*(undefined1 *)((int)puVar4 + 0xd)" * (cast_expression "(undefined1 *)((int)puVar4 + 0xd)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + 0xd)" ( (binary_expression "(int)puVar4 + 0xd" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;" (assignment_expression "*(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8" (pointer_expression "*(ushort *)((int)puVar4 + 2)" * (cast_expression "(ushort *)((int)puVar4 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + 2)" ( (binary_expression "(int)puVar4 + 2" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "(param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8" (binary_expression "(param_1 + 0x20U) * 0x100" (parenthesized_expression "(param_1 + 0x20U)" ( (binary_expression "param_1 + 0x20U" identifier + number_literal) )) * number_literal) | (binary_expression "(ushort)(param_1 + 0x20U) >> 8" (call_expression "(ushort)(param_1 + 0x20U)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(param_1 + 0x20U)" ( (binary_expression "param_1 + 0x20U" identifier + number_literal) ))) >> number_literal))) ;) (expression_statement "*(undefined1 *)(puVar4 + 2) = extraout_CL;" (assignment_expression "*(undefined1 *)(puVar4 + 2) = extraout_CL" (pointer_expression "*(undefined1 *)(puVar4 + 2)" * (cast_expression "(undefined1 *)(puVar4 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 2)" ( (binary_expression "puVar4 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined2 *)((int)puVar4 + 0xe) = 0x41;" (assignment_expression "*(undefined2 *)((int)puVar4 + 0xe) = 0x41" (pointer_expression "*(undefined2 *)((int)puVar4 + 0xe)" * (cast_expression "(undefined2 *)((int)puVar4 + 0xe)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + 0xe)" ( (binary_expression "(int)puVar4 + 0xe" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];" (assignment_expression "*(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130]" (pointer_expression "*(short *)(puVar4 + 8)" * (cast_expression "(short *)(puVar4 + 8)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 8)" ( (binary_expression "puVar4 + 8" identifier + number_literal) )))) = (cast_expression "(short)((int *)uVar7)[0x130]" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (subscript_expression "((int *)uVar7)[0x130]" (parenthesized_expression "((int *)uVar7)" ( (cast_expression "(int *)uVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )) [ number_literal ]))) ;) (expression_statement "*(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);" (assignment_expression "*(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8)" (pointer_expression "*(undefined2 *)(puVar4 + 7)" * (cast_expression "(undefined2 *)(puVar4 + 7)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 7)" ( (binary_expression "puVar4 + 7" identifier + number_literal) )))) = (pointer_expression "*(undefined2 *)(iVar1 + 8)" * (cast_expression "(undefined2 *)(iVar1 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) ))))) ;) (expression_statement "_Var2 = getpid();" (assignment_expression "_Var2 = getpid()" identifier = (call_expression "getpid()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(short *)((int)puVar4 + 0x1e) = (short)_Var2;" (assignment_expression "*(short *)((int)puVar4 + 0x1e) = (short)_Var2" (pointer_expression "*(short *)((int)puVar4 + 0x1e)" * (cast_expression "(short *)((int)puVar4 + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + 0x1e)" ( (binary_expression "(int)puVar4 + 0x1e" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (cast_expression "(short)_Var2" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "*(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);" (assignment_expression "*(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10)" (pointer_expression "*(short *)(puVar4 + 4)" * (cast_expression "(short *)(puVar4 + 4)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 4)" ( (binary_expression "puVar4 + 4" identifier + number_literal) )))) = (cast_expression "(short)((uint)_Var2 >> 0x10)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((uint)_Var2 >> 0x10)" ( (binary_expression "(uint)_Var2 >> 0x10" (cast_expression "(uint)_Var2" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier short) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ;) (for_statement for ( (assignment_expression IDENT = (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ))) ))) >> LIT)) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT - LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) * LIT) | (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) >> LIT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (subscript_expression (parenthesized_expression ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) )) [ LIT ]))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (return_statement return ;) })))
(function_definition "void FUN_00065040(short param_1)\n\n{\n  int iVar1;\n  __pid_t _Var2;\n  undefined1 extraout_CL;\n  uint uVar3;\n  undefined4 *puVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  undefined8 uVar7;\n  \n  bVar6 = 0;\n  uVar7 = FUN_0001e6b4();\n  puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);\n  iVar1 = *(int *)(*(int *)uVar7 + 0x148);\n  *puVar4 = 0;\n  puVar4[8] = 0;\n  puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);\n  for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;\n      uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }\n  puVar4[1] = 0x424d53ff;\n  *(undefined1 *)((int)puVar4 + 0xd) = 0x18;\n  *(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;\n  *(undefined1 *)(puVar4 + 2) = extraout_CL;\n  *(undefined2 *)((int)puVar4 + 0xe) = 0x41;\n  *(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];\n  *(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);\n  _Var2 = getpid();\n  *(short *)((int)puVar4 + 0x1e) = (short)_Var2;\n  *(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00065040(short param_1)" (identifier "FUN_00065040") (parameter_list "(short param_1)" (( "(") (parameter_declaration "short param_1" (sized_type_specifier "short" (short "short")) (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  __pid_t _Var2;\n  undefined1 extraout_CL;\n  uint uVar3;\n  undefined4 *puVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  undefined8 uVar7;\n  \n  bVar6 = 0;\n  uVar7 = FUN_0001e6b4();\n  puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);\n  iVar1 = *(int *)(*(int *)uVar7 + 0x148);\n  *puVar4 = 0;\n  puVar4[8] = 0;\n  puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);\n  for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;\n      uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }\n  puVar4[1] = 0x424d53ff;\n  *(undefined1 *)((int)puVar4 + 0xd) = 0x18;\n  *(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;\n  *(undefined1 *)(puVar4 + 2) = extraout_CL;\n  *(undefined2 *)((int)puVar4 + 0xe) = 0x41;\n  *(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];\n  *(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);\n  _Var2 = getpid();\n  *(short *)((int)puVar4 + 0x1e) = (short)_Var2;\n  *(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "__pid_t _Var2;" (type_identifier "__pid_t") (identifier "_Var2") (; ";")) (declaration "undefined1 extraout_CL;" (type_identifier "undefined1") (identifier "extraout_CL") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "undefined4 *puVar5;" (type_identifier "undefined4") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "byte bVar6;" (type_identifier "byte") (identifier "bVar6") (; ";")) (declaration "undefined8 uVar7;" (type_identifier "undefined8") (identifier "uVar7") (; ";")) (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" (identifier "bVar6") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar7 = FUN_0001e6b4();" (assignment_expression "uVar7 = FUN_0001e6b4()" (identifier "uVar7") (= "=") (call_expression "FUN_0001e6b4()" (identifier "FUN_0001e6b4") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);" (assignment_expression "puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20)" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)((ulonglong)uVar7 >> 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((ulonglong)uVar7 >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar7 >> 0x20" (cast_expression "(ulonglong)uVar7" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar7")) (>> ">>") (number_literal "0x20")) () ")")))) (; ";")) (expression_statement "iVar1 = *(int *)(*(int *)uVar7 + 0x148);" (assignment_expression "iVar1 = *(int *)(*(int *)uVar7 + 0x148)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(*(int *)uVar7 + 0x148)" (* "*") (cast_expression "(int *)(*(int *)uVar7 + 0x148)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)uVar7 + 0x148)" (( "(") (binary_expression "*(int *)uVar7 + 0x148" (pointer_expression "*(int *)uVar7" (* "*") (cast_expression "(int *)uVar7" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "uVar7"))) (+ "+") (number_literal "0x148")) () ")"))))) (; ";")) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar4[8] = 0;" (assignment_expression "puVar4[8] = 0" (subscript_expression "puVar4[8]" (identifier "puVar4") ([ "[") (number_literal "8") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);" (assignment_expression "puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc)" (identifier "puVar5") (= "=") (cast_expression "(undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((uint)(puVar4 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar4 + 1) & 0xfffffffc" (call_expression "(uint)(puVar4 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar4 + 1)" (( "(") (binary_expression "puVar4 + 1" (identifier "puVar4") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")))) (; ";")) (for_statement "for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;\n      uVar3 != 0; uVar3 = uVar3 - 1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }" (for "for") (( "(") (assignment_expression "uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2" (identifier "uVar3") (= "=") (binary_expression "(uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc)))" (( "(") (binary_expression "(int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (+ "+") (parenthesized_expression "(0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))" (( "(") (binary_expression "0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc)" (number_literal "0x24") (- "-") (cast_expression "(int)((uint)(puVar4 + 1) & 0xfffffffc)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((uint)(puVar4 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar4 + 1) & 0xfffffffc" (call_expression "(uint)(puVar4 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar4 + 1)" (( "(") (binary_expression "puVar4 + 1" (identifier "puVar4") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")))) () ")"))) () ")"))) (>> ">>") (number_literal "2"))) (; ";") (binary_expression "uVar3 != 0" (identifier "uVar3") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "uVar3 = uVar3 - 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 - 1" (identifier "uVar3") (- "-") (number_literal "1"))) () ")") (compound_statement "{\n    *puVar5 = 0;\n    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n  }" ({ "{") (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" (* "*") (identifier "puVar5")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar5 = puVar5 + (uint)bVar6 * -2 + 1;" (assignment_expression "puVar5 = puVar5 + (uint)bVar6 * -2 + 1" (identifier "puVar5") (= "=") (binary_expression "puVar5 + (uint)bVar6 * -2 + 1" (binary_expression "puVar5 + (uint)bVar6 * -2" (identifier "puVar5") (+ "+") (binary_expression "(uint)bVar6 * -2" (cast_expression "(uint)bVar6" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar6")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "puVar4[1] = 0x424d53ff;" (assignment_expression "puVar4[1] = 0x424d53ff" (subscript_expression "puVar4[1]" (identifier "puVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0x424d53ff")) (; ";")) (expression_statement "*(undefined1 *)((int)puVar4 + 0xd) = 0x18;" (assignment_expression "*(undefined1 *)((int)puVar4 + 0xd) = 0x18" (pointer_expression "*(undefined1 *)((int)puVar4 + 0xd)" (* "*") (cast_expression "(undefined1 *)((int)puVar4 + 0xd)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar4 + 0xd)" (( "(") (binary_expression "(int)puVar4 + 0xd" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (+ "+") (number_literal "0xd")) () ")")))) (= "=") (number_literal "0x18")) (; ";")) (expression_statement "*(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;" (assignment_expression "*(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8" (pointer_expression "*(ushort *)((int)puVar4 + 2)" (* "*") (cast_expression "(ushort *)((int)puVar4 + 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar4 + 2)" (( "(") (binary_expression "(int)puVar4 + 2" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (+ "+") (number_literal "2")) () ")")))) (= "=") (binary_expression "(param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8" (binary_expression "(param_1 + 0x20U) * 0x100" (parenthesized_expression "(param_1 + 0x20U)" (( "(") (binary_expression "param_1 + 0x20U" (identifier "param_1") (+ "+") (number_literal "0x20U")) () ")")) (* "*") (number_literal "0x100")) (| "|") (binary_expression "(ushort)(param_1 + 0x20U) >> 8" (call_expression "(ushort)(param_1 + 0x20U)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (argument_list "(param_1 + 0x20U)" (( "(") (binary_expression "param_1 + 0x20U" (identifier "param_1") (+ "+") (number_literal "0x20U")) () ")"))) (>> ">>") (number_literal "8")))) (; ";")) (expression_statement "*(undefined1 *)(puVar4 + 2) = extraout_CL;" (assignment_expression "*(undefined1 *)(puVar4 + 2) = extraout_CL" (pointer_expression "*(undefined1 *)(puVar4 + 2)" (* "*") (cast_expression "(undefined1 *)(puVar4 + 2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar4 + 2)" (( "(") (binary_expression "puVar4 + 2" (identifier "puVar4") (+ "+") (number_literal "2")) () ")")))) (= "=") (identifier "extraout_CL")) (; ";")) (expression_statement "*(undefined2 *)((int)puVar4 + 0xe) = 0x41;" (assignment_expression "*(undefined2 *)((int)puVar4 + 0xe) = 0x41" (pointer_expression "*(undefined2 *)((int)puVar4 + 0xe)" (* "*") (cast_expression "(undefined2 *)((int)puVar4 + 0xe)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar4 + 0xe)" (( "(") (binary_expression "(int)puVar4 + 0xe" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (+ "+") (number_literal "0xe")) () ")")))) (= "=") (number_literal "0x41")) (; ";")) (expression_statement "*(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];" (assignment_expression "*(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130]" (pointer_expression "*(short *)(puVar4 + 8)" (* "*") (cast_expression "(short *)(puVar4 + 8)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar4 + 8)" (( "(") (binary_expression "puVar4 + 8" (identifier "puVar4") (+ "+") (number_literal "8")) () ")")))) (= "=") (cast_expression "(short)((int *)uVar7)[0x130]" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (subscript_expression "((int *)uVar7)[0x130]" (parenthesized_expression "((int *)uVar7)" (( "(") (cast_expression "(int *)uVar7" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "uVar7")) () ")")) ([ "[") (number_literal "0x130") (] "]")))) (; ";")) (expression_statement "*(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);" (assignment_expression "*(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8)" (pointer_expression "*(undefined2 *)(puVar4 + 7)" (* "*") (cast_expression "(undefined2 *)(puVar4 + 7)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar4 + 7)" (( "(") (binary_expression "puVar4 + 7" (identifier "puVar4") (+ "+") (number_literal "7")) () ")")))) (= "=") (pointer_expression "*(undefined2 *)(iVar1 + 8)" (* "*") (cast_expression "(undefined2 *)(iVar1 + 8)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "_Var2 = getpid();" (assignment_expression "_Var2 = getpid()" (identifier "_Var2") (= "=") (call_expression "getpid()" (identifier "getpid") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*(short *)((int)puVar4 + 0x1e) = (short)_Var2;" (assignment_expression "*(short *)((int)puVar4 + 0x1e) = (short)_Var2" (pointer_expression "*(short *)((int)puVar4 + 0x1e)" (* "*") (cast_expression "(short *)((int)puVar4 + 0x1e)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar4 + 0x1e)" (( "(") (binary_expression "(int)puVar4 + 0x1e" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (+ "+") (number_literal "0x1e")) () ")")))) (= "=") (cast_expression "(short)_Var2" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "_Var2"))) (; ";")) (expression_statement "*(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);" (assignment_expression "*(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10)" (pointer_expression "*(short *)(puVar4 + 4)" (* "*") (cast_expression "(short *)(puVar4 + 4)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar4 + 4)" (( "(") (binary_expression "puVar4 + 4" (identifier "puVar4") (+ "+") (number_literal "4")) () ")")))) (= "=") (cast_expression "(short)((uint)_Var2 >> 0x10)" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (parenthesized_expression "((uint)_Var2 >> 0x10)" (( "(") (binary_expression "(uint)_Var2 >> 0x10" (cast_expression "(uint)_Var2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "_Var2")) (>> ">>") (number_literal "0x10")) () ")")))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void __regparm3 function_1(type_1 *conn,type_2 *h,type_3 cmd,size_t len)

{
  void *pvVar1;
  type_4 _Var2;
  type_5 var_1;
  type_6 *var_2;
  
  var_2 = (type_6 *)((type_5)h->magic & 0xfffffffc);
  pvVar1 = (conn->data->req).protop;
  h->nbt_type = '\0';
  h->nbt_flags = '\0';
  h->nbt_length = 0;
  h->uid = 0;
  h->mid = 0;
  var_1 = (type_5)((int)h + (0x24 - (int)var_2)) >> 2;
  for (; var_1 != 0; var_1 = var_1 - 1) {
    *var_2 = 0;
    var_2 = var_2 + 1;
  }
  h->magic[0] = 0xff;
  h->magic[1] = 'S';
  h->magic[2] = 'M';
  h->magic[3] = 'B';
  h->flags = '\x18';
  h->nbt_length = ((short)len + 0x20U) * 0x100 | (type_7)((short)len + 0x20U) >> 8;
  h->command = cmd;
  h->flags2 = 0x41;
  h->uid = (conn->proto).smbc.uid;
  h->tid = *(type_7 *)((int)pvVar1 + 8);
  _Var2 = var_3();
  h->pid = (type_7)_Var2;
  h->pid_high = (type_7)((type_5)_Var2 >> 0x10);
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal)))))) (for_statement initializer: (assignment_expression left: (identifier) right: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))))))))) right: (number_literal))) condition: (binary_expression left: (identifier) right: (number_literal)) update: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) body: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)) right: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (subscript_expression argument: (parenthesized_expression (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) index: (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))))) (return_statement))))

void MASKED(short param_1)

{
  int iVar1;
  __pid_t _Var2;
  undefined1 extraout_CL;
  uint uVar3;
  undefined4 *puVar4;
  undefined4 *puVar5;
  byte bVar6;
  undefined8 uVar7;
  
  bVar6 = 0;
  uVar7 = FUN_0001e6b4();
  puVar4 = (undefined4 *)((ulonglong)uVar7 >> 0x20);
  iVar1 = *(int *)(*(int *)uVar7 + 0x148);
  *puVar4 = 0;
  puVar4[8] = 0;
  puVar5 = (undefined4 *)((uint)(puVar4 + 1) & 0xfffffffc);
  for (uVar3 = (uint)((int)puVar4 + (0x24 - (int)((uint)(puVar4 + 1) & 0xfffffffc))) >> 2;
      uVar3 != 0; uVar3 = uVar3 - 1) {
    *puVar5 = 0;
    puVar5 = puVar5 + (uint)bVar6 * -2 + 1;
  }
  puVar4[1] = 0x424d53ff;
  *(undefined1 *)((int)puVar4 + 0xd) = 0x18;
  *(ushort *)((int)puVar4 + 2) = (param_1 + 0x20U) * 0x100 | (ushort)(param_1 + 0x20U) >> 8;
  *(undefined1 *)(puVar4 + 2) = extraout_CL;
  *(undefined2 *)((int)puVar4 + 0xe) = 0x41;
  *(short *)(puVar4 + 8) = (short)((int *)uVar7)[0x130];
  *(undefined2 *)(puVar4 + 7) = *(undefined2 *)(iVar1 + 8);
  _Var2 = getpid();
  *(short *)((int)puVar4 + 0x1e) = (short)_Var2;
  *(short *)(puVar4 + 4) = (short)((uint)_Var2 >> 0x10);
  return;
}

