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

size_t rpl_mbrlen(char *s,size_t n,mbstate_t *ps)

{
  size_t sVar1;
  
  if (ps == (mbstate_t *)0x0) {
    ps = &internal_state;
  }
  sVar1 = rpl_mbrtowc((wchar_t *)0x0,s,n,ps);
  return sVar1;
}



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

void FUN_00015740(undefined4 param_1,undefined4 param_2,undefined *param_3)

{
  if (param_3 == (undefined *)0x0) {
    param_3 = &DAT_0001a2e4;
  }
  FUN_00015780(0,param_1,param_2,param_3);
  return;
}


PUSH EBX
CALL 0x00011ae0
ADD EBX,0x48ba
SUB ESP,0x8
MOV EAX,dword ptr [ESP + 0x18]
TEST EAX,EAX
LEA EDX,[EBX + 0x2e4]
CMOVZ EAX,EDX
PUSH EAX
PUSH dword ptr [ESP + 0x18]
PUSH dword ptr [ESP + 0x18]
PUSH 0x0
CALL 0x00015780
ADD ESP,0x18
POP EBX
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00015740(undefined4 param_1,undefined4 param_2,undefined *param_3)\n\n{\n  if (param_3 == (undefined *)0x0) {\n    param_3 = &DAT_0001a2e4;\n  }\n  FUN_00015780(0,param_1,param_2,param_3);\n  return;\n}\n\n" comment (function_definition "void FUN_00015740(undefined4 param_1,undefined4 param_2,undefined *param_3)\n\n{\n  if (param_3 == (undefined *)0x0) {\n    param_3 = &DAT_0001a2e4;\n  }\n  FUN_00015780(0,param_1,param_2,param_3);\n  return;\n}" primitive_type (function_declarator "FUN_00015740(undefined4 param_1,undefined4 param_2,undefined *param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  if (param_3 == (undefined *)0x0) {\n    param_3 = &DAT_0001a2e4;\n  }\n  FUN_00015780(0,param_1,param_2,param_3);\n  return;\n}" { (if_statement "if (param_3 == (undefined *)0x0) {\n    param_3 = &DAT_0001a2e4;\n  }" if (parenthesized_expression "(param_3 == (undefined *)0x0)" ( (binary_expression "param_3 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_3 = &DAT_0001a2e4;\n  }" { (expression_statement "param_3 = &DAT_0001a2e4;" (assignment_expression "param_3 = &DAT_0001a2e4" identifier = (pointer_expression "&DAT_0001a2e4" & identifier)) ;) })) (expression_statement "FUN_00015780(0,param_1,param_2,param_3);" (call_expression "FUN_00015780(0,param_1,param_2,param_3)" identifier (argument_list "(0,param_1,param_2,param_3)" ( number_literal , identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nsize_t rpl_mbrlen(char *s,size_t n,mbstate_t *ps)\n\n{\n  size_t sVar1;\n  \n  if (ps == (mbstate_t *)0x0) {\n    ps = &internal_state;\n  }\n  sVar1 = rpl_mbrtowc((wchar_t *)0x0,s,n,ps);\n  return sVar1;\n}\n\n" comment (function_definition "size_t rpl_mbrlen(char *s,size_t n,mbstate_t *ps)\n\n{\n  size_t sVar1;\n  \n  if (ps == (mbstate_t *)0x0) {\n    ps = &internal_state;\n  }\n  sVar1 = rpl_mbrtowc((wchar_t *)0x0,s,n,ps);\n  return sVar1;\n}" primitive_type (function_declarator "rpl_mbrlen(char *s,size_t n,mbstate_t *ps)" identifier (parameter_list "(char *s,size_t n,mbstate_t *ps)" ( (parameter_declaration "char *s" primitive_type (pointer_declarator "*s" * identifier)) , (parameter_declaration "size_t n" primitive_type identifier) , (parameter_declaration "mbstate_t *ps" type_identifier (pointer_declarator "*ps" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  \n  if (ps == (mbstate_t *)0x0) {\n    ps = &internal_state;\n  }\n  sVar1 = rpl_mbrtowc((wchar_t *)0x0,s,n,ps);\n  return sVar1;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (if_statement "if (ps == (mbstate_t *)0x0) {\n    ps = &internal_state;\n  }" if (parenthesized_expression "(ps == (mbstate_t *)0x0)" ( (binary_expression "ps == (mbstate_t *)0x0" identifier == (cast_expression "(mbstate_t *)0x0" ( (type_descriptor "mbstate_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ps = &internal_state;\n  }" { (expression_statement "ps = &internal_state;" (assignment_expression "ps = &internal_state" identifier = (pointer_expression "&internal_state" & identifier)) ;) })) (expression_statement "sVar1 = rpl_mbrtowc((wchar_t *)0x0,s,n,ps);" (assignment_expression "sVar1 = rpl_mbrtowc((wchar_t *)0x0,s,n,ps)" identifier = (call_expression "rpl_mbrtowc((wchar_t *)0x0,s,n,ps)" identifier (argument_list "((wchar_t *)0x0,s,n,ps)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , identifier , identifier )))) ;) (return_statement "return sVar1;" return identifier ;) })))
(translation_unit "void FUN_00015740(undefined4 param_1,undefined4 param_2,undefined *param_3)\n\n{\n  if (param_3 == (undefined *)0x0) {\n    param_3 = &DAT_0001a2e4;\n  }\n  FUN_00015780(0,param_1,param_2,param_3);\n  return;\n}\n\n" (function_definition "void FUN_00015740(undefined4 param_1,undefined4 param_2,undefined *param_3)\n\n{\n  if (param_3 == (undefined *)0x0) {\n    param_3 = &DAT_0001a2e4;\n  }\n  FUN_00015780(0,param_1,param_2,param_3);\n  return;\n}" primitive_type (function_declarator "FUN_00015740(undefined4 param_1,undefined4 param_2,undefined *param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  if (param_3 == (undefined *)0x0) {\n    param_3 = &DAT_0001a2e4;\n  }\n  FUN_00015780(0,param_1,param_2,param_3);\n  return;\n}" { (if_statement "if (param_3 == (undefined *)0x0) {\n    param_3 = &DAT_0001a2e4;\n  }" if (parenthesized_expression "(param_3 == (undefined *)0x0)" ( (binary_expression "param_3 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_3 = &DAT_0001a2e4;\n  }" { (expression_statement "param_3 = &DAT_0001a2e4;" (assignment_expression "param_3 = &DAT_0001a2e4" identifier = (pointer_expression "&DAT_0001a2e4" & identifier)) ;) })) (expression_statement "FUN_00015780(0,param_1,param_2,param_3);" (call_expression "FUN_00015780(0,param_1,param_2,param_3)" identifier (argument_list "(0,param_1,param_2,param_3)" ( number_literal , identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) })) (expression_statement (call_expression IDENT (argument_list ( LIT , IDENT , IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00015740(undefined4 param_1,undefined4 param_2,undefined *param_3)\n\n{\n  if (param_3 == (undefined *)0x0) {\n    param_3 = &DAT_0001a2e4;\n  }\n  FUN_00015780(0,param_1,param_2,param_3);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00015740(undefined4 param_1,undefined4 param_2,undefined *param_3)" (identifier "FUN_00015740") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined *param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined *param_3" (type_identifier "undefined") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  if (param_3 == (undefined *)0x0) {\n    param_3 = &DAT_0001a2e4;\n  }\n  FUN_00015780(0,param_1,param_2,param_3);\n  return;\n}" ({ "{") (if_statement "if (param_3 == (undefined *)0x0) {\n    param_3 = &DAT_0001a2e4;\n  }" (if "if") (parenthesized_expression "(param_3 == (undefined *)0x0)" (( "(") (binary_expression "param_3 == (undefined *)0x0" (identifier "param_3") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    param_3 = &DAT_0001a2e4;\n  }" ({ "{") (expression_statement "param_3 = &DAT_0001a2e4;" (assignment_expression "param_3 = &DAT_0001a2e4" (identifier "param_3") (= "=") (pointer_expression "&DAT_0001a2e4" (& "&") (identifier "DAT_0001a2e4"))) (; ";")) (} "}"))) (expression_statement "FUN_00015780(0,param_1,param_2,param_3);" (call_expression "FUN_00015780(0,param_1,param_2,param_3)" (identifier "FUN_00015780") (argument_list "(0,param_1,param_2,param_3)" (( "(") (number_literal "0") (, ",") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

size_t function_1(char *s,size_t n,type_1 *var_1)

{
  size_t sVar1;
  
  if (var_1 == (type_1 *)0x0) {
    var_1 = &internal_state;
  }
  sVar1 = var_2((type_2 *)0x0,s,n,var_1);
  return sVar1;
}


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

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

void MASKED(undefined4 param_1,undefined4 param_2,undefined *param_3)

{
  if (param_3 == (undefined *)0x0) {
    param_3 = &DAT_0001a2e4;
  }
  FUN_00015780(0,param_1,param_2,param_3);
  return;
}

