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

size_t doh_write_cb(void *contents,size_t size,size_t nmemb,void *userp)

{
  uint size_00;
  void *pvVar1;
  size_t __n;
  
  __n = nmemb * size;
  size_00 = *(int *)((int)userp + 4) + __n;
  if (size_00 < 0xbb9) {
                    /* WARNING: Load size is inaccurate */
    pvVar1 = Curl_saferealloc(*userp,size_00);
    *(void **)userp = pvVar1;
    if (pvVar1 != (void *)0x0) {
      memcpy((void *)((int)pvVar1 + *(int *)((int)userp + 4)),contents,__n);
      *(int *)((int)userp + 4) = *(int *)((int)userp + 4) + __n;
      return __n;
    }
  }
  return 0;
}



size_t __regparm2
FUN_0006dd10(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,
            int *param_6)

{
  int iVar1;
  size_t __n;
  void *unaff_retaddr;
  
  entry(param_2,0x6dd1c);
  __n = param_4 * param_3;
  if (param_6[1] + __n < 0xbb9) {
    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);
    *param_6 = iVar1;
    if (iVar1 != 0) {
      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);
      param_6[1] = param_6[1] + __n;
      return __n;
    }
  }
  return 0;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x1c]
CALL 0x00019ed0
ADD EBX,0x42ac4
MOV ESI,dword ptr [ESP + 0x18]
IMUL ESI,dword ptr [ESP + 0x14]
MOV EAX,dword ptr [EDI + 0x4]
ADD EAX,ESI
CMP EAX,0xbb8
JBE 0x0006dd40
XOR ESI,ESI
POP EBX
MOV EAX,ESI
POP ESI
POP EDI
RET
SUB ESP,0x8
PUSH EAX
PUSH dword ptr [EDI]
CALL 0x0004b300
ADD ESP,0x10
MOV dword ptr [EDI],EAX
TEST EAX,EAX
JZ 0x0006dd37
ADD EAX,dword ptr [EDI + 0x4]
SUB ESP,0x4
PUSH ESI
PUSH dword ptr [ESP + 0x18]
PUSH EAX
CALL 0x00018750
ADD ESP,0x10
ADD dword ptr [EDI + 0x4],ESI
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
RET
(translation_unit "size_t __regparm2\nFUN_0006dd10(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,\n            int *param_6)\n\n{\n  int iVar1;\n  size_t __n;\n  void *unaff_retaddr;\n  \n  entry(param_2,0x6dd1c);\n  __n = param_4 * param_3;\n  if (param_6[1] + __n < 0xbb9) {\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }\n  return 0;\n}\n\n" (function_definition "size_t __regparm2\nFUN_0006dd10(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,\n            int *param_6)\n\n{\n  int iVar1;\n  size_t __n;\n  void *unaff_retaddr;\n  \n  entry(param_2,0x6dd1c);\n  __n = param_4 * param_3;\n  if (param_6[1] + __n < 0xbb9) {\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }\n  return 0;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_0006dd10(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,\n            int *param_6)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,\n            int *param_6)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "int *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  size_t __n;\n  void *unaff_retaddr;\n  \n  entry(param_2,0x6dd1c);\n  __n = param_4 * param_3;\n  if (param_6[1] + __n < 0xbb9) {\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "void *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "entry(param_2,0x6dd1c);" (call_expression "entry(param_2,0x6dd1c)" identifier (argument_list "(param_2,0x6dd1c)" ( identifier , number_literal ))) ;) (expression_statement "__n = param_4 * param_3;" (assignment_expression "__n = param_4 * param_3" identifier = (binary_expression "param_4 * param_3" identifier * identifier)) ;) (if_statement "if (param_6[1] + __n < 0xbb9) {\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }" if (parenthesized_expression "(param_6[1] + __n < 0xbb9)" ( (binary_expression "param_6[1] + __n < 0xbb9" (binary_expression "param_6[1] + __n" (subscript_expression "param_6[1]" identifier [ number_literal ]) + identifier) < number_literal) )) (compound_statement "{\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }" { (expression_statement "iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);" (assignment_expression "iVar1 = FUN_0004b300(*param_6,param_6[1] + __n)" identifier = (call_expression "FUN_0004b300(*param_6,param_6[1] + __n)" identifier (argument_list "(*param_6,param_6[1] + __n)" ( (pointer_expression "*param_6" * identifier) , (binary_expression "param_6[1] + __n" (subscript_expression "param_6[1]" identifier [ number_literal ]) + identifier) )))) ;) (expression_statement "*param_6 = iVar1;" (assignment_expression "*param_6 = iVar1" (pointer_expression "*param_6" * identifier) = identifier) ;) (if_statement "if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }" { (expression_statement "memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);" (call_expression "memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n)" identifier (argument_list "((void *)(iVar1 + param_6[1]),unaff_retaddr,__n)" ( (cast_expression "(void *)(iVar1 + param_6[1])" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + param_6[1])" ( (binary_expression "iVar1 + param_6[1]" identifier + (subscript_expression "param_6[1]" identifier [ number_literal ])) ))) , identifier , identifier ))) ;) (expression_statement "param_6[1] = param_6[1] + __n;" (assignment_expression "param_6[1] = param_6[1] + __n" (subscript_expression "param_6[1]" identifier [ number_literal ]) = (binary_expression "param_6[1] + __n" (subscript_expression "param_6[1]" identifier [ number_literal ]) + identifier)) ;) (return_statement "return __n;" return identifier ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nsize_t doh_write_cb(void *contents,size_t size,size_t nmemb,void *userp)\n\n{\n  uint size_00;\n  void *pvVar1;\n  size_t __n;\n  \n  __n = nmemb * size;\n  size_00 = *(int *)((int)userp + 4) + __n;\n  if (size_00 < 0xbb9) {\n                    /* WARNING: Load size is inaccurate */\n    pvVar1 = Curl_saferealloc(*userp,size_00);\n    *(void **)userp = pvVar1;\n    if (pvVar1 != (void *)0x0) {\n      memcpy((void *)((int)pvVar1 + *(int *)((int)userp + 4)),contents,__n);\n      *(int *)((int)userp + 4) = *(int *)((int)userp + 4) + __n;\n      return __n;\n    }\n  }\n  return 0;\n}\n\n" comment (function_definition "size_t doh_write_cb(void *contents,size_t size,size_t nmemb,void *userp)\n\n{\n  uint size_00;\n  void *pvVar1;\n  size_t __n;\n  \n  __n = nmemb * size;\n  size_00 = *(int *)((int)userp + 4) + __n;\n  if (size_00 < 0xbb9) {\n                    /* WARNING: Load size is inaccurate */\n    pvVar1 = Curl_saferealloc(*userp,size_00);\n    *(void **)userp = pvVar1;\n    if (pvVar1 != (void *)0x0) {\n      memcpy((void *)((int)pvVar1 + *(int *)((int)userp + 4)),contents,__n);\n      *(int *)((int)userp + 4) = *(int *)((int)userp + 4) + __n;\n      return __n;\n    }\n  }\n  return 0;\n}" primitive_type (function_declarator "doh_write_cb(void *contents,size_t size,size_t nmemb,void *userp)" identifier (parameter_list "(void *contents,size_t size,size_t nmemb,void *userp)" ( (parameter_declaration "void *contents" primitive_type (pointer_declarator "*contents" * identifier)) , (parameter_declaration "size_t size" primitive_type identifier) , (parameter_declaration "size_t nmemb" primitive_type identifier) , (parameter_declaration "void *userp" primitive_type (pointer_declarator "*userp" * identifier)) ))) (compound_statement "{\n  uint size_00;\n  void *pvVar1;\n  size_t __n;\n  \n  __n = nmemb * size;\n  size_00 = *(int *)((int)userp + 4) + __n;\n  if (size_00 < 0xbb9) {\n                    /* WARNING: Load size is inaccurate */\n    pvVar1 = Curl_saferealloc(*userp,size_00);\n    *(void **)userp = pvVar1;\n    if (pvVar1 != (void *)0x0) {\n      memcpy((void *)((int)pvVar1 + *(int *)((int)userp + 4)),contents,__n);\n      *(int *)((int)userp + 4) = *(int *)((int)userp + 4) + __n;\n      return __n;\n    }\n  }\n  return 0;\n}" { (declaration "uint size_00;" type_identifier identifier ;) (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (expression_statement "__n = nmemb * size;" (assignment_expression "__n = nmemb * size" identifier = (binary_expression "nmemb * size" identifier * identifier)) ;) (expression_statement "size_00 = *(int *)((int)userp + 4) + __n;" (assignment_expression "size_00 = *(int *)((int)userp + 4) + __n" identifier = (binary_expression "*(int *)((int)userp + 4) + __n" (pointer_expression "*(int *)((int)userp + 4)" * (cast_expression "(int *)((int)userp + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)userp + 4)" ( (binary_expression "(int)userp + 4" (cast_expression "(int)userp" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) + identifier)) ;) (if_statement "if (size_00 < 0xbb9) {\n                    /* WARNING: Load size is inaccurate */\n    pvVar1 = Curl_saferealloc(*userp,size_00);\n    *(void **)userp = pvVar1;\n    if (pvVar1 != (void *)0x0) {\n      memcpy((void *)((int)pvVar1 + *(int *)((int)userp + 4)),contents,__n);\n      *(int *)((int)userp + 4) = *(int *)((int)userp + 4) + __n;\n      return __n;\n    }\n  }" if (parenthesized_expression "(size_00 < 0xbb9)" ( (binary_expression "size_00 < 0xbb9" identifier < number_literal) )) (compound_statement "{\n                    /* WARNING: Load size is inaccurate */\n    pvVar1 = Curl_saferealloc(*userp,size_00);\n    *(void **)userp = pvVar1;\n    if (pvVar1 != (void *)0x0) {\n      memcpy((void *)((int)pvVar1 + *(int *)((int)userp + 4)),contents,__n);\n      *(int *)((int)userp + 4) = *(int *)((int)userp + 4) + __n;\n      return __n;\n    }\n  }" { comment (expression_statement "pvVar1 = Curl_saferealloc(*userp,size_00);" (assignment_expression "pvVar1 = Curl_saferealloc(*userp,size_00)" identifier = (call_expression "Curl_saferealloc(*userp,size_00)" identifier (argument_list "(*userp,size_00)" ( (pointer_expression "*userp" * identifier) , identifier )))) ;) (expression_statement "*(void **)userp = pvVar1;" (assignment_expression "*(void **)userp = pvVar1" (pointer_expression "*(void **)userp" * (cast_expression "(void **)userp" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n      memcpy((void *)((int)pvVar1 + *(int *)((int)userp + 4)),contents,__n);\n      *(int *)((int)userp + 4) = *(int *)((int)userp + 4) + __n;\n      return __n;\n    }" if (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy((void *)((int)pvVar1 + *(int *)((int)userp + 4)),contents,__n);\n      *(int *)((int)userp + 4) = *(int *)((int)userp + 4) + __n;\n      return __n;\n    }" { (expression_statement "memcpy((void *)((int)pvVar1 + *(int *)((int)userp + 4)),contents,__n);" (call_expression "memcpy((void *)((int)pvVar1 + *(int *)((int)userp + 4)),contents,__n)" identifier (argument_list "((void *)((int)pvVar1 + *(int *)((int)userp + 4)),contents,__n)" ( (cast_expression "(void *)((int)pvVar1 + *(int *)((int)userp + 4))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + *(int *)((int)userp + 4))" ( (binary_expression "(int)pvVar1 + *(int *)((int)userp + 4)" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (pointer_expression "*(int *)((int)userp + 4)" * (cast_expression "(int *)((int)userp + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)userp + 4)" ( (binary_expression "(int)userp + 4" (cast_expression "(int)userp" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ))) , identifier , identifier ))) ;) (expression_statement "*(int *)((int)userp + 4) = *(int *)((int)userp + 4) + __n;" (assignment_expression "*(int *)((int)userp + 4) = *(int *)((int)userp + 4) + __n" (pointer_expression "*(int *)((int)userp + 4)" * (cast_expression "(int *)((int)userp + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)userp + 4)" ( (binary_expression "(int)userp + 4" (cast_expression "(int)userp" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "*(int *)((int)userp + 4) + __n" (pointer_expression "*(int *)((int)userp + 4)" * (cast_expression "(int *)((int)userp + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)userp + 4)" ( (binary_expression "(int)userp + 4" (cast_expression "(int)userp" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) + identifier)) ;) (return_statement "return __n;" return identifier ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "size_t __regparm2\nFUN_0006dd10(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,\n            int *param_6)\n\n{\n  int iVar1;\n  size_t __n;\n  void *unaff_retaddr;\n  \n  entry(param_2,0x6dd1c);\n  __n = param_4 * param_3;\n  if (param_6[1] + __n < 0xbb9) {\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }\n  return 0;\n}\n\n" (function_definition "size_t __regparm2\nFUN_0006dd10(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,\n            int *param_6)\n\n{\n  int iVar1;\n  size_t __n;\n  void *unaff_retaddr;\n  \n  entry(param_2,0x6dd1c);\n  __n = param_4 * param_3;\n  if (param_6[1] + __n < 0xbb9) {\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }\n  return 0;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_0006dd10(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,\n            int *param_6)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,\n            int *param_6)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "int *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  size_t __n;\n  void *unaff_retaddr;\n  \n  entry(param_2,0x6dd1c);\n  __n = param_4 * param_3;\n  if (param_6[1] + __n < 0xbb9) {\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "void *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "entry(param_2,0x6dd1c);" (call_expression "entry(param_2,0x6dd1c)" identifier (argument_list "(param_2,0x6dd1c)" ( identifier , number_literal ))) ;) (expression_statement "__n = param_4 * param_3;" (assignment_expression "__n = param_4 * param_3" identifier = (binary_expression "param_4 * param_3" identifier * identifier)) ;) (if_statement "if (param_6[1] + __n < 0xbb9) {\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }" if (parenthesized_expression "(param_6[1] + __n < 0xbb9)" ( (binary_expression "param_6[1] + __n < 0xbb9" (binary_expression "param_6[1] + __n" (subscript_expression "param_6[1]" identifier [ number_literal ]) + identifier) < number_literal) )) (compound_statement "{\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }" { (expression_statement "iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);" (assignment_expression "iVar1 = FUN_0004b300(*param_6,param_6[1] + __n)" identifier = (call_expression "FUN_0004b300(*param_6,param_6[1] + __n)" identifier (argument_list "(*param_6,param_6[1] + __n)" ( (pointer_expression "*param_6" * identifier) , (binary_expression "param_6[1] + __n" (subscript_expression "param_6[1]" identifier [ number_literal ]) + identifier) )))) ;) (expression_statement "*param_6 = iVar1;" (assignment_expression "*param_6 = iVar1" (pointer_expression "*param_6" * identifier) = identifier) ;) (if_statement "if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }" { (expression_statement "memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);" (call_expression "memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n)" identifier (argument_list "((void *)(iVar1 + param_6[1]),unaff_retaddr,__n)" ( (cast_expression "(void *)(iVar1 + param_6[1])" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + param_6[1])" ( (binary_expression "iVar1 + param_6[1]" identifier + (subscript_expression "param_6[1]" identifier [ number_literal ])) ))) , identifier , identifier ))) ;) (expression_statement "param_6[1] = param_6[1] + __n;" (assignment_expression "param_6[1] = param_6[1] + __n" (subscript_expression "param_6[1]" identifier [ number_literal ]) = (binary_expression "param_6[1] + __n" (subscript_expression "param_6[1]" identifier [ number_literal ]) + identifier)) ;) (return_statement "return __n;" return identifier ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (subscript_expression IDENT [ LIT ])) ))) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) ;) (return_statement return IDENT ;) })) })) (return_statement return LIT ;) })))
(function_definition "size_t __regparm2\nFUN_0006dd10(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,\n            int *param_6)\n\n{\n  int iVar1;\n  size_t __n;\n  void *unaff_retaddr;\n  \n  entry(param_2,0x6dd1c);\n  __n = param_4 * param_3;\n  if (param_6[1] + __n < 0xbb9) {\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }\n  return 0;\n}" (primitive_type "size_t") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_0006dd10(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,\n            int *param_6)" (identifier "FUN_0006dd10") (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3,int param_4,undefined4 param_5,\n            int *param_6)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) (, ",") (parameter_declaration "int *param_6" (primitive_type "int") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) () ")"))) (compound_statement "{\n  int iVar1;\n  size_t __n;\n  void *unaff_retaddr;\n  \n  entry(param_2,0x6dd1c);\n  __n = param_4 * param_3;\n  if (param_6[1] + __n < 0xbb9) {\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "void *unaff_retaddr;" (primitive_type "void") (pointer_declarator "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (; ";")) (expression_statement "entry(param_2,0x6dd1c);" (call_expression "entry(param_2,0x6dd1c)" (identifier "entry") (argument_list "(param_2,0x6dd1c)" (( "(") (identifier "param_2") (, ",") (number_literal "0x6dd1c") () ")"))) (; ";")) (expression_statement "__n = param_4 * param_3;" (assignment_expression "__n = param_4 * param_3" (identifier "__n") (= "=") (binary_expression "param_4 * param_3" (identifier "param_4") (* "*") (identifier "param_3"))) (; ";")) (if_statement "if (param_6[1] + __n < 0xbb9) {\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }" (if "if") (parenthesized_expression "(param_6[1] + __n < 0xbb9)" (( "(") (binary_expression "param_6[1] + __n < 0xbb9" (binary_expression "param_6[1] + __n" (subscript_expression "param_6[1]" (identifier "param_6") ([ "[") (number_literal "1") (] "]")) (+ "+") (identifier "__n")) (< "<") (number_literal "0xbb9")) () ")")) (compound_statement "{\n    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);\n    *param_6 = iVar1;\n    if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }\n  }" ({ "{") (expression_statement "iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);" (assignment_expression "iVar1 = FUN_0004b300(*param_6,param_6[1] + __n)" (identifier "iVar1") (= "=") (call_expression "FUN_0004b300(*param_6,param_6[1] + __n)" (identifier "FUN_0004b300") (argument_list "(*param_6,param_6[1] + __n)" (( "(") (pointer_expression "*param_6" (* "*") (identifier "param_6")) (, ",") (binary_expression "param_6[1] + __n" (subscript_expression "param_6[1]" (identifier "param_6") ([ "[") (number_literal "1") (] "]")) (+ "+") (identifier "__n")) () ")")))) (; ";")) (expression_statement "*param_6 = iVar1;" (assignment_expression "*param_6 = iVar1" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar1 != 0) {\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);\n      param_6[1] = param_6[1] + __n;\n      return __n;\n    }" ({ "{") (expression_statement "memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);" (call_expression "memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n)" (identifier "memcpy") (argument_list "((void *)(iVar1 + param_6[1]),unaff_retaddr,__n)" (( "(") (cast_expression "(void *)(iVar1 + param_6[1])" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + param_6[1])" (( "(") (binary_expression "iVar1 + param_6[1]" (identifier "iVar1") (+ "+") (subscript_expression "param_6[1]" (identifier "param_6") ([ "[") (number_literal "1") (] "]"))) () ")"))) (, ",") (identifier "unaff_retaddr") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "param_6[1] = param_6[1] + __n;" (assignment_expression "param_6[1] = param_6[1] + __n" (subscript_expression "param_6[1]" (identifier "param_6") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "param_6[1] + __n" (subscript_expression "param_6[1]" (identifier "param_6") ([ "[") (number_literal "1") (] "]")) (+ "+") (identifier "__n"))) (; ";")) (return_statement "return __n;" (return "return") (identifier "__n") (; ";")) (} "}"))) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

size_t function_1(void *contents,size_t var_2,size_t var_1,void *userp)

{
  type_1 var_4;
  void *var_6;
  size_t var_3;
  
  var_3 = var_1 * var_2;
  var_4 = *(int *)((int)userp + 4) + var_3;
  if (var_4 < 0xbb9) {
                    /* WARNING: Load size is inaccurate */
    var_6 = var_5(*userp,var_4);
    *(void **)userp = var_6;
    if (var_6 != (void *)0x0) {
      var_7((void *)((int)var_6 + *(int *)((int)userp + 4)),contents,var_3);
      *(int *)((int)userp + 4) = *(int *)((int)userp + 4) + var_3;
      return var_3;
    }
  }
  return 0;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) 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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) 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)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal))))) (identifier) (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))) (return_statement (identifier)))))) (return_statement (number_literal)))))

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

{
  int iVar1;
  size_t __n;
  void *unaff_retaddr;
  
  entry(param_2,0x6dd1c);
  __n = param_4 * param_3;
  if (param_6[1] + __n < 0xbb9) {
    iVar1 = FUN_0004b300(*param_6,param_6[1] + __n);
    *param_6 = iVar1;
    if (iVar1 != 0) {
      memcpy((void *)(iVar1 + param_6[1]),unaff_retaddr,__n);
      param_6[1] = param_6[1] + __n;
      return __n;
    }
  }
  return 0;
}

