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

int32 psRsaEncryptPub(psRsaKey_t *key,uchar *in,uint32 inlen,uchar *out,uint32 outlen)

{
  pstm_int tmp;
  
}



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

uint __regparm3
FUN_0003f649(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)

{
  uint uVar1;
  int iVar2;
  char *pcVar3;
  int iVar4;
  uint uVar5;
  undefined2 *puVar6;
  uint uVar7;
  undefined1 *puVar8;
  int in_GS_OFFSET;
  byte bVar9;
  undefined2 *local_4c;
  undefined1 local_30 [12];
  undefined4 local_24;
  int local_20;
  
  bVar9 = 0;
  local_4c = param_4;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar1 = *(uint *)(param_1 + 0x80);
  if (param_5 < uVar1) {
                    /* WARNING: Subroutine does not return */
    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);
  }
  iVar2 = uVar1 - param_3;
  if (iVar2 + -3 < 8) {
                    /* WARNING: Subroutine does not return */
    FUN_000191a6("pkcs1Pad failure\n");
  }
  *param_4 = 0x200;
  FUN_0003b031();
  pcVar3 = (char *)(param_4 + 1);
  do {
    if (*pcVar3 == '\0') {
      *pcVar3 = '\x01';
    }
    pcVar3 = pcVar3 + 1;
  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));
  *(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';
  puVar8 = (undefined1 *)((int)param_4 + iVar2);
  for (; param_3 != 0; param_3 = param_3 + -1) {
    *puVar8 = *param_2;
    param_2 = param_2 + (uint)bVar9 * -2 + 1;
    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;
  }
  if ((int)uVar1 < 0) {
                    /* WARNING: Subroutine does not return */
    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");
  }
  local_24 = 0;
  iVar2 = FUN_0003d238(local_30,uVar1 + 4);
  if (iVar2 == 0) {
    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);
    if (iVar2 == 0) {
      iVar2 = param_1 + 0x20;
      iVar4 = FUN_0003d207(iVar2,local_30);
      if (iVar4 != -1) {
        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);
        if (iVar4 != 0) {
                    /* WARNING: Subroutine does not return */
          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");
        }
        uVar5 = FUN_0003d34d(iVar2);
        if (param_5 < uVar5) {
                    /* WARNING: Subroutine does not return */
          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");
        }
        puVar6 = param_4;
        uVar7 = uVar5;
        if (uVar5 < *(uint *)(param_1 + 0x80)) {
          do {
            puVar6 = (undefined2 *)((int)param_4 + 1);
            *(undefined1 *)param_4 = 0;
            uVar5 = uVar5 + 1;
            param_4 = puVar6;
            local_4c = puVar6;
            uVar7 = uVar5;
          } while (uVar5 < *(uint *)(param_1 + 0x80));
        }
        for (; uVar5 != 0; uVar5 = uVar5 - 1) {
          *(undefined1 *)puVar6 = 0;
          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);
        }
        iVar2 = FUN_0003d34d(local_30);
        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));
        if (iVar2 != 0) {
                    /* WARNING: Subroutine does not return */
          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");
        }
        FUN_0003d13c(local_30);
        if (uVar1 != uVar7) {
                    /* WARNING: Subroutine does not return */
          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");
        }
        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
          FUN_00017e10();
        }
        return uVar1;
      }
    }
    FUN_0003d13c(local_30);
  }
                    /* WARNING: Subroutine does not return */
  FUN_000191a6("Error performing psRsaEncryptPub\n");
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x3c
CALL 0x00017640
ADD EBX,0x913cb
MOV dword ptr [ESP + 0x8],EAX
MOV ESI,EDX
MOV EDX,dword ptr [ESP + 0x50]
MOV dword ptr [ESP],EDX
MOV EDX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x2c],EDX
XOR EDX,EDX
MOV EAX,dword ptr [EAX + 0x80]
MOV dword ptr [ESP + 0x4],EAX
CMP EAX,dword ptr [ESP + 0x54]
JBE 0x0003f697
PUSH EBP
PUSH EAX
PUSH dword ptr [ESP + 0x5c]
LEA EAX,[EBX + 0xffff6121]
PUSH EAX
CALL 0x000191a6
MOV EAX,dword ptr [ESP + 0x4]
SUB EAX,ECX
LEA EDI,[EAX + -0x3]
CMP EDI,0x7
JLE 0x0003f84a
MOV dword ptr [ESP + 0xc],ECX
MOV EAX,dword ptr [ESP]
MOV word ptr [EAX],0x200
LEA EBP,[EAX + 0x2]
MOV EDX,EDI
MOV EAX,EBP
CALL 0x0003b031
MOV EAX,dword ptr [ESP]
LEA EDX,[EAX + EDI*0x1 + 0x2]
MOV EAX,EBP
MOV ECX,dword ptr [ESP + 0xc]
CMP byte ptr [EAX],0x0
JNZ 0x0003f6d6
MOV byte ptr [EAX],0x1
INC EAX
CMP EAX,EDX
JNZ 0x0003f6ce
MOV byte ptr [EBP + EDI*0x1],0x0
LEA EAX,[EBP + EDI*0x1 + 0x1]
MOV EDI,EAX
MOVSB.REP ES:EDI,ESI
MOV EDI,dword ptr [ESP + 0x4]
TEST EDI,EDI
JNS 0x0003f6ff
SUB ESP,0xc
LEA EAX,[EBX + 0xfffe857c]
PUSH EAX
CALL 0x000191a6
MOV dword ptr [ESP + 0x28],0x0
SUB ESP,0x8
MOV EDI,dword ptr [ESP + 0xc]
LEA EAX,[EDI + 0x4]
PUSH EAX
LEA EBP,[ESP + 0x28]
PUSH EBP
CALL 0x0003d238
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0003f742
PUSH ESI
PUSH EDI
PUSH dword ptr [ESP + 0x8]
PUSH EBP
CALL 0x0003d274
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003f751
SUB ESP,0xc
PUSH EBP
CALL 0x0003d13c
ADD ESP,0x10
SUB ESP,0xc
LEA EAX,[EBX + 0xfffe8628]
PUSH EAX
CALL 0x000191a6
MOV EDI,dword ptr [ESP + 0x8]
LEA ESI,[EDI + 0x20]
SUB ESP,0x8
PUSH EBP
PUSH ESI
CALL 0x0003d207
ADD ESP,0x10
INC EAX
JZ 0x0003f736
PUSH EBP
PUSH ESI
PUSH EDI
PUSH EBP
CALL 0x0003e7a3
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003f787
SUB ESP,0xc
LEA EAX,[EBX + 0xfffe85b4]
PUSH EAX
CALL 0x000191a6
SUB ESP,0xc
PUSH ESI
CALL 0x0003d34d
MOV ESI,EAX
ADD ESP,0x10
CMP EAX,dword ptr [ESP + 0x54]
JBE 0x0003f7aa
SUB ESP,0xc
LEA EAX,[EBX + 0xfffe85d4]
PUSH EAX
CALL 0x000191a6
MOV EAX,dword ptr [ESP + 0x8]
CMP ESI,dword ptr [EAX + 0x80]
JNC 0x0003f7ce
MOV EAX,dword ptr [ESP]
INC EAX
MOV byte ptr [EAX + -0x1],0x0
INC ESI
MOV EDX,dword ptr [ESP + 0x8]
CMP ESI,dword ptr [EDX + 0x80]
JC 0x0003f7b9
MOV dword ptr [ESP],EAX
XOR EAX,EAX
MOV EDI,dword ptr [ESP]
MOV ECX,ESI
STOSB.REP ES:EDI
SUB ESP,0xc
PUSH EBP
CALL 0x0003d34d
POP EDX
POP ECX
MOV EDX,ESI
SUB EDX,EAX
MOV EAX,dword ptr [ESP + 0x8]
ADD EAX,EDX
PUSH EAX
PUSH EBP
CALL 0x0003ede0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003f809
SUB ESP,0xc
LEA EAX,[EBX + 0xfffe8600]
PUSH EAX
CALL 0x000191a6
SUB ESP,0xc
PUSH EBP
CALL 0x0003d13c
ADD ESP,0x10
CMP dword ptr [ESP + 0x4],ESI
JZ 0x0003f82a
SUB ESP,0xc
LEA EAX,[EBX + 0xfffe864c]
PUSH EAX
CALL 0x000191a6
MOV EAX,dword ptr [ESP + 0x4]
MOV ECX,dword ptr [ESP + 0x2c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x0003f845
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET 0x8
CALL 0x00017e10
SUB ESP,0xc
LEA EAX,[EBX + 0xffff613f]
PUSH EAX
CALL 0x000191a6
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint __regparm3\nFUN_0003f649(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)\n\n{\n  uint uVar1;\n  int iVar2;\n  char *pcVar3;\n  int iVar4;\n  uint uVar5;\n  undefined2 *puVar6;\n  uint uVar7;\n  undefined1 *puVar8;\n  int in_GS_OFFSET;\n  byte bVar9;\n  undefined2 *local_4c;\n  undefined1 local_30 [12];\n  undefined4 local_24;\n  int local_20;\n  \n  bVar9 = 0;\n  local_4c = param_4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x80);\n  if (param_5 < uVar1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }\n  iVar2 = uVar1 - param_3;\n  if (iVar2 + -3 < 8) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("pkcs1Pad failure\n");\n  }\n  *param_4 = 0x200;\n  FUN_0003b031();\n  pcVar3 = (char *)(param_4 + 1);\n  do {\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));\n  *(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';\n  puVar8 = (undefined1 *)((int)param_4 + iVar2);\n  for (; param_3 != 0; param_3 = param_3 + -1) {\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }\n  if ((int)uVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }\n  local_24 = 0;\n  iVar2 = FUN_0003d238(local_30,uVar1 + 4);\n  if (iVar2 == 0) {\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000191a6("Error performing psRsaEncryptPub\n");\n}\n\n" comment (function_definition "uint __regparm3\nFUN_0003f649(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)\n\n{\n  uint uVar1;\n  int iVar2;\n  char *pcVar3;\n  int iVar4;\n  uint uVar5;\n  undefined2 *puVar6;\n  uint uVar7;\n  undefined1 *puVar8;\n  int in_GS_OFFSET;\n  byte bVar9;\n  undefined2 *local_4c;\n  undefined1 local_30 [12];\n  undefined4 local_24;\n  int local_20;\n  \n  bVar9 = 0;\n  local_4c = param_4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x80);\n  if (param_5 < uVar1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }\n  iVar2 = uVar1 - param_3;\n  if (iVar2 + -3 < 8) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("pkcs1Pad failure\n");\n  }\n  *param_4 = 0x200;\n  FUN_0003b031();\n  pcVar3 = (char *)(param_4 + 1);\n  do {\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));\n  *(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';\n  puVar8 = (undefined1 *)((int)param_4 + iVar2);\n  for (; param_3 != 0; param_3 = param_3 + -1) {\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }\n  if ((int)uVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }\n  local_24 = 0;\n  iVar2 = FUN_0003d238(local_30,uVar1 + 4);\n  if (iVar2 == 0) {\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000191a6("Error performing psRsaEncryptPub\n");\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003f649(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)" identifier (parameter_list "(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined2 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "uint param_5" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  char *pcVar3;\n  int iVar4;\n  uint uVar5;\n  undefined2 *puVar6;\n  uint uVar7;\n  undefined1 *puVar8;\n  int in_GS_OFFSET;\n  byte bVar9;\n  undefined2 *local_4c;\n  undefined1 local_30 [12];\n  undefined4 local_24;\n  int local_20;\n  \n  bVar9 = 0;\n  local_4c = param_4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x80);\n  if (param_5 < uVar1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }\n  iVar2 = uVar1 - param_3;\n  if (iVar2 + -3 < 8) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("pkcs1Pad failure\n");\n  }\n  *param_4 = 0x200;\n  FUN_0003b031();\n  pcVar3 = (char *)(param_4 + 1);\n  do {\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));\n  *(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';\n  puVar8 = (undefined1 *)((int)param_4 + iVar2);\n  for (; param_3 != 0; param_3 = param_3 + -1) {\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }\n  if ((int)uVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }\n  local_24 = 0;\n  iVar2 = FUN_0003d238(local_30,uVar1 + 4);\n  if (iVar2 == 0) {\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000191a6("Error performing psRsaEncryptPub\n");\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "undefined2 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "undefined1 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar9;" type_identifier identifier ;) (declaration "undefined2 *local_4c;" type_identifier (pointer_declarator "*local_4c" * identifier) ;) (declaration "undefined1 local_30 [12];" type_identifier (array_declarator "local_30 [12]" identifier [ number_literal ]) ;) (declaration "undefined4 local_24;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (expression_statement "local_4c = param_4;" (assignment_expression "local_4c = param_4" identifier = identifier) ;) (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 "uVar1 = *(uint *)(param_1 + 0x80);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x80)" identifier = (pointer_expression "*(uint *)(param_1 + 0x80)" * (cast_expression "(uint *)(param_1 + 0x80)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ;) (if_statement "if (param_5 < uVar1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }" if (parenthesized_expression "(param_5 < uVar1)" ( (binary_expression "param_5 < uVar1" identifier < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }" { comment (expression_statement "FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);" (call_expression "FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1)" identifier (argument_list "("RSA crypt outlen:%d < size:%d",param_5,uVar1)" ( (string_literal ""RSA crypt outlen:%d < size:%d"" " string_content ") , identifier , identifier ))) ;) })) (expression_statement "iVar2 = uVar1 - param_3;" (assignment_expression "iVar2 = uVar1 - param_3" identifier = (binary_expression "uVar1 - param_3" identifier - identifier)) ;) (if_statement "if (iVar2 + -3 < 8) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("pkcs1Pad failure\n");\n  }" if (parenthesized_expression "(iVar2 + -3 < 8)" ( (binary_expression "iVar2 + -3 < 8" (binary_expression "iVar2 + -3" identifier + number_literal) < number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("pkcs1Pad failure\n");\n  }" { comment (expression_statement "FUN_000191a6("pkcs1Pad failure\n");" (call_expression "FUN_000191a6("pkcs1Pad failure\n")" identifier (argument_list "("pkcs1Pad failure\n")" ( (string_literal ""pkcs1Pad failure\n"" " string_content escape_sequence ") ))) ;) })) (expression_statement "*param_4 = 0x200;" (assignment_expression "*param_4 = 0x200" (pointer_expression "*param_4" * identifier) = number_literal) ;) (expression_statement "FUN_0003b031();" (call_expression "FUN_0003b031()" identifier (argument_list "()" ( ))) ;) (expression_statement "pcVar3 = (char *)(param_4 + 1);" (assignment_expression "pcVar3 = (char *)(param_4 + 1)" identifier = (cast_expression "(char *)(param_4 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 1)" ( (binary_expression "param_4 + 1" identifier + number_literal) )))) ;) (do_statement "do {\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));" do (compound_statement "{\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  }" { (if_statement "if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }" if (parenthesized_expression "(*pcVar3 == '\0')" ( (binary_expression "*pcVar3 == '\0'" (pointer_expression "*pcVar3" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      *pcVar3 = '\x01';\n    }" { (expression_statement "*pcVar3 = '\x01';" (assignment_expression "*pcVar3 = '\x01'" (pointer_expression "*pcVar3" * identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) })) (expression_statement "pcVar3 = pcVar3 + 1;" (assignment_expression "pcVar3 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pcVar3 != (char *)((int)param_4 + iVar2 + -1))" ( (binary_expression "pcVar3 != (char *)((int)param_4 + iVar2 + -1)" identifier != (cast_expression "(char *)((int)param_4 + iVar2 + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_4 + iVar2 + -1)" ( (binary_expression "(int)param_4 + iVar2 + -1" (binary_expression "(int)param_4 + iVar2" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) )) ;) (expression_statement "*(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';" (assignment_expression "*(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0'" (pointer_expression "*(char *)((int)(param_4 + 1) + iVar2 + -3)" * (cast_expression "(char *)((int)(param_4 + 1) + iVar2 + -3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)(param_4 + 1) + iVar2 + -3)" ( (binary_expression "(int)(param_4 + 1) + iVar2 + -3" (binary_expression "(int)(param_4 + 1) + iVar2" (cast_expression "(int)(param_4 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_4 + 1)" ( (binary_expression "param_4 + 1" identifier + number_literal) ))) + identifier) + number_literal) )))) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar8 = (undefined1 *)((int)param_4 + iVar2);" (assignment_expression "puVar8 = (undefined1 *)((int)param_4 + iVar2)" identifier = (cast_expression "(undefined1 *)((int)param_4 + iVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_4 + iVar2)" ( (binary_expression "(int)param_4 + iVar2" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (for_statement "for (; param_3 != 0; param_3 = param_3 + -1) {\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }" for ( ; (binary_expression "param_3 != 0" identifier != number_literal) ; (assignment_expression "param_3 = param_3 + -1" identifier = (binary_expression "param_3 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }" { (expression_statement "*puVar8 = *param_2;" (assignment_expression "*puVar8 = *param_2" (pointer_expression "*puVar8" * identifier) = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "param_2 = param_2 + (uint)bVar9 * -2 + 1;" (assignment_expression "param_2 = param_2 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "param_2 + (uint)bVar9 * -2 + 1" (binary_expression "param_2 + (uint)bVar9 * -2" identifier + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "puVar8 = puVar8 + (uint)bVar9 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "puVar8 + (uint)bVar9 * -2 + 1" (binary_expression "puVar8 + (uint)bVar9 * -2" identifier + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (if_statement "if ((int)uVar1 < 0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }" if (parenthesized_expression "((int)uVar1 < 0)" ( (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }" { comment (expression_statement "FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");" (call_expression "FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n")" identifier (argument_list "("Error padding psRsaEncryptPub. Likely data too long\n")" ( (string_literal ""Error padding psRsaEncryptPub. Likely data too long\n"" " string_content escape_sequence ") ))) ;) })) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "iVar2 = FUN_0003d238(local_30,uVar1 + 4);" (assignment_expression "iVar2 = FUN_0003d238(local_30,uVar1 + 4)" identifier = (call_expression "FUN_0003d238(local_30,uVar1 + 4)" identifier (argument_list "(local_30,uVar1 + 4)" ( identifier , (binary_expression "uVar1 + 4" identifier + number_literal) )))) ;) (if_statement "if (iVar2 == 0) {\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }" { (expression_statement "iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);" (assignment_expression "iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2)" identifier = (call_expression "FUN_0003d274(local_30,param_4,uVar1,param_2)" identifier (argument_list "(local_30,param_4,uVar1,param_2)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }" { (expression_statement "iVar2 = param_1 + 0x20;" (assignment_expression "iVar2 = param_1 + 0x20" identifier = (binary_expression "param_1 + 0x20" identifier + number_literal)) ;) (expression_statement "iVar4 = FUN_0003d207(iVar2,local_30);" (assignment_expression "iVar4 = FUN_0003d207(iVar2,local_30)" identifier = (call_expression "FUN_0003d207(iVar2,local_30)" identifier (argument_list "(iVar2,local_30)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n          FUN_00017e10();\n        }\n        return uVar1;\n      }" if (parenthesized_expression "(iVar4 != -1)" ( (binary_expression "iVar4 != -1" identifier != number_literal) )) (compound_statement "{\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n          FUN_00017e10();\n        }\n        return uVar1;\n      }" { (expression_statement "iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);" (assignment_expression "iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30)" identifier = (call_expression "FUN_0003e7a3(local_30,param_1,iVar2,local_30)" identifier (argument_list "(local_30,param_1,iVar2,local_30)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar4 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }" { comment (expression_statement "FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");" (call_expression "FUN_000191a6("psRsaCrypt error: pstm_exptmod\n")" identifier (argument_list "("psRsaCrypt error: pstm_exptmod\n")" ( (string_literal ""psRsaCrypt error: pstm_exptmod\n"" " string_content escape_sequence ") ))) ;) })) (expression_statement "uVar5 = FUN_0003d34d(iVar2);" (assignment_expression "uVar5 = FUN_0003d34d(iVar2)" identifier = (call_expression "FUN_0003d34d(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (param_5 < uVar5) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }" if (parenthesized_expression "(param_5 < uVar5)" ( (binary_expression "param_5 < uVar5" identifier < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }" { comment (expression_statement "FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");" (call_expression "FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n")" identifier (argument_list "("psRsaCrypt error: pstm_unsigned_bin_size\n")" ( (string_literal ""psRsaCrypt error: pstm_unsigned_bin_size\n"" " string_content escape_sequence ") ))) ;) })) (expression_statement "puVar6 = param_4;" (assignment_expression "puVar6 = param_4" identifier = identifier) ;) (expression_statement "uVar7 = uVar5;" (assignment_expression "uVar7 = uVar5" identifier = identifier) ;) (if_statement "if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }" if (parenthesized_expression "(uVar5 < *(uint *)(param_1 + 0x80))" ( (binary_expression "uVar5 < *(uint *)(param_1 + 0x80)" identifier < (pointer_expression "*(uint *)(param_1 + 0x80)" * (cast_expression "(uint *)(param_1 + 0x80)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) )) (compound_statement "{\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }" { (do_statement "do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));" do (compound_statement "{\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          }" { (expression_statement "puVar6 = (undefined2 *)((int)param_4 + 1);" (assignment_expression "puVar6 = (undefined2 *)((int)param_4 + 1)" identifier = (cast_expression "(undefined2 *)((int)param_4 + 1)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_4 + 1)" ( (binary_expression "(int)param_4 + 1" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "*(undefined1 *)param_4 = 0;" (assignment_expression "*(undefined1 *)param_4 = 0" (pointer_expression "*(undefined1 *)param_4" * (cast_expression "(undefined1 *)param_4" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "param_4 = puVar6;" (assignment_expression "param_4 = puVar6" identifier = identifier) ;) (expression_statement "local_4c = puVar6;" (assignment_expression "local_4c = puVar6" identifier = identifier) ;) (expression_statement "uVar7 = uVar5;" (assignment_expression "uVar7 = uVar5" identifier = identifier) ;) }) while (parenthesized_expression "(uVar5 < *(uint *)(param_1 + 0x80))" ( (binary_expression "uVar5 < *(uint *)(param_1 + 0x80)" identifier < (pointer_expression "*(uint *)(param_1 + 0x80)" * (cast_expression "(uint *)(param_1 + 0x80)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) )) ;) })) (for_statement "for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }" for ( ; (binary_expression "uVar5 != 0" identifier != number_literal) ; (assignment_expression "uVar5 = uVar5 - 1" identifier = (binary_expression "uVar5 - 1" identifier - number_literal)) ) (compound_statement "{\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }" { (expression_statement "*(undefined1 *)puVar6 = 0;" (assignment_expression "*(undefined1 *)puVar6 = 0" (pointer_expression "*(undefined1 *)puVar6" * (cast_expression "(undefined1 *)puVar6" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (expression_statement "puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);" (assignment_expression "puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1)" identifier = (cast_expression "(undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar6 + (uint)bVar9 * -2 + 1)" ( (binary_expression "(int)puVar6 + (uint)bVar9 * -2 + 1" (binary_expression "(int)puVar6 + (uint)bVar9 * -2" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal) )))) ;) })) (expression_statement "iVar2 = FUN_0003d34d(local_30);" (assignment_expression "iVar2 = FUN_0003d34d(local_30)" identifier = (call_expression "FUN_0003d34d(local_30)" identifier (argument_list "(local_30)" ( identifier )))) ;) (expression_statement "iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));" (assignment_expression "iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)))" identifier = (call_expression "FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)))" identifier (argument_list "(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)))" ( identifier , (cast_expression "(undefined1 *)((int)local_4c + (uVar7 - iVar2))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_4c + (uVar7 - iVar2))" ( (binary_expression "(int)local_4c + (uVar7 - iVar2)" (cast_expression "(int)local_4c" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar7 - iVar2)" ( (binary_expression "uVar7 - iVar2" identifier - identifier) ))) ))) )))) ;) (if_statement "if (iVar2 != 0) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }" { comment (expression_statement "FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");" (call_expression "FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n")" identifier (argument_list "("psRsaCrypt error: pstm_to_unsigned_bin\n")" ( (string_literal ""psRsaCrypt error: pstm_to_unsigned_bin\n"" " string_content escape_sequence ") ))) ;) })) (expression_statement "FUN_0003d13c(local_30);" (call_expression "FUN_0003d13c(local_30)" identifier (argument_list "(local_30)" ( identifier ))) ;) (if_statement "if (uVar1 != uVar7) {\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }" if (parenthesized_expression "(uVar1 != uVar7)" ( (binary_expression "uVar1 != uVar7" identifier != identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }" { comment (expression_statement "FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");" (call_expression "FUN_000191a6("Encrypted size error in psRsaEncryptPub\n")" identifier (argument_list "("Encrypted size error in psRsaEncryptPub\n")" ( (string_literal ""Encrypted size error in psRsaEncryptPub\n"" " string_content escape_sequence ") ))) ;) })) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n          FUN_00017e10();\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                    /* WARNING: Subroutine does not return */\n          FUN_00017e10();\n        }" { comment (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar1;" return identifier ;) })) })) (expression_statement "FUN_0003d13c(local_30);" (call_expression "FUN_0003d13c(local_30)" identifier (argument_list "(local_30)" ( identifier ))) ;) })) comment (expression_statement "FUN_000191a6("Error performing psRsaEncryptPub\n");" (call_expression "FUN_000191a6("Error performing psRsaEncryptPub\n")" identifier (argument_list "("Error performing psRsaEncryptPub\n")" ( (string_literal ""Error performing psRsaEncryptPub\n"" " string_content escape_sequence ") ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint32 psRsaEncryptPub(psRsaKey_t *key,uchar *in,uint32 inlen,uchar *out,uint32 outlen)\n\n{\n  pstm_int tmp;\n  \n}\n\n" comment (function_definition "int32 psRsaEncryptPub(psRsaKey_t *key,uchar *in,uint32 inlen,uchar *out,uint32 outlen)\n\n{\n  pstm_int tmp;\n  \n}" type_identifier (function_declarator "psRsaEncryptPub(psRsaKey_t *key,uchar *in,uint32 inlen,uchar *out,uint32 outlen)" identifier (parameter_list "(psRsaKey_t *key,uchar *in,uint32 inlen,uchar *out,uint32 outlen)" ( (parameter_declaration "psRsaKey_t *key" type_identifier (pointer_declarator "*key" * identifier)) , (parameter_declaration "uchar *in" type_identifier (pointer_declarator "*in" * identifier)) , (parameter_declaration "uint32 inlen" type_identifier identifier) , (parameter_declaration "uchar *out" type_identifier (pointer_declarator "*out" * identifier)) , (parameter_declaration "uint32 outlen" type_identifier identifier) ))) (compound_statement "{\n  pstm_int tmp;\n  \n}" { (declaration "pstm_int tmp;" type_identifier identifier ;) })))
(translation_unit "uint __regparm3\nFUN_0003f649(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)\n\n{\n  uint uVar1;\n  int iVar2;\n  char *pcVar3;\n  int iVar4;\n  uint uVar5;\n  undefined2 *puVar6;\n  uint uVar7;\n  undefined1 *puVar8;\n  int in_GS_OFFSET;\n  byte bVar9;\n  undefined2 *local_4c;\n  undefined1 local_30 [12];\n  undefined4 local_24;\n  int local_20;\n  \n  bVar9 = 0;\n  local_4c = param_4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x80);\n  if (param_5 < uVar1) {\n                    \n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }\n  iVar2 = uVar1 - param_3;\n  if (iVar2 + -3 < 8) {\n                    \n    FUN_000191a6("pkcs1Pad failure\n");\n  }\n  *param_4 = 0x200;\n  FUN_0003b031();\n  pcVar3 = (char *)(param_4 + 1);\n  do {\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));\n  *(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';\n  puVar8 = (undefined1 *)((int)param_4 + iVar2);\n  for (; param_3 != 0; param_3 = param_3 + -1) {\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }\n  if ((int)uVar1 < 0) {\n                    \n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }\n  local_24 = 0;\n  iVar2 = FUN_0003d238(local_30,uVar1 + 4);\n  if (iVar2 == 0) {\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }\n                    \n  FUN_000191a6("Error performing psRsaEncryptPub\n");\n}\n\n" (function_definition "uint __regparm3\nFUN_0003f649(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)\n\n{\n  uint uVar1;\n  int iVar2;\n  char *pcVar3;\n  int iVar4;\n  uint uVar5;\n  undefined2 *puVar6;\n  uint uVar7;\n  undefined1 *puVar8;\n  int in_GS_OFFSET;\n  byte bVar9;\n  undefined2 *local_4c;\n  undefined1 local_30 [12];\n  undefined4 local_24;\n  int local_20;\n  \n  bVar9 = 0;\n  local_4c = param_4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x80);\n  if (param_5 < uVar1) {\n                    \n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }\n  iVar2 = uVar1 - param_3;\n  if (iVar2 + -3 < 8) {\n                    \n    FUN_000191a6("pkcs1Pad failure\n");\n  }\n  *param_4 = 0x200;\n  FUN_0003b031();\n  pcVar3 = (char *)(param_4 + 1);\n  do {\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));\n  *(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';\n  puVar8 = (undefined1 *)((int)param_4 + iVar2);\n  for (; param_3 != 0; param_3 = param_3 + -1) {\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }\n  if ((int)uVar1 < 0) {\n                    \n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }\n  local_24 = 0;\n  iVar2 = FUN_0003d238(local_30,uVar1 + 4);\n  if (iVar2 == 0) {\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }\n                    \n  FUN_000191a6("Error performing psRsaEncryptPub\n");\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003f649(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)" identifier (parameter_list "(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined2 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "uint param_5" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  char *pcVar3;\n  int iVar4;\n  uint uVar5;\n  undefined2 *puVar6;\n  uint uVar7;\n  undefined1 *puVar8;\n  int in_GS_OFFSET;\n  byte bVar9;\n  undefined2 *local_4c;\n  undefined1 local_30 [12];\n  undefined4 local_24;\n  int local_20;\n  \n  bVar9 = 0;\n  local_4c = param_4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x80);\n  if (param_5 < uVar1) {\n                    \n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }\n  iVar2 = uVar1 - param_3;\n  if (iVar2 + -3 < 8) {\n                    \n    FUN_000191a6("pkcs1Pad failure\n");\n  }\n  *param_4 = 0x200;\n  FUN_0003b031();\n  pcVar3 = (char *)(param_4 + 1);\n  do {\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));\n  *(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';\n  puVar8 = (undefined1 *)((int)param_4 + iVar2);\n  for (; param_3 != 0; param_3 = param_3 + -1) {\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }\n  if ((int)uVar1 < 0) {\n                    \n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }\n  local_24 = 0;\n  iVar2 = FUN_0003d238(local_30,uVar1 + 4);\n  if (iVar2 == 0) {\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }\n                    \n  FUN_000191a6("Error performing psRsaEncryptPub\n");\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "undefined2 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "undefined1 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar9;" type_identifier identifier ;) (declaration "undefined2 *local_4c;" type_identifier (pointer_declarator "*local_4c" * identifier) ;) (declaration "undefined1 local_30 [12];" type_identifier (array_declarator "local_30 [12]" identifier [ number_literal ]) ;) (declaration "undefined4 local_24;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (expression_statement "local_4c = param_4;" (assignment_expression "local_4c = param_4" identifier = identifier) ;) (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 "uVar1 = *(uint *)(param_1 + 0x80);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x80)" identifier = (pointer_expression "*(uint *)(param_1 + 0x80)" * (cast_expression "(uint *)(param_1 + 0x80)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ;) (if_statement "if (param_5 < uVar1) {\n                    \n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }" if (parenthesized_expression "(param_5 < uVar1)" ( (binary_expression "param_5 < uVar1" identifier < identifier) )) (compound_statement "{\n                    \n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }" { (expression_statement "FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);" (call_expression "FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1)" identifier (argument_list "("RSA crypt outlen:%d < size:%d",param_5,uVar1)" ( (string_literal ""RSA crypt outlen:%d < size:%d"" " string_content ") , identifier , identifier ))) ;) })) (expression_statement "iVar2 = uVar1 - param_3;" (assignment_expression "iVar2 = uVar1 - param_3" identifier = (binary_expression "uVar1 - param_3" identifier - identifier)) ;) (if_statement "if (iVar2 + -3 < 8) {\n                    \n    FUN_000191a6("pkcs1Pad failure\n");\n  }" if (parenthesized_expression "(iVar2 + -3 < 8)" ( (binary_expression "iVar2 + -3 < 8" (binary_expression "iVar2 + -3" identifier + number_literal) < number_literal) )) (compound_statement "{\n                    \n    FUN_000191a6("pkcs1Pad failure\n");\n  }" { (expression_statement "FUN_000191a6("pkcs1Pad failure\n");" (call_expression "FUN_000191a6("pkcs1Pad failure\n")" identifier (argument_list "("pkcs1Pad failure\n")" ( (string_literal ""pkcs1Pad failure\n"" " string_content escape_sequence ") ))) ;) })) (expression_statement "*param_4 = 0x200;" (assignment_expression "*param_4 = 0x200" (pointer_expression "*param_4" * identifier) = number_literal) ;) (expression_statement "FUN_0003b031();" (call_expression "FUN_0003b031()" identifier (argument_list "()" ( ))) ;) (expression_statement "pcVar3 = (char *)(param_4 + 1);" (assignment_expression "pcVar3 = (char *)(param_4 + 1)" identifier = (cast_expression "(char *)(param_4 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 1)" ( (binary_expression "param_4 + 1" identifier + number_literal) )))) ;) (do_statement "do {\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));" do (compound_statement "{\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  }" { (if_statement "if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }" if (parenthesized_expression "(*pcVar3 == '\0')" ( (binary_expression "*pcVar3 == '\0'" (pointer_expression "*pcVar3" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      *pcVar3 = '\x01';\n    }" { (expression_statement "*pcVar3 = '\x01';" (assignment_expression "*pcVar3 = '\x01'" (pointer_expression "*pcVar3" * identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) })) (expression_statement "pcVar3 = pcVar3 + 1;" (assignment_expression "pcVar3 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pcVar3 != (char *)((int)param_4 + iVar2 + -1))" ( (binary_expression "pcVar3 != (char *)((int)param_4 + iVar2 + -1)" identifier != (cast_expression "(char *)((int)param_4 + iVar2 + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_4 + iVar2 + -1)" ( (binary_expression "(int)param_4 + iVar2 + -1" (binary_expression "(int)param_4 + iVar2" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) )) ;) (expression_statement "*(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';" (assignment_expression "*(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0'" (pointer_expression "*(char *)((int)(param_4 + 1) + iVar2 + -3)" * (cast_expression "(char *)((int)(param_4 + 1) + iVar2 + -3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)(param_4 + 1) + iVar2 + -3)" ( (binary_expression "(int)(param_4 + 1) + iVar2 + -3" (binary_expression "(int)(param_4 + 1) + iVar2" (cast_expression "(int)(param_4 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_4 + 1)" ( (binary_expression "param_4 + 1" identifier + number_literal) ))) + identifier) + number_literal) )))) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar8 = (undefined1 *)((int)param_4 + iVar2);" (assignment_expression "puVar8 = (undefined1 *)((int)param_4 + iVar2)" identifier = (cast_expression "(undefined1 *)((int)param_4 + iVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_4 + iVar2)" ( (binary_expression "(int)param_4 + iVar2" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (for_statement "for (; param_3 != 0; param_3 = param_3 + -1) {\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }" for ( ; (binary_expression "param_3 != 0" identifier != number_literal) ; (assignment_expression "param_3 = param_3 + -1" identifier = (binary_expression "param_3 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }" { (expression_statement "*puVar8 = *param_2;" (assignment_expression "*puVar8 = *param_2" (pointer_expression "*puVar8" * identifier) = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "param_2 = param_2 + (uint)bVar9 * -2 + 1;" (assignment_expression "param_2 = param_2 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "param_2 + (uint)bVar9 * -2 + 1" (binary_expression "param_2 + (uint)bVar9 * -2" identifier + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "puVar8 = puVar8 + (uint)bVar9 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "puVar8 + (uint)bVar9 * -2 + 1" (binary_expression "puVar8 + (uint)bVar9 * -2" identifier + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (if_statement "if ((int)uVar1 < 0) {\n                    \n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }" if (parenthesized_expression "((int)uVar1 < 0)" ( (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n                    \n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }" { (expression_statement "FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");" (call_expression "FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n")" identifier (argument_list "("Error padding psRsaEncryptPub. Likely data too long\n")" ( (string_literal ""Error padding psRsaEncryptPub. Likely data too long\n"" " string_content escape_sequence ") ))) ;) })) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "iVar2 = FUN_0003d238(local_30,uVar1 + 4);" (assignment_expression "iVar2 = FUN_0003d238(local_30,uVar1 + 4)" identifier = (call_expression "FUN_0003d238(local_30,uVar1 + 4)" identifier (argument_list "(local_30,uVar1 + 4)" ( identifier , (binary_expression "uVar1 + 4" identifier + number_literal) )))) ;) (if_statement "if (iVar2 == 0) {\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }" { (expression_statement "iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);" (assignment_expression "iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2)" identifier = (call_expression "FUN_0003d274(local_30,param_4,uVar1,param_2)" identifier (argument_list "(local_30,param_4,uVar1,param_2)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }" { (expression_statement "iVar2 = param_1 + 0x20;" (assignment_expression "iVar2 = param_1 + 0x20" identifier = (binary_expression "param_1 + 0x20" identifier + number_literal)) ;) (expression_statement "iVar4 = FUN_0003d207(iVar2,local_30);" (assignment_expression "iVar4 = FUN_0003d207(iVar2,local_30)" identifier = (call_expression "FUN_0003d207(iVar2,local_30)" identifier (argument_list "(iVar2,local_30)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }" if (parenthesized_expression "(iVar4 != -1)" ( (binary_expression "iVar4 != -1" identifier != number_literal) )) (compound_statement "{\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }" { (expression_statement "iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);" (assignment_expression "iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30)" identifier = (call_expression "FUN_0003e7a3(local_30,param_1,iVar2,local_30)" identifier (argument_list "(local_30,param_1,iVar2,local_30)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }" { (expression_statement "FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");" (call_expression "FUN_000191a6("psRsaCrypt error: pstm_exptmod\n")" identifier (argument_list "("psRsaCrypt error: pstm_exptmod\n")" ( (string_literal ""psRsaCrypt error: pstm_exptmod\n"" " string_content escape_sequence ") ))) ;) })) (expression_statement "uVar5 = FUN_0003d34d(iVar2);" (assignment_expression "uVar5 = FUN_0003d34d(iVar2)" identifier = (call_expression "FUN_0003d34d(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }" if (parenthesized_expression "(param_5 < uVar5)" ( (binary_expression "param_5 < uVar5" identifier < identifier) )) (compound_statement "{\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }" { (expression_statement "FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");" (call_expression "FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n")" identifier (argument_list "("psRsaCrypt error: pstm_unsigned_bin_size\n")" ( (string_literal ""psRsaCrypt error: pstm_unsigned_bin_size\n"" " string_content escape_sequence ") ))) ;) })) (expression_statement "puVar6 = param_4;" (assignment_expression "puVar6 = param_4" identifier = identifier) ;) (expression_statement "uVar7 = uVar5;" (assignment_expression "uVar7 = uVar5" identifier = identifier) ;) (if_statement "if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }" if (parenthesized_expression "(uVar5 < *(uint *)(param_1 + 0x80))" ( (binary_expression "uVar5 < *(uint *)(param_1 + 0x80)" identifier < (pointer_expression "*(uint *)(param_1 + 0x80)" * (cast_expression "(uint *)(param_1 + 0x80)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) )) (compound_statement "{\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }" { (do_statement "do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));" do (compound_statement "{\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          }" { (expression_statement "puVar6 = (undefined2 *)((int)param_4 + 1);" (assignment_expression "puVar6 = (undefined2 *)((int)param_4 + 1)" identifier = (cast_expression "(undefined2 *)((int)param_4 + 1)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_4 + 1)" ( (binary_expression "(int)param_4 + 1" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "*(undefined1 *)param_4 = 0;" (assignment_expression "*(undefined1 *)param_4 = 0" (pointer_expression "*(undefined1 *)param_4" * (cast_expression "(undefined1 *)param_4" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "param_4 = puVar6;" (assignment_expression "param_4 = puVar6" identifier = identifier) ;) (expression_statement "local_4c = puVar6;" (assignment_expression "local_4c = puVar6" identifier = identifier) ;) (expression_statement "uVar7 = uVar5;" (assignment_expression "uVar7 = uVar5" identifier = identifier) ;) }) while (parenthesized_expression "(uVar5 < *(uint *)(param_1 + 0x80))" ( (binary_expression "uVar5 < *(uint *)(param_1 + 0x80)" identifier < (pointer_expression "*(uint *)(param_1 + 0x80)" * (cast_expression "(uint *)(param_1 + 0x80)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) )) ;) })) (for_statement "for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }" for ( ; (binary_expression "uVar5 != 0" identifier != number_literal) ; (assignment_expression "uVar5 = uVar5 - 1" identifier = (binary_expression "uVar5 - 1" identifier - number_literal)) ) (compound_statement "{\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }" { (expression_statement "*(undefined1 *)puVar6 = 0;" (assignment_expression "*(undefined1 *)puVar6 = 0" (pointer_expression "*(undefined1 *)puVar6" * (cast_expression "(undefined1 *)puVar6" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (expression_statement "puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);" (assignment_expression "puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1)" identifier = (cast_expression "(undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar6 + (uint)bVar9 * -2 + 1)" ( (binary_expression "(int)puVar6 + (uint)bVar9 * -2 + 1" (binary_expression "(int)puVar6 + (uint)bVar9 * -2" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal) )))) ;) })) (expression_statement "iVar2 = FUN_0003d34d(local_30);" (assignment_expression "iVar2 = FUN_0003d34d(local_30)" identifier = (call_expression "FUN_0003d34d(local_30)" identifier (argument_list "(local_30)" ( identifier )))) ;) (expression_statement "iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));" (assignment_expression "iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)))" identifier = (call_expression "FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)))" identifier (argument_list "(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)))" ( identifier , (cast_expression "(undefined1 *)((int)local_4c + (uVar7 - iVar2))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_4c + (uVar7 - iVar2))" ( (binary_expression "(int)local_4c + (uVar7 - iVar2)" (cast_expression "(int)local_4c" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar7 - iVar2)" ( (binary_expression "uVar7 - iVar2" identifier - identifier) ))) ))) )))) ;) (if_statement "if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }" { (expression_statement "FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");" (call_expression "FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n")" identifier (argument_list "("psRsaCrypt error: pstm_to_unsigned_bin\n")" ( (string_literal ""psRsaCrypt error: pstm_to_unsigned_bin\n"" " string_content escape_sequence ") ))) ;) })) (expression_statement "FUN_0003d13c(local_30);" (call_expression "FUN_0003d13c(local_30)" identifier (argument_list "(local_30)" ( identifier ))) ;) (if_statement "if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }" if (parenthesized_expression "(uVar1 != uVar7)" ( (binary_expression "uVar1 != uVar7" identifier != identifier) )) (compound_statement "{\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }" { (expression_statement "FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");" (call_expression "FUN_000191a6("Encrypted size error in psRsaEncryptPub\n")" identifier (argument_list "("Encrypted size error in psRsaEncryptPub\n")" ( (string_literal ""Encrypted size error in psRsaEncryptPub\n"" " string_content escape_sequence ") ))) ;) })) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\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                    \n          FUN_00017e10();\n        }" { (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar1;" return identifier ;) })) })) (expression_statement "FUN_0003d13c(local_30);" (call_expression "FUN_0003d13c(local_30)" identifier (argument_list "(local_30)" ( identifier ))) ;) })) (expression_statement "FUN_000191a6("Error performing psRsaEncryptPub\n");" (call_expression "FUN_000191a6("Error performing psRsaEncryptPub\n")" identifier (argument_list "("Error performing psRsaEncryptPub\n")" ( (string_literal ""Error performing psRsaEncryptPub\n"" " string_content escape_sequence ") ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) )))) )) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) + IDENT) + LIT) )))) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (for_statement for ( ; (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)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (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 { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) ;) })) (for_statement for ( ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT - LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) ))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) })) (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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) })))
(function_definition "uint __regparm3\nFUN_0003f649(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)\n\n{\n  uint uVar1;\n  int iVar2;\n  char *pcVar3;\n  int iVar4;\n  uint uVar5;\n  undefined2 *puVar6;\n  uint uVar7;\n  undefined1 *puVar8;\n  int in_GS_OFFSET;\n  byte bVar9;\n  undefined2 *local_4c;\n  undefined1 local_30 [12];\n  undefined4 local_24;\n  int local_20;\n  \n  bVar9 = 0;\n  local_4c = param_4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x80);\n  if (param_5 < uVar1) {\n                    \n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }\n  iVar2 = uVar1 - param_3;\n  if (iVar2 + -3 < 8) {\n                    \n    FUN_000191a6("pkcs1Pad failure\n");\n  }\n  *param_4 = 0x200;\n  FUN_0003b031();\n  pcVar3 = (char *)(param_4 + 1);\n  do {\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));\n  *(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';\n  puVar8 = (undefined1 *)((int)param_4 + iVar2);\n  for (; param_3 != 0; param_3 = param_3 + -1) {\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }\n  if ((int)uVar1 < 0) {\n                    \n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }\n  local_24 = 0;\n  iVar2 = FUN_0003d238(local_30,uVar1 + 4);\n  if (iVar2 == 0) {\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }\n                    \n  FUN_000191a6("Error performing psRsaEncryptPub\n");\n}" (type_identifier "uint") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003f649(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)" (identifier "FUN_0003f649") (parameter_list "(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined1 *param_2" (type_identifier "undefined1") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "undefined2 *param_4" (type_identifier "undefined2") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "uint param_5" (type_identifier "uint") (identifier "param_5")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  char *pcVar3;\n  int iVar4;\n  uint uVar5;\n  undefined2 *puVar6;\n  uint uVar7;\n  undefined1 *puVar8;\n  int in_GS_OFFSET;\n  byte bVar9;\n  undefined2 *local_4c;\n  undefined1 local_30 [12];\n  undefined4 local_24;\n  int local_20;\n  \n  bVar9 = 0;\n  local_4c = param_4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x80);\n  if (param_5 < uVar1) {\n                    \n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }\n  iVar2 = uVar1 - param_3;\n  if (iVar2 + -3 < 8) {\n                    \n    FUN_000191a6("pkcs1Pad failure\n");\n  }\n  *param_4 = 0x200;\n  FUN_0003b031();\n  pcVar3 = (char *)(param_4 + 1);\n  do {\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));\n  *(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';\n  puVar8 = (undefined1 *)((int)param_4 + iVar2);\n  for (; param_3 != 0; param_3 = param_3 + -1) {\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }\n  if ((int)uVar1 < 0) {\n                    \n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }\n  local_24 = 0;\n  iVar2 = FUN_0003d238(local_30,uVar1 + 4);\n  if (iVar2 == 0) {\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }\n                    \n  FUN_000191a6("Error performing psRsaEncryptPub\n");\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "undefined2 *puVar6;" (type_identifier "undefined2") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "undefined1 *puVar8;" (type_identifier "undefined1") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "byte bVar9;" (type_identifier "byte") (identifier "bVar9") (; ";")) (declaration "undefined2 *local_4c;" (type_identifier "undefined2") (pointer_declarator "*local_4c" (* "*") (identifier "local_4c")) (; ";")) (declaration "undefined1 local_30 [12];" (type_identifier "undefined1") (array_declarator "local_30 [12]" (identifier "local_30") ([ "[") (number_literal "12") (] "]")) (; ";")) (declaration "undefined4 local_24;" (type_identifier "undefined4") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" (identifier "bVar9") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_4c = param_4;" (assignment_expression "local_4c = param_4" (identifier "local_4c") (= "=") (identifier "param_4")) (; ";")) (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 "uVar1 = *(uint *)(param_1 + 0x80);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x80)" (identifier "uVar1") (= "=") (pointer_expression "*(uint *)(param_1 + 0x80)" (* "*") (cast_expression "(uint *)(param_1 + 0x80)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x80)" (( "(") (binary_expression "param_1 + 0x80" (identifier "param_1") (+ "+") (number_literal "0x80")) () ")"))))) (; ";")) (if_statement "if (param_5 < uVar1) {\n                    \n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }" (if "if") (parenthesized_expression "(param_5 < uVar1)" (( "(") (binary_expression "param_5 < uVar1" (identifier "param_5") (< "<") (identifier "uVar1")) () ")")) (compound_statement "{\n                    \n    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);\n  }" ({ "{") (expression_statement "FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);" (call_expression "FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1)" (identifier "FUN_000191a6") (argument_list "("RSA crypt outlen:%d < size:%d",param_5,uVar1)" (( "(") (string_literal ""RSA crypt outlen:%d < size:%d"" (" """) (string_content "RSA crypt outlen:%d < size:%d") (" """)) (, ",") (identifier "param_5") (, ",") (identifier "uVar1") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar2 = uVar1 - param_3;" (assignment_expression "iVar2 = uVar1 - param_3" (identifier "iVar2") (= "=") (binary_expression "uVar1 - param_3" (identifier "uVar1") (- "-") (identifier "param_3"))) (; ";")) (if_statement "if (iVar2 + -3 < 8) {\n                    \n    FUN_000191a6("pkcs1Pad failure\n");\n  }" (if "if") (parenthesized_expression "(iVar2 + -3 < 8)" (( "(") (binary_expression "iVar2 + -3 < 8" (binary_expression "iVar2 + -3" (identifier "iVar2") (+ "+") (number_literal "-3")) (< "<") (number_literal "8")) () ")")) (compound_statement "{\n                    \n    FUN_000191a6("pkcs1Pad failure\n");\n  }" ({ "{") (expression_statement "FUN_000191a6("pkcs1Pad failure\n");" (call_expression "FUN_000191a6("pkcs1Pad failure\n")" (identifier "FUN_000191a6") (argument_list "("pkcs1Pad failure\n")" (( "(") (string_literal ""pkcs1Pad failure\n"" (" """) (string_content "pkcs1Pad failure") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "*param_4 = 0x200;" (assignment_expression "*param_4 = 0x200" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0x200")) (; ";")) (expression_statement "FUN_0003b031();" (call_expression "FUN_0003b031()" (identifier "FUN_0003b031") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "pcVar3 = (char *)(param_4 + 1);" (assignment_expression "pcVar3 = (char *)(param_4 + 1)" (identifier "pcVar3") (= "=") (cast_expression "(char *)(param_4 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 1)" (( "(") (binary_expression "param_4 + 1" (identifier "param_4") (+ "+") (number_literal "1")) () ")")))) (; ";")) (do_statement "do {\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));" (do "do") (compound_statement "{\n    if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }\n    pcVar3 = pcVar3 + 1;\n  }" ({ "{") (if_statement "if (*pcVar3 == '\0') {\n      *pcVar3 = '\x01';\n    }" (if "if") (parenthesized_expression "(*pcVar3 == '\0')" (( "(") (binary_expression "*pcVar3 == '\0'" (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      *pcVar3 = '\x01';\n    }" ({ "{") (expression_statement "*pcVar3 = '\x01';" (assignment_expression "*pcVar3 = '\x01'" (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3")) (= "=") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) (; ";")) (} "}"))) (expression_statement "pcVar3 = pcVar3 + 1;" (assignment_expression "pcVar3 = pcVar3 + 1" (identifier "pcVar3") (= "=") (binary_expression "pcVar3 + 1" (identifier "pcVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pcVar3 != (char *)((int)param_4 + iVar2 + -1))" (( "(") (binary_expression "pcVar3 != (char *)((int)param_4 + iVar2 + -1)" (identifier "pcVar3") (!= "!=") (cast_expression "(char *)((int)param_4 + iVar2 + -1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_4 + iVar2 + -1)" (( "(") (binary_expression "(int)param_4 + iVar2 + -1" (binary_expression "(int)param_4 + iVar2" (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (+ "+") (identifier "iVar2")) (+ "+") (number_literal "-1")) () ")")))) () ")")) (; ";")) (expression_statement "*(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';" (assignment_expression "*(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0'" (pointer_expression "*(char *)((int)(param_4 + 1) + iVar2 + -3)" (* "*") (cast_expression "(char *)((int)(param_4 + 1) + iVar2 + -3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)(param_4 + 1) + iVar2 + -3)" (( "(") (binary_expression "(int)(param_4 + 1) + iVar2 + -3" (binary_expression "(int)(param_4 + 1) + iVar2" (cast_expression "(int)(param_4 + 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(param_4 + 1)" (( "(") (binary_expression "param_4 + 1" (identifier "param_4") (+ "+") (number_literal "1")) () ")"))) (+ "+") (identifier "iVar2")) (+ "+") (number_literal "-3")) () ")")))) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "puVar8 = (undefined1 *)((int)param_4 + iVar2);" (assignment_expression "puVar8 = (undefined1 *)((int)param_4 + iVar2)" (identifier "puVar8") (= "=") (cast_expression "(undefined1 *)((int)param_4 + iVar2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_4 + iVar2)" (( "(") (binary_expression "(int)param_4 + iVar2" (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (+ "+") (identifier "iVar2")) () ")")))) (; ";")) (for_statement "for (; param_3 != 0; param_3 = param_3 + -1) {\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }" (for "for") (( "(") (; ";") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "param_3 = param_3 + -1" (identifier "param_3") (= "=") (binary_expression "param_3 + -1" (identifier "param_3") (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n    *puVar8 = *param_2;\n    param_2 = param_2 + (uint)bVar9 * -2 + 1;\n    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n  }" ({ "{") (expression_statement "*puVar8 = *param_2;" (assignment_expression "*puVar8 = *param_2" (pointer_expression "*puVar8" (* "*") (identifier "puVar8")) (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "param_2 = param_2 + (uint)bVar9 * -2 + 1;" (assignment_expression "param_2 = param_2 + (uint)bVar9 * -2 + 1" (identifier "param_2") (= "=") (binary_expression "param_2 + (uint)bVar9 * -2 + 1" (binary_expression "param_2 + (uint)bVar9 * -2" (identifier "param_2") (+ "+") (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar9")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar8 = puVar8 + (uint)bVar9 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar9 * -2 + 1" (identifier "puVar8") (= "=") (binary_expression "puVar8 + (uint)bVar9 * -2 + 1" (binary_expression "puVar8 + (uint)bVar9 * -2" (identifier "puVar8") (+ "+") (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar9")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (if_statement "if ((int)uVar1 < 0) {\n                    \n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }" (if "if") (parenthesized_expression "((int)uVar1 < 0)" (( "(") (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");\n  }" ({ "{") (expression_statement "FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");" (call_expression "FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n")" (identifier "FUN_000191a6") (argument_list "("Error padding psRsaEncryptPub. Likely data too long\n")" (( "(") (string_literal ""Error padding psRsaEncryptPub. Likely data too long\n"" (" """) (string_content "Error padding psRsaEncryptPub. Likely data too long") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" (identifier "local_24") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar2 = FUN_0003d238(local_30,uVar1 + 4);" (assignment_expression "iVar2 = FUN_0003d238(local_30,uVar1 + 4)" (identifier "iVar2") (= "=") (call_expression "FUN_0003d238(local_30,uVar1 + 4)" (identifier "FUN_0003d238") (argument_list "(local_30,uVar1 + 4)" (( "(") (identifier "local_30") (, ",") (binary_expression "uVar1 + 4" (identifier "uVar1") (+ "+") (number_literal "4")) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);\n    if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }\n    FUN_0003d13c(local_30);\n  }" ({ "{") (expression_statement "iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);" (assignment_expression "iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2)" (identifier "iVar2") (= "=") (call_expression "FUN_0003d274(local_30,param_4,uVar1,param_2)" (identifier "FUN_0003d274") (argument_list "(local_30,param_4,uVar1,param_2)" (( "(") (identifier "local_30") (, ",") (identifier "param_4") (, ",") (identifier "uVar1") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = param_1 + 0x20;\n      iVar4 = FUN_0003d207(iVar2,local_30);\n      if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }\n    }" ({ "{") (expression_statement "iVar2 = param_1 + 0x20;" (assignment_expression "iVar2 = param_1 + 0x20" (identifier "iVar2") (= "=") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20"))) (; ";")) (expression_statement "iVar4 = FUN_0003d207(iVar2,local_30);" (assignment_expression "iVar4 = FUN_0003d207(iVar2,local_30)" (identifier "iVar4") (= "=") (call_expression "FUN_0003d207(iVar2,local_30)" (identifier "FUN_0003d207") (argument_list "(iVar2,local_30)" (( "(") (identifier "iVar2") (, ",") (identifier "local_30") () ")")))) (; ";")) (if_statement "if (iVar4 != -1) {\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }" (if "if") (parenthesized_expression "(iVar4 != -1)" (( "(") (binary_expression "iVar4 != -1" (identifier "iVar4") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);\n        if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }\n        uVar5 = FUN_0003d34d(iVar2);\n        if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }\n        puVar6 = param_4;\n        uVar7 = uVar5;\n        if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }\n        for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }\n        iVar2 = FUN_0003d34d(local_30);\n        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));\n        if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }\n        FUN_0003d13c(local_30);\n        if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }\n        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\n        }\n        return uVar1;\n      }" ({ "{") (expression_statement "iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);" (assignment_expression "iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30)" (identifier "iVar4") (= "=") (call_expression "FUN_0003e7a3(local_30,param_1,iVar2,local_30)" (identifier "FUN_0003e7a3") (argument_list "(local_30,param_1,iVar2,local_30)" (( "(") (identifier "local_30") (, ",") (identifier "param_1") (, ",") (identifier "iVar2") (, ",") (identifier "local_30") () ")")))) (; ";")) (if_statement "if (iVar4 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");\n        }" ({ "{") (expression_statement "FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");" (call_expression "FUN_000191a6("psRsaCrypt error: pstm_exptmod\n")" (identifier "FUN_000191a6") (argument_list "("psRsaCrypt error: pstm_exptmod\n")" (( "(") (string_literal ""psRsaCrypt error: pstm_exptmod\n"" (" """) (string_content "psRsaCrypt error: pstm_exptmod") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar5 = FUN_0003d34d(iVar2);" (assignment_expression "uVar5 = FUN_0003d34d(iVar2)" (identifier "uVar5") (= "=") (call_expression "FUN_0003d34d(iVar2)" (identifier "FUN_0003d34d") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (if_statement "if (param_5 < uVar5) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }" (if "if") (parenthesized_expression "(param_5 < uVar5)" (( "(") (binary_expression "param_5 < uVar5" (identifier "param_5") (< "<") (identifier "uVar5")) () ")")) (compound_statement "{\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");\n        }" ({ "{") (expression_statement "FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");" (call_expression "FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n")" (identifier "FUN_000191a6") (argument_list "("psRsaCrypt error: pstm_unsigned_bin_size\n")" (( "(") (string_literal ""psRsaCrypt error: pstm_unsigned_bin_size\n"" (" """) (string_content "psRsaCrypt error: pstm_unsigned_bin_size") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "puVar6 = param_4;" (assignment_expression "puVar6 = param_4" (identifier "puVar6") (= "=") (identifier "param_4")) (; ";")) (expression_statement "uVar7 = uVar5;" (assignment_expression "uVar7 = uVar5" (identifier "uVar7") (= "=") (identifier "uVar5")) (; ";")) (if_statement "if (uVar5 < *(uint *)(param_1 + 0x80)) {\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }" (if "if") (parenthesized_expression "(uVar5 < *(uint *)(param_1 + 0x80))" (( "(") (binary_expression "uVar5 < *(uint *)(param_1 + 0x80)" (identifier "uVar5") (< "<") (pointer_expression "*(uint *)(param_1 + 0x80)" (* "*") (cast_expression "(uint *)(param_1 + 0x80)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x80)" (( "(") (binary_expression "param_1 + 0x80" (identifier "param_1") (+ "+") (number_literal "0x80")) () ")"))))) () ")")) (compound_statement "{\n          do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));\n        }" ({ "{") (do_statement "do {\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          } while (uVar5 < *(uint *)(param_1 + 0x80));" (do "do") (compound_statement "{\n            puVar6 = (undefined2 *)((int)param_4 + 1);\n            *(undefined1 *)param_4 = 0;\n            uVar5 = uVar5 + 1;\n            param_4 = puVar6;\n            local_4c = puVar6;\n            uVar7 = uVar5;\n          }" ({ "{") (expression_statement "puVar6 = (undefined2 *)((int)param_4 + 1);" (assignment_expression "puVar6 = (undefined2 *)((int)param_4 + 1)" (identifier "puVar6") (= "=") (cast_expression "(undefined2 *)((int)param_4 + 1)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_4 + 1)" (( "(") (binary_expression "(int)param_4 + 1" (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "*(undefined1 *)param_4 = 0;" (assignment_expression "*(undefined1 *)param_4 = 0" (pointer_expression "*(undefined1 *)param_4" (* "*") (cast_expression "(undefined1 *)param_4" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_4"))) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_4 = puVar6;" (assignment_expression "param_4 = puVar6" (identifier "param_4") (= "=") (identifier "puVar6")) (; ";")) (expression_statement "local_4c = puVar6;" (assignment_expression "local_4c = puVar6" (identifier "local_4c") (= "=") (identifier "puVar6")) (; ";")) (expression_statement "uVar7 = uVar5;" (assignment_expression "uVar7 = uVar5" (identifier "uVar7") (= "=") (identifier "uVar5")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar5 < *(uint *)(param_1 + 0x80))" (( "(") (binary_expression "uVar5 < *(uint *)(param_1 + 0x80)" (identifier "uVar5") (< "<") (pointer_expression "*(uint *)(param_1 + 0x80)" (* "*") (cast_expression "(uint *)(param_1 + 0x80)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x80)" (( "(") (binary_expression "param_1 + 0x80" (identifier "param_1") (+ "+") (number_literal "0x80")) () ")"))))) () ")")) (; ";")) (} "}"))) (for_statement "for (; uVar5 != 0; uVar5 = uVar5 - 1) {\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }" (for "for") (( "(") (; ";") (binary_expression "uVar5 != 0" (identifier "uVar5") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "uVar5 = uVar5 - 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 - 1" (identifier "uVar5") (- "-") (number_literal "1"))) () ")") (compound_statement "{\n          *(undefined1 *)puVar6 = 0;\n          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);\n        }" ({ "{") (expression_statement "*(undefined1 *)puVar6 = 0;" (assignment_expression "*(undefined1 *)puVar6 = 0" (pointer_expression "*(undefined1 *)puVar6" (* "*") (cast_expression "(undefined1 *)puVar6" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar6"))) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);" (assignment_expression "puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1)" (identifier "puVar6") (= "=") (cast_expression "(undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar6 + (uint)bVar9 * -2 + 1)" (( "(") (binary_expression "(int)puVar6 + (uint)bVar9 * -2 + 1" (binary_expression "(int)puVar6 + (uint)bVar9 * -2" (cast_expression "(int)puVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar6")) (+ "+") (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar9")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1")) () ")")))) (; ";")) (} "}"))) (expression_statement "iVar2 = FUN_0003d34d(local_30);" (assignment_expression "iVar2 = FUN_0003d34d(local_30)" (identifier "iVar2") (= "=") (call_expression "FUN_0003d34d(local_30)" (identifier "FUN_0003d34d") (argument_list "(local_30)" (( "(") (identifier "local_30") () ")")))) (; ";")) (expression_statement "iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));" (assignment_expression "iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)))" (identifier "iVar2") (= "=") (call_expression "FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)))" (identifier "FUN_0003ede0") (argument_list "(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)))" (( "(") (identifier "local_30") (, ",") (cast_expression "(undefined1 *)((int)local_4c + (uVar7 - iVar2))" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)local_4c + (uVar7 - iVar2))" (( "(") (binary_expression "(int)local_4c + (uVar7 - iVar2)" (cast_expression "(int)local_4c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_4c")) (+ "+") (parenthesized_expression "(uVar7 - iVar2)" (( "(") (binary_expression "uVar7 - iVar2" (identifier "uVar7") (- "-") (identifier "iVar2")) () ")"))) () ")"))) () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n                    \n          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");\n        }" ({ "{") (expression_statement "FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");" (call_expression "FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n")" (identifier "FUN_000191a6") (argument_list "("psRsaCrypt error: pstm_to_unsigned_bin\n")" (( "(") (string_literal ""psRsaCrypt error: pstm_to_unsigned_bin\n"" (" """) (string_content "psRsaCrypt error: pstm_to_unsigned_bin") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0003d13c(local_30);" (call_expression "FUN_0003d13c(local_30)" (identifier "FUN_0003d13c") (argument_list "(local_30)" (( "(") (identifier "local_30") () ")"))) (; ";")) (if_statement "if (uVar1 != uVar7) {\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }" (if "if") (parenthesized_expression "(uVar1 != uVar7)" (( "(") (binary_expression "uVar1 != uVar7" (identifier "uVar1") (!= "!=") (identifier "uVar7")) () ")")) (compound_statement "{\n                    \n          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");\n        }" ({ "{") (expression_statement "FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");" (call_expression "FUN_000191a6("Encrypted size error in psRsaEncryptPub\n")" (identifier "FUN_000191a6") (argument_list "("Encrypted size error in psRsaEncryptPub\n")" (( "(") (string_literal ""Encrypted size error in psRsaEncryptPub\n"" (" """) (string_content "Encrypted size error in psRsaEncryptPub") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n          FUN_00017e10();\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                    \n          FUN_00017e10();\n        }" ({ "{") (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" (identifier "FUN_00017e10") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (} "}"))) (expression_statement "FUN_0003d13c(local_30);" (call_expression "FUN_0003d13c(local_30)" (identifier "FUN_0003d13c") (argument_list "(local_30)" (( "(") (identifier "local_30") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_000191a6("Error performing psRsaEncryptPub\n");" (call_expression "FUN_000191a6("Error performing psRsaEncryptPub\n")" (identifier "FUN_000191a6") (argument_list "("Error performing psRsaEncryptPub\n")" (( "(") (string_literal ""Error performing psRsaEncryptPub\n"" (" """) (string_content "Error performing psRsaEncryptPub") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}")))

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

type_1 function_1(type_2 *key,type_3 *in,type_4 inlen,type_3 *out,type_4 outlen)

{
  type_5 tmp;
  
}


(translation_unit (function_definition type: (type_identifier) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier) (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (identifier)) right: (number_literal))))) right: (char_literal (escape_sequence)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)))))) (for_statement 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)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (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 (string_literal (string_content) (escape_sequence))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))) (for_statement 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: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (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: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (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 (string_literal (string_content) (escape_sequence))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))))) (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 (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))))))

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

uint __regparm3
MASKED(int param_1,undefined1 *param_2,int param_3,undefined2 *param_4,uint param_5)

{
  uint uVar1;
  int iVar2;
  char *pcVar3;
  int iVar4;
  uint uVar5;
  undefined2 *puVar6;
  uint uVar7;
  undefined1 *puVar8;
  int in_GS_OFFSET;
  byte bVar9;
  undefined2 *local_4c;
  undefined1 local_30 [12];
  undefined4 local_24;
  int local_20;
  
  bVar9 = 0;
  local_4c = param_4;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar1 = *(uint *)(param_1 + 0x80);
  if (param_5 < uVar1) {
                    /* WARNING: Subroutine does not return */
    FUN_000191a6("RSA crypt outlen:%d < size:%d",param_5,uVar1);
  }
  iVar2 = uVar1 - param_3;
  if (iVar2 + -3 < 8) {
                    /* WARNING: Subroutine does not return */
    FUN_000191a6("pkcs1Pad failure\n");
  }
  *param_4 = 0x200;
  FUN_0003b031();
  pcVar3 = (char *)(param_4 + 1);
  do {
    if (*pcVar3 == '\0') {
      *pcVar3 = '\x01';
    }
    pcVar3 = pcVar3 + 1;
  } while (pcVar3 != (char *)((int)param_4 + iVar2 + -1));
  *(char *)((int)(param_4 + 1) + iVar2 + -3) = '\0';
  puVar8 = (undefined1 *)((int)param_4 + iVar2);
  for (; param_3 != 0; param_3 = param_3 + -1) {
    *puVar8 = *param_2;
    param_2 = param_2 + (uint)bVar9 * -2 + 1;
    puVar8 = puVar8 + (uint)bVar9 * -2 + 1;
  }
  if ((int)uVar1 < 0) {
                    /* WARNING: Subroutine does not return */
    FUN_000191a6("Error padding psRsaEncryptPub. Likely data too long\n");
  }
  local_24 = 0;
  iVar2 = FUN_0003d238(local_30,uVar1 + 4);
  if (iVar2 == 0) {
    iVar2 = FUN_0003d274(local_30,param_4,uVar1,param_2);
    if (iVar2 == 0) {
      iVar2 = param_1 + 0x20;
      iVar4 = FUN_0003d207(iVar2,local_30);
      if (iVar4 != -1) {
        iVar4 = FUN_0003e7a3(local_30,param_1,iVar2,local_30);
        if (iVar4 != 0) {
                    /* WARNING: Subroutine does not return */
          FUN_000191a6("psRsaCrypt error: pstm_exptmod\n");
        }
        uVar5 = FUN_0003d34d(iVar2);
        if (param_5 < uVar5) {
                    /* WARNING: Subroutine does not return */
          FUN_000191a6("psRsaCrypt error: pstm_unsigned_bin_size\n");
        }
        puVar6 = param_4;
        uVar7 = uVar5;
        if (uVar5 < *(uint *)(param_1 + 0x80)) {
          do {
            puVar6 = (undefined2 *)((int)param_4 + 1);
            *(undefined1 *)param_4 = 0;
            uVar5 = uVar5 + 1;
            param_4 = puVar6;
            local_4c = puVar6;
            uVar7 = uVar5;
          } while (uVar5 < *(uint *)(param_1 + 0x80));
        }
        for (; uVar5 != 0; uVar5 = uVar5 - 1) {
          *(undefined1 *)puVar6 = 0;
          puVar6 = (undefined2 *)((int)puVar6 + (uint)bVar9 * -2 + 1);
        }
        iVar2 = FUN_0003d34d(local_30);
        iVar2 = FUN_0003ede0(local_30,(undefined1 *)((int)local_4c + (uVar7 - iVar2)));
        if (iVar2 != 0) {
                    /* WARNING: Subroutine does not return */
          FUN_000191a6("psRsaCrypt error: pstm_to_unsigned_bin\n");
        }
        FUN_0003d13c(local_30);
        if (uVar1 != uVar7) {
                    /* WARNING: Subroutine does not return */
          FUN_000191a6("Encrypted size error in psRsaEncryptPub\n");
        }
        if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
          FUN_00017e10();
        }
        return uVar1;
      }
    }
    FUN_0003d13c(local_30);
  }
                    /* WARNING: Subroutine does not return */
  FUN_000191a6("Error performing psRsaEncryptPub\n");
}

