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

char * __regparm3 dwarf_vmatoa_1(char *fmtch,dwarf_vma value,uint num_bytes)

{
  dwarf_vmatoa_buf *__s;
  char *__format;
  undefined4 in_ECX;
  uint uVar1;
  int iVar2;
  char fmt [32];
  
  iVar2 = dwarf_vmatoa_1::buf_pos * 0x40;
  uVar1 = dwarf_vmatoa_1::buf_pos + 1U & 0xf;
  __s = dwarf_vmatoa_1::buf + dwarf_vmatoa_1::buf_pos;
  dwarf_vmatoa_1::buf_pos = uVar1;
  if ((uint)value == 0) {
    if (fmtch == (char *)0x0) {
      __format = "%%%s";
    }
    else {
      __format = "%%%s%s";
    }
    sprintf(fmt,__format,"ll");
    snprintf(__s->place,0x40,fmt,num_bytes,in_ECX);
    return __s->place;
  }
  snprintf(__s->place,0x40,"%16.16llx",num_bytes);
  if (8 < (uint)value) {
    value._0_4_ = 8;
  }
  return (char *)(iVar2 + 0xb78b0 + (uint)value * -2);
}



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

char * __regparm3 FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)

{
  char *__s;
  char *__format;
  int iVar1;
  char local_3c [40];
  undefined4 uStack_14;
  
  uStack_14 = 0x4cb59;
  iVar1 = DAT_000b7ca0 * 0x40;
  DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;
  __s = (char *)(iVar1 + 0xb78a0);
  if (param_4 == 0) {
    if (param_1 == 0) {
      __format = "%%%s";
    }
    else {
      __format = "%%%s%s";
    }
    sprintf(local_3c,__format,"ll");
    snprintf(__s,0x40,local_3c,param_2,param_3);
    return __s;
  }
  snprintf(__s,0x40,"%16.16llx",param_2,param_3);
  if (8 < param_4) {
    param_4 = 8;
  }
  return (char *)(iVar1 + 0xb78b0 + param_4 * -2);
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00013f70
ADD EBX,0x674a7
SUB ESP,0x3c
MOV ESI,dword ptr [ESP + 0x50]
MOV EBP,dword ptr [EBX + 0x3ca0]
MOV EDI,EBP
ADD EBP,0x1
SHL EDI,0x6
AND EBP,0xf
LEA EDI,[EBX + EDI*0x1 + 0x38a0]
MOV dword ptr [EBX + 0x3ca0],EBP
TEST ESI,ESI
JNZ 0x0004cbf0
MOV dword ptr [ESP + 0x8],EDX
MOV dword ptr [ESP + 0xc],ECX
TEST EAX,EAX
JZ 0x0004cbd8
PUSH EAX
LEA EAX,[EBX + 0xfffe3983]
PUSH EAX
LEA EAX,[EBX + 0xfffc208f]
PUSH EAX
LEA ESI,[ESP + 0x1c]
PUSH ESI
CALL 0x00013370
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x8]
MOV ECX,dword ptr [ESP + 0xc]
SUB ESP,0xc
PUSH ECX
PUSH EDX
PUSH ESI
PUSH 0x40
PUSH EDI
CALL 0x000132c0
ADD ESP,0x20
MOV EAX,EDI
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[EBX + 0xfffe3983]
SUB ESP,0x4
PUSH EAX
LEA EAX,[EBX + 0xfffde31f]
JMP 0x0004cba2
SUB ESP,0xc
LEA EAX,[EBX + 0xfffde315]
PUSH ECX
PUSH EDX
PUSH EAX
PUSH 0x40
PUSH EDI
CALL 0x000132c0
ADD ESP,0x20
MOV EAX,0x8
CMP ESI,0x8
CMOVA ESI,EAX
ADD ESP,0x3c
POP EBX
NEG ESI
LEA EDI,[EDI + ESI*0x2 + 0x10]
POP ESI
MOV EAX,EDI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * __regparm3 FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)\n\n{\n  char *__s;\n  char *__format;\n  int iVar1;\n  char local_3c [40];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4cb59;\n  iVar1 = DAT_000b7ca0 * 0x40;\n  DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;\n  __s = (char *)(iVar1 + 0xb78a0);\n  if (param_4 == 0) {\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }\n  snprintf(__s,0x40,"%16.16llx",param_2,param_3);\n  if (8 < param_4) {\n    param_4 = 8;\n  }\n  return (char *)(iVar1 + 0xb78b0 + param_4 * -2);\n}\n\n" comment (function_definition "char * __regparm3 FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)\n\n{\n  char *__s;\n  char *__format;\n  int iVar1;\n  char local_3c [40];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4cb59;\n  iVar1 = DAT_000b7ca0 * 0x40;\n  DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;\n  __s = (char *)(iVar1 + 0xb78a0);\n  if (param_4 == 0) {\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }\n  snprintf(__s,0x40,"%16.16llx",param_2,param_3);\n  if (8 < param_4) {\n    param_4 = 8;\n  }\n  return (char *)(iVar1 + 0xb78b0 + param_4 * -2);\n}" primitive_type (pointer_declarator "* __regparm3 FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) )))) (compound_statement "{\n  char *__s;\n  char *__format;\n  int iVar1;\n  char local_3c [40];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4cb59;\n  iVar1 = DAT_000b7ca0 * 0x40;\n  DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;\n  __s = (char *)(iVar1 + 0xb78a0);\n  if (param_4 == 0) {\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }\n  snprintf(__s,0x40,"%16.16llx",param_2,param_3);\n  if (8 < param_4) {\n    param_4 = 8;\n  }\n  return (char *)(iVar1 + 0xb78b0 + param_4 * -2);\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "char *__format;" primitive_type (pointer_declarator "*__format" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "char local_3c [40];" primitive_type (array_declarator "local_3c [40]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x4cb59;" (assignment_expression "uStack_14 = 0x4cb59" identifier = number_literal) ;) (expression_statement "iVar1 = DAT_000b7ca0 * 0x40;" (assignment_expression "iVar1 = DAT_000b7ca0 * 0x40" identifier = (binary_expression "DAT_000b7ca0 * 0x40" identifier * number_literal)) ;) (expression_statement "DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;" (assignment_expression "DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf" identifier = (binary_expression "DAT_000b7ca0 + 1 & 0xf" (binary_expression "DAT_000b7ca0 + 1" identifier + number_literal) & number_literal)) ;) (expression_statement "__s = (char *)(iVar1 + 0xb78a0);" (assignment_expression "__s = (char *)(iVar1 + 0xb78a0)" identifier = (cast_expression "(char *)(iVar1 + 0xb78a0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xb78a0)" ( (binary_expression "iVar1 + 0xb78a0" identifier + number_literal) )))) ;) (if_statement "if (param_4 == 0) {\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }" { (if_statement "if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n      __format = "%%%s";\n    }" { (expression_statement "__format = "%%%s";" (assignment_expression "__format = "%%%s"" identifier = (string_literal ""%%%s"" " string_content ")) ;) }) (else_clause "else {\n      __format = "%%%s%s";\n    }" else (compound_statement "{\n      __format = "%%%s%s";\n    }" { (expression_statement "__format = "%%%s%s";" (assignment_expression "__format = "%%%s%s"" identifier = (string_literal ""%%%s%s"" " string_content ")) ;) }))) (expression_statement "sprintf(local_3c,__format,"ll");" (call_expression "sprintf(local_3c,__format,"ll")" identifier (argument_list "(local_3c,__format,"ll")" ( identifier , identifier , (string_literal ""ll"" " string_content ") ))) ;) (expression_statement "snprintf(__s,0x40,local_3c,param_2,param_3);" (call_expression "snprintf(__s,0x40,local_3c,param_2,param_3)" identifier (argument_list "(__s,0x40,local_3c,param_2,param_3)" ( identifier , number_literal , identifier , identifier , identifier ))) ;) (return_statement "return __s;" return identifier ;) })) (expression_statement "snprintf(__s,0x40,"%16.16llx",param_2,param_3);" (call_expression "snprintf(__s,0x40,"%16.16llx",param_2,param_3)" identifier (argument_list "(__s,0x40,"%16.16llx",param_2,param_3)" ( identifier , number_literal , (string_literal ""%16.16llx"" " string_content ") , identifier , identifier ))) ;) (if_statement "if (8 < param_4) {\n    param_4 = 8;\n  }" if (parenthesized_expression "(8 < param_4)" ( (binary_expression "8 < param_4" number_literal < identifier) )) (compound_statement "{\n    param_4 = 8;\n  }" { (expression_statement "param_4 = 8;" (assignment_expression "param_4 = 8" identifier = number_literal) ;) })) (return_statement "return (char *)(iVar1 + 0xb78b0 + param_4 * -2);" return (cast_expression "(char *)(iVar1 + 0xb78b0 + param_4 * -2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xb78b0 + param_4 * -2)" ( (binary_expression "iVar1 + 0xb78b0 + param_4 * -2" (binary_expression "iVar1 + 0xb78b0" identifier + number_literal) + (binary_expression "param_4 * -2" identifier * number_literal)) ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * __regparm3 dwarf_vmatoa_1(char *fmtch,dwarf_vma value,uint num_bytes)\n\n{\n  dwarf_vmatoa_buf *__s;\n  char *__format;\n  undefined4 in_ECX;\n  uint uVar1;\n  int iVar2;\n  char fmt [32];\n  \n  iVar2 = dwarf_vmatoa_1::buf_pos * 0x40;\n  uVar1 = dwarf_vmatoa_1::buf_pos + 1U & 0xf;\n  __s = dwarf_vmatoa_1::buf + dwarf_vmatoa_1::buf_pos;\n  dwarf_vmatoa_1::buf_pos = uVar1;\n  if ((uint)value == 0) {\n    if (fmtch == (char *)0x0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(fmt,__format,"ll");\n    snprintf(__s->place,0x40,fmt,num_bytes,in_ECX);\n    return __s->place;\n  }\n  snprintf(__s->place,0x40,"%16.16llx",num_bytes);\n  if (8 < (uint)value) {\n    value._0_4_ = 8;\n  }\n  return (char *)(iVar2 + 0xb78b0 + (uint)value * -2);\n}\n\n" comment (function_definition "char * __regparm3 dwarf_vmatoa_1(char *fmtch,dwarf_vma value,uint num_bytes)\n\n{\n  dwarf_vmatoa_buf *__s;\n  char *__format;\n  undefined4 in_ECX;\n  uint uVar1;\n  int iVar2;\n  char fmt [32];\n  \n  iVar2 = dwarf_vmatoa_1::buf_pos * 0x40;\n  uVar1 = dwarf_vmatoa_1::buf_pos + 1U & 0xf;\n  __s = dwarf_vmatoa_1::buf + dwarf_vmatoa_1::buf_pos;\n  dwarf_vmatoa_1::buf_pos = uVar1;\n  if ((uint)value == 0) {\n    if (fmtch == (char *)0x0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(fmt,__format,"ll");\n    snprintf(__s->place,0x40,fmt,num_bytes,in_ECX);\n    return __s->place;\n  }\n  snprintf(__s->place,0x40,"%16.16llx",num_bytes);\n  if (8 < (uint)value) {\n    value._0_4_ = 8;\n  }\n  return (char *)(iVar2 + 0xb78b0 + (uint)value * -2);\n}" primitive_type (pointer_declarator "* __regparm3 dwarf_vmatoa_1(char *fmtch,dwarf_vma value,uint num_bytes)" * (ERROR "__regparm3" identifier) (function_declarator "dwarf_vmatoa_1(char *fmtch,dwarf_vma value,uint num_bytes)" identifier (parameter_list "(char *fmtch,dwarf_vma value,uint num_bytes)" ( (parameter_declaration "char *fmtch" primitive_type (pointer_declarator "*fmtch" * identifier)) , (parameter_declaration "dwarf_vma value" type_identifier identifier) , (parameter_declaration "uint num_bytes" type_identifier identifier) )))) (compound_statement "{\n  dwarf_vmatoa_buf *__s;\n  char *__format;\n  undefined4 in_ECX;\n  uint uVar1;\n  int iVar2;\n  char fmt [32];\n  \n  iVar2 = dwarf_vmatoa_1::buf_pos * 0x40;\n  uVar1 = dwarf_vmatoa_1::buf_pos + 1U & 0xf;\n  __s = dwarf_vmatoa_1::buf + dwarf_vmatoa_1::buf_pos;\n  dwarf_vmatoa_1::buf_pos = uVar1;\n  if ((uint)value == 0) {\n    if (fmtch == (char *)0x0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(fmt,__format,"ll");\n    snprintf(__s->place,0x40,fmt,num_bytes,in_ECX);\n    return __s->place;\n  }\n  snprintf(__s->place,0x40,"%16.16llx",num_bytes);\n  if (8 < (uint)value) {\n    value._0_4_ = 8;\n  }\n  return (char *)(iVar2 + 0xb78b0 + (uint)value * -2);\n}" { (declaration "dwarf_vmatoa_buf *__s;" type_identifier (pointer_declarator "*__s" * identifier) ;) (declaration "char *__format;" primitive_type (pointer_declarator "*__format" * identifier) ;) (declaration "undefined4 in_ECX;" type_identifier identifier ;) (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char fmt [32];" primitive_type (array_declarator "fmt [32]" identifier [ number_literal ]) ;) (expression_statement "iVar2 = dwarf_vmatoa_1::buf_pos * 0x40;" (binary_expression "iVar2 = dwarf_vmatoa_1::buf_pos * 0x40" (assignment_expression "iVar2 = dwarf_vmatoa_1" identifier = identifier) (ERROR "::buf_pos" : : identifier) * number_literal) ;) (expression_statement "uVar1 = dwarf_vmatoa_1::buf_pos + 1U & 0xf;" (binary_expression "uVar1 = dwarf_vmatoa_1::buf_pos + 1U & 0xf" (binary_expression "uVar1 = dwarf_vmatoa_1::buf_pos + 1U" (assignment_expression "uVar1 = dwarf_vmatoa_1" identifier = identifier) (ERROR "::buf_pos" : : identifier) + number_literal) & number_literal) ;) (expression_statement "__s = dwarf_vmatoa_1::buf + dwarf_vmatoa_1::buf_pos;" (binary_expression "__s = dwarf_vmatoa_1::buf + dwarf_vmatoa_1" (assignment_expression "__s = dwarf_vmatoa_1" identifier = identifier) (ERROR "::buf" : : identifier) + identifier) (ERROR "::buf_pos" : : identifier) ;) (labeled_statement "dwarf_vmatoa_1::buf_pos = uVar1;" statement_identifier : (ERROR ":" :) (expression_statement "buf_pos = uVar1;" (assignment_expression "buf_pos = uVar1" identifier = identifier) ;)) (if_statement "if ((uint)value == 0) {\n    if (fmtch == (char *)0x0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(fmt,__format,"ll");\n    snprintf(__s->place,0x40,fmt,num_bytes,in_ECX);\n    return __s->place;\n  }" if (parenthesized_expression "((uint)value == 0)" ( (binary_expression "(uint)value == 0" (cast_expression "(uint)value" ( (type_descriptor "uint" type_identifier) ) identifier) == number_literal) )) (compound_statement "{\n    if (fmtch == (char *)0x0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(fmt,__format,"ll");\n    snprintf(__s->place,0x40,fmt,num_bytes,in_ECX);\n    return __s->place;\n  }" { (if_statement "if (fmtch == (char *)0x0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }" if (parenthesized_expression "(fmtch == (char *)0x0)" ( (binary_expression "fmtch == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      __format = "%%%s";\n    }" { (expression_statement "__format = "%%%s";" (assignment_expression "__format = "%%%s"" identifier = (string_literal ""%%%s"" " string_content ")) ;) }) (else_clause "else {\n      __format = "%%%s%s";\n    }" else (compound_statement "{\n      __format = "%%%s%s";\n    }" { (expression_statement "__format = "%%%s%s";" (assignment_expression "__format = "%%%s%s"" identifier = (string_literal ""%%%s%s"" " string_content ")) ;) }))) (expression_statement "sprintf(fmt,__format,"ll");" (call_expression "sprintf(fmt,__format,"ll")" identifier (argument_list "(fmt,__format,"ll")" ( identifier , identifier , (string_literal ""ll"" " string_content ") ))) ;) (expression_statement "snprintf(__s->place,0x40,fmt,num_bytes,in_ECX);" (call_expression "snprintf(__s->place,0x40,fmt,num_bytes,in_ECX)" identifier (argument_list "(__s->place,0x40,fmt,num_bytes,in_ECX)" ( (field_expression "__s->place" identifier -> field_identifier) , number_literal , identifier , identifier , identifier ))) ;) (return_statement "return __s->place;" return (field_expression "__s->place" identifier -> field_identifier) ;) })) (expression_statement "snprintf(__s->place,0x40,"%16.16llx",num_bytes);" (call_expression "snprintf(__s->place,0x40,"%16.16llx",num_bytes)" identifier (argument_list "(__s->place,0x40,"%16.16llx",num_bytes)" ( (field_expression "__s->place" identifier -> field_identifier) , number_literal , (string_literal ""%16.16llx"" " string_content ") , identifier ))) ;) (if_statement "if (8 < (uint)value) {\n    value._0_4_ = 8;\n  }" if (parenthesized_expression "(8 < (uint)value)" ( (binary_expression "8 < (uint)value" number_literal < (cast_expression "(uint)value" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n    value._0_4_ = 8;\n  }" { (expression_statement "value._0_4_ = 8;" (assignment_expression "value._0_4_ = 8" (field_expression "value._0_4_" identifier . field_identifier) = number_literal) ;) })) (return_statement "return (char *)(iVar2 + 0xb78b0 + (uint)value * -2);" return (cast_expression "(char *)(iVar2 + 0xb78b0 + (uint)value * -2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xb78b0 + (uint)value * -2)" ( (binary_expression "iVar2 + 0xb78b0 + (uint)value * -2" (binary_expression "iVar2 + 0xb78b0" identifier + number_literal) + (binary_expression "(uint)value * -2" (cast_expression "(uint)value" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) ))) ;) })))
(translation_unit "char * __regparm3 FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)\n\n{\n  char *__s;\n  char *__format;\n  int iVar1;\n  char local_3c [40];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4cb59;\n  iVar1 = DAT_000b7ca0 * 0x40;\n  DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;\n  __s = (char *)(iVar1 + 0xb78a0);\n  if (param_4 == 0) {\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }\n  snprintf(__s,0x40,"%16.16llx",param_2,param_3);\n  if (8 < param_4) {\n    param_4 = 8;\n  }\n  return (char *)(iVar1 + 0xb78b0 + param_4 * -2);\n}\n\n" (function_definition "char * __regparm3 FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)\n\n{\n  char *__s;\n  char *__format;\n  int iVar1;\n  char local_3c [40];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4cb59;\n  iVar1 = DAT_000b7ca0 * 0x40;\n  DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;\n  __s = (char *)(iVar1 + 0xb78a0);\n  if (param_4 == 0) {\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }\n  snprintf(__s,0x40,"%16.16llx",param_2,param_3);\n  if (8 < param_4) {\n    param_4 = 8;\n  }\n  return (char *)(iVar1 + 0xb78b0 + param_4 * -2);\n}" primitive_type (pointer_declarator "* __regparm3 FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) )))) (compound_statement "{\n  char *__s;\n  char *__format;\n  int iVar1;\n  char local_3c [40];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4cb59;\n  iVar1 = DAT_000b7ca0 * 0x40;\n  DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;\n  __s = (char *)(iVar1 + 0xb78a0);\n  if (param_4 == 0) {\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }\n  snprintf(__s,0x40,"%16.16llx",param_2,param_3);\n  if (8 < param_4) {\n    param_4 = 8;\n  }\n  return (char *)(iVar1 + 0xb78b0 + param_4 * -2);\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "char *__format;" primitive_type (pointer_declarator "*__format" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "char local_3c [40];" primitive_type (array_declarator "local_3c [40]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x4cb59;" (assignment_expression "uStack_14 = 0x4cb59" identifier = number_literal) ;) (expression_statement "iVar1 = DAT_000b7ca0 * 0x40;" (assignment_expression "iVar1 = DAT_000b7ca0 * 0x40" identifier = (binary_expression "DAT_000b7ca0 * 0x40" identifier * number_literal)) ;) (expression_statement "DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;" (assignment_expression "DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf" identifier = (binary_expression "DAT_000b7ca0 + 1 & 0xf" (binary_expression "DAT_000b7ca0 + 1" identifier + number_literal) & number_literal)) ;) (expression_statement "__s = (char *)(iVar1 + 0xb78a0);" (assignment_expression "__s = (char *)(iVar1 + 0xb78a0)" identifier = (cast_expression "(char *)(iVar1 + 0xb78a0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xb78a0)" ( (binary_expression "iVar1 + 0xb78a0" identifier + number_literal) )))) ;) (if_statement "if (param_4 == 0) {\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }" { (if_statement "if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n      __format = "%%%s";\n    }" { (expression_statement "__format = "%%%s";" (assignment_expression "__format = "%%%s"" identifier = (string_literal ""%%%s"" " string_content ")) ;) }) (else_clause "else {\n      __format = "%%%s%s";\n    }" else (compound_statement "{\n      __format = "%%%s%s";\n    }" { (expression_statement "__format = "%%%s%s";" (assignment_expression "__format = "%%%s%s"" identifier = (string_literal ""%%%s%s"" " string_content ")) ;) }))) (expression_statement "sprintf(local_3c,__format,"ll");" (call_expression "sprintf(local_3c,__format,"ll")" identifier (argument_list "(local_3c,__format,"ll")" ( identifier , identifier , (string_literal ""ll"" " string_content ") ))) ;) (expression_statement "snprintf(__s,0x40,local_3c,param_2,param_3);" (call_expression "snprintf(__s,0x40,local_3c,param_2,param_3)" identifier (argument_list "(__s,0x40,local_3c,param_2,param_3)" ( identifier , number_literal , identifier , identifier , identifier ))) ;) (return_statement "return __s;" return identifier ;) })) (expression_statement "snprintf(__s,0x40,"%16.16llx",param_2,param_3);" (call_expression "snprintf(__s,0x40,"%16.16llx",param_2,param_3)" identifier (argument_list "(__s,0x40,"%16.16llx",param_2,param_3)" ( identifier , number_literal , (string_literal ""%16.16llx"" " string_content ") , identifier , identifier ))) ;) (if_statement "if (8 < param_4) {\n    param_4 = 8;\n  }" if (parenthesized_expression "(8 < param_4)" ( (binary_expression "8 < param_4" number_literal < identifier) )) (compound_statement "{\n    param_4 = 8;\n  }" { (expression_statement "param_4 = 8;" (assignment_expression "param_4 = 8" identifier = number_literal) ;) })) (return_statement "return (char *)(iVar1 + 0xb78b0 + param_4 * -2);" return (cast_expression "(char *)(iVar1 + 0xb78b0 + param_4 * -2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xb78b0 + param_4 * -2)" ( (binary_expression "iVar1 + 0xb78b0 + param_4 * -2" (binary_expression "iVar1 + 0xb78b0" identifier + number_literal) + (binary_expression "param_4 * -2" identifier * number_literal)) ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) & LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (string_literal " string_content ") ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT , IDENT , IDENT ))) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content ") , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) ))) ;) })))
(function_definition "char * __regparm3 FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)\n\n{\n  char *__s;\n  char *__format;\n  int iVar1;\n  char local_3c [40];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4cb59;\n  iVar1 = DAT_000b7ca0 * 0x40;\n  DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;\n  __s = (char *)(iVar1 + 0xb78a0);\n  if (param_4 == 0) {\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }\n  snprintf(__s,0x40,"%16.16llx",param_2,param_3);\n  if (8 < param_4) {\n    param_4 = 8;\n  }\n  return (char *)(iVar1 + 0xb78b0 + param_4 * -2);\n}" (primitive_type "char") (pointer_declarator "* __regparm3 FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)" (* "*") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0004cb50(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)" (identifier "FUN_0004cb50") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")")))) (compound_statement "{\n  char *__s;\n  char *__format;\n  int iVar1;\n  char local_3c [40];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4cb59;\n  iVar1 = DAT_000b7ca0 * 0x40;\n  DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;\n  __s = (char *)(iVar1 + 0xb78a0);\n  if (param_4 == 0) {\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }\n  snprintf(__s,0x40,"%16.16llx",param_2,param_3);\n  if (8 < param_4) {\n    param_4 = 8;\n  }\n  return (char *)(iVar1 + 0xb78b0 + param_4 * -2);\n}" ({ "{") (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "char *__format;" (primitive_type "char") (pointer_declarator "*__format" (* "*") (identifier "__format")) (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "char local_3c [40];" (primitive_type "char") (array_declarator "local_3c [40]" (identifier "local_3c") ([ "[") (number_literal "40") (] "]")) (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x4cb59;" (assignment_expression "uStack_14 = 0x4cb59" (identifier "uStack_14") (= "=") (number_literal "0x4cb59")) (; ";")) (expression_statement "iVar1 = DAT_000b7ca0 * 0x40;" (assignment_expression "iVar1 = DAT_000b7ca0 * 0x40" (identifier "iVar1") (= "=") (binary_expression "DAT_000b7ca0 * 0x40" (identifier "DAT_000b7ca0") (* "*") (number_literal "0x40"))) (; ";")) (expression_statement "DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;" (assignment_expression "DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf" (identifier "DAT_000b7ca0") (= "=") (binary_expression "DAT_000b7ca0 + 1 & 0xf" (binary_expression "DAT_000b7ca0 + 1" (identifier "DAT_000b7ca0") (+ "+") (number_literal "1")) (& "&") (number_literal "0xf"))) (; ";")) (expression_statement "__s = (char *)(iVar1 + 0xb78a0);" (assignment_expression "__s = (char *)(iVar1 + 0xb78a0)" (identifier "__s") (= "=") (cast_expression "(char *)(iVar1 + 0xb78a0)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xb78a0)" (( "(") (binary_expression "iVar1 + 0xb78a0" (identifier "iVar1") (+ "+") (number_literal "0xb78a0")) () ")")))) (; ";")) (if_statement "if (param_4 == 0) {\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }" (if "if") (parenthesized_expression "(param_4 == 0)" (( "(") (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }\n    sprintf(local_3c,__format,"ll");\n    snprintf(__s,0x40,local_3c,param_2,param_3);\n    return __s;\n  }" ({ "{") (if_statement "if (param_1 == 0) {\n      __format = "%%%s";\n    }\n    else {\n      __format = "%%%s%s";\n    }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      __format = "%%%s";\n    }" ({ "{") (expression_statement "__format = "%%%s";" (assignment_expression "__format = "%%%s"" (identifier "__format") (= "=") (string_literal ""%%%s"" (" """) (string_content "%%%s") (" """))) (; ";")) (} "}")) (else_clause "else {\n      __format = "%%%s%s";\n    }" (else "else") (compound_statement "{\n      __format = "%%%s%s";\n    }" ({ "{") (expression_statement "__format = "%%%s%s";" (assignment_expression "__format = "%%%s%s"" (identifier "__format") (= "=") (string_literal ""%%%s%s"" (" """) (string_content "%%%s%s") (" """))) (; ";")) (} "}")))) (expression_statement "sprintf(local_3c,__format,"ll");" (call_expression "sprintf(local_3c,__format,"ll")" (identifier "sprintf") (argument_list "(local_3c,__format,"ll")" (( "(") (identifier "local_3c") (, ",") (identifier "__format") (, ",") (string_literal ""ll"" (" """) (string_content "ll") (" """)) () ")"))) (; ";")) (expression_statement "snprintf(__s,0x40,local_3c,param_2,param_3);" (call_expression "snprintf(__s,0x40,local_3c,param_2,param_3)" (identifier "snprintf") (argument_list "(__s,0x40,local_3c,param_2,param_3)" (( "(") (identifier "__s") (, ",") (number_literal "0x40") (, ",") (identifier "local_3c") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (return_statement "return __s;" (return "return") (identifier "__s") (; ";")) (} "}"))) (expression_statement "snprintf(__s,0x40,"%16.16llx",param_2,param_3);" (call_expression "snprintf(__s,0x40,"%16.16llx",param_2,param_3)" (identifier "snprintf") (argument_list "(__s,0x40,"%16.16llx",param_2,param_3)" (( "(") (identifier "__s") (, ",") (number_literal "0x40") (, ",") (string_literal ""%16.16llx"" (" """) (string_content "%16.16llx") (" """)) (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (if_statement "if (8 < param_4) {\n    param_4 = 8;\n  }" (if "if") (parenthesized_expression "(8 < param_4)" (( "(") (binary_expression "8 < param_4" (number_literal "8") (< "<") (identifier "param_4")) () ")")) (compound_statement "{\n    param_4 = 8;\n  }" ({ "{") (expression_statement "param_4 = 8;" (assignment_expression "param_4 = 8" (identifier "param_4") (= "=") (number_literal "8")) (; ";")) (} "}"))) (return_statement "return (char *)(iVar1 + 0xb78b0 + param_4 * -2);" (return "return") (cast_expression "(char *)(iVar1 + 0xb78b0 + param_4 * -2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xb78b0 + param_4 * -2)" (( "(") (binary_expression "iVar1 + 0xb78b0 + param_4 * -2" (binary_expression "iVar1 + 0xb78b0" (identifier "iVar1") (+ "+") (number_literal "0xb78b0")) (+ "+") (binary_expression "param_4 * -2" (identifier "param_4") (* "*") (number_literal "-2"))) () ")"))) (; ";")) (} "}")))

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

char * __regparm3 function_1(char *var_1,type_1 value,type_2 num_bytes)

{
  type_3 *__s;
  char *__format;
  type_4 in_ECX;
  type_2 uVar1;
  int var_4;
  char fmt [32];
  
  var_4 = function_1::buf_pos * 0x40;
  uVar1 = function_1::buf_pos + 1U & 0xf;
  __s = function_1::buf + function_1::buf_pos;
  dwarf_vmatoa_1::buf_pos = uVar1;
  if ((type_2)value == 0) {
    if (var_1 == (char *)0x0) {
      __format = "%%%s";
    }
    else {
      __format = "%%%s%s";
    }
    var_2(fmt,__format,"ll");
    var_3(__s->place,0x40,fmt,num_bytes,in_ECX);
    return __s->place;
  }
  var_3(__s->place,0x40,"%16.16llx",num_bytes);
  if (8 < (type_2)value) {
    value._0_4_ = 8;
  }
  return (char *)(var_4 + 0xb78b0 + (type_2)value * -2);
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (string_literal (string_content))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier) (identifier) (identifier)))) (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (string_literal (string_content)) (identifier) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))))))

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

char * __regparm3 MASKED(int param_1,undefined4 param_2,undefined4 param_3,uint param_4)

{
  char *__s;
  char *__format;
  int iVar1;
  char local_3c [40];
  undefined4 uStack_14;
  
  uStack_14 = 0x4cb59;
  iVar1 = DAT_000b7ca0 * 0x40;
  DAT_000b7ca0 = DAT_000b7ca0 + 1 & 0xf;
  __s = (char *)(iVar1 + 0xb78a0);
  if (param_4 == 0) {
    if (param_1 == 0) {
      __format = "%%%s";
    }
    else {
      __format = "%%%s%s";
    }
    sprintf(local_3c,__format,"ll");
    snprintf(__s,0x40,local_3c,param_2,param_3);
    return __s;
  }
  snprintf(__s,0x40,"%16.16llx",param_2,param_3);
  if (8 < param_4) {
    param_4 = 8;
  }
  return (char *)(iVar1 + 0xb78b0 + param_4 * -2);
}

