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

_Bool base32_decode_alloc_ctx
                (base32_decode_context *ctx,char *in,size_t inlen,char **out,size_t *outlen)

{
  _Bool _Var1;
  char *out_00;
  int in_GS_OFFSET;
  size_t needlen;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x52759;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  needlen = (inlen >> 3) * 5 + 5;
  out_00 = (char *)malloc(needlen);
  *out = out_00;
  if (out_00 != (char *)0x0) {
    _Var1 = base32_decode_ctx(ctx,in,inlen,out_00,&needlen);
    if (!_Var1) {
      free(*out);
      *out = (char *)0x0;
      goto LAB_000527c8;
    }
    if (outlen != (size_t *)0x0) {
      *outlen = needlen;
      goto LAB_000527c8;
    }
  }
  _Var1 = true;
LAB_000527c8:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return _Var1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

uint FUN_00052750(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,
                 size_t *param_5)

{
  void *pvVar1;
  uint uVar2;
  int in_GS_OFFSET;
  size_t local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x52759;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_24 = (param_3 >> 3) * 5 + 5;
  pvVar1 = malloc(local_24);
  *param_4 = pvVar1;
  if (pvVar1 != (void *)0x0) {
    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);
    if ((char)uVar2 == '\0') {
      free((void *)*param_4);
      *param_4 = 0;
      uVar2 = uVar2 & 0xff;
      goto LAB_000527c8;
    }
    if (param_5 != (size_t *)0x0) {
      *param_5 = local_24;
      goto LAB_000527c8;
    }
  }
  uVar2 = 1;
LAB_000527c8:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006da50();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00019070
ADD EBX,0x4e477
SUB ESP,0x38
MOV EAX,dword ptr [ESP + 0x4c]
MOV ESI,dword ptr [ESP + 0x58]
MOV EBP,dword ptr [ESP + 0x50]
MOV EDI,dword ptr [ESP + 0x5c]
MOV dword ptr [ESP + 0x18],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x28],EAX
XOR EAX,EAX
MOV EAX,dword ptr [ESP + 0x54]
SHR EAX,0x3
LEA EAX,[EAX + EAX*0x4 + 0x5]
MOV dword ptr [ESP + 0x24],EAX
PUSH EAX
CALL 0x00016ab0
ADD ESP,0x10
MOV dword ptr [ESI],EAX
TEST EAX,EAX
JZ 0x000527e0
SUB ESP,0xc
LEA EDX,[ESP + 0x24]
PUSH EDX
PUSH EAX
PUSH dword ptr [ESP + 0x5c]
PUSH EBP
PUSH dword ptr [ESP + 0x28]
CALL 0x000524c0
ADD ESP,0x20
TEST AL,AL
JZ 0x000527f0
TEST EDI,EDI
JZ 0x000527e0
MOV EDX,dword ptr [ESP + 0x18]
MOV dword ptr [EDI],EDX
MOV ECX,dword ptr [ESP + 0x1c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x0005280e
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,0x1
JMP 0x000527c8
MOV byte ptr [ESP + 0xc],AL
SUB ESP,0xc
PUSH dword ptr [ESI]
CALL 0x00016670
ADD ESP,0x10
MOV dword ptr [ESI],0x0
MOVZX EAX,byte ptr [ESP + 0xc]
JMP 0x000527c8
CALL 0x0006da50
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint FUN_00052750(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,\n                 size_t *param_5)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x52759;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = (param_3 >> 3) * 5 + 5;\n  pvVar1 = malloc(local_24);\n  *param_4 = pvVar1;\n  if (pvVar1 != (void *)0x0) {\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }\n  uVar2 = 1;\nLAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}\n\n" comment (function_definition "uint FUN_00052750(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,\n                 size_t *param_5)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x52759;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = (param_3 >> 3) * 5 + 5;\n  pvVar1 = malloc(local_24);\n  *param_4 = pvVar1;\n  if (pvVar1 != (void *)0x0) {\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }\n  uVar2 = 1;\nLAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}" type_identifier (function_declarator "FUN_00052750(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,\n                 size_t *param_5)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,\n                 size_t *param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "size_t *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  void *pvVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x52759;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = (param_3 >> 3) * 5 + 5;\n  pvVar1 = malloc(local_24);\n  *param_4 = pvVar1;\n  if (pvVar1 != (void *)0x0) {\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }\n  uVar2 = 1;\nLAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "size_t local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x52759;" (assignment_expression "uStack_14 = 0x52759" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_24 = (param_3 >> 3) * 5 + 5;" (assignment_expression "local_24 = (param_3 >> 3) * 5 + 5" identifier = (binary_expression "(param_3 >> 3) * 5 + 5" (binary_expression "(param_3 >> 3) * 5" (parenthesized_expression "(param_3 >> 3)" ( (binary_expression "param_3 >> 3" identifier >> number_literal) )) * number_literal) + number_literal)) ;) (expression_statement "pvVar1 = malloc(local_24);" (assignment_expression "pvVar1 = malloc(local_24)" identifier = (call_expression "malloc(local_24)" identifier (argument_list "(local_24)" ( identifier )))) ;) (expression_statement "*param_4 = pvVar1;" (assignment_expression "*param_4 = pvVar1" (pointer_expression "*param_4" * identifier) = identifier) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\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    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }" { (expression_statement "uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);" (assignment_expression "uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24)" identifier = (call_expression "FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24)" identifier (argument_list "(param_1,param_2,param_3,pvVar1,&local_24)" ( identifier , identifier , identifier , identifier , (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }" if (parenthesized_expression "((char)uVar2 == '\0')" ( (binary_expression "(char)uVar2 == '\0'" (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }" { (expression_statement "free((void *)*param_4);" (call_expression "free((void *)*param_4)" identifier (argument_list "((void *)*param_4)" ( (cast_expression "(void *)*param_4" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_4" * identifier)) ))) ;) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (expression_statement "uVar2 = uVar2 & 0xff;" (assignment_expression "uVar2 = uVar2 & 0xff" identifier = (binary_expression "uVar2 & 0xff" identifier & number_literal)) ;) (goto_statement "goto LAB_000527c8;" goto statement_identifier ;) })) (if_statement "if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }" if (parenthesized_expression "(param_5 != (size_t *)0x0)" ( (binary_expression "param_5 != (size_t *)0x0" identifier != (cast_expression "(size_t *)0x0" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }" { (expression_statement "*param_5 = local_24;" (assignment_expression "*param_5 = local_24" (pointer_expression "*param_5" * identifier) = identifier) ;) (goto_statement "goto LAB_000527c8;" goto statement_identifier ;) })) })) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (labeled_statement "LAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) comment (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\n_Bool base32_decode_alloc_ctx\n                (base32_decode_context *ctx,char *in,size_t inlen,char **out,size_t *outlen)\n\n{\n  _Bool _Var1;\n  char *out_00;\n  int in_GS_OFFSET;\n  size_t needlen;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x52759;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  needlen = (inlen >> 3) * 5 + 5;\n  out_00 = (char *)malloc(needlen);\n  *out = out_00;\n  if (out_00 != (char *)0x0) {\n    _Var1 = base32_decode_ctx(ctx,in,inlen,out_00,&needlen);\n    if (!_Var1) {\n      free(*out);\n      *out = (char *)0x0;\n      goto LAB_000527c8;\n    }\n    if (outlen != (size_t *)0x0) {\n      *outlen = needlen;\n      goto LAB_000527c8;\n    }\n  }\n  _Var1 = true;\nLAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return _Var1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "_Bool base32_decode_alloc_ctx\n                (base32_decode_context *ctx,char *in,size_t inlen,char **out,size_t *outlen)\n\n{\n  _Bool _Var1;\n  char *out_00;\n  int in_GS_OFFSET;\n  size_t needlen;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x52759;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  needlen = (inlen >> 3) * 5 + 5;\n  out_00 = (char *)malloc(needlen);\n  *out = out_00;\n  if (out_00 != (char *)0x0) {\n    _Var1 = base32_decode_ctx(ctx,in,inlen,out_00,&needlen);\n    if (!_Var1) {\n      free(*out);\n      *out = (char *)0x0;\n      goto LAB_000527c8;\n    }\n    if (outlen != (size_t *)0x0) {\n      *outlen = needlen;\n      goto LAB_000527c8;\n    }\n  }\n  _Var1 = true;\nLAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return _Var1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (function_declarator "base32_decode_alloc_ctx\n                (base32_decode_context *ctx,char *in,size_t inlen,char **out,size_t *outlen)" identifier (parameter_list "(base32_decode_context *ctx,char *in,size_t inlen,char **out,size_t *outlen)" ( (parameter_declaration "base32_decode_context *ctx" type_identifier (pointer_declarator "*ctx" * identifier)) , (parameter_declaration "char *in" primitive_type (pointer_declarator "*in" * identifier)) , (parameter_declaration "size_t inlen" primitive_type identifier) , (parameter_declaration "char **out" primitive_type (pointer_declarator "**out" * (pointer_declarator "*out" * identifier))) , (parameter_declaration "size_t *outlen" primitive_type (pointer_declarator "*outlen" * identifier)) ))) (compound_statement "{\n  _Bool _Var1;\n  char *out_00;\n  int in_GS_OFFSET;\n  size_t needlen;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x52759;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  needlen = (inlen >> 3) * 5 + 5;\n  out_00 = (char *)malloc(needlen);\n  *out = out_00;\n  if (out_00 != (char *)0x0) {\n    _Var1 = base32_decode_ctx(ctx,in,inlen,out_00,&needlen);\n    if (!_Var1) {\n      free(*out);\n      *out = (char *)0x0;\n      goto LAB_000527c8;\n    }\n    if (outlen != (size_t *)0x0) {\n      *outlen = needlen;\n      goto LAB_000527c8;\n    }\n  }\n  _Var1 = true;\nLAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return _Var1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "_Bool _Var1;" type_identifier identifier ;) (declaration "char *out_00;" primitive_type (pointer_declarator "*out_00" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "size_t needlen;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x52759;" (assignment_expression "uStack_14 = 0x52759" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "needlen = (inlen >> 3) * 5 + 5;" (assignment_expression "needlen = (inlen >> 3) * 5 + 5" identifier = (binary_expression "(inlen >> 3) * 5 + 5" (binary_expression "(inlen >> 3) * 5" (parenthesized_expression "(inlen >> 3)" ( (binary_expression "inlen >> 3" identifier >> number_literal) )) * number_literal) + number_literal)) ;) (expression_statement "out_00 = (char *)malloc(needlen);" (assignment_expression "out_00 = (char *)malloc(needlen)" identifier = (cast_expression "(char *)malloc(needlen)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(needlen)" identifier (argument_list "(needlen)" ( identifier ))))) ;) (expression_statement "*out = out_00;" (assignment_expression "*out = out_00" (pointer_expression "*out" * identifier) = identifier) ;) (if_statement "if (out_00 != (char *)0x0) {\n    _Var1 = base32_decode_ctx(ctx,in,inlen,out_00,&needlen);\n    if (!_Var1) {\n      free(*out);\n      *out = (char *)0x0;\n      goto LAB_000527c8;\n    }\n    if (outlen != (size_t *)0x0) {\n      *outlen = needlen;\n      goto LAB_000527c8;\n    }\n  }" if (parenthesized_expression "(out_00 != (char *)0x0)" ( (binary_expression "out_00 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    _Var1 = base32_decode_ctx(ctx,in,inlen,out_00,&needlen);\n    if (!_Var1) {\n      free(*out);\n      *out = (char *)0x0;\n      goto LAB_000527c8;\n    }\n    if (outlen != (size_t *)0x0) {\n      *outlen = needlen;\n      goto LAB_000527c8;\n    }\n  }" { (expression_statement "_Var1 = base32_decode_ctx(ctx,in,inlen,out_00,&needlen);" (assignment_expression "_Var1 = base32_decode_ctx(ctx,in,inlen,out_00,&needlen)" identifier = (call_expression "base32_decode_ctx(ctx,in,inlen,out_00,&needlen)" identifier (argument_list "(ctx,in,inlen,out_00,&needlen)" ( identifier , identifier , identifier , identifier , (pointer_expression "&needlen" & identifier) )))) ;) (if_statement "if (!_Var1) {\n      free(*out);\n      *out = (char *)0x0;\n      goto LAB_000527c8;\n    }" if (parenthesized_expression "(!_Var1)" ( (unary_expression "!_Var1" ! identifier) )) (compound_statement "{\n      free(*out);\n      *out = (char *)0x0;\n      goto LAB_000527c8;\n    }" { (expression_statement "free(*out);" (call_expression "free(*out)" identifier (argument_list "(*out)" ( (pointer_expression "*out" * identifier) ))) ;) (expression_statement "*out = (char *)0x0;" (assignment_expression "*out = (char *)0x0" (pointer_expression "*out" * identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (goto_statement "goto LAB_000527c8;" goto statement_identifier ;) })) (if_statement "if (outlen != (size_t *)0x0) {\n      *outlen = needlen;\n      goto LAB_000527c8;\n    }" if (parenthesized_expression "(outlen != (size_t *)0x0)" ( (binary_expression "outlen != (size_t *)0x0" identifier != (cast_expression "(size_t *)0x0" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *outlen = needlen;\n      goto LAB_000527c8;\n    }" { (expression_statement "*outlen = needlen;" (assignment_expression "*outlen = needlen" (pointer_expression "*outlen" * identifier) = identifier) ;) (goto_statement "goto LAB_000527c8;" goto statement_identifier ;) })) })) (expression_statement "_Var1 = true;" (assignment_expression "_Var1 = true" identifier = true) ;) (labeled_statement "LAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return _Var1;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return _Var1;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return _Var1;\n  }" { (return_statement "return _Var1;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "uint FUN_00052750(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,\n                 size_t *param_5)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x52759;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = (param_3 >> 3) * 5 + 5;\n  pvVar1 = malloc(local_24);\n  *param_4 = pvVar1;\n  if (pvVar1 != (void *)0x0) {\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }\n  uVar2 = 1;\nLAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_0006da50();\n}\n\n" (function_definition "uint FUN_00052750(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,\n                 size_t *param_5)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x52759;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = (param_3 >> 3) * 5 + 5;\n  pvVar1 = malloc(local_24);\n  *param_4 = pvVar1;\n  if (pvVar1 != (void *)0x0) {\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }\n  uVar2 = 1;\nLAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_0006da50();\n}" type_identifier (function_declarator "FUN_00052750(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,\n                 size_t *param_5)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,\n                 size_t *param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "size_t *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  void *pvVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x52759;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = (param_3 >> 3) * 5 + 5;\n  pvVar1 = malloc(local_24);\n  *param_4 = pvVar1;\n  if (pvVar1 != (void *)0x0) {\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }\n  uVar2 = 1;\nLAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_0006da50();\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "size_t local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x52759;" (assignment_expression "uStack_14 = 0x52759" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_24 = (param_3 >> 3) * 5 + 5;" (assignment_expression "local_24 = (param_3 >> 3) * 5 + 5" identifier = (binary_expression "(param_3 >> 3) * 5 + 5" (binary_expression "(param_3 >> 3) * 5" (parenthesized_expression "(param_3 >> 3)" ( (binary_expression "param_3 >> 3" identifier >> number_literal) )) * number_literal) + number_literal)) ;) (expression_statement "pvVar1 = malloc(local_24);" (assignment_expression "pvVar1 = malloc(local_24)" identifier = (call_expression "malloc(local_24)" identifier (argument_list "(local_24)" ( identifier )))) ;) (expression_statement "*param_4 = pvVar1;" (assignment_expression "*param_4 = pvVar1" (pointer_expression "*param_4" * identifier) = identifier) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\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    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }" { (expression_statement "uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);" (assignment_expression "uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24)" identifier = (call_expression "FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24)" identifier (argument_list "(param_1,param_2,param_3,pvVar1,&local_24)" ( identifier , identifier , identifier , identifier , (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }" if (parenthesized_expression "((char)uVar2 == '\0')" ( (binary_expression "(char)uVar2 == '\0'" (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }" { (expression_statement "free((void *)*param_4);" (call_expression "free((void *)*param_4)" identifier (argument_list "((void *)*param_4)" ( (cast_expression "(void *)*param_4" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_4" * identifier)) ))) ;) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (expression_statement "uVar2 = uVar2 & 0xff;" (assignment_expression "uVar2 = uVar2 & 0xff" identifier = (binary_expression "uVar2 & 0xff" identifier & number_literal)) ;) (goto_statement "goto LAB_000527c8;" goto statement_identifier ;) })) (if_statement "if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }" if (parenthesized_expression "(param_5 != (size_t *)0x0)" ( (binary_expression "param_5 != (size_t *)0x0" identifier != (cast_expression "(size_t *)0x0" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }" { (expression_statement "*param_5 = local_24;" (assignment_expression "*param_5 = local_24" (pointer_expression "*param_5" * identifier) = identifier) ;) (goto_statement "goto LAB_000527c8;" goto statement_identifier ;) })) })) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (labeled_statement "LAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT >> LIT) )) * LIT) + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "uint FUN_00052750(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,\n                 size_t *param_5)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x52759;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = (param_3 >> 3) * 5 + 5;\n  pvVar1 = malloc(local_24);\n  *param_4 = pvVar1;\n  if (pvVar1 != (void *)0x0) {\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }\n  uVar2 = 1;\nLAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_0006da50();\n}" (type_identifier "uint") (function_declarator "FUN_00052750(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,\n                 size_t *param_5)" (identifier "FUN_00052750") (parameter_list "(undefined4 param_1,undefined4 param_2,uint param_3,undefined4 *param_4,\n                 size_t *param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 *param_4" (type_identifier "undefined4") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "size_t *param_5" (primitive_type "size_t") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  void *pvVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x52759;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = (param_3 >> 3) * 5 + 5;\n  pvVar1 = malloc(local_24);\n  *param_4 = pvVar1;\n  if (pvVar1 != (void *)0x0) {\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }\n  uVar2 = 1;\nLAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_0006da50();\n}" ({ "{") (declaration "void *pvVar1;" (primitive_type "void") (pointer_declarator "*pvVar1" (* "*") (identifier "pvVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "size_t local_24;" (primitive_type "size_t") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x52759;" (assignment_expression "uStack_14 = 0x52759" (identifier "uStack_14") (= "=") (number_literal "0x52759")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "local_24 = (param_3 >> 3) * 5 + 5;" (assignment_expression "local_24 = (param_3 >> 3) * 5 + 5" (identifier "local_24") (= "=") (binary_expression "(param_3 >> 3) * 5 + 5" (binary_expression "(param_3 >> 3) * 5" (parenthesized_expression "(param_3 >> 3)" (( "(") (binary_expression "param_3 >> 3" (identifier "param_3") (>> ">>") (number_literal "3")) () ")")) (* "*") (number_literal "5")) (+ "+") (number_literal "5"))) (; ";")) (expression_statement "pvVar1 = malloc(local_24);" (assignment_expression "pvVar1 = malloc(local_24)" (identifier "pvVar1") (= "=") (call_expression "malloc(local_24)" (identifier "malloc") (argument_list "(local_24)" (( "(") (identifier "local_24") () ")")))) (; ";")) (expression_statement "*param_4 = pvVar1;" (assignment_expression "*param_4 = pvVar1" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "pvVar1")) (; ";")) (if_statement "if (pvVar1 != (void *)0x0) {\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }" (if "if") (parenthesized_expression "(pvVar1 != (void *)0x0)" (( "(") (binary_expression "pvVar1 != (void *)0x0" (identifier "pvVar1") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);\n    if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }\n    if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }\n  }" ({ "{") (expression_statement "uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);" (assignment_expression "uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24)" (identifier "uVar2") (= "=") (call_expression "FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24)" (identifier "FUN_000524c0") (argument_list "(param_1,param_2,param_3,pvVar1,&local_24)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "pvVar1") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) () ")")))) (; ";")) (if_statement "if ((char)uVar2 == '\0') {\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }" (if "if") (parenthesized_expression "((char)uVar2 == '\0')" (( "(") (binary_expression "(char)uVar2 == '\0'" (cast_expression "(char)uVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar2")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      free((void *)*param_4);\n      *param_4 = 0;\n      uVar2 = uVar2 & 0xff;\n      goto LAB_000527c8;\n    }" ({ "{") (expression_statement "free((void *)*param_4);" (call_expression "free((void *)*param_4)" (identifier "free") (argument_list "((void *)*param_4)" (( "(") (cast_expression "(void *)*param_4" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_4" (* "*") (identifier "param_4"))) () ")"))) (; ";")) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = uVar2 & 0xff;" (assignment_expression "uVar2 = uVar2 & 0xff" (identifier "uVar2") (= "=") (binary_expression "uVar2 & 0xff" (identifier "uVar2") (& "&") (number_literal "0xff"))) (; ";")) (goto_statement "goto LAB_000527c8;" (goto "goto") (statement_identifier "LAB_000527c8") (; ";")) (} "}"))) (if_statement "if (param_5 != (size_t *)0x0) {\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }" (if "if") (parenthesized_expression "(param_5 != (size_t *)0x0)" (( "(") (binary_expression "param_5 != (size_t *)0x0" (identifier "param_5") (!= "!=") (cast_expression "(size_t *)0x0" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *param_5 = local_24;\n      goto LAB_000527c8;\n    }" ({ "{") (expression_statement "*param_5 = local_24;" (assignment_expression "*param_5 = local_24" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "local_24")) (; ";")) (goto_statement "goto LAB_000527c8;" (goto "goto") (statement_identifier "LAB_000527c8") (; ";")) (} "}"))) (} "}"))) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (labeled_statement "LAB_000527c8:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" (statement_identifier "LAB_000527c8") (: ":") (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))) (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" (identifier "FUN_0006da50") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

type_1 function_1
                (type_2 *ctx,char *in,size_t var_2,char **out,size_t *var_7)

{
  type_1 _Var1;
  char *var_4;
  int var_1;
  size_t needlen;
  int var_8;
  type_3 uStack_14;
  
  uStack_14 = 0x52759;
  var_8 = *(int *)(var_1 + 0x14);
  needlen = (var_2 >> 3) * 5 + 5;
  var_4 = (char *)var_3(needlen);
  *out = var_4;
  if (var_4 != (char *)0x0) {
    _Var1 = var_5(ctx,in,var_2,var_4,&needlen);
    if (!_Var1) {
      var_6(*out);
      *out = (char *)0x0;
      goto LAB_000527c8;
    }
    if (var_7 != (size_t *)0x0) {
      *var_7 = needlen;
      goto LAB_000527c8;
    }
  }
  _Var1 = true;
LAB_000527c8:
  if (var_8 == *(int *)(var_1 + 0x14)) {
    return _Var1;
  }
                    /* WARNING: Subroutine does not return */
  var_9();
}


(translation_unit (function_definition type: (type_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: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (char_literal (escape_sequence)))) 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: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

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

{
  void *pvVar1;
  uint uVar2;
  int in_GS_OFFSET;
  size_t local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x52759;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_24 = (param_3 >> 3) * 5 + 5;
  pvVar1 = malloc(local_24);
  *param_4 = pvVar1;
  if (pvVar1 != (void *)0x0) {
    uVar2 = FUN_000524c0(param_1,param_2,param_3,pvVar1,&local_24);
    if ((char)uVar2 == '\0') {
      free((void *)*param_4);
      *param_4 = 0;
      uVar2 = uVar2 & 0xff;
      goto LAB_000527c8;
    }
    if (param_5 != (size_t *)0x0) {
      *param_5 = local_24;
      goto LAB_000527c8;
    }
  }
  uVar2 = 1;
LAB_000527c8:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006da50();
}

