{"type": "func", "start": 590684, "end": 590768, "name": "sub_9035C", "pseudocode": "// \n// sub_9035C from 0x9035c to 0x903b0 (84 bytes)\n// \n// 1 xrefs:\n// > sub_90A8E @ 0x90a94\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nint __fastcall sub_9035C(int a1, int a2, unsigned int a3)\n{\n  float v3; // s0\n  int v4; // r1\n  unsigned int v5; // r1\n  unsigned int v6; // s2\n  bool v7; // cf\n  unsigned int v8; // r2\n\n  v3 = *(float *)(a1 + 456);\n  if ( v3 < 0.0 )\n    return 0;\n  if ( a2 )\n  {\n    v5 = *(_DWORD *)(a1 + 452);\n    if ( !v5 )\n      return 11;\n  }\n  else\n  {\n    v6 = (unsigned int)(float)(v3 * (float)*(int *)(*(_DWORD *)(a1 + 128) + 1184));\n    *(_DWORD *)(a1 + 452) = v6;\n    v5 = v6;\n  }\n  v7 = v5 >= a3;\n  v8 = v5 - a3;\n  v4 = 0;\n  if ( !v7 )\n    v8 = 0;\n  *(_DWORD *)(a1 + 452) = v8;\n  return v4;\n}", "assembly": "; \n; sub_9035C from 0x9035c to 0x903b0 (84 bytes)\n; \n; 1 xrefs:\n; > sub_90A8E @ 0x90a94\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nVLDR            S0, [R0,#0x1C8]                                        ; +0x0, 0x9035c\nVCMPE.F32       S0, #0.0                                               ; +0x4, 0x90360\nVMRS            APSR_nzcv, FPSCR                                       ; +0x8, 0x90364\nBGE             loc_9036E                                              ; +0xc, 0x90368\nMOVS            R1, #0                                                 ; +0xe, 0x9036a\nB               loc_903AC                                              ; +0x10, 0x9036c\nCBZ             R1, loc_9037A                                          ; +0x12, 0x9036e\nLDR.W           R1, [R0,#0x1C4]                                        ; +0x14, 0x90370\nCBNZ            R1, loc_9039E                                          ; +0x18, 0x90374\nMOVS            R1, #0xB                                               ; +0x1a, 0x90376\nB               loc_903AC                                              ; +0x1c, 0x90378\nLDR.W           R1, [R0,#0x80]                                         ; +0x1e, 0x9037a\nADD.W           R1, R1, #0x4A0                                         ; +0x22, 0x9037e\nVLDR            S2, [R1]                                               ; +0x26, 0x90382\nVCVT.F32.S32    S2, S2                                                 ; +0x2a, 0x90386\nVMUL.F32        S0, S0, S2                                             ; +0x2e, 0x9038a\nVCVT.U32.F32    S2, S0                                                 ; +0x32, 0x9038e\nVSTR            S2, [R0,#0x1C4]                                        ; +0x36, 0x90392\nVCVT.U32.F32    S0, S0                                                 ; +0x3a, 0x90396\nVMOV            R1, S0                                                 ; +0x3e, 0x9039a\nSUBS            R2, R1, R2                                             ; +0x42, 0x9039e\nMOV.W           R1, #0                                                 ; +0x44, 0x903a0\nIT CC                                                                  ; +0x48, 0x903a4\nMOVCC           R2, R1                                                 ; +0x4a, 0x903a6\nSTR.W           R2, [R0,#0x1C4]                                        ; +0x4c, 0x903a8\nMOV             R0, R1                                                 ; +0x50, 0x903ac\nBX              LR                                                     ; +0x52, 0x903ae", "xrefs": ["sub_90A8E @ 0x90a94"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}