
sqlite3_value * sqlite3_column_value(sqlite3_stmt *pStmt,int i)

{
  sqlite3 *db;
  uint extraout_EDX;
  uint extraout_EDX_00;
  uint err_code;
  Mem *pOut;
  sqlite3_value *psVar1;
  int unaff_EDI;
  
  __x86_get_pc_thunk_di();
  if (pStmt == (sqlite3_stmt *)0x0) {
    columnMallocFailure((sqlite3_stmt *)0x0);
    return (sqlite3_value *)(unaff_EDI + 0xfb40a);
  }
  err_code = extraout_EDX;
  if (*(int *)(*(int *)pStmt + 0xc) != 0) {
    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*(int *)pStmt + 0xc));
    err_code = extraout_EDX_00;
  }
  if ((*(int *)(pStmt + 0x74) == 0) ||
     (err_code = (uint)*(ushort *)(pStmt + 0x88), err_code <= (uint)i)) {
    db = *(sqlite3 **)pStmt;
    psVar1 = (sqlite3_value *)(unaff_EDI + 0xfb40a);
    db->errCode = 0x19;
    sqlite3ErrorFinish(db,err_code);
  }
  else {
    psVar1 = (sqlite3_value *)(*(int *)(pStmt + 0x74) + i * 0x28);
    if ((psVar1->flags & 0x800) != 0) {
      psVar1->flags = psVar1->flags & 0xf7ff | 0x1000;
      columnMallocFailure(pStmt);
      return psVar1;
    }
  }
  columnMallocFailure(pStmt);
  return psVar1;
}



undefined * FUN_00067950(int *param_1,uint param_2)

{
  undefined *puVar1;
  int unaff_EDI;
  
  FUN_0003a401();
  if (param_1 == (int *)0x0) {
    FUN_0004c6c0();
    return &UNK_000fb40a + unaff_EDI;
  }
  if (*(int *)(*param_1 + 0xc) != 0) {
    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));
  }
  if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {
    puVar1 = &UNK_000fb40a + unaff_EDI;
    *(undefined4 *)(*param_1 + 0x3c) = 0x19;
    FUN_0004c5a0();
  }
  else {
    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);
    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {
      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;
      FUN_0004c6c0();
      return puVar1;
    }
  }
  FUN_0004c6c0();
  return puVar1;
}


PUSH EDI
CALL 0x0003a401
ADD EDI,0x1534d2
PUSH ESI
PUSH EBX
MOV EBX,dword ptr [ESP + 0x10]
MOV ESI,dword ptr [ESP + 0x14]
TEST EBX,EBX
JZ 0x000679e0
MOV EAX,dword ptr [EBX]
MOV EAX,dword ptr [EAX + 0xc]
TEST EAX,EAX
JZ 0x00067980
SUB ESP,0xc
PUSH EAX
CALL dword ptr [EDI + 0x614]
ADD ESP,0x10
MOV EAX,dword ptr [EBX + 0x74]
TEST EAX,EAX
JZ 0x00067992
MOVZX EDX,word ptr [EBX + 0x88]
CMP ESI,EDX
JC 0x000679b8
MOV EAX,dword ptr [EBX]
LEA ESI,[EDI + 0xfffa7f38]
MOV dword ptr [EAX + 0x3c],0x19
CALL 0x0004c5a0
MOV EAX,EBX
CALL 0x0004c6c0
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
RET
LEA EDX,[ESI + ESI*0x4]
LEA ESI,[EAX + EDX*0x8]
MOVZX EAX,word ptr [ESI + 0x8]
TEST AH,0x8
JZ 0x000679a6
AND AH,0xf7
OR AH,0x10
MOV word ptr [ESI + 0x8],AX
MOV EAX,EBX
CALL 0x0004c6c0
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
RET
LEA ESI,[EDI + 0xfffa7f38]
MOV EAX,EBX
CALL 0x0004c6c0
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
RET
(translation_unit "undefined * FUN_00067950(int *param_1,uint param_2)\n\n{\n  undefined *puVar1;\n  int unaff_EDI;\n  \n  FUN_0003a401();\n  if (param_1 == (int *)0x0) {\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }\n  if (*(int *)(*param_1 + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }\n  if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }\n  else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }\n  FUN_0004c6c0();\n  return puVar1;\n}\n\n" (function_definition "undefined * FUN_00067950(int *param_1,uint param_2)\n\n{\n  undefined *puVar1;\n  int unaff_EDI;\n  \n  FUN_0003a401();\n  if (param_1 == (int *)0x0) {\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }\n  if (*(int *)(*param_1 + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }\n  if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }\n  else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }\n  FUN_0004c6c0();\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_00067950(int *param_1,uint param_2)" * (function_declarator "FUN_00067950(int *param_1,uint param_2)" identifier (parameter_list "(int *param_1,uint param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) )))) (compound_statement "{\n  undefined *puVar1;\n  int unaff_EDI;\n  \n  FUN_0003a401();\n  if (param_1 == (int *)0x0) {\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }\n  if (*(int *)(*param_1 + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }\n  if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }\n  else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }\n  FUN_0004c6c0();\n  return puVar1;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "FUN_0003a401();" (call_expression "FUN_0003a401()" identifier (argument_list "()" ( ))) ;) (if_statement "if (param_1 == (int *)0x0) {\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }" if (parenthesized_expression "(param_1 == (int *)0x0)" ( (binary_expression "param_1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }" { (expression_statement "FUN_0004c6c0();" (call_expression "FUN_0004c6c0()" identifier (argument_list "()" ( ))) ;) (return_statement "return &UNK_000fb40a + unaff_EDI;" return (binary_expression "&UNK_000fb40a + unaff_EDI" (pointer_expression "&UNK_000fb40a" & identifier) + identifier) ;) })) (if_statement "if (*(int *)(*param_1 + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }" if (parenthesized_expression "(*(int *)(*param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(*param_1 + 0xc) != 0" (pointer_expression "*(int *)(*param_1 + 0xc)" * (cast_expression "(int *)(*param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0xc)" ( (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) != number_literal) )) (compound_statement "{\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }" { (expression_statement "(**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));" (call_expression "(**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc))" (parenthesized_expression "(**(code **)(unaff_EDI + 0x153ae6))" ( (pointer_expression "**(code **)(unaff_EDI + 0x153ae6)" * (pointer_expression "*(code **)(unaff_EDI + 0x153ae6)" * (cast_expression "(code **)(unaff_EDI + 0x153ae6)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EDI + 0x153ae6)" ( (binary_expression "unaff_EDI + 0x153ae6" identifier + number_literal) ))))) )) (argument_list "(*(int *)(*param_1 + 0xc))" ( (pointer_expression "*(int *)(*param_1 + 0xc)" * (cast_expression "(int *)(*param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0xc)" ( (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) })) (if_statement "if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }\n  else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }" if (parenthesized_expression "((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2))" ( (binary_expression "(param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)" (parenthesized_expression "(param_1[0x1d] == 0)" ( (binary_expression "param_1[0x1d] == 0" (subscript_expression "param_1[0x1d]" identifier [ number_literal ]) == number_literal) )) || (parenthesized_expression "(*(ushort *)(param_1 + 0x22) <= param_2)" ( (binary_expression "*(ushort *)(param_1 + 0x22) <= param_2" (pointer_expression "*(ushort *)(param_1 + 0x22)" * (cast_expression "(ushort *)(param_1 + 0x22)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x22)" ( (binary_expression "param_1 + 0x22" identifier + number_literal) )))) <= identifier) ))) )) (compound_statement "{\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }" { (expression_statement "puVar1 = &UNK_000fb40a + unaff_EDI;" (assignment_expression "puVar1 = &UNK_000fb40a + unaff_EDI" identifier = (binary_expression "&UNK_000fb40a + unaff_EDI" (pointer_expression "&UNK_000fb40a" & identifier) + identifier)) ;) (expression_statement "*(undefined4 *)(*param_1 + 0x3c) = 0x19;" (assignment_expression "*(undefined4 *)(*param_1 + 0x3c) = 0x19" (pointer_expression "*(undefined4 *)(*param_1 + 0x3c)" * (cast_expression "(undefined4 *)(*param_1 + 0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x3c)" ( (binary_expression "*param_1 + 0x3c" (pointer_expression "*param_1" * identifier) + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0004c5a0();" (call_expression "FUN_0004c5a0()" identifier (argument_list "()" ( ))) ;) }) (else_clause "else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }" else (compound_statement "{\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }" { (expression_statement "puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);" (assignment_expression "puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28)" identifier = (cast_expression "(undefined *)(param_1[0x1d] + param_2 * 0x28)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0x1d] + param_2 * 0x28)" ( (binary_expression "param_1[0x1d] + param_2 * 0x28" (subscript_expression "param_1[0x1d]" identifier [ number_literal ]) + (binary_expression "param_2 * 0x28" identifier * number_literal)) )))) ;) (if_statement "if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }" if (parenthesized_expression "((*(ushort *)(puVar1 + 8) & 0x800) != 0)" ( (binary_expression "(*(ushort *)(puVar1 + 8) & 0x800) != 0" (parenthesized_expression "(*(ushort *)(puVar1 + 8) & 0x800)" ( (binary_expression "*(ushort *)(puVar1 + 8) & 0x800" (pointer_expression "*(ushort *)(puVar1 + 8)" * (cast_expression "(ushort *)(puVar1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 8)" ( (binary_expression "puVar1 + 8" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }" { (expression_statement "*(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;" (assignment_expression "*(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000" (pointer_expression "*(ushort *)(puVar1 + 8)" * (cast_expression "(ushort *)(puVar1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 8)" ( (binary_expression "puVar1 + 8" identifier + number_literal) )))) = (binary_expression "*(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000" (binary_expression "*(ushort *)(puVar1 + 8) & 0xf7ff" (pointer_expression "*(ushort *)(puVar1 + 8)" * (cast_expression "(ushort *)(puVar1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 8)" ( (binary_expression "puVar1 + 8" identifier + number_literal) )))) & number_literal) | number_literal)) ;) (expression_statement "FUN_0004c6c0();" (call_expression "FUN_0004c6c0()" identifier (argument_list "()" ( ))) ;) (return_statement "return puVar1;" return identifier ;) })) }))) (expression_statement "FUN_0004c6c0();" (call_expression "FUN_0004c6c0()" identifier (argument_list "()" ( ))) ;) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit "sqlite3_value * sqlite3_column_value(sqlite3_stmt *pStmt,int i)\n\n{\n  sqlite3 *db;\n  uint extraout_EDX;\n  uint extraout_EDX_00;\n  uint err_code;\n  Mem *pOut;\n  sqlite3_value *psVar1;\n  int unaff_EDI;\n  \n  __x86_get_pc_thunk_di();\n  if (pStmt == (sqlite3_stmt *)0x0) {\n    columnMallocFailure((sqlite3_stmt *)0x0);\n    return (sqlite3_value *)(unaff_EDI + 0xfb40a);\n  }\n  err_code = extraout_EDX;\n  if (*(int *)(*(int *)pStmt + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*(int *)pStmt + 0xc));\n    err_code = extraout_EDX_00;\n  }\n  if ((*(int *)(pStmt + 0x74) == 0) ||\n     (err_code = (uint)*(ushort *)(pStmt + 0x88), err_code <= (uint)i)) {\n    db = *(sqlite3 **)pStmt;\n    psVar1 = (sqlite3_value *)(unaff_EDI + 0xfb40a);\n    db->errCode = 0x19;\n    sqlite3ErrorFinish(db,err_code);\n  }\n  else {\n    psVar1 = (sqlite3_value *)(*(int *)(pStmt + 0x74) + i * 0x28);\n    if ((psVar1->flags & 0x800) != 0) {\n      psVar1->flags = psVar1->flags & 0xf7ff | 0x1000;\n      columnMallocFailure(pStmt);\n      return psVar1;\n    }\n  }\n  columnMallocFailure(pStmt);\n  return psVar1;\n}\n\n" (function_definition "sqlite3_value * sqlite3_column_value(sqlite3_stmt *pStmt,int i)\n\n{\n  sqlite3 *db;\n  uint extraout_EDX;\n  uint extraout_EDX_00;\n  uint err_code;\n  Mem *pOut;\n  sqlite3_value *psVar1;\n  int unaff_EDI;\n  \n  __x86_get_pc_thunk_di();\n  if (pStmt == (sqlite3_stmt *)0x0) {\n    columnMallocFailure((sqlite3_stmt *)0x0);\n    return (sqlite3_value *)(unaff_EDI + 0xfb40a);\n  }\n  err_code = extraout_EDX;\n  if (*(int *)(*(int *)pStmt + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*(int *)pStmt + 0xc));\n    err_code = extraout_EDX_00;\n  }\n  if ((*(int *)(pStmt + 0x74) == 0) ||\n     (err_code = (uint)*(ushort *)(pStmt + 0x88), err_code <= (uint)i)) {\n    db = *(sqlite3 **)pStmt;\n    psVar1 = (sqlite3_value *)(unaff_EDI + 0xfb40a);\n    db->errCode = 0x19;\n    sqlite3ErrorFinish(db,err_code);\n  }\n  else {\n    psVar1 = (sqlite3_value *)(*(int *)(pStmt + 0x74) + i * 0x28);\n    if ((psVar1->flags & 0x800) != 0) {\n      psVar1->flags = psVar1->flags & 0xf7ff | 0x1000;\n      columnMallocFailure(pStmt);\n      return psVar1;\n    }\n  }\n  columnMallocFailure(pStmt);\n  return psVar1;\n}" type_identifier (pointer_declarator "* sqlite3_column_value(sqlite3_stmt *pStmt,int i)" * (function_declarator "sqlite3_column_value(sqlite3_stmt *pStmt,int i)" identifier (parameter_list "(sqlite3_stmt *pStmt,int i)" ( (parameter_declaration "sqlite3_stmt *pStmt" type_identifier (pointer_declarator "*pStmt" * identifier)) , (parameter_declaration "int i" primitive_type identifier) )))) (compound_statement "{\n  sqlite3 *db;\n  uint extraout_EDX;\n  uint extraout_EDX_00;\n  uint err_code;\n  Mem *pOut;\n  sqlite3_value *psVar1;\n  int unaff_EDI;\n  \n  __x86_get_pc_thunk_di();\n  if (pStmt == (sqlite3_stmt *)0x0) {\n    columnMallocFailure((sqlite3_stmt *)0x0);\n    return (sqlite3_value *)(unaff_EDI + 0xfb40a);\n  }\n  err_code = extraout_EDX;\n  if (*(int *)(*(int *)pStmt + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*(int *)pStmt + 0xc));\n    err_code = extraout_EDX_00;\n  }\n  if ((*(int *)(pStmt + 0x74) == 0) ||\n     (err_code = (uint)*(ushort *)(pStmt + 0x88), err_code <= (uint)i)) {\n    db = *(sqlite3 **)pStmt;\n    psVar1 = (sqlite3_value *)(unaff_EDI + 0xfb40a);\n    db->errCode = 0x19;\n    sqlite3ErrorFinish(db,err_code);\n  }\n  else {\n    psVar1 = (sqlite3_value *)(*(int *)(pStmt + 0x74) + i * 0x28);\n    if ((psVar1->flags & 0x800) != 0) {\n      psVar1->flags = psVar1->flags & 0xf7ff | 0x1000;\n      columnMallocFailure(pStmt);\n      return psVar1;\n    }\n  }\n  columnMallocFailure(pStmt);\n  return psVar1;\n}" { (declaration "sqlite3 *db;" type_identifier (pointer_declarator "*db" * identifier) ;) (declaration "uint extraout_EDX;" type_identifier identifier ;) (declaration "uint extraout_EDX_00;" type_identifier identifier ;) (declaration "uint err_code;" type_identifier identifier ;) (declaration "Mem *pOut;" type_identifier (pointer_declarator "*pOut" * identifier) ;) (declaration "sqlite3_value *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "__x86_get_pc_thunk_di();" (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( ))) ;) (if_statement "if (pStmt == (sqlite3_stmt *)0x0) {\n    columnMallocFailure((sqlite3_stmt *)0x0);\n    return (sqlite3_value *)(unaff_EDI + 0xfb40a);\n  }" if (parenthesized_expression "(pStmt == (sqlite3_stmt *)0x0)" ( (binary_expression "pStmt == (sqlite3_stmt *)0x0" identifier == (cast_expression "(sqlite3_stmt *)0x0" ( (type_descriptor "sqlite3_stmt *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    columnMallocFailure((sqlite3_stmt *)0x0);\n    return (sqlite3_value *)(unaff_EDI + 0xfb40a);\n  }" { (expression_statement "columnMallocFailure((sqlite3_stmt *)0x0);" (call_expression "columnMallocFailure((sqlite3_stmt *)0x0)" identifier (argument_list "((sqlite3_stmt *)0x0)" ( (cast_expression "(sqlite3_stmt *)0x0" ( (type_descriptor "sqlite3_stmt *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (return_statement "return (sqlite3_value *)(unaff_EDI + 0xfb40a);" return (cast_expression "(sqlite3_value *)(unaff_EDI + 0xfb40a)" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0xfb40a)" ( (binary_expression "unaff_EDI + 0xfb40a" identifier + number_literal) ))) ;) })) (expression_statement "err_code = extraout_EDX;" (assignment_expression "err_code = extraout_EDX" identifier = identifier) ;) (if_statement "if (*(int *)(*(int *)pStmt + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*(int *)pStmt + 0xc));\n    err_code = extraout_EDX_00;\n  }" if (parenthesized_expression "(*(int *)(*(int *)pStmt + 0xc) != 0)" ( (binary_expression "*(int *)(*(int *)pStmt + 0xc) != 0" (pointer_expression "*(int *)(*(int *)pStmt + 0xc)" * (cast_expression "(int *)(*(int *)pStmt + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)pStmt + 0xc)" ( (binary_expression "*(int *)pStmt + 0xc" (pointer_expression "*(int *)pStmt" * (cast_expression "(int *)pStmt" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) != number_literal) )) (compound_statement "{\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*(int *)pStmt + 0xc));\n    err_code = extraout_EDX_00;\n  }" { (expression_statement "(**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*(int *)pStmt + 0xc));" (call_expression "(**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*(int *)pStmt + 0xc))" (parenthesized_expression "(**(code **)(unaff_EDI + 0x153ae6))" ( (pointer_expression "**(code **)(unaff_EDI + 0x153ae6)" * (pointer_expression "*(code **)(unaff_EDI + 0x153ae6)" * (cast_expression "(code **)(unaff_EDI + 0x153ae6)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EDI + 0x153ae6)" ( (binary_expression "unaff_EDI + 0x153ae6" identifier + number_literal) ))))) )) (argument_list "(*(int *)(*(int *)pStmt + 0xc))" ( (pointer_expression "*(int *)(*(int *)pStmt + 0xc)" * (cast_expression "(int *)(*(int *)pStmt + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)pStmt + 0xc)" ( (binary_expression "*(int *)pStmt + 0xc" (pointer_expression "*(int *)pStmt" * (cast_expression "(int *)pStmt" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) ))) ;) (expression_statement "err_code = extraout_EDX_00;" (assignment_expression "err_code = extraout_EDX_00" identifier = identifier) ;) })) (if_statement "if ((*(int *)(pStmt + 0x74) == 0) ||\n     (err_code = (uint)*(ushort *)(pStmt + 0x88), err_code <= (uint)i)) {\n    db = *(sqlite3 **)pStmt;\n    psVar1 = (sqlite3_value *)(unaff_EDI + 0xfb40a);\n    db->errCode = 0x19;\n    sqlite3ErrorFinish(db,err_code);\n  }\n  else {\n    psVar1 = (sqlite3_value *)(*(int *)(pStmt + 0x74) + i * 0x28);\n    if ((psVar1->flags & 0x800) != 0) {\n      psVar1->flags = psVar1->flags & 0xf7ff | 0x1000;\n      columnMallocFailure(pStmt);\n      return psVar1;\n    }\n  }" if (parenthesized_expression "((*(int *)(pStmt + 0x74) == 0) ||\n     (err_code = (uint)*(ushort *)(pStmt + 0x88), err_code <= (uint)i))" ( (binary_expression "(*(int *)(pStmt + 0x74) == 0) ||\n     (err_code = (uint)*(ushort *)(pStmt + 0x88), err_code <= (uint)i)" (parenthesized_expression "(*(int *)(pStmt + 0x74) == 0)" ( (binary_expression "*(int *)(pStmt + 0x74) == 0" (pointer_expression "*(int *)(pStmt + 0x74)" * (cast_expression "(int *)(pStmt + 0x74)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pStmt + 0x74)" ( (binary_expression "pStmt + 0x74" identifier + number_literal) )))) == number_literal) )) || (parenthesized_expression "(err_code = (uint)*(ushort *)(pStmt + 0x88), err_code <= (uint)i)" ( (comma_expression "err_code = (uint)*(ushort *)(pStmt + 0x88), err_code <= (uint)i" (assignment_expression "err_code = (uint)*(ushort *)(pStmt + 0x88)" identifier = (binary_expression "(uint)*(ushort *)(pStmt + 0x88)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(pStmt + 0x88)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pStmt + 0x88)" ( (binary_expression "pStmt + 0x88" identifier + number_literal) ))))) , (binary_expression "err_code <= (uint)i" identifier <= (cast_expression "(uint)i" ( (type_descriptor "uint" type_identifier) ) identifier))) ))) )) (compound_statement "{\n    db = *(sqlite3 **)pStmt;\n    psVar1 = (sqlite3_value *)(unaff_EDI + 0xfb40a);\n    db->errCode = 0x19;\n    sqlite3ErrorFinish(db,err_code);\n  }" { (expression_statement "db = *(sqlite3 **)pStmt;" (assignment_expression "db = *(sqlite3 **)pStmt" identifier = (pointer_expression "*(sqlite3 **)pStmt" * (cast_expression "(sqlite3 **)pStmt" ( (type_descriptor "sqlite3 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "psVar1 = (sqlite3_value *)(unaff_EDI + 0xfb40a);" (assignment_expression "psVar1 = (sqlite3_value *)(unaff_EDI + 0xfb40a)" identifier = (cast_expression "(sqlite3_value *)(unaff_EDI + 0xfb40a)" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0xfb40a)" ( (binary_expression "unaff_EDI + 0xfb40a" identifier + number_literal) )))) ;) (expression_statement "db->errCode = 0x19;" (assignment_expression "db->errCode = 0x19" (field_expression "db->errCode" identifier -> field_identifier) = number_literal) ;) (expression_statement "sqlite3ErrorFinish(db,err_code);" (call_expression "sqlite3ErrorFinish(db,err_code)" identifier (argument_list "(db,err_code)" ( identifier , identifier ))) ;) }) (else_clause "else {\n    psVar1 = (sqlite3_value *)(*(int *)(pStmt + 0x74) + i * 0x28);\n    if ((psVar1->flags & 0x800) != 0) {\n      psVar1->flags = psVar1->flags & 0xf7ff | 0x1000;\n      columnMallocFailure(pStmt);\n      return psVar1;\n    }\n  }" else (compound_statement "{\n    psVar1 = (sqlite3_value *)(*(int *)(pStmt + 0x74) + i * 0x28);\n    if ((psVar1->flags & 0x800) != 0) {\n      psVar1->flags = psVar1->flags & 0xf7ff | 0x1000;\n      columnMallocFailure(pStmt);\n      return psVar1;\n    }\n  }" { (expression_statement "psVar1 = (sqlite3_value *)(*(int *)(pStmt + 0x74) + i * 0x28);" (assignment_expression "psVar1 = (sqlite3_value *)(*(int *)(pStmt + 0x74) + i * 0x28)" identifier = (cast_expression "(sqlite3_value *)(*(int *)(pStmt + 0x74) + i * 0x28)" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(pStmt + 0x74) + i * 0x28)" ( (binary_expression "*(int *)(pStmt + 0x74) + i * 0x28" (pointer_expression "*(int *)(pStmt + 0x74)" * (cast_expression "(int *)(pStmt + 0x74)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pStmt + 0x74)" ( (binary_expression "pStmt + 0x74" identifier + number_literal) )))) + (binary_expression "i * 0x28" identifier * number_literal)) )))) ;) (if_statement "if ((psVar1->flags & 0x800) != 0) {\n      psVar1->flags = psVar1->flags & 0xf7ff | 0x1000;\n      columnMallocFailure(pStmt);\n      return psVar1;\n    }" if (parenthesized_expression "((psVar1->flags & 0x800) != 0)" ( (binary_expression "(psVar1->flags & 0x800) != 0" (parenthesized_expression "(psVar1->flags & 0x800)" ( (binary_expression "psVar1->flags & 0x800" (field_expression "psVar1->flags" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n      psVar1->flags = psVar1->flags & 0xf7ff | 0x1000;\n      columnMallocFailure(pStmt);\n      return psVar1;\n    }" { (expression_statement "psVar1->flags = psVar1->flags & 0xf7ff | 0x1000;" (assignment_expression "psVar1->flags = psVar1->flags & 0xf7ff | 0x1000" (field_expression "psVar1->flags" identifier -> field_identifier) = (binary_expression "psVar1->flags & 0xf7ff | 0x1000" (binary_expression "psVar1->flags & 0xf7ff" (field_expression "psVar1->flags" identifier -> field_identifier) & number_literal) | number_literal)) ;) (expression_statement "columnMallocFailure(pStmt);" (call_expression "columnMallocFailure(pStmt)" identifier (argument_list "(pStmt)" ( identifier ))) ;) (return_statement "return psVar1;" return identifier ;) })) }))) (expression_statement "columnMallocFailure(pStmt);" (call_expression "columnMallocFailure(pStmt)" identifier (argument_list "(pStmt)" ( identifier ))) ;) (return_statement "return psVar1;" return identifier ;) })))
(translation_unit "undefined * FUN_00067950(int *param_1,uint param_2)\n\n{\n  undefined *puVar1;\n  int unaff_EDI;\n  \n  FUN_0003a401();\n  if (param_1 == (int *)0x0) {\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }\n  if (*(int *)(*param_1 + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }\n  if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }\n  else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }\n  FUN_0004c6c0();\n  return puVar1;\n}\n\n" (function_definition "undefined * FUN_00067950(int *param_1,uint param_2)\n\n{\n  undefined *puVar1;\n  int unaff_EDI;\n  \n  FUN_0003a401();\n  if (param_1 == (int *)0x0) {\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }\n  if (*(int *)(*param_1 + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }\n  if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }\n  else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }\n  FUN_0004c6c0();\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_00067950(int *param_1,uint param_2)" * (function_declarator "FUN_00067950(int *param_1,uint param_2)" identifier (parameter_list "(int *param_1,uint param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) )))) (compound_statement "{\n  undefined *puVar1;\n  int unaff_EDI;\n  \n  FUN_0003a401();\n  if (param_1 == (int *)0x0) {\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }\n  if (*(int *)(*param_1 + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }\n  if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }\n  else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }\n  FUN_0004c6c0();\n  return puVar1;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "FUN_0003a401();" (call_expression "FUN_0003a401()" identifier (argument_list "()" ( ))) ;) (if_statement "if (param_1 == (int *)0x0) {\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }" if (parenthesized_expression "(param_1 == (int *)0x0)" ( (binary_expression "param_1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }" { (expression_statement "FUN_0004c6c0();" (call_expression "FUN_0004c6c0()" identifier (argument_list "()" ( ))) ;) (return_statement "return &UNK_000fb40a + unaff_EDI;" return (binary_expression "&UNK_000fb40a + unaff_EDI" (pointer_expression "&UNK_000fb40a" & identifier) + identifier) ;) })) (if_statement "if (*(int *)(*param_1 + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }" if (parenthesized_expression "(*(int *)(*param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(*param_1 + 0xc) != 0" (pointer_expression "*(int *)(*param_1 + 0xc)" * (cast_expression "(int *)(*param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0xc)" ( (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) != number_literal) )) (compound_statement "{\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }" { (expression_statement "(**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));" (call_expression "(**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc))" (parenthesized_expression "(**(code **)(unaff_EDI + 0x153ae6))" ( (pointer_expression "**(code **)(unaff_EDI + 0x153ae6)" * (pointer_expression "*(code **)(unaff_EDI + 0x153ae6)" * (cast_expression "(code **)(unaff_EDI + 0x153ae6)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EDI + 0x153ae6)" ( (binary_expression "unaff_EDI + 0x153ae6" identifier + number_literal) ))))) )) (argument_list "(*(int *)(*param_1 + 0xc))" ( (pointer_expression "*(int *)(*param_1 + 0xc)" * (cast_expression "(int *)(*param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0xc)" ( (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) })) (if_statement "if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }\n  else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }" if (parenthesized_expression "((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2))" ( (binary_expression "(param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)" (parenthesized_expression "(param_1[0x1d] == 0)" ( (binary_expression "param_1[0x1d] == 0" (subscript_expression "param_1[0x1d]" identifier [ number_literal ]) == number_literal) )) || (parenthesized_expression "(*(ushort *)(param_1 + 0x22) <= param_2)" ( (binary_expression "*(ushort *)(param_1 + 0x22) <= param_2" (pointer_expression "*(ushort *)(param_1 + 0x22)" * (cast_expression "(ushort *)(param_1 + 0x22)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x22)" ( (binary_expression "param_1 + 0x22" identifier + number_literal) )))) <= identifier) ))) )) (compound_statement "{\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }" { (expression_statement "puVar1 = &UNK_000fb40a + unaff_EDI;" (assignment_expression "puVar1 = &UNK_000fb40a + unaff_EDI" identifier = (binary_expression "&UNK_000fb40a + unaff_EDI" (pointer_expression "&UNK_000fb40a" & identifier) + identifier)) ;) (expression_statement "*(undefined4 *)(*param_1 + 0x3c) = 0x19;" (assignment_expression "*(undefined4 *)(*param_1 + 0x3c) = 0x19" (pointer_expression "*(undefined4 *)(*param_1 + 0x3c)" * (cast_expression "(undefined4 *)(*param_1 + 0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x3c)" ( (binary_expression "*param_1 + 0x3c" (pointer_expression "*param_1" * identifier) + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0004c5a0();" (call_expression "FUN_0004c5a0()" identifier (argument_list "()" ( ))) ;) }) (else_clause "else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }" else (compound_statement "{\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }" { (expression_statement "puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);" (assignment_expression "puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28)" identifier = (cast_expression "(undefined *)(param_1[0x1d] + param_2 * 0x28)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0x1d] + param_2 * 0x28)" ( (binary_expression "param_1[0x1d] + param_2 * 0x28" (subscript_expression "param_1[0x1d]" identifier [ number_literal ]) + (binary_expression "param_2 * 0x28" identifier * number_literal)) )))) ;) (if_statement "if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }" if (parenthesized_expression "((*(ushort *)(puVar1 + 8) & 0x800) != 0)" ( (binary_expression "(*(ushort *)(puVar1 + 8) & 0x800) != 0" (parenthesized_expression "(*(ushort *)(puVar1 + 8) & 0x800)" ( (binary_expression "*(ushort *)(puVar1 + 8) & 0x800" (pointer_expression "*(ushort *)(puVar1 + 8)" * (cast_expression "(ushort *)(puVar1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 8)" ( (binary_expression "puVar1 + 8" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }" { (expression_statement "*(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;" (assignment_expression "*(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000" (pointer_expression "*(ushort *)(puVar1 + 8)" * (cast_expression "(ushort *)(puVar1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 8)" ( (binary_expression "puVar1 + 8" identifier + number_literal) )))) = (binary_expression "*(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000" (binary_expression "*(ushort *)(puVar1 + 8) & 0xf7ff" (pointer_expression "*(ushort *)(puVar1 + 8)" * (cast_expression "(ushort *)(puVar1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 8)" ( (binary_expression "puVar1 + 8" identifier + number_literal) )))) & number_literal) | number_literal)) ;) (expression_statement "FUN_0004c6c0();" (call_expression "FUN_0004c6c0()" identifier (argument_list "()" ( ))) ;) (return_statement "return puVar1;" return identifier ;) })) }))) (expression_statement "FUN_0004c6c0();" (call_expression "FUN_0004c6c0()" identifier (argument_list "()" ( ))) ;) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return (binary_expression (pointer_expression & IDENT) + IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression & IDENT) + IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression IDENT * LIT)) )))) ;) (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 IDENT + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) | LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return IDENT ;) })) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined * FUN_00067950(int *param_1,uint param_2)\n\n{\n  undefined *puVar1;\n  int unaff_EDI;\n  \n  FUN_0003a401();\n  if (param_1 == (int *)0x0) {\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }\n  if (*(int *)(*param_1 + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }\n  if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }\n  else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }\n  FUN_0004c6c0();\n  return puVar1;\n}" (type_identifier "undefined") (pointer_declarator "* FUN_00067950(int *param_1,uint param_2)" (* "*") (function_declarator "FUN_00067950(int *param_1,uint param_2)" (identifier "FUN_00067950") (parameter_list "(int *param_1,uint param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")")))) (compound_statement "{\n  undefined *puVar1;\n  int unaff_EDI;\n  \n  FUN_0003a401();\n  if (param_1 == (int *)0x0) {\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }\n  if (*(int *)(*param_1 + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }\n  if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }\n  else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }\n  FUN_0004c6c0();\n  return puVar1;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (expression_statement "FUN_0003a401();" (call_expression "FUN_0003a401()" (identifier "FUN_0003a401") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (param_1 == (int *)0x0) {\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }" (if "if") (parenthesized_expression "(param_1 == (int *)0x0)" (( "(") (binary_expression "param_1 == (int *)0x0" (identifier "param_1") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    FUN_0004c6c0();\n    return &UNK_000fb40a + unaff_EDI;\n  }" ({ "{") (expression_statement "FUN_0004c6c0();" (call_expression "FUN_0004c6c0()" (identifier "FUN_0004c6c0") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return &UNK_000fb40a + unaff_EDI;" (return "return") (binary_expression "&UNK_000fb40a + unaff_EDI" (pointer_expression "&UNK_000fb40a" (& "&") (identifier "UNK_000fb40a")) (+ "+") (identifier "unaff_EDI")) (; ";")) (} "}"))) (if_statement "if (*(int *)(*param_1 + 0xc) != 0) {\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }" (if "if") (parenthesized_expression "(*(int *)(*param_1 + 0xc) != 0)" (( "(") (binary_expression "*(int *)(*param_1 + 0xc) != 0" (pointer_expression "*(int *)(*param_1 + 0xc)" (* "*") (cast_expression "(int *)(*param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0xc)" (( "(") (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));\n  }" ({ "{") (expression_statement "(**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));" (call_expression "(**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc))" (parenthesized_expression "(**(code **)(unaff_EDI + 0x153ae6))" (( "(") (pointer_expression "**(code **)(unaff_EDI + 0x153ae6)" (* "*") (pointer_expression "*(code **)(unaff_EDI + 0x153ae6)" (* "*") (cast_expression "(code **)(unaff_EDI + 0x153ae6)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EDI + 0x153ae6)" (( "(") (binary_expression "unaff_EDI + 0x153ae6" (identifier "unaff_EDI") (+ "+") (number_literal "0x153ae6")) () ")"))))) () ")")) (argument_list "(*(int *)(*param_1 + 0xc))" (( "(") (pointer_expression "*(int *)(*param_1 + 0xc)" (* "*") (cast_expression "(int *)(*param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0xc)" (( "(") (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (} "}"))) (if_statement "if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }\n  else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }" (if "if") (parenthesized_expression "((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2))" (( "(") (binary_expression "(param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)" (parenthesized_expression "(param_1[0x1d] == 0)" (( "(") (binary_expression "param_1[0x1d] == 0" (subscript_expression "param_1[0x1d]" (identifier "param_1") ([ "[") (number_literal "0x1d") (] "]")) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*(ushort *)(param_1 + 0x22) <= param_2)" (( "(") (binary_expression "*(ushort *)(param_1 + 0x22) <= param_2" (pointer_expression "*(ushort *)(param_1 + 0x22)" (* "*") (cast_expression "(ushort *)(param_1 + 0x22)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x22)" (( "(") (binary_expression "param_1 + 0x22" (identifier "param_1") (+ "+") (number_literal "0x22")) () ")")))) (<= "<=") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\n    puVar1 = &UNK_000fb40a + unaff_EDI;\n    *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n    FUN_0004c5a0();\n  }" ({ "{") (expression_statement "puVar1 = &UNK_000fb40a + unaff_EDI;" (assignment_expression "puVar1 = &UNK_000fb40a + unaff_EDI" (identifier "puVar1") (= "=") (binary_expression "&UNK_000fb40a + unaff_EDI" (pointer_expression "&UNK_000fb40a" (& "&") (identifier "UNK_000fb40a")) (+ "+") (identifier "unaff_EDI"))) (; ";")) (expression_statement "*(undefined4 *)(*param_1 + 0x3c) = 0x19;" (assignment_expression "*(undefined4 *)(*param_1 + 0x3c) = 0x19" (pointer_expression "*(undefined4 *)(*param_1 + 0x3c)" (* "*") (cast_expression "(undefined4 *)(*param_1 + 0x3c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x3c)" (( "(") (binary_expression "*param_1 + 0x3c" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (number_literal "0x19")) (; ";")) (expression_statement "FUN_0004c5a0();" (call_expression "FUN_0004c5a0()" (identifier "FUN_0004c5a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }" (else "else") (compound_statement "{\n    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }\n  }" ({ "{") (expression_statement "puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);" (assignment_expression "puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28)" (identifier "puVar1") (= "=") (cast_expression "(undefined *)(param_1[0x1d] + param_2 * 0x28)" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[0x1d] + param_2 * 0x28)" (( "(") (binary_expression "param_1[0x1d] + param_2 * 0x28" (subscript_expression "param_1[0x1d]" (identifier "param_1") ([ "[") (number_literal "0x1d") (] "]")) (+ "+") (binary_expression "param_2 * 0x28" (identifier "param_2") (* "*") (number_literal "0x28"))) () ")")))) (; ";")) (if_statement "if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }" (if "if") (parenthesized_expression "((*(ushort *)(puVar1 + 8) & 0x800) != 0)" (( "(") (binary_expression "(*(ushort *)(puVar1 + 8) & 0x800) != 0" (parenthesized_expression "(*(ushort *)(puVar1 + 8) & 0x800)" (( "(") (binary_expression "*(ushort *)(puVar1 + 8) & 0x800" (pointer_expression "*(ushort *)(puVar1 + 8)" (* "*") (cast_expression "(ushort *)(puVar1 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 8)" (( "(") (binary_expression "puVar1 + 8" (identifier "puVar1") (+ "+") (number_literal "8")) () ")")))) (& "&") (number_literal "0x800")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;\n      FUN_0004c6c0();\n      return puVar1;\n    }" ({ "{") (expression_statement "*(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;" (assignment_expression "*(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000" (pointer_expression "*(ushort *)(puVar1 + 8)" (* "*") (cast_expression "(ushort *)(puVar1 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 8)" (( "(") (binary_expression "puVar1 + 8" (identifier "puVar1") (+ "+") (number_literal "8")) () ")")))) (= "=") (binary_expression "*(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000" (binary_expression "*(ushort *)(puVar1 + 8) & 0xf7ff" (pointer_expression "*(ushort *)(puVar1 + 8)" (* "*") (cast_expression "(ushort *)(puVar1 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 8)" (( "(") (binary_expression "puVar1 + 8" (identifier "puVar1") (+ "+") (number_literal "8")) () ")")))) (& "&") (number_literal "0xf7ff")) (| "|") (number_literal "0x1000"))) (; ";")) (expression_statement "FUN_0004c6c0();" (call_expression "FUN_0004c6c0()" (identifier "FUN_0004c6c0") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}"))) (} "}")))) (expression_statement "FUN_0004c6c0();" (call_expression "FUN_0004c6c0()" (identifier "FUN_0004c6c0") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}")))

type_1 * function_1(type_2 *var_2,int var_7)

{
  type_3 *db;
  type_4 extraout_EDX;
  type_4 extraout_EDX_00;
  type_4 var_5;
  type_5 *pOut;
  type_1 *psVar1;
  int var_4;
  
  var_1();
  if (var_2 == (type_2 *)0x0) {
    var_3((type_2 *)0x0);
    return (type_1 *)(var_4 + 0xfb40a);
  }
  var_5 = extraout_EDX;
  if (*(int *)(*(int *)var_2 + 0xc) != 0) {
    (**(type_6 **)(var_4 + 0x153ae6))(*(int *)(*(int *)var_2 + 0xc));
    var_5 = extraout_EDX_00;
  }
  if ((*(int *)(var_2 + 0x74) == 0) ||
     (var_5 = (type_4)*(type_7 *)(var_2 + 0x88), var_5 <= (type_4)var_7)) {
    db = *(type_3 **)var_2;
    psVar1 = (type_1 *)(var_4 + 0xfb40a);
    db->errCode = 0x19;
    var_6(db,var_5);
  }
  else {
    psVar1 = (type_1 *)(*(int *)(var_2 + 0x74) + var_7 * 0x28);
    if ((psVar1->flags & 0x800) != 0) {
      psVar1->flags = psVar1->flags & 0xf7ff | 0x1000;
      var_3(var_2);
      return psVar1;
    }
  }
  var_3(var_2);
  return psVar1;
}


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

undefined * MASKED(int *param_1,uint param_2)

{
  undefined *puVar1;
  int unaff_EDI;
  
  FUN_0003a401();
  if (param_1 == (int *)0x0) {
    FUN_0004c6c0();
    return &UNK_000fb40a + unaff_EDI;
  }
  if (*(int *)(*param_1 + 0xc) != 0) {
    (**(code **)(unaff_EDI + 0x153ae6))(*(int *)(*param_1 + 0xc));
  }
  if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {
    puVar1 = &UNK_000fb40a + unaff_EDI;
    *(undefined4 *)(*param_1 + 0x3c) = 0x19;
    FUN_0004c5a0();
  }
  else {
    puVar1 = (undefined *)(param_1[0x1d] + param_2 * 0x28);
    if ((*(ushort *)(puVar1 + 8) & 0x800) != 0) {
      *(ushort *)(puVar1 + 8) = *(ushort *)(puVar1 + 8) & 0xf7ff | 0x1000;
      FUN_0004c6c0();
      return puVar1;
    }
  }
  FUN_0004c6c0();
  return puVar1;
}

