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

int sha1_verify(void *handle,uchar *blk,int len,ulong seq)

{
  int iVar1;
  int iVar2;
  undefined4 *puVar3;
  SHA_State *pSVar4;
  uint32 *puVar5;
  undefined4 *puVar6;
  SHA_State *pSVar7;
  int in_GS_OFFSET;
  byte bVar8;
  SHA_State s;
  uchar seqbuf [4];
  uchar correct [20];
  uchar intermediate [20];
  
  bVar8 = 0;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  puVar3 = (undefined4 *)handle;
  puVar6 = (undefined4 *)((int)handle + 0xc0);
  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {
    *puVar6 = *puVar3;
    puVar3 = puVar3 + 1;
    puVar6 = puVar6 + 1;
  }
  pSVar4 = (SHA_State *)((int)handle + 0xc0);
  seqbuf = (uchar  [4])(seq >> 0x18 | (seq & 0xff0000) >> 8 | (seq & 0xff00) << 8 | seq << 0x18);
  SHA_Bytes(pSVar4,seqbuf,4);
  SHA_Bytes(pSVar4,blk,len);
  pSVar7 = &s;
  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {
    pSVar7->h[0] = pSVar4->h[0];
    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);
    pSVar7 = (SHA_State *)((int)pSVar7 + (uint)bVar8 * -8 + 4);
  }
  SHA_Final(&s,intermediate);
  puVar5 = (uint32 *)((int)handle + 0x60);
  pSVar4 = &s;
  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {
    pSVar4->h[0] = *puVar5;
    puVar5 = puVar5 + (uint)bVar8 * -2 + 1;
    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);
  }
  SHA_Bytes(&s,intermediate,0x14);
  SHA_Final(&s,correct);
  iVar2 = smemeq(correct,blk + len,0x14);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void FUN_00043770(undefined4 *param_1,int param_2,int param_3,uint param_4)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  int in_GS_OFFSET;
  byte bVar4;
  undefined4 local_ac [24];
  uint local_4c;
  undefined1 local_48 [20];
  undefined1 local_34 [20];
  int local_20;
  
  bVar4 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  puVar2 = param_1;
  puVar3 = param_1 + 0x30;
  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {
    *puVar3 = *puVar2;
    puVar2 = puVar2 + 1;
    puVar3 = puVar3 + 1;
  }
  puVar2 = param_1 + 0x30;
  local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18
  ;
  FUN_000428e0(puVar2,&local_4c,4);
  FUN_000428e0(puVar2,param_2,param_3);
  puVar3 = local_ac;
  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {
    *puVar3 = *puVar2;
    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;
    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;
  }
  FUN_00042dd0(local_ac,local_34);
  puVar2 = param_1 + 0x18;
  puVar3 = local_ac;
  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {
    *puVar3 = *puVar2;
    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;
    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;
  }
  FUN_000428e0(local_ac,local_34,0x14);
  FUN_00042dd0(local_ac,local_48);
  FUN_0001f2b0(local_48,param_2 + param_3,0x14);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0004d450();
}


CALL 0x000225b2
ADD EAX,0x2c6ef
PUSH EBP
MOV ECX,0x18
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0xb0
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,dword ptr [ESP + 0xc4]
MOV EBP,dword ptr [ESP + 0xc8]
LEA EDI,[EAX + 0xc0]
MOV ESI,EAX
MOV EDX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0xa0],EDX
XOR EDX,EDX
MOV EDX,dword ptr [ESP + 0xd0]
MOV dword ptr [ESP + 0x10],EAX
MOVSD.REP ES:EDI,ESI
LEA ESI,[EAX + 0xc0]
BSWAP EDX
MOV dword ptr [ESP + 0x74],EDX
PUSH 0x4
LEA EDX,[ESP + 0x78]
PUSH EDX
PUSH ESI
CALL 0x000428e0
ADD ESP,0xc
PUSH dword ptr [ESP + 0xcc]
MOV dword ptr [ESP + 0xc],EBP
PUSH EBP
PUSH ESI
CALL 0x000428e0
LEA EDI,[ESP + 0x20]
MOV ECX,0x18
MOVSD.REP ES:EDI,ESI
POP EAX
POP EDX
LEA EBP,[ESP + 0x90]
PUSH EBP
LEA EBX,[ESP + 0x1c]
PUSH EBX
MOV EDI,EBX
CALL 0x00042dd0
MOV EAX,dword ptr [ESP + 0x1c]
ADD ESP,0xc
MOV ECX,0x18
LEA ESI,[EAX + 0x60]
MOVSD.REP ES:EDI,ESI
PUSH 0x14
PUSH EBP
PUSH EBX
CALL 0x000428e0
POP ECX
POP ESI
LEA ESI,[ESP + 0x7c]
PUSH ESI
PUSH EBX
CALL 0x00042dd0
ADD ESP,0xc
PUSH 0x14
MOV EAX,dword ptr [ESP + 0xc]
ADD EAX,dword ptr [ESP + 0xd0]
PUSH EAX
PUSH ESI
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x0001f2b0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x9c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x0004386f
ADD ESP,0xac
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x0004d450
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nvoid FUN_00043770(undefined4 *param_1,int param_2,int param_3,uint param_4)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  byte bVar4;\n  undefined4 local_ac [24];\n  uint local_4c;\n  undefined1 local_48 [20];\n  undefined1 local_34 [20];\n  int local_20;\n  \n  bVar4 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = param_1;\n  puVar3 = param_1 + 0x30;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }\n  puVar2 = param_1 + 0x30;\n  local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18\n  ;\n  FUN_000428e0(puVar2,&local_4c,4);\n  FUN_000428e0(puVar2,param_2,param_3);\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_00042dd0(local_ac,local_34);\n  puVar2 = param_1 + 0x18;\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_000428e0(local_ac,local_34,0x14);\n  FUN_00042dd0(local_ac,local_48);\n  FUN_0001f2b0(local_48,param_2 + param_3,0x14);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0004d450();\n}\n\n" comment (function_definition "void FUN_00043770(undefined4 *param_1,int param_2,int param_3,uint param_4)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  byte bVar4;\n  undefined4 local_ac [24];\n  uint local_4c;\n  undefined1 local_48 [20];\n  undefined1 local_34 [20];\n  int local_20;\n  \n  bVar4 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = param_1;\n  puVar3 = param_1 + 0x30;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }\n  puVar2 = param_1 + 0x30;\n  local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18\n  ;\n  FUN_000428e0(puVar2,&local_4c,4);\n  FUN_000428e0(puVar2,param_2,param_3);\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_00042dd0(local_ac,local_34);\n  puVar2 = param_1 + 0x18;\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_000428e0(local_ac,local_34,0x14);\n  FUN_00042dd0(local_ac,local_48);\n  FUN_0001f2b0(local_48,param_2 + param_3,0x14);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0004d450();\n}" primitive_type (function_declarator "FUN_00043770(undefined4 *param_1,int param_2,int param_3,uint param_4)" identifier (parameter_list "(undefined4 *param_1,int param_2,int param_3,uint param_4)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  byte bVar4;\n  undefined4 local_ac [24];\n  uint local_4c;\n  undefined1 local_48 [20];\n  undefined1 local_34 [20];\n  int local_20;\n  \n  bVar4 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = param_1;\n  puVar3 = param_1 + 0x30;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }\n  puVar2 = param_1 + 0x30;\n  local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18\n  ;\n  FUN_000428e0(puVar2,&local_4c,4);\n  FUN_000428e0(puVar2,param_2,param_3);\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_00042dd0(local_ac,local_34);\n  puVar2 = param_1 + 0x18;\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_000428e0(local_ac,local_34,0x14);\n  FUN_00042dd0(local_ac,local_48);\n  FUN_0001f2b0(local_48,param_2 + param_3,0x14);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0004d450();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "undefined4 local_ac [24];" type_identifier (array_declarator "local_ac [24]" identifier [ number_literal ]) ;) (declaration "uint local_4c;" type_identifier identifier ;) (declaration "undefined1 local_48 [20];" type_identifier (array_declarator "local_48 [20]" identifier [ number_literal ]) ;) (declaration "undefined1 local_34 [20];" type_identifier (array_declarator "local_34 [20]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "bVar4 = 0;" (assignment_expression "bVar4 = 0" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar2 = param_1;" (assignment_expression "puVar2 = param_1" identifier = identifier) ;) (expression_statement "puVar3 = param_1 + 0x30;" (assignment_expression "puVar3 = param_1 + 0x30" identifier = (binary_expression "param_1 + 0x30" identifier + number_literal)) ;) (for_statement "for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }" for ( (assignment_expression "iVar1 = 0x18" identifier = number_literal) ; (binary_expression "iVar1 != 0" identifier != number_literal) ; (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }" { (expression_statement "*puVar3 = *puVar2;" (assignment_expression "*puVar3 = *puVar2" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*puVar2" * identifier)) ;) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) (expression_statement "puVar3 = puVar3 + 1;" (assignment_expression "puVar3 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "puVar2 = param_1 + 0x30;" (assignment_expression "puVar2 = param_1 + 0x30" identifier = (binary_expression "param_1 + 0x30" identifier + number_literal)) ;) (expression_statement "local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18\n  ;" (assignment_expression "local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18" identifier = (binary_expression "param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18" (binary_expression "param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8" (binary_expression "param_4 >> 0x18 | (param_4 & 0xff0000) >> 8" (binary_expression "param_4 >> 0x18" identifier >> number_literal) | (binary_expression "(param_4 & 0xff0000) >> 8" (parenthesized_expression "(param_4 & 0xff0000)" ( (binary_expression "param_4 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_4 & 0xff00) << 8" (parenthesized_expression "(param_4 & 0xff00)" ( (binary_expression "param_4 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_4 << 0x18" identifier << number_literal))) ;) (expression_statement "FUN_000428e0(puVar2,&local_4c,4);" (call_expression "FUN_000428e0(puVar2,&local_4c,4)" identifier (argument_list "(puVar2,&local_4c,4)" ( identifier , (pointer_expression "&local_4c" & identifier) , number_literal ))) ;) (expression_statement "FUN_000428e0(puVar2,param_2,param_3);" (call_expression "FUN_000428e0(puVar2,param_2,param_3)" identifier (argument_list "(puVar2,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "puVar3 = local_ac;" (assignment_expression "puVar3 = local_ac" identifier = identifier) ;) (for_statement "for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" for ( (assignment_expression "iVar1 = 0x18" identifier = number_literal) ; (binary_expression "iVar1 != 0" identifier != number_literal) ; (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" { (expression_statement "*puVar3 = *puVar2;" (assignment_expression "*puVar3 = *puVar2" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*puVar2" * identifier)) ;) (expression_statement "puVar2 = puVar2 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar2 = puVar2 + (uint)bVar4 * -2 + 1" identifier = (binary_expression "puVar2 + (uint)bVar4 * -2 + 1" (binary_expression "puVar2 + (uint)bVar4 * -2" identifier + (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "puVar3 = puVar3 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar3 = puVar3 + (uint)bVar4 * -2 + 1" identifier = (binary_expression "puVar3 + (uint)bVar4 * -2 + 1" (binary_expression "puVar3 + (uint)bVar4 * -2" identifier + (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "FUN_00042dd0(local_ac,local_34);" (call_expression "FUN_00042dd0(local_ac,local_34)" identifier (argument_list "(local_ac,local_34)" ( identifier , identifier ))) ;) (expression_statement "puVar2 = param_1 + 0x18;" (assignment_expression "puVar2 = param_1 + 0x18" identifier = (binary_expression "param_1 + 0x18" identifier + number_literal)) ;) (expression_statement "puVar3 = local_ac;" (assignment_expression "puVar3 = local_ac" identifier = identifier) ;) (for_statement "for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" for ( (assignment_expression "iVar1 = 0x18" identifier = number_literal) ; (binary_expression "iVar1 != 0" identifier != number_literal) ; (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" { (expression_statement "*puVar3 = *puVar2;" (assignment_expression "*puVar3 = *puVar2" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*puVar2" * identifier)) ;) (expression_statement "puVar2 = puVar2 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar2 = puVar2 + (uint)bVar4 * -2 + 1" identifier = (binary_expression "puVar2 + (uint)bVar4 * -2 + 1" (binary_expression "puVar2 + (uint)bVar4 * -2" identifier + (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "puVar3 = puVar3 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar3 = puVar3 + (uint)bVar4 * -2 + 1" identifier = (binary_expression "puVar3 + (uint)bVar4 * -2 + 1" (binary_expression "puVar3 + (uint)bVar4 * -2" identifier + (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "FUN_000428e0(local_ac,local_34,0x14);" (call_expression "FUN_000428e0(local_ac,local_34,0x14)" identifier (argument_list "(local_ac,local_34,0x14)" ( identifier , identifier , number_literal ))) ;) (expression_statement "FUN_00042dd0(local_ac,local_48);" (call_expression "FUN_00042dd0(local_ac,local_48)" identifier (argument_list "(local_ac,local_48)" ( identifier , identifier ))) ;) (expression_statement "FUN_0001f2b0(local_48,param_2 + param_3,0x14);" (call_expression "FUN_0001f2b0(local_48,param_2 + param_3,0x14)" identifier (argument_list "(local_48,param_2 + param_3,0x14)" ( identifier , (binary_expression "param_2 + param_3" identifier + identifier) , number_literal ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_0004d450();" (call_expression "FUN_0004d450()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n/* WARNING: Unknown calling convention */\n\nint sha1_verify(void *handle,uchar *blk,int len,ulong seq)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  SHA_State *pSVar4;\n  uint32 *puVar5;\n  undefined4 *puVar6;\n  SHA_State *pSVar7;\n  int in_GS_OFFSET;\n  byte bVar8;\n  SHA_State s;\n  uchar seqbuf [4];\n  uchar correct [20];\n  uchar intermediate [20];\n  \n  bVar8 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (undefined4 *)handle;\n  puVar6 = (undefined4 *)((int)handle + 0xc0);\n  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    *puVar6 = *puVar3;\n    puVar3 = puVar3 + 1;\n    puVar6 = puVar6 + 1;\n  }\n  pSVar4 = (SHA_State *)((int)handle + 0xc0);\n  seqbuf = (uchar  [4])(seq >> 0x18 | (seq & 0xff0000) >> 8 | (seq & 0xff00) << 8 | seq << 0x18);\n  SHA_Bytes(pSVar4,seqbuf,4);\n  SHA_Bytes(pSVar4,blk,len);\n  pSVar7 = &s;\n  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    pSVar7->h[0] = pSVar4->h[0];\n    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);\n    pSVar7 = (SHA_State *)((int)pSVar7 + (uint)bVar8 * -8 + 4);\n  }\n  SHA_Final(&s,intermediate);\n  puVar5 = (uint32 *)((int)handle + 0x60);\n  pSVar4 = &s;\n  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    pSVar4->h[0] = *puVar5;\n    puVar5 = puVar5 + (uint)bVar8 * -2 + 1;\n    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);\n  }\n  SHA_Bytes(&s,intermediate,0x14);\n  SHA_Final(&s,correct);\n  iVar2 = smemeq(correct,blk + len,0x14);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "int sha1_verify(void *handle,uchar *blk,int len,ulong seq)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  SHA_State *pSVar4;\n  uint32 *puVar5;\n  undefined4 *puVar6;\n  SHA_State *pSVar7;\n  int in_GS_OFFSET;\n  byte bVar8;\n  SHA_State s;\n  uchar seqbuf [4];\n  uchar correct [20];\n  uchar intermediate [20];\n  \n  bVar8 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (undefined4 *)handle;\n  puVar6 = (undefined4 *)((int)handle + 0xc0);\n  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    *puVar6 = *puVar3;\n    puVar3 = puVar3 + 1;\n    puVar6 = puVar6 + 1;\n  }\n  pSVar4 = (SHA_State *)((int)handle + 0xc0);\n  seqbuf = (uchar  [4])(seq >> 0x18 | (seq & 0xff0000) >> 8 | (seq & 0xff00) << 8 | seq << 0x18);\n  SHA_Bytes(pSVar4,seqbuf,4);\n  SHA_Bytes(pSVar4,blk,len);\n  pSVar7 = &s;\n  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    pSVar7->h[0] = pSVar4->h[0];\n    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);\n    pSVar7 = (SHA_State *)((int)pSVar7 + (uint)bVar8 * -8 + 4);\n  }\n  SHA_Final(&s,intermediate);\n  puVar5 = (uint32 *)((int)handle + 0x60);\n  pSVar4 = &s;\n  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    pSVar4->h[0] = *puVar5;\n    puVar5 = puVar5 + (uint)bVar8 * -2 + 1;\n    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);\n  }\n  SHA_Bytes(&s,intermediate,0x14);\n  SHA_Final(&s,correct);\n  iVar2 = smemeq(correct,blk + len,0x14);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "sha1_verify(void *handle,uchar *blk,int len,ulong seq)" identifier (parameter_list "(void *handle,uchar *blk,int len,ulong seq)" ( (parameter_declaration "void *handle" primitive_type (pointer_declarator "*handle" * identifier)) , (parameter_declaration "uchar *blk" type_identifier (pointer_declarator "*blk" * identifier)) , (parameter_declaration "int len" primitive_type identifier) , (parameter_declaration "ulong seq" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  SHA_State *pSVar4;\n  uint32 *puVar5;\n  undefined4 *puVar6;\n  SHA_State *pSVar7;\n  int in_GS_OFFSET;\n  byte bVar8;\n  SHA_State s;\n  uchar seqbuf [4];\n  uchar correct [20];\n  uchar intermediate [20];\n  \n  bVar8 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (undefined4 *)handle;\n  puVar6 = (undefined4 *)((int)handle + 0xc0);\n  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    *puVar6 = *puVar3;\n    puVar3 = puVar3 + 1;\n    puVar6 = puVar6 + 1;\n  }\n  pSVar4 = (SHA_State *)((int)handle + 0xc0);\n  seqbuf = (uchar  [4])(seq >> 0x18 | (seq & 0xff0000) >> 8 | (seq & 0xff00) << 8 | seq << 0x18);\n  SHA_Bytes(pSVar4,seqbuf,4);\n  SHA_Bytes(pSVar4,blk,len);\n  pSVar7 = &s;\n  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    pSVar7->h[0] = pSVar4->h[0];\n    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);\n    pSVar7 = (SHA_State *)((int)pSVar7 + (uint)bVar8 * -8 + 4);\n  }\n  SHA_Final(&s,intermediate);\n  puVar5 = (uint32 *)((int)handle + 0x60);\n  pSVar4 = &s;\n  for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    pSVar4->h[0] = *puVar5;\n    puVar5 = puVar5 + (uint)bVar8 * -2 + 1;\n    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);\n  }\n  SHA_Bytes(&s,intermediate,0x14);\n  SHA_Final(&s,correct);\n  iVar2 = smemeq(correct,blk + len,0x14);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "SHA_State *pSVar4;" type_identifier (pointer_declarator "*pSVar4" * identifier) ;) (declaration "uint32 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "SHA_State *pSVar7;" type_identifier (pointer_declarator "*pSVar7" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar8;" type_identifier identifier ;) (declaration "SHA_State s;" type_identifier identifier ;) (declaration "uchar seqbuf [4];" type_identifier (array_declarator "seqbuf [4]" identifier [ number_literal ]) ;) (declaration "uchar correct [20];" type_identifier (array_declarator "correct [20]" identifier [ number_literal ]) ;) (declaration "uchar intermediate [20];" type_identifier (array_declarator "intermediate [20]" identifier [ number_literal ]) ;) (expression_statement "bVar8 = 0;" (assignment_expression "bVar8 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = (undefined4 *)handle;" (assignment_expression "puVar3 = (undefined4 *)handle" identifier = (cast_expression "(undefined4 *)handle" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "puVar6 = (undefined4 *)((int)handle + 0xc0);" (assignment_expression "puVar6 = (undefined4 *)((int)handle + 0xc0)" identifier = (cast_expression "(undefined4 *)((int)handle + 0xc0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0xc0)" ( (binary_expression "(int)handle + 0xc0" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (for_statement "for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    *puVar6 = *puVar3;\n    puVar3 = puVar3 + 1;\n    puVar6 = puVar6 + 1;\n  }" for ( (assignment_expression "iVar2 = 0x18" identifier = number_literal) ; (binary_expression "iVar2 != 0" identifier != number_literal) ; (assignment_expression "iVar2 = iVar2 + -1" identifier = (binary_expression "iVar2 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar6 = *puVar3;\n    puVar3 = puVar3 + 1;\n    puVar6 = puVar6 + 1;\n  }" { (expression_statement "*puVar6 = *puVar3;" (assignment_expression "*puVar6 = *puVar3" (pointer_expression "*puVar6" * identifier) = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "puVar3 = puVar3 + 1;" (assignment_expression "puVar3 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) })) (expression_statement "pSVar4 = (SHA_State *)((int)handle + 0xc0);" (assignment_expression "pSVar4 = (SHA_State *)((int)handle + 0xc0)" identifier = (cast_expression "(SHA_State *)((int)handle + 0xc0)" ( (type_descriptor "SHA_State *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0xc0)" ( (binary_expression "(int)handle + 0xc0" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "seqbuf = (uchar  [4])(seq >> 0x18 | (seq & 0xff0000) >> 8 | (seq & 0xff00) << 8 | seq << 0x18);" (assignment_expression "seqbuf = (uchar  [4])(seq >> 0x18 | (seq & 0xff0000) >> 8 | (seq & 0xff00) << 8 | seq << 0x18)" identifier = (call_expression "(uchar  [4])(seq >> 0x18 | (seq & 0xff0000) >> 8 | (seq & 0xff00) << 8 | seq << 0x18)" (parenthesized_expression "(uchar  [4])" ( (subscript_expression "uchar  [4]" identifier [ number_literal ]) )) (argument_list "(seq >> 0x18 | (seq & 0xff0000) >> 8 | (seq & 0xff00) << 8 | seq << 0x18)" ( (binary_expression "seq >> 0x18 | (seq & 0xff0000) >> 8 | (seq & 0xff00) << 8 | seq << 0x18" (binary_expression "seq >> 0x18 | (seq & 0xff0000) >> 8 | (seq & 0xff00) << 8" (binary_expression "seq >> 0x18 | (seq & 0xff0000) >> 8" (binary_expression "seq >> 0x18" identifier >> number_literal) | (binary_expression "(seq & 0xff0000) >> 8" (parenthesized_expression "(seq & 0xff0000)" ( (binary_expression "seq & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(seq & 0xff00) << 8" (parenthesized_expression "(seq & 0xff00)" ( (binary_expression "seq & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "seq << 0x18" identifier << number_literal)) )))) ;) (expression_statement "SHA_Bytes(pSVar4,seqbuf,4);" (call_expression "SHA_Bytes(pSVar4,seqbuf,4)" identifier (argument_list "(pSVar4,seqbuf,4)" ( identifier , identifier , number_literal ))) ;) (expression_statement "SHA_Bytes(pSVar4,blk,len);" (call_expression "SHA_Bytes(pSVar4,blk,len)" identifier (argument_list "(pSVar4,blk,len)" ( identifier , identifier , identifier ))) ;) (expression_statement "pSVar7 = &s;" (assignment_expression "pSVar7 = &s" identifier = (pointer_expression "&s" & identifier)) ;) (for_statement "for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    pSVar7->h[0] = pSVar4->h[0];\n    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);\n    pSVar7 = (SHA_State *)((int)pSVar7 + (uint)bVar8 * -8 + 4);\n  }" for ( (assignment_expression "iVar2 = 0x18" identifier = number_literal) ; (binary_expression "iVar2 != 0" identifier != number_literal) ; (assignment_expression "iVar2 = iVar2 + -1" identifier = (binary_expression "iVar2 + -1" identifier + number_literal)) ) (compound_statement "{\n    pSVar7->h[0] = pSVar4->h[0];\n    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);\n    pSVar7 = (SHA_State *)((int)pSVar7 + (uint)bVar8 * -8 + 4);\n  }" { (expression_statement "pSVar7->h[0] = pSVar4->h[0];" (assignment_expression "pSVar7->h[0] = pSVar4->h[0]" (subscript_expression "pSVar7->h[0]" (field_expression "pSVar7->h" identifier -> field_identifier) [ number_literal ]) = (subscript_expression "pSVar4->h[0]" (field_expression "pSVar4->h" identifier -> field_identifier) [ number_literal ])) ;) (expression_statement "pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);" (assignment_expression "pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4)" identifier = (cast_expression "(SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4)" ( (type_descriptor "SHA_State *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pSVar4 + (uint)bVar8 * -8 + 4)" ( (binary_expression "(int)pSVar4 + (uint)bVar8 * -8 + 4" (binary_expression "(int)pSVar4 + (uint)bVar8 * -8" (cast_expression "(int)pSVar4" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "(uint)bVar8 * -8" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal) )))) ;) (expression_statement "pSVar7 = (SHA_State *)((int)pSVar7 + (uint)bVar8 * -8 + 4);" (assignment_expression "pSVar7 = (SHA_State *)((int)pSVar7 + (uint)bVar8 * -8 + 4)" identifier = (cast_expression "(SHA_State *)((int)pSVar7 + (uint)bVar8 * -8 + 4)" ( (type_descriptor "SHA_State *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pSVar7 + (uint)bVar8 * -8 + 4)" ( (binary_expression "(int)pSVar7 + (uint)bVar8 * -8 + 4" (binary_expression "(int)pSVar7 + (uint)bVar8 * -8" (cast_expression "(int)pSVar7" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "(uint)bVar8 * -8" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal) )))) ;) })) (expression_statement "SHA_Final(&s,intermediate);" (call_expression "SHA_Final(&s,intermediate)" identifier (argument_list "(&s,intermediate)" ( (pointer_expression "&s" & identifier) , identifier ))) ;) (expression_statement "puVar5 = (uint32 *)((int)handle + 0x60);" (assignment_expression "puVar5 = (uint32 *)((int)handle + 0x60)" identifier = (cast_expression "(uint32 *)((int)handle + 0x60)" ( (type_descriptor "uint32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x60)" ( (binary_expression "(int)handle + 0x60" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "pSVar4 = &s;" (assignment_expression "pSVar4 = &s" identifier = (pointer_expression "&s" & identifier)) ;) (for_statement "for (iVar2 = 0x18; iVar2 != 0; iVar2 = iVar2 + -1) {\n    pSVar4->h[0] = *puVar5;\n    puVar5 = puVar5 + (uint)bVar8 * -2 + 1;\n    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);\n  }" for ( (assignment_expression "iVar2 = 0x18" identifier = number_literal) ; (binary_expression "iVar2 != 0" identifier != number_literal) ; (assignment_expression "iVar2 = iVar2 + -1" identifier = (binary_expression "iVar2 + -1" identifier + number_literal)) ) (compound_statement "{\n    pSVar4->h[0] = *puVar5;\n    puVar5 = puVar5 + (uint)bVar8 * -2 + 1;\n    pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);\n  }" { (expression_statement "pSVar4->h[0] = *puVar5;" (assignment_expression "pSVar4->h[0] = *puVar5" (subscript_expression "pSVar4->h[0]" (field_expression "pSVar4->h" identifier -> field_identifier) [ number_literal ]) = (pointer_expression "*puVar5" * identifier)) ;) (expression_statement "puVar5 = puVar5 + (uint)bVar8 * -2 + 1;" (assignment_expression "puVar5 = puVar5 + (uint)bVar8 * -2 + 1" identifier = (binary_expression "puVar5 + (uint)bVar8 * -2 + 1" (binary_expression "puVar5 + (uint)bVar8 * -2" identifier + (binary_expression "(uint)bVar8 * -2" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4);" (assignment_expression "pSVar4 = (SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4)" identifier = (cast_expression "(SHA_State *)((int)pSVar4 + (uint)bVar8 * -8 + 4)" ( (type_descriptor "SHA_State *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pSVar4 + (uint)bVar8 * -8 + 4)" ( (binary_expression "(int)pSVar4 + (uint)bVar8 * -8 + 4" (binary_expression "(int)pSVar4 + (uint)bVar8 * -8" (cast_expression "(int)pSVar4" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "(uint)bVar8 * -8" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal) )))) ;) })) (expression_statement "SHA_Bytes(&s,intermediate,0x14);" (call_expression "SHA_Bytes(&s,intermediate,0x14)" identifier (argument_list "(&s,intermediate,0x14)" ( (pointer_expression "&s" & identifier) , identifier , number_literal ))) ;) (expression_statement "SHA_Final(&s,correct);" (call_expression "SHA_Final(&s,correct)" identifier (argument_list "(&s,correct)" ( (pointer_expression "&s" & identifier) , identifier ))) ;) (expression_statement "iVar2 = smemeq(correct,blk + len,0x14);" (assignment_expression "iVar2 = smemeq(correct,blk + len,0x14)" identifier = (call_expression "smemeq(correct,blk + len,0x14)" identifier (argument_list "(correct,blk + len,0x14)" ( identifier , (binary_expression "blk + len" identifier + identifier) , number_literal )))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_00043770(undefined4 *param_1,int param_2,int param_3,uint param_4)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  byte bVar4;\n  undefined4 local_ac [24];\n  uint local_4c;\n  undefined1 local_48 [20];\n  undefined1 local_34 [20];\n  int local_20;\n  \n  bVar4 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = param_1;\n  puVar3 = param_1 + 0x30;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }\n  puVar2 = param_1 + 0x30;\n  local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18\n  ;\n  FUN_000428e0(puVar2,&local_4c,4);\n  FUN_000428e0(puVar2,param_2,param_3);\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_00042dd0(local_ac,local_34);\n  puVar2 = param_1 + 0x18;\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_000428e0(local_ac,local_34,0x14);\n  FUN_00042dd0(local_ac,local_48);\n  FUN_0001f2b0(local_48,param_2 + param_3,0x14);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0004d450();\n}\n\n" (function_definition "void FUN_00043770(undefined4 *param_1,int param_2,int param_3,uint param_4)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  byte bVar4;\n  undefined4 local_ac [24];\n  uint local_4c;\n  undefined1 local_48 [20];\n  undefined1 local_34 [20];\n  int local_20;\n  \n  bVar4 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = param_1;\n  puVar3 = param_1 + 0x30;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }\n  puVar2 = param_1 + 0x30;\n  local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18\n  ;\n  FUN_000428e0(puVar2,&local_4c,4);\n  FUN_000428e0(puVar2,param_2,param_3);\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_00042dd0(local_ac,local_34);\n  puVar2 = param_1 + 0x18;\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_000428e0(local_ac,local_34,0x14);\n  FUN_00042dd0(local_ac,local_48);\n  FUN_0001f2b0(local_48,param_2 + param_3,0x14);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0004d450();\n}" primitive_type (function_declarator "FUN_00043770(undefined4 *param_1,int param_2,int param_3,uint param_4)" identifier (parameter_list "(undefined4 *param_1,int param_2,int param_3,uint param_4)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  byte bVar4;\n  undefined4 local_ac [24];\n  uint local_4c;\n  undefined1 local_48 [20];\n  undefined1 local_34 [20];\n  int local_20;\n  \n  bVar4 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = param_1;\n  puVar3 = param_1 + 0x30;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }\n  puVar2 = param_1 + 0x30;\n  local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18\n  ;\n  FUN_000428e0(puVar2,&local_4c,4);\n  FUN_000428e0(puVar2,param_2,param_3);\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_00042dd0(local_ac,local_34);\n  puVar2 = param_1 + 0x18;\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_000428e0(local_ac,local_34,0x14);\n  FUN_00042dd0(local_ac,local_48);\n  FUN_0001f2b0(local_48,param_2 + param_3,0x14);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0004d450();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "undefined4 local_ac [24];" type_identifier (array_declarator "local_ac [24]" identifier [ number_literal ]) ;) (declaration "uint local_4c;" type_identifier identifier ;) (declaration "undefined1 local_48 [20];" type_identifier (array_declarator "local_48 [20]" identifier [ number_literal ]) ;) (declaration "undefined1 local_34 [20];" type_identifier (array_declarator "local_34 [20]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "bVar4 = 0;" (assignment_expression "bVar4 = 0" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar2 = param_1;" (assignment_expression "puVar2 = param_1" identifier = identifier) ;) (expression_statement "puVar3 = param_1 + 0x30;" (assignment_expression "puVar3 = param_1 + 0x30" identifier = (binary_expression "param_1 + 0x30" identifier + number_literal)) ;) (for_statement "for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }" for ( (assignment_expression "iVar1 = 0x18" identifier = number_literal) ; (binary_expression "iVar1 != 0" identifier != number_literal) ; (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }" { (expression_statement "*puVar3 = *puVar2;" (assignment_expression "*puVar3 = *puVar2" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*puVar2" * identifier)) ;) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) (expression_statement "puVar3 = puVar3 + 1;" (assignment_expression "puVar3 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "puVar2 = param_1 + 0x30;" (assignment_expression "puVar2 = param_1 + 0x30" identifier = (binary_expression "param_1 + 0x30" identifier + number_literal)) ;) (expression_statement "local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18\n  ;" (assignment_expression "local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18" identifier = (binary_expression "param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18" (binary_expression "param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8" (binary_expression "param_4 >> 0x18 | (param_4 & 0xff0000) >> 8" (binary_expression "param_4 >> 0x18" identifier >> number_literal) | (binary_expression "(param_4 & 0xff0000) >> 8" (parenthesized_expression "(param_4 & 0xff0000)" ( (binary_expression "param_4 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_4 & 0xff00) << 8" (parenthesized_expression "(param_4 & 0xff00)" ( (binary_expression "param_4 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_4 << 0x18" identifier << number_literal))) ;) (expression_statement "FUN_000428e0(puVar2,&local_4c,4);" (call_expression "FUN_000428e0(puVar2,&local_4c,4)" identifier (argument_list "(puVar2,&local_4c,4)" ( identifier , (pointer_expression "&local_4c" & identifier) , number_literal ))) ;) (expression_statement "FUN_000428e0(puVar2,param_2,param_3);" (call_expression "FUN_000428e0(puVar2,param_2,param_3)" identifier (argument_list "(puVar2,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "puVar3 = local_ac;" (assignment_expression "puVar3 = local_ac" identifier = identifier) ;) (for_statement "for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" for ( (assignment_expression "iVar1 = 0x18" identifier = number_literal) ; (binary_expression "iVar1 != 0" identifier != number_literal) ; (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" { (expression_statement "*puVar3 = *puVar2;" (assignment_expression "*puVar3 = *puVar2" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*puVar2" * identifier)) ;) (expression_statement "puVar2 = puVar2 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar2 = puVar2 + (uint)bVar4 * -2 + 1" identifier = (binary_expression "puVar2 + (uint)bVar4 * -2 + 1" (binary_expression "puVar2 + (uint)bVar4 * -2" identifier + (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "puVar3 = puVar3 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar3 = puVar3 + (uint)bVar4 * -2 + 1" identifier = (binary_expression "puVar3 + (uint)bVar4 * -2 + 1" (binary_expression "puVar3 + (uint)bVar4 * -2" identifier + (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "FUN_00042dd0(local_ac,local_34);" (call_expression "FUN_00042dd0(local_ac,local_34)" identifier (argument_list "(local_ac,local_34)" ( identifier , identifier ))) ;) (expression_statement "puVar2 = param_1 + 0x18;" (assignment_expression "puVar2 = param_1 + 0x18" identifier = (binary_expression "param_1 + 0x18" identifier + number_literal)) ;) (expression_statement "puVar3 = local_ac;" (assignment_expression "puVar3 = local_ac" identifier = identifier) ;) (for_statement "for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" for ( (assignment_expression "iVar1 = 0x18" identifier = number_literal) ; (binary_expression "iVar1 != 0" identifier != number_literal) ; (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" { (expression_statement "*puVar3 = *puVar2;" (assignment_expression "*puVar3 = *puVar2" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*puVar2" * identifier)) ;) (expression_statement "puVar2 = puVar2 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar2 = puVar2 + (uint)bVar4 * -2 + 1" identifier = (binary_expression "puVar2 + (uint)bVar4 * -2 + 1" (binary_expression "puVar2 + (uint)bVar4 * -2" identifier + (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "puVar3 = puVar3 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar3 = puVar3 + (uint)bVar4 * -2 + 1" identifier = (binary_expression "puVar3 + (uint)bVar4 * -2 + 1" (binary_expression "puVar3 + (uint)bVar4 * -2" identifier + (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "FUN_000428e0(local_ac,local_34,0x14);" (call_expression "FUN_000428e0(local_ac,local_34,0x14)" identifier (argument_list "(local_ac,local_34,0x14)" ( identifier , identifier , number_literal ))) ;) (expression_statement "FUN_00042dd0(local_ac,local_48);" (call_expression "FUN_00042dd0(local_ac,local_48)" identifier (argument_list "(local_ac,local_48)" ( identifier , identifier ))) ;) (expression_statement "FUN_0001f2b0(local_48,param_2 + param_3,0x14);" (call_expression "FUN_0001f2b0(local_48,param_2 + param_3,0x14)" identifier (argument_list "(local_48,param_2 + param_3,0x14)" ( identifier , (binary_expression "param_2 + param_3" identifier + identifier) , number_literal ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_0004d450();" (call_expression "FUN_0004d450()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (for_statement for ( (assignment_expression IDENT = LIT) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (for_statement for ( (assignment_expression IDENT = LIT) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (for_statement for ( (assignment_expression IDENT = LIT) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + IDENT) , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_00043770(undefined4 *param_1,int param_2,int param_3,uint param_4)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  byte bVar4;\n  undefined4 local_ac [24];\n  uint local_4c;\n  undefined1 local_48 [20];\n  undefined1 local_34 [20];\n  int local_20;\n  \n  bVar4 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = param_1;\n  puVar3 = param_1 + 0x30;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }\n  puVar2 = param_1 + 0x30;\n  local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18\n  ;\n  FUN_000428e0(puVar2,&local_4c,4);\n  FUN_000428e0(puVar2,param_2,param_3);\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_00042dd0(local_ac,local_34);\n  puVar2 = param_1 + 0x18;\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_000428e0(local_ac,local_34,0x14);\n  FUN_00042dd0(local_ac,local_48);\n  FUN_0001f2b0(local_48,param_2 + param_3,0x14);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0004d450();\n}" (primitive_type "void") (function_declarator "FUN_00043770(undefined4 *param_1,int param_2,int param_3,uint param_4)" (identifier "FUN_00043770") (parameter_list "(undefined4 *param_1,int param_2,int param_3,uint param_4)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  byte bVar4;\n  undefined4 local_ac [24];\n  uint local_4c;\n  undefined1 local_48 [20];\n  undefined1 local_34 [20];\n  int local_20;\n  \n  bVar4 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = param_1;\n  puVar3 = param_1 + 0x30;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }\n  puVar2 = param_1 + 0x30;\n  local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18\n  ;\n  FUN_000428e0(puVar2,&local_4c,4);\n  FUN_000428e0(puVar2,param_2,param_3);\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_00042dd0(local_ac,local_34);\n  puVar2 = param_1 + 0x18;\n  puVar3 = local_ac;\n  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }\n  FUN_000428e0(local_ac,local_34,0x14);\n  FUN_00042dd0(local_ac,local_48);\n  FUN_0001f2b0(local_48,param_2 + param_3,0x14);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0004d450();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "byte bVar4;" (type_identifier "byte") (identifier "bVar4") (; ";")) (declaration "undefined4 local_ac [24];" (type_identifier "undefined4") (array_declarator "local_ac [24]" (identifier "local_ac") ([ "[") (number_literal "24") (] "]")) (; ";")) (declaration "uint local_4c;" (type_identifier "uint") (identifier "local_4c") (; ";")) (declaration "undefined1 local_48 [20];" (type_identifier "undefined1") (array_declarator "local_48 [20]" (identifier "local_48") ([ "[") (number_literal "20") (] "]")) (; ";")) (declaration "undefined1 local_34 [20];" (type_identifier "undefined1") (array_declarator "local_34 [20]" (identifier "local_34") ([ "[") (number_literal "20") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (expression_statement "bVar4 = 0;" (assignment_expression "bVar4 = 0" (identifier "bVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "puVar2 = param_1;" (assignment_expression "puVar2 = param_1" (identifier "puVar2") (= "=") (identifier "param_1")) (; ";")) (expression_statement "puVar3 = param_1 + 0x30;" (assignment_expression "puVar3 = param_1 + 0x30" (identifier "puVar3") (= "=") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30"))) (; ";")) (for_statement "for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }" (for "for") (( "(") (assignment_expression "iVar1 = 0x18" (identifier "iVar1") (= "=") (number_literal "0x18")) (; ";") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "iVar1 = iVar1 + -1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + -1" (identifier "iVar1") (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + 1;\n    puVar3 = puVar3 + 1;\n  }" ({ "{") (expression_statement "*puVar3 = *puVar2;" (assignment_expression "*puVar3 = *puVar2" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "*puVar2" (* "*") (identifier "puVar2"))) (; ";")) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" (identifier "puVar2") (= "=") (binary_expression "puVar2 + 1" (identifier "puVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar3 = puVar3 + 1;" (assignment_expression "puVar3 = puVar3 + 1" (identifier "puVar3") (= "=") (binary_expression "puVar3 + 1" (identifier "puVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "puVar2 = param_1 + 0x30;" (assignment_expression "puVar2 = param_1 + 0x30" (identifier "puVar2") (= "=") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30"))) (; ";")) (expression_statement "local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18\n  ;" (assignment_expression "local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18" (identifier "local_4c") (= "=") (binary_expression "param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18" (binary_expression "param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8" (binary_expression "param_4 >> 0x18 | (param_4 & 0xff0000) >> 8" (binary_expression "param_4 >> 0x18" (identifier "param_4") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(param_4 & 0xff0000) >> 8" (parenthesized_expression "(param_4 & 0xff0000)" (( "(") (binary_expression "param_4 & 0xff0000" (identifier "param_4") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(param_4 & 0xff00) << 8" (parenthesized_expression "(param_4 & 0xff00)" (( "(") (binary_expression "param_4 & 0xff00" (identifier "param_4") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "param_4 << 0x18" (identifier "param_4") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "FUN_000428e0(puVar2,&local_4c,4);" (call_expression "FUN_000428e0(puVar2,&local_4c,4)" (identifier "FUN_000428e0") (argument_list "(puVar2,&local_4c,4)" (( "(") (identifier "puVar2") (, ",") (pointer_expression "&local_4c" (& "&") (identifier "local_4c")) (, ",") (number_literal "4") () ")"))) (; ";")) (expression_statement "FUN_000428e0(puVar2,param_2,param_3);" (call_expression "FUN_000428e0(puVar2,param_2,param_3)" (identifier "FUN_000428e0") (argument_list "(puVar2,param_2,param_3)" (( "(") (identifier "puVar2") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "puVar3 = local_ac;" (assignment_expression "puVar3 = local_ac" (identifier "puVar3") (= "=") (identifier "local_ac")) (; ";")) (for_statement "for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" (for "for") (( "(") (assignment_expression "iVar1 = 0x18" (identifier "iVar1") (= "=") (number_literal "0x18")) (; ";") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "iVar1 = iVar1 + -1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + -1" (identifier "iVar1") (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" ({ "{") (expression_statement "*puVar3 = *puVar2;" (assignment_expression "*puVar3 = *puVar2" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "*puVar2" (* "*") (identifier "puVar2"))) (; ";")) (expression_statement "puVar2 = puVar2 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar2 = puVar2 + (uint)bVar4 * -2 + 1" (identifier "puVar2") (= "=") (binary_expression "puVar2 + (uint)bVar4 * -2 + 1" (binary_expression "puVar2 + (uint)bVar4 * -2" (identifier "puVar2") (+ "+") (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar4")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar3 = puVar3 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar3 = puVar3 + (uint)bVar4 * -2 + 1" (identifier "puVar3") (= "=") (binary_expression "puVar3 + (uint)bVar4 * -2 + 1" (binary_expression "puVar3 + (uint)bVar4 * -2" (identifier "puVar3") (+ "+") (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar4")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "FUN_00042dd0(local_ac,local_34);" (call_expression "FUN_00042dd0(local_ac,local_34)" (identifier "FUN_00042dd0") (argument_list "(local_ac,local_34)" (( "(") (identifier "local_ac") (, ",") (identifier "local_34") () ")"))) (; ";")) (expression_statement "puVar2 = param_1 + 0x18;" (assignment_expression "puVar2 = param_1 + 0x18" (identifier "puVar2") (= "=") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18"))) (; ";")) (expression_statement "puVar3 = local_ac;" (assignment_expression "puVar3 = local_ac" (identifier "puVar3") (= "=") (identifier "local_ac")) (; ";")) (for_statement "for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" (for "for") (( "(") (assignment_expression "iVar1 = 0x18" (identifier "iVar1") (= "=") (number_literal "0x18")) (; ";") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "iVar1 = iVar1 + -1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + -1" (identifier "iVar1") (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n    *puVar3 = *puVar2;\n    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;\n    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;\n  }" ({ "{") (expression_statement "*puVar3 = *puVar2;" (assignment_expression "*puVar3 = *puVar2" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "*puVar2" (* "*") (identifier "puVar2"))) (; ";")) (expression_statement "puVar2 = puVar2 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar2 = puVar2 + (uint)bVar4 * -2 + 1" (identifier "puVar2") (= "=") (binary_expression "puVar2 + (uint)bVar4 * -2 + 1" (binary_expression "puVar2 + (uint)bVar4 * -2" (identifier "puVar2") (+ "+") (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar4")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar3 = puVar3 + (uint)bVar4 * -2 + 1;" (assignment_expression "puVar3 = puVar3 + (uint)bVar4 * -2 + 1" (identifier "puVar3") (= "=") (binary_expression "puVar3 + (uint)bVar4 * -2 + 1" (binary_expression "puVar3 + (uint)bVar4 * -2" (identifier "puVar3") (+ "+") (binary_expression "(uint)bVar4 * -2" (cast_expression "(uint)bVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar4")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "FUN_000428e0(local_ac,local_34,0x14);" (call_expression "FUN_000428e0(local_ac,local_34,0x14)" (identifier "FUN_000428e0") (argument_list "(local_ac,local_34,0x14)" (( "(") (identifier "local_ac") (, ",") (identifier "local_34") (, ",") (number_literal "0x14") () ")"))) (; ";")) (expression_statement "FUN_00042dd0(local_ac,local_48);" (call_expression "FUN_00042dd0(local_ac,local_48)" (identifier "FUN_00042dd0") (argument_list "(local_ac,local_48)" (( "(") (identifier "local_ac") (, ",") (identifier "local_48") () ")"))) (; ";")) (expression_statement "FUN_0001f2b0(local_48,param_2 + param_3,0x14);" (call_expression "FUN_0001f2b0(local_48,param_2 + param_3,0x14)" (identifier "FUN_0001f2b0") (argument_list "(local_48,param_2 + param_3,0x14)" (( "(") (identifier "local_48") (, ",") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3")) (, ",") (number_literal "0x14") () ")"))) (; ";")) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0004d450();" (call_expression "FUN_0004d450()" (identifier "FUN_0004d450") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int function_1(void *handle,type_1 *var_10,int var_11,type_2 var_5)

{
  int var_12;
  int var_2;
  type_3 *var_3;
  type_4 *pSVar4;
  type_5 *var_8;
  type_3 *var_4;
  type_4 *pSVar7;
  int var_1;
  type_6 bVar8;
  type_4 s;
  type_1 seqbuf [4];
  type_1 correct [20];
  type_1 intermediate [20];
  
  bVar8 = 0;
  var_12 = *(int *)(var_1 + 0x14);
  var_3 = (type_3 *)handle;
  var_4 = (type_3 *)((int)handle + 0xc0);
  for (var_2 = 0x18; var_2 != 0; var_2 = var_2 + -1) {
    *var_4 = *var_3;
    var_3 = var_3 + 1;
    var_4 = var_4 + 1;
  }
  pSVar4 = (type_4 *)((int)handle + 0xc0);
  seqbuf = (type_1  [4])(var_5 >> 0x18 | (var_5 & 0xff0000) >> 8 | (var_5 & 0xff00) << 8 | var_5 << 0x18);
  var_6(pSVar4,seqbuf,4);
  var_6(pSVar4,var_10,var_11);
  pSVar7 = &s;
  for (var_2 = 0x18; var_2 != 0; var_2 = var_2 + -1) {
    pSVar7->h[0] = pSVar4->h[0];
    pSVar4 = (type_4 *)((int)pSVar4 + (type_7)bVar8 * -8 + 4);
    pSVar7 = (type_4 *)((int)pSVar7 + (type_7)bVar8 * -8 + 4);
  }
  var_7(&s,intermediate);
  var_8 = (type_5 *)((int)handle + 0x60);
  pSVar4 = &s;
  for (var_2 = 0x18; var_2 != 0; var_2 = var_2 + -1) {
    pSVar4->h[0] = *var_8;
    var_8 = var_8 + (type_7)bVar8 * -2 + 1;
    pSVar4 = (type_4 *)((int)pSVar4 + (type_7)bVar8 * -8 + 4);
  }
  var_6(&s,intermediate,0x14);
  var_7(&s,correct);
  var_2 = var_9(correct,var_10 + var_11,0x14);
  if (var_12 == *(int *)(var_1 + 0x14)) {
    return var_2;
  }
                    /* WARNING: Subroutine does not return */
  var_13();
}


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

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

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

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  int in_GS_OFFSET;
  byte bVar4;
  undefined4 local_ac [24];
  uint local_4c;
  undefined1 local_48 [20];
  undefined1 local_34 [20];
  int local_20;
  
  bVar4 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  puVar2 = param_1;
  puVar3 = param_1 + 0x30;
  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {
    *puVar3 = *puVar2;
    puVar2 = puVar2 + 1;
    puVar3 = puVar3 + 1;
  }
  puVar2 = param_1 + 0x30;
  local_4c = param_4 >> 0x18 | (param_4 & 0xff0000) >> 8 | (param_4 & 0xff00) << 8 | param_4 << 0x18
  ;
  FUN_000428e0(puVar2,&local_4c,4);
  FUN_000428e0(puVar2,param_2,param_3);
  puVar3 = local_ac;
  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {
    *puVar3 = *puVar2;
    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;
    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;
  }
  FUN_00042dd0(local_ac,local_34);
  puVar2 = param_1 + 0x18;
  puVar3 = local_ac;
  for (iVar1 = 0x18; iVar1 != 0; iVar1 = iVar1 + -1) {
    *puVar3 = *puVar2;
    puVar2 = puVar2 + (uint)bVar4 * -2 + 1;
    puVar3 = puVar3 + (uint)bVar4 * -2 + 1;
  }
  FUN_000428e0(local_ac,local_34,0x14);
  FUN_00042dd0(local_ac,local_48);
  FUN_0001f2b0(local_48,param_2 + param_3,0x14);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0004d450();
}

