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

ulong schedule_timer(int ticks,timer_fn_t fn,void *ctx)

{
  undefined4 *e;
  undefined4 *puVar1;
  ulong uVar2;
  
  if (timers == (tree234 *)0x0) {
    init_timers();
  }
  now = getticks();
  uVar2 = ticks + now + (uint)(now == ticks + now);
  e = (undefined4 *)safemalloc(1,0x10);
  e[2] = uVar2;
  *e = fn;
  e[1] = ctx;
  e[3] = now;
  puVar1 = (undefined4 *)add234(timers,e);
  if (puVar1 == e) {
    add234(timer_contexts,(void *)e[1]);
  }
  else {
    safefree(e);
  }
  puVar1 = (undefined4 *)index234(timers,0);
  if (e != puVar1) {
    return uVar2;
  }
  timer_change_notify(e[2]);
  return uVar2;
}



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

int FUN_0003dd70(int param_1,undefined4 param_2,undefined4 param_3)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  int iVar3;
  
  if (DAT_0006f22c == 0) {
    FUN_0003dd20();
  }
  DAT_0006f224 = FUN_000416f0();
  iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);
  puVar1 = (undefined4 *)FUN_00019880(1,0x10);
  puVar1[2] = iVar3;
  *puVar1 = param_2;
  puVar1[1] = param_3;
  puVar1[3] = DAT_0006f224;
  puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);
  if (puVar2 == puVar1) {
    FUN_0003efa0(DAT_0006f228,puVar1[1]);
  }
  else {
    FUN_0001a110(puVar1);
  }
  puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);
  if (puVar1 != puVar2) {
    return iVar3;
  }
  FUN_000407b0(puVar1[2]);
  return iVar3;
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000152d0
ADD EBX,0x30f70
MOV ECX,dword ptr [EBX + 0x544]
TEST ECX,ECX
JZ 0x0003de30
CALL 0x000416f0
MOV EDI,dword ptr [ESP + 0x10]
MOV dword ptr [EBX + 0x53c],EAX
ADD EDI,EAX
CMP EAX,EDI
SETZ AL
SUB ESP,0x8
PUSH 0x10
MOVZX EAX,AL
PUSH 0x1
ADD EDI,EAX
CALL 0x00019880
MOV ESI,EAX
MOV EAX,dword ptr [ESP + 0x24]
MOV dword ptr [ESI + 0x8],EDI
MOV dword ptr [ESI],EAX
MOV EAX,dword ptr [ESP + 0x28]
MOV dword ptr [ESI + 0x4],EAX
MOV EAX,dword ptr [EBX + 0x53c]
MOV dword ptr [ESI + 0xc],EAX
POP EAX
POP EDX
PUSH ESI
PUSH dword ptr [EBX + 0x544]
CALL 0x0003efa0
ADD ESP,0x10
CMP EAX,ESI
JZ 0x0003de10
SUB ESP,0xc
PUSH ESI
CALL 0x0001a110
ADD ESP,0x10
SUB ESP,0x8
PUSH 0x0
PUSH dword ptr [EBX + 0x544]
CALL 0x0003f000
ADD ESP,0x10
CMP ESI,EAX
JZ 0x0003de40
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x8
PUSH dword ptr [ESI + 0x4]
PUSH dword ptr [EBX + 0x540]
CALL 0x0003efa0
ADD ESP,0x10
JMP 0x0003ddef
CALL 0x0003dd20
JMP 0x0003dd8c
SUB ESP,0xc
PUSH dword ptr [ESI + 0x8]
CALL 0x000407b0
ADD ESP,0x10
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0003dd70(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  if (DAT_0006f22c == 0) {\n    FUN_0003dd20();\n  }\n  DAT_0006f224 = FUN_000416f0();\n  iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);\n  puVar1 = (undefined4 *)FUN_00019880(1,0x10);\n  puVar1[2] = iVar3;\n  *puVar1 = param_2;\n  puVar1[1] = param_3;\n  puVar1[3] = DAT_0006f224;\n  puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);\n  if (puVar2 == puVar1) {\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }\n  else {\n    FUN_0001a110(puVar1);\n  }\n  puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);\n  if (puVar1 != puVar2) {\n    return iVar3;\n  }\n  FUN_000407b0(puVar1[2]);\n  return iVar3;\n}\n\n" comment (function_definition "int FUN_0003dd70(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  if (DAT_0006f22c == 0) {\n    FUN_0003dd20();\n  }\n  DAT_0006f224 = FUN_000416f0();\n  iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);\n  puVar1 = (undefined4 *)FUN_00019880(1,0x10);\n  puVar1[2] = iVar3;\n  *puVar1 = param_2;\n  puVar1[1] = param_3;\n  puVar1[3] = DAT_0006f224;\n  puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);\n  if (puVar2 == puVar1) {\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }\n  else {\n    FUN_0001a110(puVar1);\n  }\n  puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);\n  if (puVar1 != puVar2) {\n    return iVar3;\n  }\n  FUN_000407b0(puVar1[2]);\n  return iVar3;\n}" primitive_type (function_declarator "FUN_0003dd70(int param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  if (DAT_0006f22c == 0) {\n    FUN_0003dd20();\n  }\n  DAT_0006f224 = FUN_000416f0();\n  iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);\n  puVar1 = (undefined4 *)FUN_00019880(1,0x10);\n  puVar1[2] = iVar3;\n  *puVar1 = param_2;\n  puVar1[1] = param_3;\n  puVar1[3] = DAT_0006f224;\n  puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);\n  if (puVar2 == puVar1) {\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }\n  else {\n    FUN_0001a110(puVar1);\n  }\n  puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);\n  if (puVar1 != puVar2) {\n    return iVar3;\n  }\n  FUN_000407b0(puVar1[2]);\n  return iVar3;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if (DAT_0006f22c == 0) {\n    FUN_0003dd20();\n  }" if (parenthesized_expression "(DAT_0006f22c == 0)" ( (binary_expression "DAT_0006f22c == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_0003dd20();\n  }" { (expression_statement "FUN_0003dd20();" (call_expression "FUN_0003dd20()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "DAT_0006f224 = FUN_000416f0();" (assignment_expression "DAT_0006f224 = FUN_000416f0()" identifier = (call_expression "FUN_000416f0()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);" (assignment_expression "iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224)" identifier = (binary_expression "param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224)" (binary_expression "param_1 + DAT_0006f224" identifier + identifier) + (call_expression "(uint)(DAT_0006f224 == param_1 + DAT_0006f224)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(DAT_0006f224 == param_1 + DAT_0006f224)" ( (binary_expression "DAT_0006f224 == param_1 + DAT_0006f224" identifier == (binary_expression "param_1 + DAT_0006f224" identifier + identifier)) ))))) ;) (expression_statement "puVar1 = (undefined4 *)FUN_00019880(1,0x10);" (assignment_expression "puVar1 = (undefined4 *)FUN_00019880(1,0x10)" identifier = (cast_expression "(undefined4 *)FUN_00019880(1,0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00019880(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar1[2] = iVar3;" (assignment_expression "puVar1[2] = iVar3" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "puVar1[1] = param_3;" (assignment_expression "puVar1[1] = param_3" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[3] = DAT_0006f224;" (assignment_expression "puVar1[3] = DAT_0006f224" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);" (assignment_expression "puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1)" identifier = (cast_expression "(undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003efa0(DAT_0006f22c,puVar1)" identifier (argument_list "(DAT_0006f22c,puVar1)" ( identifier , identifier ))))) ;) (if_statement "if (puVar2 == puVar1) {\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }\n  else {\n    FUN_0001a110(puVar1);\n  }" if (parenthesized_expression "(puVar2 == puVar1)" ( (binary_expression "puVar2 == puVar1" identifier == identifier) )) (compound_statement "{\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }" { (expression_statement "FUN_0003efa0(DAT_0006f228,puVar1[1]);" (call_expression "FUN_0003efa0(DAT_0006f228,puVar1[1])" identifier (argument_list "(DAT_0006f228,puVar1[1])" ( identifier , (subscript_expression "puVar1[1]" identifier [ number_literal ]) ))) ;) }) (else_clause "else {\n    FUN_0001a110(puVar1);\n  }" else (compound_statement "{\n    FUN_0001a110(puVar1);\n  }" { (expression_statement "FUN_0001a110(puVar1);" (call_expression "FUN_0001a110(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) }))) (expression_statement "puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);" (assignment_expression "puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0)" identifier = (cast_expression "(undefined4 *)FUN_0003f000(DAT_0006f22c,0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003f000(DAT_0006f22c,0)" identifier (argument_list "(DAT_0006f22c,0)" ( identifier , number_literal ))))) ;) (if_statement "if (puVar1 != puVar2) {\n    return iVar3;\n  }" if (parenthesized_expression "(puVar1 != puVar2)" ( (binary_expression "puVar1 != puVar2" identifier != identifier) )) (compound_statement "{\n    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) })) (expression_statement "FUN_000407b0(puVar1[2]);" (call_expression "FUN_000407b0(puVar1[2])" identifier (argument_list "(puVar1[2])" ( (subscript_expression "puVar1[2]" identifier [ number_literal ]) ))) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nulong schedule_timer(int ticks,timer_fn_t fn,void *ctx)\n\n{\n  undefined4 *e;\n  undefined4 *puVar1;\n  ulong uVar2;\n  \n  if (timers == (tree234 *)0x0) {\n    init_timers();\n  }\n  now = getticks();\n  uVar2 = ticks + now + (uint)(now == ticks + now);\n  e = (undefined4 *)safemalloc(1,0x10);\n  e[2] = uVar2;\n  *e = fn;\n  e[1] = ctx;\n  e[3] = now;\n  puVar1 = (undefined4 *)add234(timers,e);\n  if (puVar1 == e) {\n    add234(timer_contexts,(void *)e[1]);\n  }\n  else {\n    safefree(e);\n  }\n  puVar1 = (undefined4 *)index234(timers,0);\n  if (e != puVar1) {\n    return uVar2;\n  }\n  timer_change_notify(e[2]);\n  return uVar2;\n}\n\n" comment comment (function_definition "ulong schedule_timer(int ticks,timer_fn_t fn,void *ctx)\n\n{\n  undefined4 *e;\n  undefined4 *puVar1;\n  ulong uVar2;\n  \n  if (timers == (tree234 *)0x0) {\n    init_timers();\n  }\n  now = getticks();\n  uVar2 = ticks + now + (uint)(now == ticks + now);\n  e = (undefined4 *)safemalloc(1,0x10);\n  e[2] = uVar2;\n  *e = fn;\n  e[1] = ctx;\n  e[3] = now;\n  puVar1 = (undefined4 *)add234(timers,e);\n  if (puVar1 == e) {\n    add234(timer_contexts,(void *)e[1]);\n  }\n  else {\n    safefree(e);\n  }\n  puVar1 = (undefined4 *)index234(timers,0);\n  if (e != puVar1) {\n    return uVar2;\n  }\n  timer_change_notify(e[2]);\n  return uVar2;\n}" type_identifier (function_declarator "schedule_timer(int ticks,timer_fn_t fn,void *ctx)" identifier (parameter_list "(int ticks,timer_fn_t fn,void *ctx)" ( (parameter_declaration "int ticks" primitive_type identifier) , (parameter_declaration "timer_fn_t fn" type_identifier identifier) , (parameter_declaration "void *ctx" primitive_type (pointer_declarator "*ctx" * identifier)) ))) (compound_statement "{\n  undefined4 *e;\n  undefined4 *puVar1;\n  ulong uVar2;\n  \n  if (timers == (tree234 *)0x0) {\n    init_timers();\n  }\n  now = getticks();\n  uVar2 = ticks + now + (uint)(now == ticks + now);\n  e = (undefined4 *)safemalloc(1,0x10);\n  e[2] = uVar2;\n  *e = fn;\n  e[1] = ctx;\n  e[3] = now;\n  puVar1 = (undefined4 *)add234(timers,e);\n  if (puVar1 == e) {\n    add234(timer_contexts,(void *)e[1]);\n  }\n  else {\n    safefree(e);\n  }\n  puVar1 = (undefined4 *)index234(timers,0);\n  if (e != puVar1) {\n    return uVar2;\n  }\n  timer_change_notify(e[2]);\n  return uVar2;\n}" { (declaration "undefined4 *e;" type_identifier (pointer_declarator "*e" * identifier) ;) (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ulong uVar2;" type_identifier identifier ;) (if_statement "if (timers == (tree234 *)0x0) {\n    init_timers();\n  }" if (parenthesized_expression "(timers == (tree234 *)0x0)" ( (binary_expression "timers == (tree234 *)0x0" identifier == (cast_expression "(tree234 *)0x0" ( (type_descriptor "tree234 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    init_timers();\n  }" { (expression_statement "init_timers();" (call_expression "init_timers()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "now = getticks();" (assignment_expression "now = getticks()" identifier = (call_expression "getticks()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = ticks + now + (uint)(now == ticks + now);" (assignment_expression "uVar2 = ticks + now + (uint)(now == ticks + now)" identifier = (binary_expression "ticks + now + (uint)(now == ticks + now)" (binary_expression "ticks + now" identifier + identifier) + (call_expression "(uint)(now == ticks + now)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(now == ticks + now)" ( (binary_expression "now == ticks + now" identifier == (binary_expression "ticks + now" identifier + identifier)) ))))) ;) (expression_statement "e = (undefined4 *)safemalloc(1,0x10);" (assignment_expression "e = (undefined4 *)safemalloc(1,0x10)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (expression_statement "e[2] = uVar2;" (assignment_expression "e[2] = uVar2" (subscript_expression "e[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*e = fn;" (assignment_expression "*e = fn" (pointer_expression "*e" * identifier) = identifier) ;) (expression_statement "e[1] = ctx;" (assignment_expression "e[1] = ctx" (subscript_expression "e[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "e[3] = now;" (assignment_expression "e[3] = now" (subscript_expression "e[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1 = (undefined4 *)add234(timers,e);" (assignment_expression "puVar1 = (undefined4 *)add234(timers,e)" identifier = (cast_expression "(undefined4 *)add234(timers,e)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "add234(timers,e)" identifier (argument_list "(timers,e)" ( identifier , identifier ))))) ;) (if_statement "if (puVar1 == e) {\n    add234(timer_contexts,(void *)e[1]);\n  }\n  else {\n    safefree(e);\n  }" if (parenthesized_expression "(puVar1 == e)" ( (binary_expression "puVar1 == e" identifier == identifier) )) (compound_statement "{\n    add234(timer_contexts,(void *)e[1]);\n  }" { (expression_statement "add234(timer_contexts,(void *)e[1]);" (call_expression "add234(timer_contexts,(void *)e[1])" identifier (argument_list "(timer_contexts,(void *)e[1])" ( identifier , (cast_expression "(void *)e[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "e[1]" identifier [ number_literal ])) ))) ;) }) (else_clause "else {\n    safefree(e);\n  }" else (compound_statement "{\n    safefree(e);\n  }" { (expression_statement "safefree(e);" (call_expression "safefree(e)" identifier (argument_list "(e)" ( identifier ))) ;) }))) (expression_statement "puVar1 = (undefined4 *)index234(timers,0);" (assignment_expression "puVar1 = (undefined4 *)index234(timers,0)" identifier = (cast_expression "(undefined4 *)index234(timers,0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "index234(timers,0)" identifier (argument_list "(timers,0)" ( identifier , number_literal ))))) ;) (if_statement "if (e != puVar1) {\n    return uVar2;\n  }" if (parenthesized_expression "(e != puVar1)" ( (binary_expression "e != puVar1" identifier != identifier) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) (expression_statement "timer_change_notify(e[2]);" (call_expression "timer_change_notify(e[2])" identifier (argument_list "(e[2])" ( (subscript_expression "e[2]" identifier [ number_literal ]) ))) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "int FUN_0003dd70(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  if (DAT_0006f22c == 0) {\n    FUN_0003dd20();\n  }\n  DAT_0006f224 = FUN_000416f0();\n  iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);\n  puVar1 = (undefined4 *)FUN_00019880(1,0x10);\n  puVar1[2] = iVar3;\n  *puVar1 = param_2;\n  puVar1[1] = param_3;\n  puVar1[3] = DAT_0006f224;\n  puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);\n  if (puVar2 == puVar1) {\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }\n  else {\n    FUN_0001a110(puVar1);\n  }\n  puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);\n  if (puVar1 != puVar2) {\n    return iVar3;\n  }\n  FUN_000407b0(puVar1[2]);\n  return iVar3;\n}\n\n" (function_definition "int FUN_0003dd70(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  if (DAT_0006f22c == 0) {\n    FUN_0003dd20();\n  }\n  DAT_0006f224 = FUN_000416f0();\n  iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);\n  puVar1 = (undefined4 *)FUN_00019880(1,0x10);\n  puVar1[2] = iVar3;\n  *puVar1 = param_2;\n  puVar1[1] = param_3;\n  puVar1[3] = DAT_0006f224;\n  puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);\n  if (puVar2 == puVar1) {\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }\n  else {\n    FUN_0001a110(puVar1);\n  }\n  puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);\n  if (puVar1 != puVar2) {\n    return iVar3;\n  }\n  FUN_000407b0(puVar1[2]);\n  return iVar3;\n}" primitive_type (function_declarator "FUN_0003dd70(int param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  if (DAT_0006f22c == 0) {\n    FUN_0003dd20();\n  }\n  DAT_0006f224 = FUN_000416f0();\n  iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);\n  puVar1 = (undefined4 *)FUN_00019880(1,0x10);\n  puVar1[2] = iVar3;\n  *puVar1 = param_2;\n  puVar1[1] = param_3;\n  puVar1[3] = DAT_0006f224;\n  puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);\n  if (puVar2 == puVar1) {\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }\n  else {\n    FUN_0001a110(puVar1);\n  }\n  puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);\n  if (puVar1 != puVar2) {\n    return iVar3;\n  }\n  FUN_000407b0(puVar1[2]);\n  return iVar3;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if (DAT_0006f22c == 0) {\n    FUN_0003dd20();\n  }" if (parenthesized_expression "(DAT_0006f22c == 0)" ( (binary_expression "DAT_0006f22c == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_0003dd20();\n  }" { (expression_statement "FUN_0003dd20();" (call_expression "FUN_0003dd20()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "DAT_0006f224 = FUN_000416f0();" (assignment_expression "DAT_0006f224 = FUN_000416f0()" identifier = (call_expression "FUN_000416f0()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);" (assignment_expression "iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224)" identifier = (binary_expression "param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224)" (binary_expression "param_1 + DAT_0006f224" identifier + identifier) + (call_expression "(uint)(DAT_0006f224 == param_1 + DAT_0006f224)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(DAT_0006f224 == param_1 + DAT_0006f224)" ( (binary_expression "DAT_0006f224 == param_1 + DAT_0006f224" identifier == (binary_expression "param_1 + DAT_0006f224" identifier + identifier)) ))))) ;) (expression_statement "puVar1 = (undefined4 *)FUN_00019880(1,0x10);" (assignment_expression "puVar1 = (undefined4 *)FUN_00019880(1,0x10)" identifier = (cast_expression "(undefined4 *)FUN_00019880(1,0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00019880(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar1[2] = iVar3;" (assignment_expression "puVar1[2] = iVar3" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "puVar1[1] = param_3;" (assignment_expression "puVar1[1] = param_3" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[3] = DAT_0006f224;" (assignment_expression "puVar1[3] = DAT_0006f224" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);" (assignment_expression "puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1)" identifier = (cast_expression "(undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003efa0(DAT_0006f22c,puVar1)" identifier (argument_list "(DAT_0006f22c,puVar1)" ( identifier , identifier ))))) ;) (if_statement "if (puVar2 == puVar1) {\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }\n  else {\n    FUN_0001a110(puVar1);\n  }" if (parenthesized_expression "(puVar2 == puVar1)" ( (binary_expression "puVar2 == puVar1" identifier == identifier) )) (compound_statement "{\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }" { (expression_statement "FUN_0003efa0(DAT_0006f228,puVar1[1]);" (call_expression "FUN_0003efa0(DAT_0006f228,puVar1[1])" identifier (argument_list "(DAT_0006f228,puVar1[1])" ( identifier , (subscript_expression "puVar1[1]" identifier [ number_literal ]) ))) ;) }) (else_clause "else {\n    FUN_0001a110(puVar1);\n  }" else (compound_statement "{\n    FUN_0001a110(puVar1);\n  }" { (expression_statement "FUN_0001a110(puVar1);" (call_expression "FUN_0001a110(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) }))) (expression_statement "puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);" (assignment_expression "puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0)" identifier = (cast_expression "(undefined4 *)FUN_0003f000(DAT_0006f22c,0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003f000(DAT_0006f22c,0)" identifier (argument_list "(DAT_0006f22c,0)" ( identifier , number_literal ))))) ;) (if_statement "if (puVar1 != puVar2) {\n    return iVar3;\n  }" if (parenthesized_expression "(puVar1 != puVar2)" ( (binary_expression "puVar1 != puVar2" identifier != identifier) )) (compound_statement "{\n    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) })) (expression_statement "FUN_000407b0(puVar1[2]);" (call_expression "FUN_000407b0(puVar1[2])" identifier (argument_list "(puVar1[2])" ( (subscript_expression "puVar1[2]" identifier [ number_literal ]) ))) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == (binary_expression IDENT + IDENT)) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_0003dd70(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  if (DAT_0006f22c == 0) {\n    FUN_0003dd20();\n  }\n  DAT_0006f224 = FUN_000416f0();\n  iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);\n  puVar1 = (undefined4 *)FUN_00019880(1,0x10);\n  puVar1[2] = iVar3;\n  *puVar1 = param_2;\n  puVar1[1] = param_3;\n  puVar1[3] = DAT_0006f224;\n  puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);\n  if (puVar2 == puVar1) {\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }\n  else {\n    FUN_0001a110(puVar1);\n  }\n  puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);\n  if (puVar1 != puVar2) {\n    return iVar3;\n  }\n  FUN_000407b0(puVar1[2]);\n  return iVar3;\n}" (primitive_type "int") (function_declarator "FUN_0003dd70(int param_1,undefined4 param_2,undefined4 param_3)" (identifier "FUN_0003dd70") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  \n  if (DAT_0006f22c == 0) {\n    FUN_0003dd20();\n  }\n  DAT_0006f224 = FUN_000416f0();\n  iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);\n  puVar1 = (undefined4 *)FUN_00019880(1,0x10);\n  puVar1[2] = iVar3;\n  *puVar1 = param_2;\n  puVar1[1] = param_3;\n  puVar1[3] = DAT_0006f224;\n  puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);\n  if (puVar2 == puVar1) {\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }\n  else {\n    FUN_0001a110(puVar1);\n  }\n  puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);\n  if (puVar1 != puVar2) {\n    return iVar3;\n  }\n  FUN_000407b0(puVar1[2]);\n  return iVar3;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (if_statement "if (DAT_0006f22c == 0) {\n    FUN_0003dd20();\n  }" (if "if") (parenthesized_expression "(DAT_0006f22c == 0)" (( "(") (binary_expression "DAT_0006f22c == 0" (identifier "DAT_0006f22c") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0003dd20();\n  }" ({ "{") (expression_statement "FUN_0003dd20();" (call_expression "FUN_0003dd20()" (identifier "FUN_0003dd20") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "DAT_0006f224 = FUN_000416f0();" (assignment_expression "DAT_0006f224 = FUN_000416f0()" (identifier "DAT_0006f224") (= "=") (call_expression "FUN_000416f0()" (identifier "FUN_000416f0") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);" (assignment_expression "iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224)" (identifier "iVar3") (= "=") (binary_expression "param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224)" (binary_expression "param_1 + DAT_0006f224" (identifier "param_1") (+ "+") (identifier "DAT_0006f224")) (+ "+") (call_expression "(uint)(DAT_0006f224 == param_1 + DAT_0006f224)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(DAT_0006f224 == param_1 + DAT_0006f224)" (( "(") (binary_expression "DAT_0006f224 == param_1 + DAT_0006f224" (identifier "DAT_0006f224") (== "==") (binary_expression "param_1 + DAT_0006f224" (identifier "param_1") (+ "+") (identifier "DAT_0006f224"))) () ")"))))) (; ";")) (expression_statement "puVar1 = (undefined4 *)FUN_00019880(1,0x10);" (assignment_expression "puVar1 = (undefined4 *)FUN_00019880(1,0x10)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)FUN_00019880(1,0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00019880(1,0x10)" (identifier "FUN_00019880") (argument_list "(1,0x10)" (( "(") (number_literal "1") (, ",") (number_literal "0x10") () ")"))))) (; ";")) (expression_statement "puVar1[2] = iVar3;" (assignment_expression "puVar1[2] = iVar3" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "puVar1[1] = param_3;" (assignment_expression "puVar1[1] = param_3" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "puVar1[3] = DAT_0006f224;" (assignment_expression "puVar1[3] = DAT_0006f224" (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "DAT_0006f224")) (; ";")) (expression_statement "puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);" (assignment_expression "puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0003efa0(DAT_0006f22c,puVar1)" (identifier "FUN_0003efa0") (argument_list "(DAT_0006f22c,puVar1)" (( "(") (identifier "DAT_0006f22c") (, ",") (identifier "puVar1") () ")"))))) (; ";")) (if_statement "if (puVar2 == puVar1) {\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }\n  else {\n    FUN_0001a110(puVar1);\n  }" (if "if") (parenthesized_expression "(puVar2 == puVar1)" (( "(") (binary_expression "puVar2 == puVar1" (identifier "puVar2") (== "==") (identifier "puVar1")) () ")")) (compound_statement "{\n    FUN_0003efa0(DAT_0006f228,puVar1[1]);\n  }" ({ "{") (expression_statement "FUN_0003efa0(DAT_0006f228,puVar1[1]);" (call_expression "FUN_0003efa0(DAT_0006f228,puVar1[1])" (identifier "FUN_0003efa0") (argument_list "(DAT_0006f228,puVar1[1])" (( "(") (identifier "DAT_0006f228") (, ",") (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) () ")"))) (; ";")) (} "}")) (else_clause "else {\n    FUN_0001a110(puVar1);\n  }" (else "else") (compound_statement "{\n    FUN_0001a110(puVar1);\n  }" ({ "{") (expression_statement "FUN_0001a110(puVar1);" (call_expression "FUN_0001a110(puVar1)" (identifier "FUN_0001a110") (argument_list "(puVar1)" (( "(") (identifier "puVar1") () ")"))) (; ";")) (} "}")))) (expression_statement "puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);" (assignment_expression "puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)FUN_0003f000(DAT_0006f22c,0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0003f000(DAT_0006f22c,0)" (identifier "FUN_0003f000") (argument_list "(DAT_0006f22c,0)" (( "(") (identifier "DAT_0006f22c") (, ",") (number_literal "0") () ")"))))) (; ";")) (if_statement "if (puVar1 != puVar2) {\n    return iVar3;\n  }" (if "if") (parenthesized_expression "(puVar1 != puVar2)" (( "(") (binary_expression "puVar1 != puVar2" (identifier "puVar1") (!= "!=") (identifier "puVar2")) () ")")) (compound_statement "{\n    return iVar3;\n  }" ({ "{") (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}"))) (expression_statement "FUN_000407b0(puVar1[2]);" (call_expression "FUN_000407b0(puVar1[2])" (identifier "FUN_000407b0") (argument_list "(puVar1[2])" (( "(") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) () ")"))) (; ";")) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))

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

type_1 function_1(int var_4,type_2 fn,void *ctx)

{
  type_3 *var_9;
  type_3 *var_8;
  type_1 uVar2;
  
  if (var_1 == (type_4 *)0x0) {
    var_2();
  }
  var_5 = var_3();
  uVar2 = var_4 + var_5 + (uint)(var_5 == var_4 + var_5);
  var_9 = (type_3 *)var_6(1,0x10);
  var_9[2] = uVar2;
  *var_9 = fn;
  var_9[1] = ctx;
  var_9[3] = var_5;
  var_8 = (type_3 *)var_7(var_1,var_9);
  if (var_8 == var_9) {
    var_7(timer_contexts,(void *)var_9[1]);
  }
  else {
    var_10(var_9);
  }
  var_8 = (type_3 *)var_11(var_1,0);
  if (var_9 != var_8) {
    return uVar2;
  }
  var_12(var_9[2]);
  return uVar2;
}


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

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

int MASKED(int param_1,undefined4 param_2,undefined4 param_3)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  int iVar3;
  
  if (DAT_0006f22c == 0) {
    FUN_0003dd20();
  }
  DAT_0006f224 = FUN_000416f0();
  iVar3 = param_1 + DAT_0006f224 + (uint)(DAT_0006f224 == param_1 + DAT_0006f224);
  puVar1 = (undefined4 *)FUN_00019880(1,0x10);
  puVar1[2] = iVar3;
  *puVar1 = param_2;
  puVar1[1] = param_3;
  puVar1[3] = DAT_0006f224;
  puVar2 = (undefined4 *)FUN_0003efa0(DAT_0006f22c,puVar1);
  if (puVar2 == puVar1) {
    FUN_0003efa0(DAT_0006f228,puVar1[1]);
  }
  else {
    FUN_0001a110(puVar1);
  }
  puVar2 = (undefined4 *)FUN_0003f000(DAT_0006f22c,0);
  if (puVar1 != puVar2) {
    return iVar3;
  }
  FUN_000407b0(puVar1[2]);
  return iVar3;
}

