
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* WARNING: Unknown calling convention */

void jsonObjectFinal(sqlite3_context *ctx)

{
  uint *puVar1;
  u16 *puVar2;
  Mem *pMVar3;
  uint uVar4;
  code *xDel;
  int iVar5;
  JsonString *p;
  sqlite3_context *in_ECX;
  uint uVar6;
  _func_void_void_ptr *xDel_00;
  int in_stack_ffffffcc;
  u8 in_stack_ffffffd0;
  _func_void_void_ptr *in_stack_ffffffd4;
  
  pMVar3 = ctx->pMem;
  if ((pMVar3->flags & 0x2000) == 0) {
    in_stack_ffffffd0 = 200;
    p = (JsonString *)createAggContext((sqlite3_context *)&ctx->pFunc,(int)pMVar3,in_ECX);
  }
  else {
    p = (JsonString *)pMVar3->z;
  }
  if (p == (JsonString *)0x0) {
    xDel_00 = (_func_void_void_ptr *)0x0;
    iVar5 = sqlite3VdbeMemSetStr
                      ((Mem *)&DAT_00000001,(char *)0x0,in_stack_ffffffcc,in_stack_ffffffd0,
                       in_stack_ffffffd4);
    if (iVar5 == 0x12) {
      ctx->isError = 0x12;
      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel_00);
    }
    goto LAB_000a0c6d;
  }
  uVar6 = *(uint *)((int)&p->nUsed + 4);
  uVar4 = (uint)p->nUsed;
  puVar1 = (uint *)((int)&p->nAlloc + 4);
  if (uVar6 < *puVar1 || uVar6 - *puVar1 < (uint)(uVar4 < (uint)p->nAlloc)) {
LAB_000a0c15:
    *(uint *)&p->nUsed = uVar4 + 1;
    *(uint *)((int)&p->nUsed + 4) = uVar6 + (0xfffffffe < uVar4);
    p->zBuf[uVar4] = '}';
  }
  else {
    in_stack_ffffffd0 = 0xac;
    iVar5 = jsonGrow(p,1);
    if (iVar5 == 0) {
      uVar4 = (uint)p->nUsed;
      uVar6 = *(uint *)((int)&p->nUsed + 4);
      goto LAB_000a0c15;
    }
  }
  if (p->bErr == '\0') {
    xDel = sqlite3_free;
    if (p->bStatic != '\0') {
      xDel = (code *)&DAT_ffffffff;
    }
    iVar5 = sqlite3VdbeMemSetStr
                      ((Mem *)&DAT_00000001,(char *)xDel,in_stack_ffffffcc,in_stack_ffffffd0,
                       in_stack_ffffffd4);
    if (iVar5 == 0x12) {
      ctx->isError = 0x12;
      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel);
    }
    p->bStatic = '\x01';
  }
  else if (p->bErr == '\x01') {
    sqlite3_result_error_nomem(ctx);
  }
LAB_000a0c6d:
  pMVar3 = ctx->pOut;
  pMVar3->eSubtype = 'J';
  puVar2 = &pMVar3->flags;
  *puVar2 = *puVar2 | 0x8000;
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

void FUN_000a0bd0(int *param_1)

{
  ushort *puVar1;
  uint uVar2;
  code *pcVar3;
  int iVar4;
  int iVar5;
  uint uVar6;
  
  if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {
    iVar5 = FUN_0004c400();
  }
  else {
    iVar5 = *(int *)(param_1[2] + 0x10);
  }
  if (iVar5 == 0) {
    iVar5 = FUN_000715f0(1,0);
    if (iVar5 == 0x12) {
      param_1[5] = 0x12;
      FUN_0006f5d0(0);
    }
    goto LAB_000a0c6d;
  }
  uVar6 = *(uint *)(iVar5 + 0x14);
  uVar2 = *(uint *)(iVar5 + 0x10);
  if (uVar6 < *(uint *)(iVar5 + 0xc) ||
      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {
LAB_000a0c15:
    *(uint *)(iVar5 + 0x10) = uVar2 + 1;
    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);
    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;
  }
  else {
    iVar4 = FUN_0009f0a0();
    if (iVar4 == 0) {
      uVar2 = *(uint *)(iVar5 + 0x10);
      uVar6 = *(uint *)(iVar5 + 0x14);
      goto LAB_000a0c15;
    }
  }
  if (*(char *)(iVar5 + 0x19) == '\0') {
    pcVar3 = FUN_00044000;
    if (*(char *)(iVar5 + 0x18) != '\0') {
      pcVar3 = (code *)0xffffffff;
    }
    iVar4 = FUN_000715f0(1,pcVar3);
    if (iVar4 == 0x12) {
      param_1[5] = 0x12;
      FUN_0006f5d0(0);
    }
    *(undefined1 *)(iVar5 + 0x18) = 1;
  }
  else if (*(char *)(iVar5 + 0x19) == '\x01') {
    FUN_0004e320(param_1);
  }
LAB_000a0c6d:
  iVar5 = *param_1;
  *(undefined1 *)(iVar5 + 0xb) = 0x4a;
  puVar1 = (ushort *)(iVar5 + 8);
  *puVar1 = *puVar1 | 0x8000;
  return;
}


CALL 0x0003a3fd
ADD EAX,0x11a253
PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x1c
MOV EBP,dword ptr [ESP + 0x30]
MOV dword ptr [ESP + 0xc],EAX
MOV EDX,dword ptr [EBP + 0x8]
TEST byte ptr [EDX + 0x9],0x20
JZ 0x000a0cc0
MOV EBX,dword ptr [EDX + 0x10]
TEST EBX,EBX
JZ 0x000a0cd2
MOV EDX,dword ptr [EBX + 0x14]
MOV EAX,dword ptr [EBX + 0x10]
CMP EAX,dword ptr [EBX + 0x8]
MOV ECX,EDX
SBB ECX,dword ptr [EBX + 0xc]
JNC 0x000a0ca0
MOV ESI,EAX
MOV EDI,EDX
ADD ESI,0x1
ADC EDI,0x0
ADD EAX,dword ptr [EBX + 0x4]
MOV dword ptr [EBX + 0x10],ESI
MOV dword ptr [EBX + 0x14],EDI
MOV byte ptr [EAX],0x7d
MOVZX EAX,byte ptr [EBX + 0x19]
TEST AL,AL
JNZ 0x000a0c88
MOV EAX,dword ptr [ESP + 0xc]
CMP byte ptr [EBX + 0x18],0x0
MOV EDX,0xffffffff
MOV ECX,dword ptr [EBX + 0x10]
LEA EAX,[EAX + 0xffe891d8]
CMOVNZ EAX,EDX
SUB ESP,0x8
MOV EDX,dword ptr [EBX + 0x4]
PUSH EAX
PUSH 0x1
MOV EAX,dword ptr [EBP]
CALL 0x000715f0
ADD ESP,0x10
CMP EAX,0x12
JZ 0x000a0d30
MOV byte ptr [EBX + 0x18],0x1
MOV EAX,dword ptr [EBP]
MOV byte ptr [EAX + 0xb],0x4a
OR word ptr [EAX + 0x8],0x8000
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP AL,0x1
JNZ 0x000a0c6d
SUB ESP,0xc
PUSH EBP
CALL 0x0004e320
ADD ESP,0x10
JMP 0x000a0c6d
MOV EDX,0x1
MOV EAX,EBX
CALL 0x0009f0a0
TEST EAX,EAX
JNZ 0x000a0c2b
MOV EAX,dword ptr [EBX + 0x10]
MOV EDX,dword ptr [EBX + 0x14]
JMP 0x000a0c15
LEA EAX,[EBP + 0x4]
CALL 0x0004c400
MOV EBX,EAX
TEST EBX,EBX
JNZ 0x000a0c01
SUB ESP,0x8
MOV ECX,0x2
PUSH 0x0
PUSH 0x1
MOV EAX,dword ptr [ESP + 0x1c]
LEA EDX,[EAX + 0xfffa21c8]
MOV EAX,dword ptr [EBP]
CALL 0x000715f0
ADD ESP,0x10
CMP EAX,0x12
JNZ 0x000a0c6d
SUB ESP,0xc
MOV dword ptr [EBP + 0x14],0x12
MOV ECX,0x1
PUSH 0x0
MOV EAX,dword ptr [ESP + 0x1c]
LEA EDX,[EAX + 0xfffa1a74]
MOV EAX,dword ptr [EBP]
CALL 0x0006f5d0
ADD ESP,0x10
JMP 0x000a0c6d
SUB ESP,0xc
MOV dword ptr [EBP + 0x14],0x12
MOV ECX,0x1
PUSH 0x0
MOV EAX,dword ptr [ESP + 0x1c]
LEA EDX,[EAX + 0xfffa1a74]
MOV EAX,dword ptr [EBP]
CALL 0x0006f5d0
ADD ESP,0x10
JMP 0x000a0c69
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nvoid FUN_000a0bd0(int *param_1)\n\n{\n  ushort *puVar1;\n  uint uVar2;\n  code *pcVar3;\n  int iVar4;\n  int iVar5;\n  uint uVar6;\n  \n  if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {\n    iVar5 = FUN_0004c400();\n  }\n  else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }\n  if (iVar5 == 0) {\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }\n  uVar6 = *(uint *)(iVar5 + 0x14);\n  uVar2 = *(uint *)(iVar5 + 0x10);\n  if (uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }\n  else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }\n  if (*(char *)(iVar5 + 0x19) == '\0') {\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }\n  else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }\nLAB_000a0c6d:\n  iVar5 = *param_1;\n  *(undefined1 *)(iVar5 + 0xb) = 0x4a;\n  puVar1 = (ushort *)(iVar5 + 8);\n  *puVar1 = *puVar1 | 0x8000;\n  return;\n}\n\n" comment (function_definition "void FUN_000a0bd0(int *param_1)\n\n{\n  ushort *puVar1;\n  uint uVar2;\n  code *pcVar3;\n  int iVar4;\n  int iVar5;\n  uint uVar6;\n  \n  if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {\n    iVar5 = FUN_0004c400();\n  }\n  else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }\n  if (iVar5 == 0) {\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }\n  uVar6 = *(uint *)(iVar5 + 0x14);\n  uVar2 = *(uint *)(iVar5 + 0x10);\n  if (uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }\n  else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }\n  if (*(char *)(iVar5 + 0x19) == '\0') {\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }\n  else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }\nLAB_000a0c6d:\n  iVar5 = *param_1;\n  *(undefined1 *)(iVar5 + 0xb) = 0x4a;\n  puVar1 = (ushort *)(iVar5 + 8);\n  *puVar1 = *puVar1 | 0x8000;\n  return;\n}" primitive_type (function_declarator "FUN_000a0bd0(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  ushort *puVar1;\n  uint uVar2;\n  code *pcVar3;\n  int iVar4;\n  int iVar5;\n  uint uVar6;\n  \n  if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {\n    iVar5 = FUN_0004c400();\n  }\n  else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }\n  if (iVar5 == 0) {\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }\n  uVar6 = *(uint *)(iVar5 + 0x14);\n  uVar2 = *(uint *)(iVar5 + 0x10);\n  if (uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }\n  else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }\n  if (*(char *)(iVar5 + 0x19) == '\0') {\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }\n  else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }\nLAB_000a0c6d:\n  iVar5 = *param_1;\n  *(undefined1 *)(iVar5 + 0xb) = 0x4a;\n  puVar1 = (ushort *)(iVar5 + 8);\n  *puVar1 = *puVar1 | 0x8000;\n  return;\n}" { (declaration "ushort *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "code *pcVar3;" type_identifier (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (if_statement "if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {\n    iVar5 = FUN_0004c400();\n  }\n  else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }" if (parenthesized_expression "((*(byte *)(param_1[2] + 9) & 0x20) == 0)" ( (binary_expression "(*(byte *)(param_1[2] + 9) & 0x20) == 0" (parenthesized_expression "(*(byte *)(param_1[2] + 9) & 0x20)" ( (binary_expression "*(byte *)(param_1[2] + 9) & 0x20" (pointer_expression "*(byte *)(param_1[2] + 9)" * (cast_expression "(byte *)(param_1[2] + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[2] + 9)" ( (binary_expression "param_1[2] + 9" (subscript_expression "param_1[2]" identifier [ number_literal ]) + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar5 = FUN_0004c400();\n  }" { (expression_statement "iVar5 = FUN_0004c400();" (assignment_expression "iVar5 = FUN_0004c400()" identifier = (call_expression "FUN_0004c400()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }" else (compound_statement "{\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }" { (expression_statement "iVar5 = *(int *)(param_1[2] + 0x10);" (assignment_expression "iVar5 = *(int *)(param_1[2] + 0x10)" identifier = (pointer_expression "*(int *)(param_1[2] + 0x10)" * (cast_expression "(int *)(param_1[2] + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[2] + 0x10)" ( (binary_expression "param_1[2] + 0x10" (subscript_expression "param_1[2]" identifier [ number_literal ]) + number_literal) ))))) ;) }))) (if_statement "if (iVar5 == 0) {\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }" { (expression_statement "iVar5 = FUN_000715f0(1,0);" (assignment_expression "iVar5 = FUN_000715f0(1,0)" identifier = (call_expression "FUN_000715f0(1,0)" identifier (argument_list "(1,0)" ( number_literal , number_literal )))) ;) (if_statement "if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" if (parenthesized_expression "(iVar5 == 0x12)" ( (binary_expression "iVar5 == 0x12" identifier == number_literal) )) (compound_statement "{\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" { (expression_statement "param_1[5] = 0x12;" (assignment_expression "param_1[5] = 0x12" (subscript_expression "param_1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "FUN_0006f5d0(0);" (call_expression "FUN_0006f5d0(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (goto_statement "goto LAB_000a0c6d;" goto statement_identifier ;) })) (expression_statement "uVar6 = *(uint *)(iVar5 + 0x14);" (assignment_expression "uVar6 = *(uint *)(iVar5 + 0x14)" identifier = (pointer_expression "*(uint *)(iVar5 + 0x14)" * (cast_expression "(uint *)(iVar5 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x14)" ( (binary_expression "iVar5 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(iVar5 + 0x10);" (assignment_expression "uVar2 = *(uint *)(iVar5 + 0x10)" identifier = (pointer_expression "*(uint *)(iVar5 + 0x10)" * (cast_expression "(uint *)(iVar5 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x10)" ( (binary_expression "iVar5 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }\n  else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }" if (parenthesized_expression "(uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8)))" ( (binary_expression "uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))" (binary_expression "uVar6 < *(uint *)(iVar5 + 0xc)" identifier < (pointer_expression "*(uint *)(iVar5 + 0xc)" * (cast_expression "(uint *)(iVar5 + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0xc)" ( (binary_expression "iVar5 + 0xc" identifier + number_literal) ))))) || (binary_expression "uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))" (binary_expression "uVar6 - *(uint *)(iVar5 + 0xc)" identifier - (pointer_expression "*(uint *)(iVar5 + 0xc)" * (cast_expression "(uint *)(iVar5 + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0xc)" ( (binary_expression "iVar5 + 0xc" identifier + number_literal) ))))) < (call_expression "(uint)(uVar2 < *(uint *)(iVar5 + 8))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar2 < *(uint *)(iVar5 + 8))" ( (binary_expression "uVar2 < *(uint *)(iVar5 + 8)" identifier < (pointer_expression "*(uint *)(iVar5 + 8)" * (cast_expression "(uint *)(iVar5 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) ))))) ))))) )) (compound_statement "{\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }" { (labeled_statement "LAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;" statement_identifier : (expression_statement "*(uint *)(iVar5 + 0x10) = uVar2 + 1;" (assignment_expression "*(uint *)(iVar5 + 0x10) = uVar2 + 1" (pointer_expression "*(uint *)(iVar5 + 0x10)" * (cast_expression "(uint *)(iVar5 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x10)" ( (binary_expression "iVar5 + 0x10" identifier + number_literal) )))) = (binary_expression "uVar2 + 1" identifier + number_literal)) ;)) (expression_statement "*(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);" (assignment_expression "*(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2)" (pointer_expression "*(uint *)(iVar5 + 0x14)" * (cast_expression "(uint *)(iVar5 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x14)" ( (binary_expression "iVar5 + 0x14" identifier + number_literal) )))) = (binary_expression "uVar6 + (0xfffffffe < uVar2)" identifier + (parenthesized_expression "(0xfffffffe < uVar2)" ( (binary_expression "0xfffffffe < uVar2" number_literal < identifier) )))) ;) (expression_statement "*(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;" (assignment_expression "*(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d" (pointer_expression "*(undefined1 *)(uVar2 + *(int *)(iVar5 + 4))" * (cast_expression "(undefined1 *)(uVar2 + *(int *)(iVar5 + 4))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 + *(int *)(iVar5 + 4))" ( (binary_expression "uVar2 + *(int *)(iVar5 + 4)" identifier + (pointer_expression "*(int *)(iVar5 + 4)" * (cast_expression "(int *)(iVar5 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 4)" ( (binary_expression "iVar5 + 4" identifier + number_literal) ))))) )))) = number_literal) ;) }) (else_clause "else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }" else (compound_statement "{\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }" { (expression_statement "iVar4 = FUN_0009f0a0();" (assignment_expression "iVar4 = FUN_0009f0a0()" identifier = (call_expression "FUN_0009f0a0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }" { (expression_statement "uVar2 = *(uint *)(iVar5 + 0x10);" (assignment_expression "uVar2 = *(uint *)(iVar5 + 0x10)" identifier = (pointer_expression "*(uint *)(iVar5 + 0x10)" * (cast_expression "(uint *)(iVar5 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x10)" ( (binary_expression "iVar5 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar6 = *(uint *)(iVar5 + 0x14);" (assignment_expression "uVar6 = *(uint *)(iVar5 + 0x14)" identifier = (pointer_expression "*(uint *)(iVar5 + 0x14)" * (cast_expression "(uint *)(iVar5 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x14)" ( (binary_expression "iVar5 + 0x14" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000a0c15;" goto statement_identifier ;) })) }))) (if_statement "if (*(char *)(iVar5 + 0x19) == '\0') {\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }\n  else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }" if (parenthesized_expression "(*(char *)(iVar5 + 0x19) == '\0')" ( (binary_expression "*(char *)(iVar5 + 0x19) == '\0'" (pointer_expression "*(char *)(iVar5 + 0x19)" * (cast_expression "(char *)(iVar5 + 0x19)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x19)" ( (binary_expression "iVar5 + 0x19" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }" { (expression_statement "pcVar3 = FUN_00044000;" (assignment_expression "pcVar3 = FUN_00044000" identifier = identifier) ;) (if_statement "if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }" if (parenthesized_expression "(*(char *)(iVar5 + 0x18) != '\0')" ( (binary_expression "*(char *)(iVar5 + 0x18) != '\0'" (pointer_expression "*(char *)(iVar5 + 0x18)" * (cast_expression "(char *)(iVar5 + 0x18)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x18)" ( (binary_expression "iVar5 + 0x18" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      pcVar3 = (code *)0xffffffff;\n    }" { (expression_statement "pcVar3 = (code *)0xffffffff;" (assignment_expression "pcVar3 = (code *)0xffffffff" identifier = (cast_expression "(code *)0xffffffff" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (expression_statement "iVar4 = FUN_000715f0(1,pcVar3);" (assignment_expression "iVar4 = FUN_000715f0(1,pcVar3)" identifier = (call_expression "FUN_000715f0(1,pcVar3)" identifier (argument_list "(1,pcVar3)" ( number_literal , identifier )))) ;) (if_statement "if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" if (parenthesized_expression "(iVar4 == 0x12)" ( (binary_expression "iVar4 == 0x12" identifier == number_literal) )) (compound_statement "{\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" { (expression_statement "param_1[5] = 0x12;" (assignment_expression "param_1[5] = 0x12" (subscript_expression "param_1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "FUN_0006f5d0(0);" (call_expression "FUN_0006f5d0(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (expression_statement "*(undefined1 *)(iVar5 + 0x18) = 1;" (assignment_expression "*(undefined1 *)(iVar5 + 0x18) = 1" (pointer_expression "*(undefined1 *)(iVar5 + 0x18)" * (cast_expression "(undefined1 *)(iVar5 + 0x18)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x18)" ( (binary_expression "iVar5 + 0x18" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }" else (if_statement "if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }" if (parenthesized_expression "(*(char *)(iVar5 + 0x19) == '\x01')" ( (binary_expression "*(char *)(iVar5 + 0x19) == '\x01'" (pointer_expression "*(char *)(iVar5 + 0x19)" * (cast_expression "(char *)(iVar5 + 0x19)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x19)" ( (binary_expression "iVar5 + 0x19" identifier + number_literal) )))) == (char_literal "'\x01'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0004e320(param_1);\n  }" { (expression_statement "FUN_0004e320(param_1);" (call_expression "FUN_0004e320(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })))) (labeled_statement "LAB_000a0c6d:\n  iVar5 = *param_1;" statement_identifier : (expression_statement "iVar5 = *param_1;" (assignment_expression "iVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;)) (expression_statement "*(undefined1 *)(iVar5 + 0xb) = 0x4a;" (assignment_expression "*(undefined1 *)(iVar5 + 0xb) = 0x4a" (pointer_expression "*(undefined1 *)(iVar5 + 0xb)" * (cast_expression "(undefined1 *)(iVar5 + 0xb)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0xb)" ( (binary_expression "iVar5 + 0xb" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar1 = (ushort *)(iVar5 + 8);" (assignment_expression "puVar1 = (ushort *)(iVar5 + 8)" identifier = (cast_expression "(ushort *)(iVar5 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) )))) ;) (expression_statement "*puVar1 = *puVar1 | 0x8000;" (assignment_expression "*puVar1 = *puVar1 | 0x8000" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 0x8000" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n/* WARNING: Unknown calling convention */\n\nvoid jsonObjectFinal(sqlite3_context *ctx)\n\n{\n  uint *puVar1;\n  u16 *puVar2;\n  Mem *pMVar3;\n  uint uVar4;\n  code *xDel;\n  int iVar5;\n  JsonString *p;\n  sqlite3_context *in_ECX;\n  uint uVar6;\n  _func_void_void_ptr *xDel_00;\n  int in_stack_ffffffcc;\n  u8 in_stack_ffffffd0;\n  _func_void_void_ptr *in_stack_ffffffd4;\n  \n  pMVar3 = ctx->pMem;\n  if ((pMVar3->flags & 0x2000) == 0) {\n    in_stack_ffffffd0 = 200;\n    p = (JsonString *)createAggContext((sqlite3_context *)&ctx->pFunc,(int)pMVar3,in_ECX);\n  }\n  else {\n    p = (JsonString *)pMVar3->z;\n  }\n  if (p == (JsonString *)0x0) {\n    xDel_00 = (_func_void_void_ptr *)0x0;\n    iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)0x0,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n    if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel_00);\n    }\n    goto LAB_000a0c6d;\n  }\n  uVar6 = *(uint *)((int)&p->nUsed + 4);\n  uVar4 = (uint)p->nUsed;\n  puVar1 = (uint *)((int)&p->nAlloc + 4);\n  if (uVar6 < *puVar1 || uVar6 - *puVar1 < (uint)(uVar4 < (uint)p->nAlloc)) {\nLAB_000a0c15:\n    *(uint *)&p->nUsed = uVar4 + 1;\n    *(uint *)((int)&p->nUsed + 4) = uVar6 + (0xfffffffe < uVar4);\n    p->zBuf[uVar4] = '}';\n  }\n  else {\n    in_stack_ffffffd0 = 0xac;\n    iVar5 = jsonGrow(p,1);\n    if (iVar5 == 0) {\n      uVar4 = (uint)p->nUsed;\n      uVar6 = *(uint *)((int)&p->nUsed + 4);\n      goto LAB_000a0c15;\n    }\n  }\n  if (p->bErr == '\0') {\n    xDel = sqlite3_free;\n    if (p->bStatic != '\0') {\n      xDel = (code *)&DAT_ffffffff;\n    }\n    iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)xDel,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n    if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel);\n    }\n    p->bStatic = '\x01';\n  }\n  else if (p->bErr == '\x01') {\n    sqlite3_result_error_nomem(ctx);\n  }\nLAB_000a0c6d:\n  pMVar3 = ctx->pOut;\n  pMVar3->eSubtype = 'J';\n  puVar2 = &pMVar3->flags;\n  *puVar2 = *puVar2 | 0x8000;\n  return;\n}\n\n" comment comment (function_definition "void jsonObjectFinal(sqlite3_context *ctx)\n\n{\n  uint *puVar1;\n  u16 *puVar2;\n  Mem *pMVar3;\n  uint uVar4;\n  code *xDel;\n  int iVar5;\n  JsonString *p;\n  sqlite3_context *in_ECX;\n  uint uVar6;\n  _func_void_void_ptr *xDel_00;\n  int in_stack_ffffffcc;\n  u8 in_stack_ffffffd0;\n  _func_void_void_ptr *in_stack_ffffffd4;\n  \n  pMVar3 = ctx->pMem;\n  if ((pMVar3->flags & 0x2000) == 0) {\n    in_stack_ffffffd0 = 200;\n    p = (JsonString *)createAggContext((sqlite3_context *)&ctx->pFunc,(int)pMVar3,in_ECX);\n  }\n  else {\n    p = (JsonString *)pMVar3->z;\n  }\n  if (p == (JsonString *)0x0) {\n    xDel_00 = (_func_void_void_ptr *)0x0;\n    iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)0x0,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n    if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel_00);\n    }\n    goto LAB_000a0c6d;\n  }\n  uVar6 = *(uint *)((int)&p->nUsed + 4);\n  uVar4 = (uint)p->nUsed;\n  puVar1 = (uint *)((int)&p->nAlloc + 4);\n  if (uVar6 < *puVar1 || uVar6 - *puVar1 < (uint)(uVar4 < (uint)p->nAlloc)) {\nLAB_000a0c15:\n    *(uint *)&p->nUsed = uVar4 + 1;\n    *(uint *)((int)&p->nUsed + 4) = uVar6 + (0xfffffffe < uVar4);\n    p->zBuf[uVar4] = '}';\n  }\n  else {\n    in_stack_ffffffd0 = 0xac;\n    iVar5 = jsonGrow(p,1);\n    if (iVar5 == 0) {\n      uVar4 = (uint)p->nUsed;\n      uVar6 = *(uint *)((int)&p->nUsed + 4);\n      goto LAB_000a0c15;\n    }\n  }\n  if (p->bErr == '\0') {\n    xDel = sqlite3_free;\n    if (p->bStatic != '\0') {\n      xDel = (code *)&DAT_ffffffff;\n    }\n    iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)xDel,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n    if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel);\n    }\n    p->bStatic = '\x01';\n  }\n  else if (p->bErr == '\x01') {\n    sqlite3_result_error_nomem(ctx);\n  }\nLAB_000a0c6d:\n  pMVar3 = ctx->pOut;\n  pMVar3->eSubtype = 'J';\n  puVar2 = &pMVar3->flags;\n  *puVar2 = *puVar2 | 0x8000;\n  return;\n}" primitive_type (function_declarator "jsonObjectFinal(sqlite3_context *ctx)" identifier (parameter_list "(sqlite3_context *ctx)" ( (parameter_declaration "sqlite3_context *ctx" type_identifier (pointer_declarator "*ctx" * identifier)) ))) (compound_statement "{\n  uint *puVar1;\n  u16 *puVar2;\n  Mem *pMVar3;\n  uint uVar4;\n  code *xDel;\n  int iVar5;\n  JsonString *p;\n  sqlite3_context *in_ECX;\n  uint uVar6;\n  _func_void_void_ptr *xDel_00;\n  int in_stack_ffffffcc;\n  u8 in_stack_ffffffd0;\n  _func_void_void_ptr *in_stack_ffffffd4;\n  \n  pMVar3 = ctx->pMem;\n  if ((pMVar3->flags & 0x2000) == 0) {\n    in_stack_ffffffd0 = 200;\n    p = (JsonString *)createAggContext((sqlite3_context *)&ctx->pFunc,(int)pMVar3,in_ECX);\n  }\n  else {\n    p = (JsonString *)pMVar3->z;\n  }\n  if (p == (JsonString *)0x0) {\n    xDel_00 = (_func_void_void_ptr *)0x0;\n    iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)0x0,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n    if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel_00);\n    }\n    goto LAB_000a0c6d;\n  }\n  uVar6 = *(uint *)((int)&p->nUsed + 4);\n  uVar4 = (uint)p->nUsed;\n  puVar1 = (uint *)((int)&p->nAlloc + 4);\n  if (uVar6 < *puVar1 || uVar6 - *puVar1 < (uint)(uVar4 < (uint)p->nAlloc)) {\nLAB_000a0c15:\n    *(uint *)&p->nUsed = uVar4 + 1;\n    *(uint *)((int)&p->nUsed + 4) = uVar6 + (0xfffffffe < uVar4);\n    p->zBuf[uVar4] = '}';\n  }\n  else {\n    in_stack_ffffffd0 = 0xac;\n    iVar5 = jsonGrow(p,1);\n    if (iVar5 == 0) {\n      uVar4 = (uint)p->nUsed;\n      uVar6 = *(uint *)((int)&p->nUsed + 4);\n      goto LAB_000a0c15;\n    }\n  }\n  if (p->bErr == '\0') {\n    xDel = sqlite3_free;\n    if (p->bStatic != '\0') {\n      xDel = (code *)&DAT_ffffffff;\n    }\n    iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)xDel,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n    if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel);\n    }\n    p->bStatic = '\x01';\n  }\n  else if (p->bErr == '\x01') {\n    sqlite3_result_error_nomem(ctx);\n  }\nLAB_000a0c6d:\n  pMVar3 = ctx->pOut;\n  pMVar3->eSubtype = 'J';\n  puVar2 = &pMVar3->flags;\n  *puVar2 = *puVar2 | 0x8000;\n  return;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "u16 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "Mem *pMVar3;" type_identifier (pointer_declarator "*pMVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "code *xDel;" type_identifier (pointer_declarator "*xDel" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "JsonString *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "sqlite3_context *in_ECX;" type_identifier (pointer_declarator "*in_ECX" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "_func_void_void_ptr *xDel_00;" type_identifier (pointer_declarator "*xDel_00" * identifier) ;) (declaration "int in_stack_ffffffcc;" primitive_type identifier ;) (declaration "u8 in_stack_ffffffd0;" type_identifier identifier ;) (declaration "_func_void_void_ptr *in_stack_ffffffd4;" type_identifier (pointer_declarator "*in_stack_ffffffd4" * identifier) ;) (expression_statement "pMVar3 = ctx->pMem;" (assignment_expression "pMVar3 = ctx->pMem" identifier = (field_expression "ctx->pMem" identifier -> field_identifier)) ;) (if_statement "if ((pMVar3->flags & 0x2000) == 0) {\n    in_stack_ffffffd0 = 200;\n    p = (JsonString *)createAggContext((sqlite3_context *)&ctx->pFunc,(int)pMVar3,in_ECX);\n  }\n  else {\n    p = (JsonString *)pMVar3->z;\n  }" if (parenthesized_expression "((pMVar3->flags & 0x2000) == 0)" ( (binary_expression "(pMVar3->flags & 0x2000) == 0" (parenthesized_expression "(pMVar3->flags & 0x2000)" ( (binary_expression "pMVar3->flags & 0x2000" (field_expression "pMVar3->flags" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    in_stack_ffffffd0 = 200;\n    p = (JsonString *)createAggContext((sqlite3_context *)&ctx->pFunc,(int)pMVar3,in_ECX);\n  }" { (expression_statement "in_stack_ffffffd0 = 200;" (assignment_expression "in_stack_ffffffd0 = 200" identifier = number_literal) ;) (expression_statement "p = (JsonString *)createAggContext((sqlite3_context *)&ctx->pFunc,(int)pMVar3,in_ECX);" (assignment_expression "p = (JsonString *)createAggContext((sqlite3_context *)&ctx->pFunc,(int)pMVar3,in_ECX)" identifier = (cast_expression "(JsonString *)createAggContext((sqlite3_context *)&ctx->pFunc,(int)pMVar3,in_ECX)" ( (type_descriptor "JsonString *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "createAggContext((sqlite3_context *)&ctx->pFunc,(int)pMVar3,in_ECX)" identifier (argument_list "((sqlite3_context *)&ctx->pFunc,(int)pMVar3,in_ECX)" ( (cast_expression "(sqlite3_context *)&ctx->pFunc" ( (type_descriptor "sqlite3_context *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&ctx->pFunc" & (field_expression "ctx->pFunc" identifier -> field_identifier))) , (cast_expression "(int)pMVar3" ( (type_descriptor "int" primitive_type) ) identifier) , identifier ))))) ;) }) (else_clause "else {\n    p = (JsonString *)pMVar3->z;\n  }" else (compound_statement "{\n    p = (JsonString *)pMVar3->z;\n  }" { (expression_statement "p = (JsonString *)pMVar3->z;" (assignment_expression "p = (JsonString *)pMVar3->z" identifier = (cast_expression "(JsonString *)pMVar3->z" ( (type_descriptor "JsonString *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pMVar3->z" identifier -> field_identifier))) ;) }))) (if_statement "if (p == (JsonString *)0x0) {\n    xDel_00 = (_func_void_void_ptr *)0x0;\n    iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)0x0,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n    if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel_00);\n    }\n    goto LAB_000a0c6d;\n  }" if (parenthesized_expression "(p == (JsonString *)0x0)" ( (binary_expression "p == (JsonString *)0x0" identifier == (cast_expression "(JsonString *)0x0" ( (type_descriptor "JsonString *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    xDel_00 = (_func_void_void_ptr *)0x0;\n    iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)0x0,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n    if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel_00);\n    }\n    goto LAB_000a0c6d;\n  }" { (expression_statement "xDel_00 = (_func_void_void_ptr *)0x0;" (assignment_expression "xDel_00 = (_func_void_void_ptr *)0x0" identifier = (cast_expression "(_func_void_void_ptr *)0x0" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)0x0,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);" (assignment_expression "iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)0x0,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4)" identifier = (call_expression "sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)0x0,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4)" identifier (argument_list "((Mem *)&DAT_00000001,(char *)0x0,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4)" ( (cast_expression "(Mem *)&DAT_00000001" ( (type_descriptor "Mem *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00000001" & identifier)) , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , identifier , identifier )))) ;) (if_statement "if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel_00);\n    }" if (parenthesized_expression "(iVar5 == 0x12)" ( (binary_expression "iVar5 == 0x12" identifier == number_literal) )) (compound_statement "{\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel_00);\n    }" { (expression_statement "ctx->isError = 0x12;" (assignment_expression "ctx->isError = 0x12" (field_expression "ctx->isError" identifier -> field_identifier) = number_literal) ;) (expression_statement "sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel_00);" (call_expression "sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel_00)" identifier (argument_list "(ctx->pOut,"string or blob too big",1,'\0',xDel_00)" ( (field_expression "ctx->pOut" identifier -> field_identifier) , (string_literal ""string or blob too big"" " string_content ") , number_literal , (char_literal "'\0'" ' escape_sequence ') , identifier ))) ;) })) (goto_statement "goto LAB_000a0c6d;" goto statement_identifier ;) })) (expression_statement "uVar6 = *(uint *)((int)&p->nUsed + 4);" (assignment_expression "uVar6 = *(uint *)((int)&p->nUsed + 4)" identifier = (pointer_expression "*(uint *)((int)&p->nUsed + 4)" * (cast_expression "(uint *)((int)&p->nUsed + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&p->nUsed + 4)" ( (binary_expression "(int)&p->nUsed + 4" (cast_expression "(int)&p->nUsed" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&p->nUsed" & (field_expression "p->nUsed" identifier -> field_identifier))) + number_literal) ))))) ;) (expression_statement "uVar4 = (uint)p->nUsed;" (assignment_expression "uVar4 = (uint)p->nUsed" identifier = (cast_expression "(uint)p->nUsed" ( (type_descriptor "uint" type_identifier) ) (field_expression "p->nUsed" identifier -> field_identifier))) ;) (expression_statement "puVar1 = (uint *)((int)&p->nAlloc + 4);" (assignment_expression "puVar1 = (uint *)((int)&p->nAlloc + 4)" identifier = (cast_expression "(uint *)((int)&p->nAlloc + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&p->nAlloc + 4)" ( (binary_expression "(int)&p->nAlloc + 4" (cast_expression "(int)&p->nAlloc" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&p->nAlloc" & (field_expression "p->nAlloc" identifier -> field_identifier))) + number_literal) )))) ;) (if_statement "if (uVar6 < *puVar1 || uVar6 - *puVar1 < (uint)(uVar4 < (uint)p->nAlloc)) {\nLAB_000a0c15:\n    *(uint *)&p->nUsed = uVar4 + 1;\n    *(uint *)((int)&p->nUsed + 4) = uVar6 + (0xfffffffe < uVar4);\n    p->zBuf[uVar4] = '}';\n  }\n  else {\n    in_stack_ffffffd0 = 0xac;\n    iVar5 = jsonGrow(p,1);\n    if (iVar5 == 0) {\n      uVar4 = (uint)p->nUsed;\n      uVar6 = *(uint *)((int)&p->nUsed + 4);\n      goto LAB_000a0c15;\n    }\n  }" if (parenthesized_expression "(uVar6 < *puVar1 || uVar6 - *puVar1 < (uint)(uVar4 < (uint)p->nAlloc))" ( (binary_expression "uVar6 < *puVar1 || uVar6 - *puVar1 < (uint)(uVar4 < (uint)p->nAlloc)" (binary_expression "uVar6 < *puVar1" identifier < (pointer_expression "*puVar1" * identifier)) || (binary_expression "uVar6 - *puVar1 < (uint)(uVar4 < (uint)p->nAlloc)" (binary_expression "uVar6 - *puVar1" identifier - (pointer_expression "*puVar1" * identifier)) < (call_expression "(uint)(uVar4 < (uint)p->nAlloc)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar4 < (uint)p->nAlloc)" ( (binary_expression "uVar4 < (uint)p->nAlloc" identifier < (cast_expression "(uint)p->nAlloc" ( (type_descriptor "uint" type_identifier) ) (field_expression "p->nAlloc" identifier -> field_identifier))) ))))) )) (compound_statement "{\nLAB_000a0c15:\n    *(uint *)&p->nUsed = uVar4 + 1;\n    *(uint *)((int)&p->nUsed + 4) = uVar6 + (0xfffffffe < uVar4);\n    p->zBuf[uVar4] = '}';\n  }" { (labeled_statement "LAB_000a0c15:\n    *(uint *)&p->nUsed = uVar4 + 1;" statement_identifier : (expression_statement "*(uint *)&p->nUsed = uVar4 + 1;" (assignment_expression "*(uint *)&p->nUsed = uVar4 + 1" (pointer_expression "*(uint *)&p->nUsed" * (cast_expression "(uint *)&p->nUsed" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&p->nUsed" & (field_expression "p->nUsed" identifier -> field_identifier)))) = (binary_expression "uVar4 + 1" identifier + number_literal)) ;)) (expression_statement "*(uint *)((int)&p->nUsed + 4) = uVar6 + (0xfffffffe < uVar4);" (assignment_expression "*(uint *)((int)&p->nUsed + 4) = uVar6 + (0xfffffffe < uVar4)" (pointer_expression "*(uint *)((int)&p->nUsed + 4)" * (cast_expression "(uint *)((int)&p->nUsed + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&p->nUsed + 4)" ( (binary_expression "(int)&p->nUsed + 4" (cast_expression "(int)&p->nUsed" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&p->nUsed" & (field_expression "p->nUsed" identifier -> field_identifier))) + number_literal) )))) = (binary_expression "uVar6 + (0xfffffffe < uVar4)" identifier + (parenthesized_expression "(0xfffffffe < uVar4)" ( (binary_expression "0xfffffffe < uVar4" number_literal < identifier) )))) ;) (expression_statement "p->zBuf[uVar4] = '}';" (assignment_expression "p->zBuf[uVar4] = '}'" (subscript_expression "p->zBuf[uVar4]" (field_expression "p->zBuf" identifier -> field_identifier) [ identifier ]) = (char_literal "'}'" ' character ')) ;) }) (else_clause "else {\n    in_stack_ffffffd0 = 0xac;\n    iVar5 = jsonGrow(p,1);\n    if (iVar5 == 0) {\n      uVar4 = (uint)p->nUsed;\n      uVar6 = *(uint *)((int)&p->nUsed + 4);\n      goto LAB_000a0c15;\n    }\n  }" else (compound_statement "{\n    in_stack_ffffffd0 = 0xac;\n    iVar5 = jsonGrow(p,1);\n    if (iVar5 == 0) {\n      uVar4 = (uint)p->nUsed;\n      uVar6 = *(uint *)((int)&p->nUsed + 4);\n      goto LAB_000a0c15;\n    }\n  }" { (expression_statement "in_stack_ffffffd0 = 0xac;" (assignment_expression "in_stack_ffffffd0 = 0xac" identifier = number_literal) ;) (expression_statement "iVar5 = jsonGrow(p,1);" (assignment_expression "iVar5 = jsonGrow(p,1)" identifier = (call_expression "jsonGrow(p,1)" identifier (argument_list "(p,1)" ( identifier , number_literal )))) ;) (if_statement "if (iVar5 == 0) {\n      uVar4 = (uint)p->nUsed;\n      uVar6 = *(uint *)((int)&p->nUsed + 4);\n      goto LAB_000a0c15;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar4 = (uint)p->nUsed;\n      uVar6 = *(uint *)((int)&p->nUsed + 4);\n      goto LAB_000a0c15;\n    }" { (expression_statement "uVar4 = (uint)p->nUsed;" (assignment_expression "uVar4 = (uint)p->nUsed" identifier = (cast_expression "(uint)p->nUsed" ( (type_descriptor "uint" type_identifier) ) (field_expression "p->nUsed" identifier -> field_identifier))) ;) (expression_statement "uVar6 = *(uint *)((int)&p->nUsed + 4);" (assignment_expression "uVar6 = *(uint *)((int)&p->nUsed + 4)" identifier = (pointer_expression "*(uint *)((int)&p->nUsed + 4)" * (cast_expression "(uint *)((int)&p->nUsed + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&p->nUsed + 4)" ( (binary_expression "(int)&p->nUsed + 4" (cast_expression "(int)&p->nUsed" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&p->nUsed" & (field_expression "p->nUsed" identifier -> field_identifier))) + number_literal) ))))) ;) (goto_statement "goto LAB_000a0c15;" goto statement_identifier ;) })) }))) (if_statement "if (p->bErr == '\0') {\n    xDel = sqlite3_free;\n    if (p->bStatic != '\0') {\n      xDel = (code *)&DAT_ffffffff;\n    }\n    iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)xDel,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n    if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel);\n    }\n    p->bStatic = '\x01';\n  }\n  else if (p->bErr == '\x01') {\n    sqlite3_result_error_nomem(ctx);\n  }" if (parenthesized_expression "(p->bErr == '\0')" ( (binary_expression "p->bErr == '\0'" (field_expression "p->bErr" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    xDel = sqlite3_free;\n    if (p->bStatic != '\0') {\n      xDel = (code *)&DAT_ffffffff;\n    }\n    iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)xDel,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n    if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel);\n    }\n    p->bStatic = '\x01';\n  }" { (expression_statement "xDel = sqlite3_free;" (assignment_expression "xDel = sqlite3_free" identifier = identifier) ;) (if_statement "if (p->bStatic != '\0') {\n      xDel = (code *)&DAT_ffffffff;\n    }" if (parenthesized_expression "(p->bStatic != '\0')" ( (binary_expression "p->bStatic != '\0'" (field_expression "p->bStatic" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      xDel = (code *)&DAT_ffffffff;\n    }" { (expression_statement "xDel = (code *)&DAT_ffffffff;" (assignment_expression "xDel = (code *)&DAT_ffffffff" identifier = (cast_expression "(code *)&DAT_ffffffff" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_ffffffff" & identifier))) ;) })) (expression_statement "iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)xDel,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4);" (assignment_expression "iVar5 = sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)xDel,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4)" identifier = (call_expression "sqlite3VdbeMemSetStr\n                      ((Mem *)&DAT_00000001,(char *)xDel,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4)" identifier (argument_list "((Mem *)&DAT_00000001,(char *)xDel,in_stack_ffffffcc,in_stack_ffffffd0,\n                       in_stack_ffffffd4)" ( (cast_expression "(Mem *)&DAT_00000001" ( (type_descriptor "Mem *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00000001" & identifier)) , (cast_expression "(char *)xDel" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier , identifier )))) ;) (if_statement "if (iVar5 == 0x12) {\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel);\n    }" if (parenthesized_expression "(iVar5 == 0x12)" ( (binary_expression "iVar5 == 0x12" identifier == number_literal) )) (compound_statement "{\n      ctx->isError = 0x12;\n      sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel);\n    }" { (expression_statement "ctx->isError = 0x12;" (assignment_expression "ctx->isError = 0x12" (field_expression "ctx->isError" identifier -> field_identifier) = number_literal) ;) (expression_statement "sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel);" (call_expression "sqlite3VdbeMemSetStr(ctx->pOut,"string or blob too big",1,'\0',xDel)" identifier (argument_list "(ctx->pOut,"string or blob too big",1,'\0',xDel)" ( (field_expression "ctx->pOut" identifier -> field_identifier) , (string_literal ""string or blob too big"" " string_content ") , number_literal , (char_literal "'\0'" ' escape_sequence ') , identifier ))) ;) })) (expression_statement "p->bStatic = '\x01';" (assignment_expression "p->bStatic = '\x01'" (field_expression "p->bStatic" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) }) (else_clause "else if (p->bErr == '\x01') {\n    sqlite3_result_error_nomem(ctx);\n  }" else (if_statement "if (p->bErr == '\x01') {\n    sqlite3_result_error_nomem(ctx);\n  }" if (parenthesized_expression "(p->bErr == '\x01')" ( (binary_expression "p->bErr == '\x01'" (field_expression "p->bErr" identifier -> field_identifier) == (char_literal "'\x01'" ' escape_sequence ')) )) (compound_statement "{\n    sqlite3_result_error_nomem(ctx);\n  }" { (expression_statement "sqlite3_result_error_nomem(ctx);" (call_expression "sqlite3_result_error_nomem(ctx)" identifier (argument_list "(ctx)" ( identifier ))) ;) })))) (labeled_statement "LAB_000a0c6d:\n  pMVar3 = ctx->pOut;" statement_identifier : (expression_statement "pMVar3 = ctx->pOut;" (assignment_expression "pMVar3 = ctx->pOut" identifier = (field_expression "ctx->pOut" identifier -> field_identifier)) ;)) (expression_statement "pMVar3->eSubtype = 'J';" (assignment_expression "pMVar3->eSubtype = 'J'" (field_expression "pMVar3->eSubtype" identifier -> field_identifier) = (char_literal "'J'" ' character ')) ;) (expression_statement "puVar2 = &pMVar3->flags;" (assignment_expression "puVar2 = &pMVar3->flags" identifier = (pointer_expression "&pMVar3->flags" & (field_expression "pMVar3->flags" identifier -> field_identifier))) ;) (expression_statement "*puVar2 = *puVar2 | 0x8000;" (assignment_expression "*puVar2 = *puVar2 | 0x8000" (pointer_expression "*puVar2" * identifier) = (binary_expression "*puVar2 | 0x8000" (pointer_expression "*puVar2" * identifier) | number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_000a0bd0(int *param_1)\n\n{\n  ushort *puVar1;\n  uint uVar2;\n  code *pcVar3;\n  int iVar4;\n  int iVar5;\n  uint uVar6;\n  \n  if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {\n    iVar5 = FUN_0004c400();\n  }\n  else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }\n  if (iVar5 == 0) {\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }\n  uVar6 = *(uint *)(iVar5 + 0x14);\n  uVar2 = *(uint *)(iVar5 + 0x10);\n  if (uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }\n  else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }\n  if (*(char *)(iVar5 + 0x19) == '\0') {\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }\n  else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }\nLAB_000a0c6d:\n  iVar5 = *param_1;\n  *(undefined1 *)(iVar5 + 0xb) = 0x4a;\n  puVar1 = (ushort *)(iVar5 + 8);\n  *puVar1 = *puVar1 | 0x8000;\n  return;\n}\n\n" (function_definition "void FUN_000a0bd0(int *param_1)\n\n{\n  ushort *puVar1;\n  uint uVar2;\n  code *pcVar3;\n  int iVar4;\n  int iVar5;\n  uint uVar6;\n  \n  if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {\n    iVar5 = FUN_0004c400();\n  }\n  else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }\n  if (iVar5 == 0) {\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }\n  uVar6 = *(uint *)(iVar5 + 0x14);\n  uVar2 = *(uint *)(iVar5 + 0x10);\n  if (uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }\n  else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }\n  if (*(char *)(iVar5 + 0x19) == '\0') {\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }\n  else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }\nLAB_000a0c6d:\n  iVar5 = *param_1;\n  *(undefined1 *)(iVar5 + 0xb) = 0x4a;\n  puVar1 = (ushort *)(iVar5 + 8);\n  *puVar1 = *puVar1 | 0x8000;\n  return;\n}" primitive_type (function_declarator "FUN_000a0bd0(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  ushort *puVar1;\n  uint uVar2;\n  code *pcVar3;\n  int iVar4;\n  int iVar5;\n  uint uVar6;\n  \n  if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {\n    iVar5 = FUN_0004c400();\n  }\n  else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }\n  if (iVar5 == 0) {\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }\n  uVar6 = *(uint *)(iVar5 + 0x14);\n  uVar2 = *(uint *)(iVar5 + 0x10);\n  if (uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }\n  else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }\n  if (*(char *)(iVar5 + 0x19) == '\0') {\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }\n  else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }\nLAB_000a0c6d:\n  iVar5 = *param_1;\n  *(undefined1 *)(iVar5 + 0xb) = 0x4a;\n  puVar1 = (ushort *)(iVar5 + 8);\n  *puVar1 = *puVar1 | 0x8000;\n  return;\n}" { (declaration "ushort *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "code *pcVar3;" type_identifier (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (if_statement "if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {\n    iVar5 = FUN_0004c400();\n  }\n  else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }" if (parenthesized_expression "((*(byte *)(param_1[2] + 9) & 0x20) == 0)" ( (binary_expression "(*(byte *)(param_1[2] + 9) & 0x20) == 0" (parenthesized_expression "(*(byte *)(param_1[2] + 9) & 0x20)" ( (binary_expression "*(byte *)(param_1[2] + 9) & 0x20" (pointer_expression "*(byte *)(param_1[2] + 9)" * (cast_expression "(byte *)(param_1[2] + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[2] + 9)" ( (binary_expression "param_1[2] + 9" (subscript_expression "param_1[2]" identifier [ number_literal ]) + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar5 = FUN_0004c400();\n  }" { (expression_statement "iVar5 = FUN_0004c400();" (assignment_expression "iVar5 = FUN_0004c400()" identifier = (call_expression "FUN_0004c400()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }" else (compound_statement "{\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }" { (expression_statement "iVar5 = *(int *)(param_1[2] + 0x10);" (assignment_expression "iVar5 = *(int *)(param_1[2] + 0x10)" identifier = (pointer_expression "*(int *)(param_1[2] + 0x10)" * (cast_expression "(int *)(param_1[2] + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[2] + 0x10)" ( (binary_expression "param_1[2] + 0x10" (subscript_expression "param_1[2]" identifier [ number_literal ]) + number_literal) ))))) ;) }))) (if_statement "if (iVar5 == 0) {\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }" { (expression_statement "iVar5 = FUN_000715f0(1,0);" (assignment_expression "iVar5 = FUN_000715f0(1,0)" identifier = (call_expression "FUN_000715f0(1,0)" identifier (argument_list "(1,0)" ( number_literal , number_literal )))) ;) (if_statement "if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" if (parenthesized_expression "(iVar5 == 0x12)" ( (binary_expression "iVar5 == 0x12" identifier == number_literal) )) (compound_statement "{\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" { (expression_statement "param_1[5] = 0x12;" (assignment_expression "param_1[5] = 0x12" (subscript_expression "param_1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "FUN_0006f5d0(0);" (call_expression "FUN_0006f5d0(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (goto_statement "goto LAB_000a0c6d;" goto statement_identifier ;) })) (expression_statement "uVar6 = *(uint *)(iVar5 + 0x14);" (assignment_expression "uVar6 = *(uint *)(iVar5 + 0x14)" identifier = (pointer_expression "*(uint *)(iVar5 + 0x14)" * (cast_expression "(uint *)(iVar5 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x14)" ( (binary_expression "iVar5 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(iVar5 + 0x10);" (assignment_expression "uVar2 = *(uint *)(iVar5 + 0x10)" identifier = (pointer_expression "*(uint *)(iVar5 + 0x10)" * (cast_expression "(uint *)(iVar5 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x10)" ( (binary_expression "iVar5 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }\n  else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }" if (parenthesized_expression "(uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8)))" ( (binary_expression "uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))" (binary_expression "uVar6 < *(uint *)(iVar5 + 0xc)" identifier < (pointer_expression "*(uint *)(iVar5 + 0xc)" * (cast_expression "(uint *)(iVar5 + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0xc)" ( (binary_expression "iVar5 + 0xc" identifier + number_literal) ))))) || (binary_expression "uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))" (binary_expression "uVar6 - *(uint *)(iVar5 + 0xc)" identifier - (pointer_expression "*(uint *)(iVar5 + 0xc)" * (cast_expression "(uint *)(iVar5 + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0xc)" ( (binary_expression "iVar5 + 0xc" identifier + number_literal) ))))) < (call_expression "(uint)(uVar2 < *(uint *)(iVar5 + 8))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar2 < *(uint *)(iVar5 + 8))" ( (binary_expression "uVar2 < *(uint *)(iVar5 + 8)" identifier < (pointer_expression "*(uint *)(iVar5 + 8)" * (cast_expression "(uint *)(iVar5 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) ))))) ))))) )) (compound_statement "{\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }" { (labeled_statement "LAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;" statement_identifier : (expression_statement "*(uint *)(iVar5 + 0x10) = uVar2 + 1;" (assignment_expression "*(uint *)(iVar5 + 0x10) = uVar2 + 1" (pointer_expression "*(uint *)(iVar5 + 0x10)" * (cast_expression "(uint *)(iVar5 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x10)" ( (binary_expression "iVar5 + 0x10" identifier + number_literal) )))) = (binary_expression "uVar2 + 1" identifier + number_literal)) ;)) (expression_statement "*(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);" (assignment_expression "*(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2)" (pointer_expression "*(uint *)(iVar5 + 0x14)" * (cast_expression "(uint *)(iVar5 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x14)" ( (binary_expression "iVar5 + 0x14" identifier + number_literal) )))) = (binary_expression "uVar6 + (0xfffffffe < uVar2)" identifier + (parenthesized_expression "(0xfffffffe < uVar2)" ( (binary_expression "0xfffffffe < uVar2" number_literal < identifier) )))) ;) (expression_statement "*(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;" (assignment_expression "*(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d" (pointer_expression "*(undefined1 *)(uVar2 + *(int *)(iVar5 + 4))" * (cast_expression "(undefined1 *)(uVar2 + *(int *)(iVar5 + 4))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 + *(int *)(iVar5 + 4))" ( (binary_expression "uVar2 + *(int *)(iVar5 + 4)" identifier + (pointer_expression "*(int *)(iVar5 + 4)" * (cast_expression "(int *)(iVar5 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 4)" ( (binary_expression "iVar5 + 4" identifier + number_literal) ))))) )))) = number_literal) ;) }) (else_clause "else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }" else (compound_statement "{\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }" { (expression_statement "iVar4 = FUN_0009f0a0();" (assignment_expression "iVar4 = FUN_0009f0a0()" identifier = (call_expression "FUN_0009f0a0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }" { (expression_statement "uVar2 = *(uint *)(iVar5 + 0x10);" (assignment_expression "uVar2 = *(uint *)(iVar5 + 0x10)" identifier = (pointer_expression "*(uint *)(iVar5 + 0x10)" * (cast_expression "(uint *)(iVar5 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x10)" ( (binary_expression "iVar5 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar6 = *(uint *)(iVar5 + 0x14);" (assignment_expression "uVar6 = *(uint *)(iVar5 + 0x14)" identifier = (pointer_expression "*(uint *)(iVar5 + 0x14)" * (cast_expression "(uint *)(iVar5 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x14)" ( (binary_expression "iVar5 + 0x14" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000a0c15;" goto statement_identifier ;) })) }))) (if_statement "if (*(char *)(iVar5 + 0x19) == '\0') {\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }\n  else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }" if (parenthesized_expression "(*(char *)(iVar5 + 0x19) == '\0')" ( (binary_expression "*(char *)(iVar5 + 0x19) == '\0'" (pointer_expression "*(char *)(iVar5 + 0x19)" * (cast_expression "(char *)(iVar5 + 0x19)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x19)" ( (binary_expression "iVar5 + 0x19" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }" { (expression_statement "pcVar3 = FUN_00044000;" (assignment_expression "pcVar3 = FUN_00044000" identifier = identifier) ;) (if_statement "if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }" if (parenthesized_expression "(*(char *)(iVar5 + 0x18) != '\0')" ( (binary_expression "*(char *)(iVar5 + 0x18) != '\0'" (pointer_expression "*(char *)(iVar5 + 0x18)" * (cast_expression "(char *)(iVar5 + 0x18)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x18)" ( (binary_expression "iVar5 + 0x18" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      pcVar3 = (code *)0xffffffff;\n    }" { (expression_statement "pcVar3 = (code *)0xffffffff;" (assignment_expression "pcVar3 = (code *)0xffffffff" identifier = (cast_expression "(code *)0xffffffff" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (expression_statement "iVar4 = FUN_000715f0(1,pcVar3);" (assignment_expression "iVar4 = FUN_000715f0(1,pcVar3)" identifier = (call_expression "FUN_000715f0(1,pcVar3)" identifier (argument_list "(1,pcVar3)" ( number_literal , identifier )))) ;) (if_statement "if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" if (parenthesized_expression "(iVar4 == 0x12)" ( (binary_expression "iVar4 == 0x12" identifier == number_literal) )) (compound_statement "{\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" { (expression_statement "param_1[5] = 0x12;" (assignment_expression "param_1[5] = 0x12" (subscript_expression "param_1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "FUN_0006f5d0(0);" (call_expression "FUN_0006f5d0(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (expression_statement "*(undefined1 *)(iVar5 + 0x18) = 1;" (assignment_expression "*(undefined1 *)(iVar5 + 0x18) = 1" (pointer_expression "*(undefined1 *)(iVar5 + 0x18)" * (cast_expression "(undefined1 *)(iVar5 + 0x18)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x18)" ( (binary_expression "iVar5 + 0x18" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }" else (if_statement "if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }" if (parenthesized_expression "(*(char *)(iVar5 + 0x19) == '\x01')" ( (binary_expression "*(char *)(iVar5 + 0x19) == '\x01'" (pointer_expression "*(char *)(iVar5 + 0x19)" * (cast_expression "(char *)(iVar5 + 0x19)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x19)" ( (binary_expression "iVar5 + 0x19" identifier + number_literal) )))) == (char_literal "'\x01'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0004e320(param_1);\n  }" { (expression_statement "FUN_0004e320(param_1);" (call_expression "FUN_0004e320(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })))) (labeled_statement "LAB_000a0c6d:\n  iVar5 = *param_1;" statement_identifier : (expression_statement "iVar5 = *param_1;" (assignment_expression "iVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;)) (expression_statement "*(undefined1 *)(iVar5 + 0xb) = 0x4a;" (assignment_expression "*(undefined1 *)(iVar5 + 0xb) = 0x4a" (pointer_expression "*(undefined1 *)(iVar5 + 0xb)" * (cast_expression "(undefined1 *)(iVar5 + 0xb)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0xb)" ( (binary_expression "iVar5 + 0xb" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar1 = (ushort *)(iVar5 + 8);" (assignment_expression "puVar1 = (ushort *)(iVar5 + 8)" identifier = (cast_expression "(ushort *)(iVar5 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) )))) ;) (expression_statement "*puVar1 = *puVar1 | 0x8000;" (assignment_expression "*puVar1 = *puVar1 | 0x8000" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 0x8000" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (goto_statement goto statement_identifier ;) })) (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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) || (binary_expression (binary_expression IDENT - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + (parenthesized_expression ( (binary_expression LIT < IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )))) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (goto_statement goto statement_identifier ;) })) }))) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_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) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) | LIT)) ;) (return_statement return ;) })))
(function_definition "void FUN_000a0bd0(int *param_1)\n\n{\n  ushort *puVar1;\n  uint uVar2;\n  code *pcVar3;\n  int iVar4;\n  int iVar5;\n  uint uVar6;\n  \n  if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {\n    iVar5 = FUN_0004c400();\n  }\n  else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }\n  if (iVar5 == 0) {\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }\n  uVar6 = *(uint *)(iVar5 + 0x14);\n  uVar2 = *(uint *)(iVar5 + 0x10);\n  if (uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }\n  else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }\n  if (*(char *)(iVar5 + 0x19) == '\0') {\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }\n  else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }\nLAB_000a0c6d:\n  iVar5 = *param_1;\n  *(undefined1 *)(iVar5 + 0xb) = 0x4a;\n  puVar1 = (ushort *)(iVar5 + 8);\n  *puVar1 = *puVar1 | 0x8000;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000a0bd0(int *param_1)" (identifier "FUN_000a0bd0") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  ushort *puVar1;\n  uint uVar2;\n  code *pcVar3;\n  int iVar4;\n  int iVar5;\n  uint uVar6;\n  \n  if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {\n    iVar5 = FUN_0004c400();\n  }\n  else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }\n  if (iVar5 == 0) {\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }\n  uVar6 = *(uint *)(iVar5 + 0x14);\n  uVar2 = *(uint *)(iVar5 + 0x10);\n  if (uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }\n  else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }\n  if (*(char *)(iVar5 + 0x19) == '\0') {\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }\n  else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }\nLAB_000a0c6d:\n  iVar5 = *param_1;\n  *(undefined1 *)(iVar5 + 0xb) = 0x4a;\n  puVar1 = (ushort *)(iVar5 + 8);\n  *puVar1 = *puVar1 | 0x8000;\n  return;\n}" ({ "{") (declaration "ushort *puVar1;" (type_identifier "ushort") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "code *pcVar3;" (type_identifier "code") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (if_statement "if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {\n    iVar5 = FUN_0004c400();\n  }\n  else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }" (if "if") (parenthesized_expression "((*(byte *)(param_1[2] + 9) & 0x20) == 0)" (( "(") (binary_expression "(*(byte *)(param_1[2] + 9) & 0x20) == 0" (parenthesized_expression "(*(byte *)(param_1[2] + 9) & 0x20)" (( "(") (binary_expression "*(byte *)(param_1[2] + 9) & 0x20" (pointer_expression "*(byte *)(param_1[2] + 9)" (* "*") (cast_expression "(byte *)(param_1[2] + 9)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[2] + 9)" (( "(") (binary_expression "param_1[2] + 9" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "9")) () ")")))) (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar5 = FUN_0004c400();\n  }" ({ "{") (expression_statement "iVar5 = FUN_0004c400();" (assignment_expression "iVar5 = FUN_0004c400()" (identifier "iVar5") (= "=") (call_expression "FUN_0004c400()" (identifier "FUN_0004c400") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }" (else "else") (compound_statement "{\n    iVar5 = *(int *)(param_1[2] + 0x10);\n  }" ({ "{") (expression_statement "iVar5 = *(int *)(param_1[2] + 0x10);" (assignment_expression "iVar5 = *(int *)(param_1[2] + 0x10)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(param_1[2] + 0x10)" (* "*") (cast_expression "(int *)(param_1[2] + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[2] + 0x10)" (( "(") (binary_expression "param_1[2] + 0x10" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (} "}")))) (if_statement "if (iVar5 == 0) {\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar5 = FUN_000715f0(1,0);\n    if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    goto LAB_000a0c6d;\n  }" ({ "{") (expression_statement "iVar5 = FUN_000715f0(1,0);" (assignment_expression "iVar5 = FUN_000715f0(1,0)" (identifier "iVar5") (= "=") (call_expression "FUN_000715f0(1,0)" (identifier "FUN_000715f0") (argument_list "(1,0)" (( "(") (number_literal "1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar5 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" (if "if") (parenthesized_expression "(iVar5 == 0x12)" (( "(") (binary_expression "iVar5 == 0x12" (identifier "iVar5") (== "==") (number_literal "0x12")) () ")")) (compound_statement "{\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" ({ "{") (expression_statement "param_1[5] = 0x12;" (assignment_expression "param_1[5] = 0x12" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0x12")) (; ";")) (expression_statement "FUN_0006f5d0(0);" (call_expression "FUN_0006f5d0(0)" (identifier "FUN_0006f5d0") (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (} "}"))) (goto_statement "goto LAB_000a0c6d;" (goto "goto") (statement_identifier "LAB_000a0c6d") (; ";")) (} "}"))) (expression_statement "uVar6 = *(uint *)(iVar5 + 0x14);" (assignment_expression "uVar6 = *(uint *)(iVar5 + 0x14)" (identifier "uVar6") (= "=") (pointer_expression "*(uint *)(iVar5 + 0x14)" (* "*") (cast_expression "(uint *)(iVar5 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x14)" (( "(") (binary_expression "iVar5 + 0x14" (identifier "iVar5") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "uVar2 = *(uint *)(iVar5 + 0x10);" (assignment_expression "uVar2 = *(uint *)(iVar5 + 0x10)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(iVar5 + 0x10)" (* "*") (cast_expression "(uint *)(iVar5 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x10)" (( "(") (binary_expression "iVar5 + 0x10" (identifier "iVar5") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (if_statement "if (uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }\n  else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }" (if "if") (parenthesized_expression "(uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8)))" (( "(") (binary_expression "uVar6 < *(uint *)(iVar5 + 0xc) ||\n      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))" (binary_expression "uVar6 < *(uint *)(iVar5 + 0xc)" (identifier "uVar6") (< "<") (pointer_expression "*(uint *)(iVar5 + 0xc)" (* "*") (cast_expression "(uint *)(iVar5 + 0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0xc)" (( "(") (binary_expression "iVar5 + 0xc" (identifier "iVar5") (+ "+") (number_literal "0xc")) () ")"))))) (|| "||") (binary_expression "uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))" (binary_expression "uVar6 - *(uint *)(iVar5 + 0xc)" (identifier "uVar6") (- "-") (pointer_expression "*(uint *)(iVar5 + 0xc)" (* "*") (cast_expression "(uint *)(iVar5 + 0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0xc)" (( "(") (binary_expression "iVar5 + 0xc" (identifier "iVar5") (+ "+") (number_literal "0xc")) () ")"))))) (< "<") (call_expression "(uint)(uVar2 < *(uint *)(iVar5 + 8))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar2 < *(uint *)(iVar5 + 8))" (( "(") (binary_expression "uVar2 < *(uint *)(iVar5 + 8)" (identifier "uVar2") (< "<") (pointer_expression "*(uint *)(iVar5 + 8)" (* "*") (cast_expression "(uint *)(iVar5 + 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 8)" (( "(") (binary_expression "iVar5 + 8" (identifier "iVar5") (+ "+") (number_literal "8")) () ")"))))) () ")"))))) () ")")) (compound_statement "{\nLAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;\n    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);\n    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;\n  }" ({ "{") (labeled_statement "LAB_000a0c15:\n    *(uint *)(iVar5 + 0x10) = uVar2 + 1;" (statement_identifier "LAB_000a0c15") (: ":") (expression_statement "*(uint *)(iVar5 + 0x10) = uVar2 + 1;" (assignment_expression "*(uint *)(iVar5 + 0x10) = uVar2 + 1" (pointer_expression "*(uint *)(iVar5 + 0x10)" (* "*") (cast_expression "(uint *)(iVar5 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x10)" (( "(") (binary_expression "iVar5 + 0x10" (identifier "iVar5") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (binary_expression "uVar2 + 1" (identifier "uVar2") (+ "+") (number_literal "1"))) (; ";"))) (expression_statement "*(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);" (assignment_expression "*(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2)" (pointer_expression "*(uint *)(iVar5 + 0x14)" (* "*") (cast_expression "(uint *)(iVar5 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x14)" (( "(") (binary_expression "iVar5 + 0x14" (identifier "iVar5") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (binary_expression "uVar6 + (0xfffffffe < uVar2)" (identifier "uVar6") (+ "+") (parenthesized_expression "(0xfffffffe < uVar2)" (( "(") (binary_expression "0xfffffffe < uVar2" (number_literal "0xfffffffe") (< "<") (identifier "uVar2")) () ")")))) (; ";")) (expression_statement "*(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;" (assignment_expression "*(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d" (pointer_expression "*(undefined1 *)(uVar2 + *(int *)(iVar5 + 4))" (* "*") (cast_expression "(undefined1 *)(uVar2 + *(int *)(iVar5 + 4))" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar2 + *(int *)(iVar5 + 4))" (( "(") (binary_expression "uVar2 + *(int *)(iVar5 + 4)" (identifier "uVar2") (+ "+") (pointer_expression "*(int *)(iVar5 + 4)" (* "*") (cast_expression "(int *)(iVar5 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 4)" (( "(") (binary_expression "iVar5 + 4" (identifier "iVar5") (+ "+") (number_literal "4")) () ")"))))) () ")")))) (= "=") (number_literal "0x7d")) (; ";")) (} "}")) (else_clause "else {\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }" (else "else") (compound_statement "{\n    iVar4 = FUN_0009f0a0();\n    if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }\n  }" ({ "{") (expression_statement "iVar4 = FUN_0009f0a0();" (assignment_expression "iVar4 = FUN_0009f0a0()" (identifier "iVar4") (= "=") (call_expression "FUN_0009f0a0()" (identifier "FUN_0009f0a0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar4 == 0) {\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = *(uint *)(iVar5 + 0x10);\n      uVar6 = *(uint *)(iVar5 + 0x14);\n      goto LAB_000a0c15;\n    }" ({ "{") (expression_statement "uVar2 = *(uint *)(iVar5 + 0x10);" (assignment_expression "uVar2 = *(uint *)(iVar5 + 0x10)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(iVar5 + 0x10)" (* "*") (cast_expression "(uint *)(iVar5 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x10)" (( "(") (binary_expression "iVar5 + 0x10" (identifier "iVar5") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "uVar6 = *(uint *)(iVar5 + 0x14);" (assignment_expression "uVar6 = *(uint *)(iVar5 + 0x14)" (identifier "uVar6") (= "=") (pointer_expression "*(uint *)(iVar5 + 0x14)" (* "*") (cast_expression "(uint *)(iVar5 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x14)" (( "(") (binary_expression "iVar5 + 0x14" (identifier "iVar5") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (goto_statement "goto LAB_000a0c15;" (goto "goto") (statement_identifier "LAB_000a0c15") (; ";")) (} "}"))) (} "}")))) (if_statement "if (*(char *)(iVar5 + 0x19) == '\0') {\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }\n  else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }" (if "if") (parenthesized_expression "(*(char *)(iVar5 + 0x19) == '\0')" (( "(") (binary_expression "*(char *)(iVar5 + 0x19) == '\0'" (pointer_expression "*(char *)(iVar5 + 0x19)" (* "*") (cast_expression "(char *)(iVar5 + 0x19)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x19)" (( "(") (binary_expression "iVar5 + 0x19" (identifier "iVar5") (+ "+") (number_literal "0x19")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    pcVar3 = FUN_00044000;\n    if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }\n    iVar4 = FUN_000715f0(1,pcVar3);\n    if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }\n    *(undefined1 *)(iVar5 + 0x18) = 1;\n  }" ({ "{") (expression_statement "pcVar3 = FUN_00044000;" (assignment_expression "pcVar3 = FUN_00044000" (identifier "pcVar3") (= "=") (identifier "FUN_00044000")) (; ";")) (if_statement "if (*(char *)(iVar5 + 0x18) != '\0') {\n      pcVar3 = (code *)0xffffffff;\n    }" (if "if") (parenthesized_expression "(*(char *)(iVar5 + 0x18) != '\0')" (( "(") (binary_expression "*(char *)(iVar5 + 0x18) != '\0'" (pointer_expression "*(char *)(iVar5 + 0x18)" (* "*") (cast_expression "(char *)(iVar5 + 0x18)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x18)" (( "(") (binary_expression "iVar5 + 0x18" (identifier "iVar5") (+ "+") (number_literal "0x18")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      pcVar3 = (code *)0xffffffff;\n    }" ({ "{") (expression_statement "pcVar3 = (code *)0xffffffff;" (assignment_expression "pcVar3 = (code *)0xffffffff" (identifier "pcVar3") (= "=") (cast_expression "(code *)0xffffffff" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0xffffffff"))) (; ";")) (} "}"))) (expression_statement "iVar4 = FUN_000715f0(1,pcVar3);" (assignment_expression "iVar4 = FUN_000715f0(1,pcVar3)" (identifier "iVar4") (= "=") (call_expression "FUN_000715f0(1,pcVar3)" (identifier "FUN_000715f0") (argument_list "(1,pcVar3)" (( "(") (number_literal "1") (, ",") (identifier "pcVar3") () ")")))) (; ";")) (if_statement "if (iVar4 == 0x12) {\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" (if "if") (parenthesized_expression "(iVar4 == 0x12)" (( "(") (binary_expression "iVar4 == 0x12" (identifier "iVar4") (== "==") (number_literal "0x12")) () ")")) (compound_statement "{\n      param_1[5] = 0x12;\n      FUN_0006f5d0(0);\n    }" ({ "{") (expression_statement "param_1[5] = 0x12;" (assignment_expression "param_1[5] = 0x12" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0x12")) (; ";")) (expression_statement "FUN_0006f5d0(0);" (call_expression "FUN_0006f5d0(0)" (identifier "FUN_0006f5d0") (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (} "}"))) (expression_statement "*(undefined1 *)(iVar5 + 0x18) = 1;" (assignment_expression "*(undefined1 *)(iVar5 + 0x18) = 1" (pointer_expression "*(undefined1 *)(iVar5 + 0x18)" (* "*") (cast_expression "(undefined1 *)(iVar5 + 0x18)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x18)" (( "(") (binary_expression "iVar5 + 0x18" (identifier "iVar5") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }" (else "else") (if_statement "if (*(char *)(iVar5 + 0x19) == '\x01') {\n    FUN_0004e320(param_1);\n  }" (if "if") (parenthesized_expression "(*(char *)(iVar5 + 0x19) == '\x01')" (( "(") (binary_expression "*(char *)(iVar5 + 0x19) == '\x01'" (pointer_expression "*(char *)(iVar5 + 0x19)" (* "*") (cast_expression "(char *)(iVar5 + 0x19)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x19)" (( "(") (binary_expression "iVar5 + 0x19" (identifier "iVar5") (+ "+") (number_literal "0x19")) () ")")))) (== "==") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) () ")")) (compound_statement "{\n    FUN_0004e320(param_1);\n  }" ({ "{") (expression_statement "FUN_0004e320(param_1);" (call_expression "FUN_0004e320(param_1)" (identifier "FUN_0004e320") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}"))))) (labeled_statement "LAB_000a0c6d:\n  iVar5 = *param_1;" (statement_identifier "LAB_000a0c6d") (: ":") (expression_statement "iVar5 = *param_1;" (assignment_expression "iVar5 = *param_1" (identifier "iVar5") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";"))) (expression_statement "*(undefined1 *)(iVar5 + 0xb) = 0x4a;" (assignment_expression "*(undefined1 *)(iVar5 + 0xb) = 0x4a" (pointer_expression "*(undefined1 *)(iVar5 + 0xb)" (* "*") (cast_expression "(undefined1 *)(iVar5 + 0xb)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0xb)" (( "(") (binary_expression "iVar5 + 0xb" (identifier "iVar5") (+ "+") (number_literal "0xb")) () ")")))) (= "=") (number_literal "0x4a")) (; ";")) (expression_statement "puVar1 = (ushort *)(iVar5 + 8);" (assignment_expression "puVar1 = (ushort *)(iVar5 + 8)" (identifier "puVar1") (= "=") (cast_expression "(ushort *)(iVar5 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 8)" (( "(") (binary_expression "iVar5 + 8" (identifier "iVar5") (+ "+") (number_literal "8")) () ")")))) (; ";")) (expression_statement "*puVar1 = *puVar1 | 0x8000;" (assignment_expression "*puVar1 = *puVar1 | 0x8000" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (binary_expression "*puVar1 | 0x8000" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (| "|") (number_literal "0x8000"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* WARNING: Unknown calling convention */

void function_1(type_1 *ctx)

{
  type_2 *puVar1;
  type_3 *puVar2;
  type_4 *pMVar3;
  type_2 var_6;
  type_5 *xDel;
  int var_4;
  type_6 *var_2;
  type_1 *in_ECX;
  type_2 var_5;
  type_7 *xDel_00;
  int in_stack_ffffffcc;
  type_8 in_stack_ffffffd0;
  type_7 *in_stack_ffffffd4;
  
  pMVar3 = ctx->pMem;
  if ((pMVar3->flags & 0x2000) == 0) {
    in_stack_ffffffd0 = 200;
    var_2 = (type_6 *)var_1((type_1 *)&ctx->pFunc,(int)pMVar3,in_ECX);
  }
  else {
    var_2 = (type_6 *)pMVar3->z;
  }
  if (var_2 == (type_6 *)0x0) {
    xDel_00 = (type_7 *)0x0;
    var_4 = var_3
                      ((type_4 *)&DAT_00000001,(char *)0x0,in_stack_ffffffcc,in_stack_ffffffd0,
                       in_stack_ffffffd4);
    if (var_4 == 0x12) {
      ctx->isError = 0x12;
      var_3(ctx->pOut,"string or blob too big",1,'\0',xDel_00);
    }
    goto LAB_000a0c6d;
  }
  var_5 = *(type_2 *)((int)&var_2->nUsed + 4);
  var_6 = (type_2)var_2->nUsed;
  puVar1 = (type_2 *)((int)&var_2->nAlloc + 4);
  if (var_5 < *puVar1 || var_5 - *puVar1 < (type_2)(var_6 < (type_2)var_2->nAlloc)) {
LAB_000a0c15:
    *(type_2 *)&var_2->nUsed = var_6 + 1;
    *(type_2 *)((int)&var_2->nUsed + 4) = var_5 + (0xfffffffe < var_6);
    var_2->zBuf[var_6] = '}';
  }
  else {
    in_stack_ffffffd0 = 0xac;
    var_4 = var_7(var_2,1);
    if (var_4 == 0) {
      var_6 = (type_2)var_2->nUsed;
      var_5 = *(type_2 *)((int)&var_2->nUsed + 4);
      goto LAB_000a0c15;
    }
  }
  if (var_2->bErr == '\0') {
    xDel = sqlite3_free;
    if (var_2->bStatic != '\0') {
      xDel = (type_5 *)&DAT_ffffffff;
    }
    var_4 = var_3
                      ((type_4 *)&DAT_00000001,(char *)xDel,in_stack_ffffffcc,in_stack_ffffffd0,
                       in_stack_ffffffd4);
    if (var_4 == 0x12) {
      ctx->isError = 0x12;
      var_3(ctx->pOut,"string or blob too big",1,'\0',xDel);
    }
    var_2->bStatic = '\x01';
  }
  else if (var_2->bErr == '\x01') {
    var_8(ctx);
  }
LAB_000a0c6d:
  pMVar3 = ctx->pOut;
  pMVar3->eSubtype = 'J';
  puVar2 = &pMVar3->flags;
  *puVar2 = *puVar2 | 0x8000;
  return;
}


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

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

void MASKED(int *param_1)

{
  ushort *puVar1;
  uint uVar2;
  code *pcVar3;
  int iVar4;
  int iVar5;
  uint uVar6;
  
  if ((*(byte *)(param_1[2] + 9) & 0x20) == 0) {
    iVar5 = FUN_0004c400();
  }
  else {
    iVar5 = *(int *)(param_1[2] + 0x10);
  }
  if (iVar5 == 0) {
    iVar5 = FUN_000715f0(1,0);
    if (iVar5 == 0x12) {
      param_1[5] = 0x12;
      FUN_0006f5d0(0);
    }
    goto LAB_000a0c6d;
  }
  uVar6 = *(uint *)(iVar5 + 0x14);
  uVar2 = *(uint *)(iVar5 + 0x10);
  if (uVar6 < *(uint *)(iVar5 + 0xc) ||
      uVar6 - *(uint *)(iVar5 + 0xc) < (uint)(uVar2 < *(uint *)(iVar5 + 8))) {
LAB_000a0c15:
    *(uint *)(iVar5 + 0x10) = uVar2 + 1;
    *(uint *)(iVar5 + 0x14) = uVar6 + (0xfffffffe < uVar2);
    *(undefined1 *)(uVar2 + *(int *)(iVar5 + 4)) = 0x7d;
  }
  else {
    iVar4 = FUN_0009f0a0();
    if (iVar4 == 0) {
      uVar2 = *(uint *)(iVar5 + 0x10);
      uVar6 = *(uint *)(iVar5 + 0x14);
      goto LAB_000a0c15;
    }
  }
  if (*(char *)(iVar5 + 0x19) == '\0') {
    pcVar3 = FUN_00044000;
    if (*(char *)(iVar5 + 0x18) != '\0') {
      pcVar3 = (code *)0xffffffff;
    }
    iVar4 = FUN_000715f0(1,pcVar3);
    if (iVar4 == 0x12) {
      param_1[5] = 0x12;
      FUN_0006f5d0(0);
    }
    *(undefined1 *)(iVar5 + 0x18) = 1;
  }
  else if (*(char *)(iVar5 + 0x19) == '\x01') {
    FUN_0004e320(param_1);
  }
LAB_000a0c6d:
  iVar5 = *param_1;
  *(undefined1 *)(iVar5 + 0xb) = 0x4a;
  puVar1 = (ushort *)(iVar5 + 8);
  *puVar1 = *puVar1 | 0x8000;
  return;
}

