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

int binCollFunc(void *NotUsed,int nKey1,void *pKey1,int nKey2,void *pKey2)

{
  size_t __n;
  int iVar1;
  
  __n = nKey1;
  if (nKey2 <= nKey1) {
    __n = nKey2;
  }
  iVar1 = memcmp(pKey1,pKey2,__n);
  if (iVar1 == 0) {
    iVar1 = nKey1 - nKey2;
  }
  return iVar1;
}



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

int FUN_00023200(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)

{
  size_t __n;
  int iVar1;
  
  __n = param_2;
  if ((int)param_4 <= (int)param_2) {
    __n = param_4;
  }
  iVar1 = memcmp(param_3,param_5,__n);
  if (iVar1 == 0) {
    iVar1 = param_2 - param_4;
  }
  return iVar1;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x1c]
MOV ESI,dword ptr [ESP + 0x14]
CALL 0x0001d810
ADD EBX,0xbadf0
SUB ESP,0x4
MOV EAX,ESI
CMP EDI,ESI
CMOVLE EAX,EDI
SUB ESI,EDI
PUSH EAX
PUSH dword ptr [ESP + 0x28]
PUSH dword ptr [ESP + 0x24]
CALL 0x000164e0
ADD ESP,0x10
TEST EAX,EAX
CMOVZ EAX,ESI
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00023200(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)\n\n{\n  size_t __n;\n  int iVar1;\n  \n  __n = param_2;\n  if ((int)param_4 <= (int)param_2) {\n    __n = param_4;\n  }\n  iVar1 = memcmp(param_3,param_5,__n);\n  if (iVar1 == 0) {\n    iVar1 = param_2 - param_4;\n  }\n  return iVar1;\n}\n\n" comment (function_definition "int FUN_00023200(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)\n\n{\n  size_t __n;\n  int iVar1;\n  \n  __n = param_2;\n  if ((int)param_4 <= (int)param_2) {\n    __n = param_4;\n  }\n  iVar1 = memcmp(param_3,param_5,__n);\n  if (iVar1 == 0) {\n    iVar1 = param_2 - param_4;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00023200(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)" identifier (parameter_list "(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "size_t param_2" primitive_type identifier) , (parameter_declaration "void *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "size_t param_4" primitive_type identifier) , (parameter_declaration "void *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  \n  __n = param_2;\n  if ((int)param_4 <= (int)param_2) {\n    __n = param_4;\n  }\n  iVar1 = memcmp(param_3,param_5,__n);\n  if (iVar1 == 0) {\n    iVar1 = param_2 - param_4;\n  }\n  return iVar1;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "__n = param_2;" (assignment_expression "__n = param_2" identifier = identifier) ;) (if_statement "if ((int)param_4 <= (int)param_2) {\n    __n = param_4;\n  }" if (parenthesized_expression "((int)param_4 <= (int)param_2)" ( (binary_expression "(int)param_4 <= (int)param_2" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    __n = param_4;\n  }" { (expression_statement "__n = param_4;" (assignment_expression "__n = param_4" identifier = identifier) ;) })) (expression_statement "iVar1 = memcmp(param_3,param_5,__n);" (assignment_expression "iVar1 = memcmp(param_3,param_5,__n)" identifier = (call_expression "memcmp(param_3,param_5,__n)" identifier (argument_list "(param_3,param_5,__n)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    iVar1 = param_2 - param_4;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = param_2 - param_4;\n  }" { (expression_statement "iVar1 = param_2 - param_4;" (assignment_expression "iVar1 = param_2 - param_4" identifier = (binary_expression "param_2 - param_4" identifier - identifier)) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint binCollFunc(void *NotUsed,int nKey1,void *pKey1,int nKey2,void *pKey2)\n\n{\n  size_t __n;\n  int iVar1;\n  \n  __n = nKey1;\n  if (nKey2 <= nKey1) {\n    __n = nKey2;\n  }\n  iVar1 = memcmp(pKey1,pKey2,__n);\n  if (iVar1 == 0) {\n    iVar1 = nKey1 - nKey2;\n  }\n  return iVar1;\n}\n\n" comment comment (function_definition "int binCollFunc(void *NotUsed,int nKey1,void *pKey1,int nKey2,void *pKey2)\n\n{\n  size_t __n;\n  int iVar1;\n  \n  __n = nKey1;\n  if (nKey2 <= nKey1) {\n    __n = nKey2;\n  }\n  iVar1 = memcmp(pKey1,pKey2,__n);\n  if (iVar1 == 0) {\n    iVar1 = nKey1 - nKey2;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "binCollFunc(void *NotUsed,int nKey1,void *pKey1,int nKey2,void *pKey2)" identifier (parameter_list "(void *NotUsed,int nKey1,void *pKey1,int nKey2,void *pKey2)" ( (parameter_declaration "void *NotUsed" primitive_type (pointer_declarator "*NotUsed" * identifier)) , (parameter_declaration "int nKey1" primitive_type identifier) , (parameter_declaration "void *pKey1" primitive_type (pointer_declarator "*pKey1" * identifier)) , (parameter_declaration "int nKey2" primitive_type identifier) , (parameter_declaration "void *pKey2" primitive_type (pointer_declarator "*pKey2" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  \n  __n = nKey1;\n  if (nKey2 <= nKey1) {\n    __n = nKey2;\n  }\n  iVar1 = memcmp(pKey1,pKey2,__n);\n  if (iVar1 == 0) {\n    iVar1 = nKey1 - nKey2;\n  }\n  return iVar1;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "__n = nKey1;" (assignment_expression "__n = nKey1" identifier = identifier) ;) (if_statement "if (nKey2 <= nKey1) {\n    __n = nKey2;\n  }" if (parenthesized_expression "(nKey2 <= nKey1)" ( (binary_expression "nKey2 <= nKey1" identifier <= identifier) )) (compound_statement "{\n    __n = nKey2;\n  }" { (expression_statement "__n = nKey2;" (assignment_expression "__n = nKey2" identifier = identifier) ;) })) (expression_statement "iVar1 = memcmp(pKey1,pKey2,__n);" (assignment_expression "iVar1 = memcmp(pKey1,pKey2,__n)" identifier = (call_expression "memcmp(pKey1,pKey2,__n)" identifier (argument_list "(pKey1,pKey2,__n)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    iVar1 = nKey1 - nKey2;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = nKey1 - nKey2;\n  }" { (expression_statement "iVar1 = nKey1 - nKey2;" (assignment_expression "iVar1 = nKey1 - nKey2" identifier = (binary_expression "nKey1 - nKey2" identifier - identifier)) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int FUN_00023200(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)\n\n{\n  size_t __n;\n  int iVar1;\n  \n  __n = param_2;\n  if ((int)param_4 <= (int)param_2) {\n    __n = param_4;\n  }\n  iVar1 = memcmp(param_3,param_5,__n);\n  if (iVar1 == 0) {\n    iVar1 = param_2 - param_4;\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_00023200(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)\n\n{\n  size_t __n;\n  int iVar1;\n  \n  __n = param_2;\n  if ((int)param_4 <= (int)param_2) {\n    __n = param_4;\n  }\n  iVar1 = memcmp(param_3,param_5,__n);\n  if (iVar1 == 0) {\n    iVar1 = param_2 - param_4;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00023200(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)" identifier (parameter_list "(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "size_t param_2" primitive_type identifier) , (parameter_declaration "void *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "size_t param_4" primitive_type identifier) , (parameter_declaration "void *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  \n  __n = param_2;\n  if ((int)param_4 <= (int)param_2) {\n    __n = param_4;\n  }\n  iVar1 = memcmp(param_3,param_5,__n);\n  if (iVar1 == 0) {\n    iVar1 = param_2 - param_4;\n  }\n  return iVar1;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "__n = param_2;" (assignment_expression "__n = param_2" identifier = identifier) ;) (if_statement "if ((int)param_4 <= (int)param_2) {\n    __n = param_4;\n  }" if (parenthesized_expression "((int)param_4 <= (int)param_2)" ( (binary_expression "(int)param_4 <= (int)param_2" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    __n = param_4;\n  }" { (expression_statement "__n = param_4;" (assignment_expression "__n = param_4" identifier = identifier) ;) })) (expression_statement "iVar1 = memcmp(param_3,param_5,__n);" (assignment_expression "iVar1 = memcmp(param_3,param_5,__n)" identifier = (call_expression "memcmp(param_3,param_5,__n)" identifier (argument_list "(param_3,param_5,__n)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    iVar1 = param_2 - param_4;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = param_2 - param_4;\n  }" { (expression_statement "iVar1 = param_2 - param_4;" (assignment_expression "iVar1 = param_2 - param_4" identifier = (binary_expression "param_2 - param_4" identifier - identifier)) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) <= (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_00023200(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)\n\n{\n  size_t __n;\n  int iVar1;\n  \n  __n = param_2;\n  if ((int)param_4 <= (int)param_2) {\n    __n = param_4;\n  }\n  iVar1 = memcmp(param_3,param_5,__n);\n  if (iVar1 == 0) {\n    iVar1 = param_2 - param_4;\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_00023200(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)" (identifier "FUN_00023200") (parameter_list "(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "size_t param_2" (primitive_type "size_t") (identifier "param_2")) (, ",") (parameter_declaration "void *param_3" (primitive_type "void") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "size_t param_4" (primitive_type "size_t") (identifier "param_4")) (, ",") (parameter_declaration "void *param_5" (primitive_type "void") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  \n  __n = param_2;\n  if ((int)param_4 <= (int)param_2) {\n    __n = param_4;\n  }\n  iVar1 = memcmp(param_3,param_5,__n);\n  if (iVar1 == 0) {\n    iVar1 = param_2 - param_4;\n  }\n  return iVar1;\n}" ({ "{") (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "__n = param_2;" (assignment_expression "__n = param_2" (identifier "__n") (= "=") (identifier "param_2")) (; ";")) (if_statement "if ((int)param_4 <= (int)param_2) {\n    __n = param_4;\n  }" (if "if") (parenthesized_expression "((int)param_4 <= (int)param_2)" (( "(") (binary_expression "(int)param_4 <= (int)param_2" (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (<= "<=") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")")) (compound_statement "{\n    __n = param_4;\n  }" ({ "{") (expression_statement "__n = param_4;" (assignment_expression "__n = param_4" (identifier "__n") (= "=") (identifier "param_4")) (; ";")) (} "}"))) (expression_statement "iVar1 = memcmp(param_3,param_5,__n);" (assignment_expression "iVar1 = memcmp(param_3,param_5,__n)" (identifier "iVar1") (= "=") (call_expression "memcmp(param_3,param_5,__n)" (identifier "memcmp") (argument_list "(param_3,param_5,__n)" (( "(") (identifier "param_3") (, ",") (identifier "param_5") (, ",") (identifier "__n") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    iVar1 = param_2 - param_4;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = param_2 - param_4;\n  }" ({ "{") (expression_statement "iVar1 = param_2 - param_4;" (assignment_expression "iVar1 = param_2 - param_4" (identifier "iVar1") (= "=") (binary_expression "param_2 - param_4" (identifier "param_2") (- "-") (identifier "param_4"))) (; ";")) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

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

int function_1(void *NotUsed,int var_2,void *pKey1,int var_1,void *pKey2)

{
  size_t __n;
  int var_4;
  
  __n = var_2;
  if (var_1 <= var_2) {
    __n = var_1;
  }
  var_4 = var_3(pKey1,pKey2,__n);
  if (var_4 == 0) {
    var_4 = var_2 - var_1;
  }
  return var_4;
}


(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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))))) (return_statement (identifier)))))

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

int MASKED(undefined4 param_1,size_t param_2,void *param_3,size_t param_4,void *param_5)

{
  size_t __n;
  int iVar1;
  
  __n = param_2;
  if ((int)param_4 <= (int)param_2) {
    __n = param_4;
  }
  iVar1 = memcmp(param_3,param_5,__n);
  if (iVar1 == 0) {
    iVar1 = param_2 - param_4;
  }
  return iVar1;
}

