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

void sh_getopt_restore_istate(sh_getopt_state_t *state)

{
  sh_optarg = state->gs_optarg;
  sh_optind = state->gs_optind;
  sh_curopt = state->gs_curopt;
  nextchar = state->gs_nextchar;
  sh_charindex = state->gs_charindex;
  free(state);
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void sh_getopt_restore_istate(undefined4 *param_1)

{
  sh_optarg = *param_1;
  sh_optind = param_1[1];
  DAT_0015183c = param_1[2];
  DAT_00151838 = param_1[3];
  DAT_00151834 = param_1[4];
  free(param_1);
  return;
}


PUSH EBX
CALL 0x00031ed0
ADD EBX,0x9746a
SUB ESP,0x14
MOV EAX,dword ptr [ESP + 0x1c]
MOV EDX,dword ptr [EAX]
MOV dword ptr [EBX + 0x7830],EDX
MOV EDX,dword ptr [EAX + 0x4]
MOV dword ptr [EBX + 0x782c],EDX
MOV EDX,dword ptr [EAX + 0x8]
MOV dword ptr [EBX + 0x783c],EDX
MOV EDX,dword ptr [EAX + 0xc]
MOV dword ptr [EBX + 0x7838],EDX
MOV EDX,dword ptr [EAX + 0x10]
PUSH EAX
MOV dword ptr [EBX + 0x7834],EDX
CALL 0x0002f200
ADD ESP,0x18
POP EBX
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid sh_getopt_restore_istate(undefined4 *param_1)\n\n{\n  sh_optarg = *param_1;\n  sh_optind = param_1[1];\n  DAT_0015183c = param_1[2];\n  DAT_00151838 = param_1[3];\n  DAT_00151834 = param_1[4];\n  free(param_1);\n  return;\n}\n\n" comment (function_definition "void sh_getopt_restore_istate(undefined4 *param_1)\n\n{\n  sh_optarg = *param_1;\n  sh_optind = param_1[1];\n  DAT_0015183c = param_1[2];\n  DAT_00151838 = param_1[3];\n  DAT_00151834 = param_1[4];\n  free(param_1);\n  return;\n}" primitive_type (function_declarator "sh_getopt_restore_istate(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  sh_optarg = *param_1;\n  sh_optind = param_1[1];\n  DAT_0015183c = param_1[2];\n  DAT_00151838 = param_1[3];\n  DAT_00151834 = param_1[4];\n  free(param_1);\n  return;\n}" { (expression_statement "sh_optarg = *param_1;" (assignment_expression "sh_optarg = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "sh_optind = param_1[1];" (assignment_expression "sh_optind = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "DAT_0015183c = param_1[2];" (assignment_expression "DAT_0015183c = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "DAT_00151838 = param_1[3];" (assignment_expression "DAT_00151838 = param_1[3]" identifier = (subscript_expression "param_1[3]" identifier [ number_literal ])) ;) (expression_statement "DAT_00151834 = param_1[4];" (assignment_expression "DAT_00151834 = param_1[4]" identifier = (subscript_expression "param_1[4]" identifier [ number_literal ])) ;) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (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 sh_getopt_restore_istate(sh_getopt_state_t *state)\n\n{\n  sh_optarg = state->gs_optarg;\n  sh_optind = state->gs_optind;\n  sh_curopt = state->gs_curopt;\n  nextchar = state->gs_nextchar;\n  sh_charindex = state->gs_charindex;\n  free(state);\n  return;\n}\n\n" comment comment (function_definition "void sh_getopt_restore_istate(sh_getopt_state_t *state)\n\n{\n  sh_optarg = state->gs_optarg;\n  sh_optind = state->gs_optind;\n  sh_curopt = state->gs_curopt;\n  nextchar = state->gs_nextchar;\n  sh_charindex = state->gs_charindex;\n  free(state);\n  return;\n}" primitive_type (function_declarator "sh_getopt_restore_istate(sh_getopt_state_t *state)" identifier (parameter_list "(sh_getopt_state_t *state)" ( (parameter_declaration "sh_getopt_state_t *state" type_identifier (pointer_declarator "*state" * identifier)) ))) (compound_statement "{\n  sh_optarg = state->gs_optarg;\n  sh_optind = state->gs_optind;\n  sh_curopt = state->gs_curopt;\n  nextchar = state->gs_nextchar;\n  sh_charindex = state->gs_charindex;\n  free(state);\n  return;\n}" { (expression_statement "sh_optarg = state->gs_optarg;" (assignment_expression "sh_optarg = state->gs_optarg" identifier = (field_expression "state->gs_optarg" identifier -> field_identifier)) ;) (expression_statement "sh_optind = state->gs_optind;" (assignment_expression "sh_optind = state->gs_optind" identifier = (field_expression "state->gs_optind" identifier -> field_identifier)) ;) (expression_statement "sh_curopt = state->gs_curopt;" (assignment_expression "sh_curopt = state->gs_curopt" identifier = (field_expression "state->gs_curopt" identifier -> field_identifier)) ;) (expression_statement "nextchar = state->gs_nextchar;" (assignment_expression "nextchar = state->gs_nextchar" identifier = (field_expression "state->gs_nextchar" identifier -> field_identifier)) ;) (expression_statement "sh_charindex = state->gs_charindex;" (assignment_expression "sh_charindex = state->gs_charindex" identifier = (field_expression "state->gs_charindex" identifier -> field_identifier)) ;) (expression_statement "free(state);" (call_expression "free(state)" identifier (argument_list "(state)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void sh_getopt_restore_istate(undefined4 *param_1)\n\n{\n  sh_optarg = *param_1;\n  sh_optind = param_1[1];\n  DAT_0015183c = param_1[2];\n  DAT_00151838 = param_1[3];\n  DAT_00151834 = param_1[4];\n  free(param_1);\n  return;\n}\n\n" (function_definition "void sh_getopt_restore_istate(undefined4 *param_1)\n\n{\n  sh_optarg = *param_1;\n  sh_optind = param_1[1];\n  DAT_0015183c = param_1[2];\n  DAT_00151838 = param_1[3];\n  DAT_00151834 = param_1[4];\n  free(param_1);\n  return;\n}" primitive_type (function_declarator "sh_getopt_restore_istate(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  sh_optarg = *param_1;\n  sh_optind = param_1[1];\n  DAT_0015183c = param_1[2];\n  DAT_00151838 = param_1[3];\n  DAT_00151834 = param_1[4];\n  free(param_1);\n  return;\n}" { (expression_statement "sh_optarg = *param_1;" (assignment_expression "sh_optarg = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "sh_optind = param_1[1];" (assignment_expression "sh_optind = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "DAT_0015183c = param_1[2];" (assignment_expression "DAT_0015183c = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "DAT_00151838 = param_1[3];" (assignment_expression "DAT_00151838 = param_1[3]" identifier = (subscript_expression "param_1[3]" identifier [ number_literal ])) ;) (expression_statement "DAT_00151834 = param_1[4];" (assignment_expression "DAT_00151834 = param_1[4]" identifier = (subscript_expression "param_1[4]" identifier [ number_literal ])) ;) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void sh_getopt_restore_istate(undefined4 *param_1)\n\n{\n  sh_optarg = *param_1;\n  sh_optind = param_1[1];\n  DAT_0015183c = param_1[2];\n  DAT_00151838 = param_1[3];\n  DAT_00151834 = param_1[4];\n  free(param_1);\n  return;\n}" (primitive_type "void") (function_declarator "sh_getopt_restore_istate(undefined4 *param_1)" (identifier "sh_getopt_restore_istate") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  sh_optarg = *param_1;\n  sh_optind = param_1[1];\n  DAT_0015183c = param_1[2];\n  DAT_00151838 = param_1[3];\n  DAT_00151834 = param_1[4];\n  free(param_1);\n  return;\n}" ({ "{") (expression_statement "sh_optarg = *param_1;" (assignment_expression "sh_optarg = *param_1" (identifier "sh_optarg") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "sh_optind = param_1[1];" (assignment_expression "sh_optind = param_1[1]" (identifier "sh_optind") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "DAT_0015183c = param_1[2];" (assignment_expression "DAT_0015183c = param_1[2]" (identifier "DAT_0015183c") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "DAT_00151838 = param_1[3];" (assignment_expression "DAT_00151838 = param_1[3]" (identifier "DAT_00151838") (= "=") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]"))) (; ";")) (expression_statement "DAT_00151834 = param_1[4];" (assignment_expression "DAT_00151834 = param_1[4]" (identifier "DAT_00151834") (= "=") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) (; ";")) (expression_statement "free(param_1);" (call_expression "free(param_1)" (identifier "free") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (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(type_1 *state)

{
  sh_optarg = state->gs_optarg;
  sh_optind = state->gs_optind;
  sh_curopt = state->gs_curopt;
  nextchar = state->gs_nextchar;
  sh_charindex = state->gs_charindex;
  var_1(state);
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(undefined4 *param_1)

{
  sh_optarg = *param_1;
  sh_optind = param_1[1];
  DAT_0015183c = param_1[2];
  DAT_00151838 = param_1[3];
  DAT_00151834 = param_1[4];
  free(param_1);
  return;
}

