
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void sg_print_command(uint8_t *command)

{
  int iVar1;
  char *buff_00;
  int iVar2;
  int in_GS_OFFSET;
  int local_b0;
  char buff [128];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  buff_00 = buff;
  sg_get_command_name(command,0,0x80,buff_00);
  buff[0x7f] = '\0';
  pr2ws("%s [",buff_00);
  if (*command == '\x7f') {
    local_b0 = command[7] + 8;
  }
  else {
    local_b0 = sg_get_command_size(*command);
    if (local_b0 < 1) goto LAB_000191d2;
  }
  iVar2 = 0;
  do {
    buff_00 = (char *)(uint)command[iVar2];
    iVar2 = iVar2 + 1;
    pr2ws("%02x ",buff_00);
  } while (iVar2 < local_b0);
LAB_000191d2:
  pr2ws("]\n",buff_00);
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return;
}



void sg_print_command(void)

{
  undefined1 *puVar1;
  int unaff_EBX;
  int iVar2;
  int in_GS_OFFSET;
  char *unaff_retaddr;
  int local_b4;
  undefined1 local_a4 [127];
  undefined1 local_25;
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x19149;
  entry();
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  puVar1 = local_a4;
  sg_get_command_name(unaff_retaddr,0,0x80,puVar1);
  local_25 = 0;
  pr2ws(unaff_EBX + 0x1809c,puVar1);
  if (*unaff_retaddr == '\x7f') {
    local_b4 = (byte)unaff_retaddr[7] + 8;
  }
  else {
    local_b4 = sg_get_command_size(*unaff_retaddr);
    if (local_b4 < 1) goto LAB_000191d2;
  }
  iVar2 = 0;
  do {
    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];
    iVar2 = iVar2 + 1;
    pr2ws(unaff_EBX + 0x253b6,puVar1);
  } while (iVar2 < local_b4);
LAB_000191d2:
  pr2ws(unaff_EBX + 0x186d6,puVar1);
  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00030280();
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00017820
ADD EBX,0x30c3f
SUB ESP,0xac
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x9c],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0xc0]
LEA EDI,[ESP + 0x1c]
PUSH EDI
PUSH 0x80
PUSH 0x0
PUSH ESI
CALL 0x00017800
MOV byte ptr [ESP + 0xab],0x0
POP EAX
LEA EAX,[EBX + 0xfffe745d]
POP EDX
PUSH EDI
PUSH EAX
CALL 0x00017630
MOVZX EAX,byte ptr [ESI]
ADD ESP,0x10
CMP AL,0x7f
JNZ 0x00019200
MOVZX EDI,byte ptr [ESI + 0x7]
LEA EAX,[EDI + 0x8]
MOV dword ptr [ESP + 0xc],EAX
XOR EDI,EDI
LEA EBP,[EBX + 0xffff4777]
LEA ESI,[ESI]
MOVZX EAX,byte ptr [ESI + EDI*0x1]
SUB ESP,0x8
ADD EDI,0x1
PUSH EAX
PUSH EBP
CALL 0x00017630
ADD ESP,0x10
CMP EDI,dword ptr [ESP + 0xc]
JL 0x000191b8
SUB ESP,0xc
LEA EAX,[EBX + 0xfffe7a97]
PUSH EAX
CALL 0x00017630
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x9c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00019216
ADD ESP,0xac
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH EAX
CALL 0x00017240
MOV dword ptr [ESP + 0x1c],EAX
ADD ESP,0x10
TEST EAX,EAX
JG 0x000191a9
JMP 0x000191d2
CALL 0x00030280
(translation_unit "void sg_print_command(void)\n\n{\n  undefined1 *puVar1;\n  int unaff_EBX;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  int local_b4;\n  undefined1 local_a4 [127];\n  undefined1 local_25;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19149;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = local_a4;\n  sg_get_command_name(unaff_retaddr,0,0x80,puVar1);\n  local_25 = 0;\n  pr2ws(unaff_EBX + 0x1809c,puVar1);\n  if (*unaff_retaddr == '\x7f') {\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }\n  else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }\n  iVar2 = 0;\n  do {\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  } while (iVar2 < local_b4);\nLAB_000191d2:\n  pr2ws(unaff_EBX + 0x186d6,puVar1);\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00030280();\n  }\n  return;\n}\n\n" (function_definition "void sg_print_command(void)\n\n{\n  undefined1 *puVar1;\n  int unaff_EBX;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  int local_b4;\n  undefined1 local_a4 [127];\n  undefined1 local_25;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19149;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = local_a4;\n  sg_get_command_name(unaff_retaddr,0,0x80,puVar1);\n  local_25 = 0;\n  pr2ws(unaff_EBX + 0x1809c,puVar1);\n  if (*unaff_retaddr == '\x7f') {\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }\n  else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }\n  iVar2 = 0;\n  do {\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  } while (iVar2 < local_b4);\nLAB_000191d2:\n  pr2ws(unaff_EBX + 0x186d6,puVar1);\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00030280();\n  }\n  return;\n}" primitive_type (function_declarator "sg_print_command(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  undefined1 *puVar1;\n  int unaff_EBX;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  int local_b4;\n  undefined1 local_a4 [127];\n  undefined1 local_25;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19149;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = local_a4;\n  sg_get_command_name(unaff_retaddr,0,0x80,puVar1);\n  local_25 = 0;\n  pr2ws(unaff_EBX + 0x1809c,puVar1);\n  if (*unaff_retaddr == '\x7f') {\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }\n  else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }\n  iVar2 = 0;\n  do {\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  } while (iVar2 < local_b4);\nLAB_000191d2:\n  pr2ws(unaff_EBX + 0x186d6,puVar1);\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00030280();\n  }\n  return;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (declaration "int local_b4;" primitive_type identifier ;) (declaration "undefined1 local_a4 [127];" type_identifier (array_declarator "local_a4 [127]" identifier [ number_literal ]) ;) (declaration "undefined1 local_25;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x19149;" (assignment_expression "uStack_14 = 0x19149" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = local_a4;" (assignment_expression "puVar1 = local_a4" identifier = identifier) ;) (expression_statement "sg_get_command_name(unaff_retaddr,0,0x80,puVar1);" (call_expression "sg_get_command_name(unaff_retaddr,0,0x80,puVar1)" identifier (argument_list "(unaff_retaddr,0,0x80,puVar1)" ( identifier , number_literal , number_literal , identifier ))) ;) (expression_statement "local_25 = 0;" (assignment_expression "local_25 = 0" identifier = number_literal) ;) (expression_statement "pr2ws(unaff_EBX + 0x1809c,puVar1);" (call_expression "pr2ws(unaff_EBX + 0x1809c,puVar1)" identifier (argument_list "(unaff_EBX + 0x1809c,puVar1)" ( (binary_expression "unaff_EBX + 0x1809c" identifier + number_literal) , identifier ))) ;) (if_statement "if (*unaff_retaddr == '\x7f') {\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }\n  else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }" if (parenthesized_expression "(*unaff_retaddr == '\x7f')" ( (binary_expression "*unaff_retaddr == '\x7f'" (pointer_expression "*unaff_retaddr" * identifier) == (char_literal "'\x7f'" ' escape_sequence ')) )) (compound_statement "{\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }" { (expression_statement "local_b4 = (byte)unaff_retaddr[7] + 8;" (assignment_expression "local_b4 = (byte)unaff_retaddr[7] + 8" identifier = (binary_expression "(byte)unaff_retaddr[7] + 8" (cast_expression "(byte)unaff_retaddr[7]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "unaff_retaddr[7]" identifier [ number_literal ])) + number_literal)) ;) }) (else_clause "else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }" else (compound_statement "{\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }" { (expression_statement "local_b4 = sg_get_command_size(*unaff_retaddr);" (assignment_expression "local_b4 = sg_get_command_size(*unaff_retaddr)" identifier = (call_expression "sg_get_command_size(*unaff_retaddr)" identifier (argument_list "(*unaff_retaddr)" ( (pointer_expression "*unaff_retaddr" * identifier) )))) ;) (if_statement "if (local_b4 < 1) goto LAB_000191d2;" if (parenthesized_expression "(local_b4 < 1)" ( (binary_expression "local_b4 < 1" identifier < number_literal) )) (goto_statement "goto LAB_000191d2;" goto statement_identifier ;)) }))) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  } while (iVar2 < local_b4);" do (compound_statement "{\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  }" { (expression_statement "puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];" (assignment_expression "puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2]" identifier = (cast_expression "(undefined1 *)(uint)(byte)unaff_retaddr[iVar2]" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (cast_expression "(uint)(byte)unaff_retaddr[iVar2]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)unaff_retaddr[iVar2]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "unaff_retaddr[iVar2]" identifier [ identifier ]))))) ;) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws(unaff_EBX + 0x253b6,puVar1);" (call_expression "pr2ws(unaff_EBX + 0x253b6,puVar1)" identifier (argument_list "(unaff_EBX + 0x253b6,puVar1)" ( (binary_expression "unaff_EBX + 0x253b6" identifier + number_literal) , identifier ))) ;) }) while (parenthesized_expression "(iVar2 < local_b4)" ( (binary_expression "iVar2 < local_b4" identifier < identifier) )) ;) (labeled_statement "LAB_000191d2:\n  pr2ws(unaff_EBX + 0x186d6,puVar1);" statement_identifier : (expression_statement "pr2ws(unaff_EBX + 0x186d6,puVar1);" (call_expression "pr2ws(unaff_EBX + 0x186d6,puVar1)" identifier (argument_list "(unaff_EBX + 0x186d6,puVar1)" ( (binary_expression "unaff_EBX + 0x186d6" identifier + number_literal) , identifier ))) ;)) (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00030280();\n  }" if (parenthesized_expression "(local_24 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_00030280();\n  }" { comment (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid sg_print_command(uint8_t *command)\n\n{\n  int iVar1;\n  char *buff_00;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_b0;\n  char buff [128];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  buff_00 = buff;\n  sg_get_command_name(command,0,0x80,buff_00);\n  buff[0x7f] = '\0';\n  pr2ws("%s [",buff_00);\n  if (*command == '\x7f') {\n    local_b0 = command[7] + 8;\n  }\n  else {\n    local_b0 = sg_get_command_size(*command);\n    if (local_b0 < 1) goto LAB_000191d2;\n  }\n  iVar2 = 0;\n  do {\n    buff_00 = (char *)(uint)command[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws("%02x ",buff_00);\n  } while (iVar2 < local_b0);\nLAB_000191d2:\n  pr2ws("]\n",buff_00);\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}\n\n" comment comment (function_definition "void sg_print_command(uint8_t *command)\n\n{\n  int iVar1;\n  char *buff_00;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_b0;\n  char buff [128];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  buff_00 = buff;\n  sg_get_command_name(command,0,0x80,buff_00);\n  buff[0x7f] = '\0';\n  pr2ws("%s [",buff_00);\n  if (*command == '\x7f') {\n    local_b0 = command[7] + 8;\n  }\n  else {\n    local_b0 = sg_get_command_size(*command);\n    if (local_b0 < 1) goto LAB_000191d2;\n  }\n  iVar2 = 0;\n  do {\n    buff_00 = (char *)(uint)command[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws("%02x ",buff_00);\n  } while (iVar2 < local_b0);\nLAB_000191d2:\n  pr2ws("]\n",buff_00);\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" primitive_type (function_declarator "sg_print_command(uint8_t *command)" identifier (parameter_list "(uint8_t *command)" ( (parameter_declaration "uint8_t *command" primitive_type (pointer_declarator "*command" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  char *buff_00;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_b0;\n  char buff [128];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  buff_00 = buff;\n  sg_get_command_name(command,0,0x80,buff_00);\n  buff[0x7f] = '\0';\n  pr2ws("%s [",buff_00);\n  if (*command == '\x7f') {\n    local_b0 = command[7] + 8;\n  }\n  else {\n    local_b0 = sg_get_command_size(*command);\n    if (local_b0 < 1) goto LAB_000191d2;\n  }\n  iVar2 = 0;\n  do {\n    buff_00 = (char *)(uint)command[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws("%02x ",buff_00);\n  } while (iVar2 < local_b0);\nLAB_000191d2:\n  pr2ws("]\n",buff_00);\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *buff_00;" primitive_type (pointer_declarator "*buff_00" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_b0;" primitive_type identifier ;) (declaration "char buff [128];" primitive_type (array_declarator "buff [128]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "buff_00 = buff;" (assignment_expression "buff_00 = buff" identifier = identifier) ;) (expression_statement "sg_get_command_name(command,0,0x80,buff_00);" (call_expression "sg_get_command_name(command,0,0x80,buff_00)" identifier (argument_list "(command,0,0x80,buff_00)" ( identifier , number_literal , number_literal , identifier ))) ;) (expression_statement "buff[0x7f] = '\0';" (assignment_expression "buff[0x7f] = '\0'" (subscript_expression "buff[0x7f]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pr2ws("%s [",buff_00);" (call_expression "pr2ws("%s [",buff_00)" identifier (argument_list "("%s [",buff_00)" ( (string_literal ""%s ["" " string_content ") , identifier ))) ;) (if_statement "if (*command == '\x7f') {\n    local_b0 = command[7] + 8;\n  }\n  else {\n    local_b0 = sg_get_command_size(*command);\n    if (local_b0 < 1) goto LAB_000191d2;\n  }" if (parenthesized_expression "(*command == '\x7f')" ( (binary_expression "*command == '\x7f'" (pointer_expression "*command" * identifier) == (char_literal "'\x7f'" ' escape_sequence ')) )) (compound_statement "{\n    local_b0 = command[7] + 8;\n  }" { (expression_statement "local_b0 = command[7] + 8;" (assignment_expression "local_b0 = command[7] + 8" identifier = (binary_expression "command[7] + 8" (subscript_expression "command[7]" identifier [ number_literal ]) + number_literal)) ;) }) (else_clause "else {\n    local_b0 = sg_get_command_size(*command);\n    if (local_b0 < 1) goto LAB_000191d2;\n  }" else (compound_statement "{\n    local_b0 = sg_get_command_size(*command);\n    if (local_b0 < 1) goto LAB_000191d2;\n  }" { (expression_statement "local_b0 = sg_get_command_size(*command);" (assignment_expression "local_b0 = sg_get_command_size(*command)" identifier = (call_expression "sg_get_command_size(*command)" identifier (argument_list "(*command)" ( (pointer_expression "*command" * identifier) )))) ;) (if_statement "if (local_b0 < 1) goto LAB_000191d2;" if (parenthesized_expression "(local_b0 < 1)" ( (binary_expression "local_b0 < 1" identifier < number_literal) )) (goto_statement "goto LAB_000191d2;" goto statement_identifier ;)) }))) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n    buff_00 = (char *)(uint)command[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws("%02x ",buff_00);\n  } while (iVar2 < local_b0);" do (compound_statement "{\n    buff_00 = (char *)(uint)command[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws("%02x ",buff_00);\n  }" { (expression_statement "buff_00 = (char *)(uint)command[iVar2];" (assignment_expression "buff_00 = (char *)(uint)command[iVar2]" identifier = (cast_expression "(char *)(uint)command[iVar2]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (cast_expression "(uint)command[iVar2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "command[iVar2]" identifier [ identifier ])))) ;) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws("%02x ",buff_00);" (call_expression "pr2ws("%02x ",buff_00)" identifier (argument_list "("%02x ",buff_00)" ( (string_literal ""%02x "" " string_content ") , identifier ))) ;) }) while (parenthesized_expression "(iVar2 < local_b0)" ( (binary_expression "iVar2 < local_b0" identifier < identifier) )) ;) (labeled_statement "LAB_000191d2:\n  pr2ws("]\n",buff_00);" statement_identifier : (expression_statement "pr2ws("]\n",buff_00);" (call_expression "pr2ws("]\n",buff_00)" identifier (argument_list "("]\n",buff_00)" ( (string_literal ""]\n"" " string_content escape_sequence ") , identifier ))) ;)) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void sg_print_command(void)\n\n{\n  undefined1 *puVar1;\n  int unaff_EBX;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  int local_b4;\n  undefined1 local_a4 [127];\n  undefined1 local_25;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19149;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = local_a4;\n  sg_get_command_name(unaff_retaddr,0,0x80,puVar1);\n  local_25 = 0;\n  pr2ws(unaff_EBX + 0x1809c,puVar1);\n  if (*unaff_retaddr == '\x7f') {\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }\n  else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }\n  iVar2 = 0;\n  do {\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  } while (iVar2 < local_b4);\nLAB_000191d2:\n  pr2ws(unaff_EBX + 0x186d6,puVar1);\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }\n  return;\n}\n\n" (function_definition "void sg_print_command(void)\n\n{\n  undefined1 *puVar1;\n  int unaff_EBX;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  int local_b4;\n  undefined1 local_a4 [127];\n  undefined1 local_25;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19149;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = local_a4;\n  sg_get_command_name(unaff_retaddr,0,0x80,puVar1);\n  local_25 = 0;\n  pr2ws(unaff_EBX + 0x1809c,puVar1);\n  if (*unaff_retaddr == '\x7f') {\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }\n  else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }\n  iVar2 = 0;\n  do {\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  } while (iVar2 < local_b4);\nLAB_000191d2:\n  pr2ws(unaff_EBX + 0x186d6,puVar1);\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }\n  return;\n}" primitive_type (function_declarator "sg_print_command(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  undefined1 *puVar1;\n  int unaff_EBX;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  int local_b4;\n  undefined1 local_a4 [127];\n  undefined1 local_25;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19149;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = local_a4;\n  sg_get_command_name(unaff_retaddr,0,0x80,puVar1);\n  local_25 = 0;\n  pr2ws(unaff_EBX + 0x1809c,puVar1);\n  if (*unaff_retaddr == '\x7f') {\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }\n  else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }\n  iVar2 = 0;\n  do {\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  } while (iVar2 < local_b4);\nLAB_000191d2:\n  pr2ws(unaff_EBX + 0x186d6,puVar1);\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }\n  return;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (declaration "int local_b4;" primitive_type identifier ;) (declaration "undefined1 local_a4 [127];" type_identifier (array_declarator "local_a4 [127]" identifier [ number_literal ]) ;) (declaration "undefined1 local_25;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x19149;" (assignment_expression "uStack_14 = 0x19149" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = local_a4;" (assignment_expression "puVar1 = local_a4" identifier = identifier) ;) (expression_statement "sg_get_command_name(unaff_retaddr,0,0x80,puVar1);" (call_expression "sg_get_command_name(unaff_retaddr,0,0x80,puVar1)" identifier (argument_list "(unaff_retaddr,0,0x80,puVar1)" ( identifier , number_literal , number_literal , identifier ))) ;) (expression_statement "local_25 = 0;" (assignment_expression "local_25 = 0" identifier = number_literal) ;) (expression_statement "pr2ws(unaff_EBX + 0x1809c,puVar1);" (call_expression "pr2ws(unaff_EBX + 0x1809c,puVar1)" identifier (argument_list "(unaff_EBX + 0x1809c,puVar1)" ( (binary_expression "unaff_EBX + 0x1809c" identifier + number_literal) , identifier ))) ;) (if_statement "if (*unaff_retaddr == '\x7f') {\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }\n  else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }" if (parenthesized_expression "(*unaff_retaddr == '\x7f')" ( (binary_expression "*unaff_retaddr == '\x7f'" (pointer_expression "*unaff_retaddr" * identifier) == (char_literal "'\x7f'" ' escape_sequence ')) )) (compound_statement "{\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }" { (expression_statement "local_b4 = (byte)unaff_retaddr[7] + 8;" (assignment_expression "local_b4 = (byte)unaff_retaddr[7] + 8" identifier = (binary_expression "(byte)unaff_retaddr[7] + 8" (cast_expression "(byte)unaff_retaddr[7]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "unaff_retaddr[7]" identifier [ number_literal ])) + number_literal)) ;) }) (else_clause "else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }" else (compound_statement "{\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }" { (expression_statement "local_b4 = sg_get_command_size(*unaff_retaddr);" (assignment_expression "local_b4 = sg_get_command_size(*unaff_retaddr)" identifier = (call_expression "sg_get_command_size(*unaff_retaddr)" identifier (argument_list "(*unaff_retaddr)" ( (pointer_expression "*unaff_retaddr" * identifier) )))) ;) (if_statement "if (local_b4 < 1) goto LAB_000191d2;" if (parenthesized_expression "(local_b4 < 1)" ( (binary_expression "local_b4 < 1" identifier < number_literal) )) (goto_statement "goto LAB_000191d2;" goto statement_identifier ;)) }))) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  } while (iVar2 < local_b4);" do (compound_statement "{\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  }" { (expression_statement "puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];" (assignment_expression "puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2]" identifier = (cast_expression "(undefined1 *)(uint)(byte)unaff_retaddr[iVar2]" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (cast_expression "(uint)(byte)unaff_retaddr[iVar2]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)unaff_retaddr[iVar2]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "unaff_retaddr[iVar2]" identifier [ identifier ]))))) ;) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "pr2ws(unaff_EBX + 0x253b6,puVar1);" (call_expression "pr2ws(unaff_EBX + 0x253b6,puVar1)" identifier (argument_list "(unaff_EBX + 0x253b6,puVar1)" ( (binary_expression "unaff_EBX + 0x253b6" identifier + number_literal) , identifier ))) ;) }) while (parenthesized_expression "(iVar2 < local_b4)" ( (binary_expression "iVar2 < local_b4" identifier < identifier) )) ;) (labeled_statement "LAB_000191d2:\n  pr2ws(unaff_EBX + 0x186d6,puVar1);" statement_identifier : (expression_statement "pr2ws(unaff_EBX + 0x186d6,puVar1);" (call_expression "pr2ws(unaff_EBX + 0x186d6,puVar1)" identifier (argument_list "(unaff_EBX + 0x186d6,puVar1)" ( (binary_expression "unaff_EBX + 0x186d6" identifier + number_literal) , identifier ))) ;)) (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }" if (parenthesized_expression "(local_24 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_00030280();\n  }" { (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (goto_statement goto statement_identifier ;)) }))) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ IDENT ]))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return ;) })))
(function_definition "void sg_print_command(void)\n\n{\n  undefined1 *puVar1;\n  int unaff_EBX;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  int local_b4;\n  undefined1 local_a4 [127];\n  undefined1 local_25;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19149;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = local_a4;\n  sg_get_command_name(unaff_retaddr,0,0x80,puVar1);\n  local_25 = 0;\n  pr2ws(unaff_EBX + 0x1809c,puVar1);\n  if (*unaff_retaddr == '\x7f') {\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }\n  else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }\n  iVar2 = 0;\n  do {\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  } while (iVar2 < local_b4);\nLAB_000191d2:\n  pr2ws(unaff_EBX + 0x186d6,puVar1);\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }\n  return;\n}" (primitive_type "void") (function_declarator "sg_print_command(void)" (identifier "sg_print_command") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  undefined1 *puVar1;\n  int unaff_EBX;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  int local_b4;\n  undefined1 local_a4 [127];\n  undefined1 local_25;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x19149;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = local_a4;\n  sg_get_command_name(unaff_retaddr,0,0x80,puVar1);\n  local_25 = 0;\n  pr2ws(unaff_EBX + 0x1809c,puVar1);\n  if (*unaff_retaddr == '\x7f') {\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }\n  else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }\n  iVar2 = 0;\n  do {\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  } while (iVar2 < local_b4);\nLAB_000191d2:\n  pr2ws(unaff_EBX + 0x186d6,puVar1);\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }\n  return;\n}" ({ "{") (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char *unaff_retaddr;" (primitive_type "char") (pointer_declarator "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (; ";")) (declaration "int local_b4;" (primitive_type "int") (identifier "local_b4") (; ";")) (declaration "undefined1 local_a4 [127];" (type_identifier "undefined1") (array_declarator "local_a4 [127]" (identifier "local_a4") ([ "[") (number_literal "127") (] "]")) (; ";")) (declaration "undefined1 local_25;" (type_identifier "undefined1") (identifier "local_25") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x19149;" (assignment_expression "uStack_14 = 0x19149" (identifier "uStack_14") (= "=") (number_literal "0x19149")) (; ";")) (expression_statement "entry();" (call_expression "entry()" (identifier "entry") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "puVar1 = local_a4;" (assignment_expression "puVar1 = local_a4" (identifier "puVar1") (= "=") (identifier "local_a4")) (; ";")) (expression_statement "sg_get_command_name(unaff_retaddr,0,0x80,puVar1);" (call_expression "sg_get_command_name(unaff_retaddr,0,0x80,puVar1)" (identifier "sg_get_command_name") (argument_list "(unaff_retaddr,0,0x80,puVar1)" (( "(") (identifier "unaff_retaddr") (, ",") (number_literal "0") (, ",") (number_literal "0x80") (, ",") (identifier "puVar1") () ")"))) (; ";")) (expression_statement "local_25 = 0;" (assignment_expression "local_25 = 0" (identifier "local_25") (= "=") (number_literal "0")) (; ";")) (expression_statement "pr2ws(unaff_EBX + 0x1809c,puVar1);" (call_expression "pr2ws(unaff_EBX + 0x1809c,puVar1)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x1809c,puVar1)" (( "(") (binary_expression "unaff_EBX + 0x1809c" (identifier "unaff_EBX") (+ "+") (number_literal "0x1809c")) (, ",") (identifier "puVar1") () ")"))) (; ";")) (if_statement "if (*unaff_retaddr == '\x7f') {\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }\n  else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }" (if "if") (parenthesized_expression "(*unaff_retaddr == '\x7f')" (( "(") (binary_expression "*unaff_retaddr == '\x7f'" (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (== "==") (char_literal "'\x7f'" (' "'") (escape_sequence "\x7f") (' "'"))) () ")")) (compound_statement "{\n    local_b4 = (byte)unaff_retaddr[7] + 8;\n  }" ({ "{") (expression_statement "local_b4 = (byte)unaff_retaddr[7] + 8;" (assignment_expression "local_b4 = (byte)unaff_retaddr[7] + 8" (identifier "local_b4") (= "=") (binary_expression "(byte)unaff_retaddr[7] + 8" (cast_expression "(byte)unaff_retaddr[7]" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (subscript_expression "unaff_retaddr[7]" (identifier "unaff_retaddr") ([ "[") (number_literal "7") (] "]"))) (+ "+") (number_literal "8"))) (; ";")) (} "}")) (else_clause "else {\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }" (else "else") (compound_statement "{\n    local_b4 = sg_get_command_size(*unaff_retaddr);\n    if (local_b4 < 1) goto LAB_000191d2;\n  }" ({ "{") (expression_statement "local_b4 = sg_get_command_size(*unaff_retaddr);" (assignment_expression "local_b4 = sg_get_command_size(*unaff_retaddr)" (identifier "local_b4") (= "=") (call_expression "sg_get_command_size(*unaff_retaddr)" (identifier "sg_get_command_size") (argument_list "(*unaff_retaddr)" (( "(") (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) () ")")))) (; ";")) (if_statement "if (local_b4 < 1) goto LAB_000191d2;" (if "if") (parenthesized_expression "(local_b4 < 1)" (( "(") (binary_expression "local_b4 < 1" (identifier "local_b4") (< "<") (number_literal "1")) () ")")) (goto_statement "goto LAB_000191d2;" (goto "goto") (statement_identifier "LAB_000191d2") (; ";"))) (} "}")))) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  } while (iVar2 < local_b4);" (do "do") (compound_statement "{\n    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];\n    iVar2 = iVar2 + 1;\n    pr2ws(unaff_EBX + 0x253b6,puVar1);\n  }" ({ "{") (expression_statement "puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];" (assignment_expression "puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2]" (identifier "puVar1") (= "=") (cast_expression "(undefined1 *)(uint)(byte)unaff_retaddr[iVar2]" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (cast_expression "(uint)(byte)unaff_retaddr[iVar2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(byte)unaff_retaddr[iVar2]" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (subscript_expression "unaff_retaddr[iVar2]" (identifier "unaff_retaddr") ([ "[") (identifier "iVar2") (] "]")))))) (; ";")) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" (identifier "iVar2") (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pr2ws(unaff_EBX + 0x253b6,puVar1);" (call_expression "pr2ws(unaff_EBX + 0x253b6,puVar1)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x253b6,puVar1)" (( "(") (binary_expression "unaff_EBX + 0x253b6" (identifier "unaff_EBX") (+ "+") (number_literal "0x253b6")) (, ",") (identifier "puVar1") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar2 < local_b4)" (( "(") (binary_expression "iVar2 < local_b4" (identifier "iVar2") (< "<") (identifier "local_b4")) () ")")) (; ";")) (labeled_statement "LAB_000191d2:\n  pr2ws(unaff_EBX + 0x186d6,puVar1);" (statement_identifier "LAB_000191d2") (: ":") (expression_statement "pr2ws(unaff_EBX + 0x186d6,puVar1);" (call_expression "pr2ws(unaff_EBX + 0x186d6,puVar1)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x186d6,puVar1)" (( "(") (binary_expression "unaff_EBX + 0x186d6" (identifier "unaff_EBX") (+ "+") (number_literal "0x186d6")) (, ",") (identifier "puVar1") () ")"))) (; ";"))) (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00030280();\n  }" (if "if") (parenthesized_expression "(local_24 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_24 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_00030280();\n  }" ({ "{") (expression_statement "FUN_00030280();" (call_expression "FUN_00030280()" (identifier "FUN_00030280") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void function_1(uint8_t *command)

{
  int var_7;
  char *buff_00;
  int var_6;
  int var_1;
  int var_5;
  char buff [128];
  
  var_7 = *(int *)(var_1 + 0x14);
  buff_00 = buff;
  var_2(command,0,0x80,buff_00);
  buff[0x7f] = '\0';
  var_3("%s [",buff_00);
  if (*command == '\x7f') {
    var_5 = command[7] + 8;
  }
  else {
    var_5 = var_4(*command);
    if (var_5 < 1) goto LAB_000191d2;
  }
  var_6 = 0;
  do {
    buff_00 = (char *)(type_1)command[var_6];
    var_6 = var_6 + 1;
    var_3("%02x ",buff_00);
  } while (var_6 < var_5);
LAB_000191d2:
  var_3("]\n",buff_00);
  if (var_7 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_8();
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (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: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier))))) (if_statement condition: (parenthesized_expression (binary_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: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement))))

void MASKED(void)

{
  undefined1 *puVar1;
  int unaff_EBX;
  int iVar2;
  int in_GS_OFFSET;
  char *unaff_retaddr;
  int local_b4;
  undefined1 local_a4 [127];
  undefined1 local_25;
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x19149;
  entry();
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  puVar1 = local_a4;
  sg_get_command_name(unaff_retaddr,0,0x80,puVar1);
  local_25 = 0;
  pr2ws(unaff_EBX + 0x1809c,puVar1);
  if (*unaff_retaddr == '\x7f') {
    local_b4 = (byte)unaff_retaddr[7] + 8;
  }
  else {
    local_b4 = sg_get_command_size(*unaff_retaddr);
    if (local_b4 < 1) goto LAB_000191d2;
  }
  iVar2 = 0;
  do {
    puVar1 = (undefined1 *)(uint)(byte)unaff_retaddr[iVar2];
    iVar2 = iVar2 + 1;
    pr2ws(unaff_EBX + 0x253b6,puVar1);
  } while (iVar2 < local_b4);
LAB_000191d2:
  pr2ws(unaff_EBX + 0x186d6,puVar1);
  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00030280();
  }
  return;
}

