{"type": "func", "start": 326888, "end": 327052, "name": "sub_4FCE8", "pseudocode": "// \n// sub_4FCE8 from 0x4fce8 to 0x4fd8c (164 bytes)\n// \n// 2 xrefs:\n// > sub_4DD08 @ 0x4df5a\n// > sub_50210 @ 0x502d4\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_4FCE8(int a1, int a2)\n{\n  int result; // r0\n  float v5; // s2\n  float v6; // s8\n\n  result = *(_DWORD *)(a2 + 24);\n  if ( (result & 0x40) == 0 )\n  {\n    *(_DWORD *)(a2 + 24) = result | 0x44;\n    v5 = *(float *)(a2 + 12) - *(float *)(a2 + 8);\n    v6 = *(float *)(a2 + 20) - *(float *)(a2 + 16);\n    if ( (float)(*(float *)(a2 + 4) - *(float *)a2) > v5 )\n      v5 = *(float *)(a2 + 4) - *(float *)a2;\n    if ( v5 > v6 )\n      v6 = v5;\n    *(_DWORD *)(a2 + 28) = sub_4FD90((int)(float)((float)(*(float *)(a1 + 16) * 1073700000.0) * v6), result << 25);\n    *(_DWORD *)(a2 + 32) = sub_4FDAC(a1, a2);\n    *(_DWORD *)(a2 + 36) = sub_4FDE4(a1, a2);\n    result = sub_4FE1C(a1, a2);\n    *(_DWORD *)(a2 + 40) = result;\n    if ( *(_DWORD *)a1 )\n      return sub_4FE54(a1, *(_DWORD *)a1, a2);\n    else\n      *(_DWORD *)a1 = a2;\n  }\n  return result;\n}", "assembly": "; \n; sub_4FCE8 from 0x4fce8 to 0x4fd8c (164 bytes)\n; \n; 2 xrefs:\n; > sub_4DD08 @ 0x4df5a\n; > sub_50210 @ 0x502d4\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\nPUSH            {R4,R5,R7,LR}                                          ; +0x0, 0x4fce8\nADD             R7, SP, #8                                             ; +0x2, 0x4fcea\nMOV             R5, R0                                                 ; +0x4, 0x4fcec\nLDR             R0, [R1,#0x18]                                         ; +0x6, 0x4fcee\nMOV             R4, R1                                                 ; +0x8, 0x4fcf0\nLSLS            R1, R0, #0x19                                          ; +0xa, 0x4fcf2\nBMI             locret_4FD8A                                           ; +0xc, 0x4fcf4\nORR.W           R0, R0, #0x44 ; 'D'                                    ; +0xe, 0x4fcf6\nSTR             R0, [R4,#0x18]                                         ; +0x12, 0x4fcfa\nVLDR            S0, [R4]                                               ; +0x14, 0x4fcfc\nVLDR            S2, [R4,#4]                                            ; +0x18, 0x4fd00\nVLDR            S4, [R4,#8]                                            ; +0x1c, 0x4fd04\nVLDR            S6, [R4,#0xC]                                          ; +0x20, 0x4fd08\nVSUB.F32        S0, S2, S0                                             ; +0x24, 0x4fd0c\nVLDR            S8, [R4,#0x10]                                         ; +0x28, 0x4fd10\nVLDR            S10, [R4,#0x14]                                        ; +0x2c, 0x4fd14\nVSUB.F32        S2, S6, S4                                             ; +0x30, 0x4fd18\nVSUB.F32        S8, S10, S8                                            ; +0x34, 0x4fd1c\nVCMPE.F32       S0, S2                                                 ; +0x38, 0x4fd20\nVMRS            APSR_nzcv, FPSCR                                       ; +0x3c, 0x4fd24\nIT GT                                                                  ; +0x40, 0x4fd28\nVMOVGT.F32      S2, S0                                                 ; +0x42, 0x4fd2a\nVCMPE.F32       S2, S8                                                 ; +0x46, 0x4fd2e\nVMRS            APSR_nzcv, FPSCR                                       ; +0x4a, 0x4fd32\nIT GT                                                                  ; +0x4e, 0x4fd36\nVMOVGT.F32      S8, S2                                                 ; +0x50, 0x4fd38\nVLDR            S0, [R5,#0x10]                                         ; +0x54, 0x4fd3c\nVLDR            S2, =1.0737e9                                          ; +0x58, 0x4fd40\nVMUL.F32        S0, S0, S2                                             ; +0x5c, 0x4fd44\nVMUL.F32        S0, S0, S8                                             ; +0x60, 0x4fd48\nVCVT.S32.F32    S0, S0                                                 ; +0x64, 0x4fd4c\nVMOV            R0, S0                                                 ; +0x68, 0x4fd50\nBL              sub_4FD90                                              ; +0x6c, 0x4fd54\nSTR             R0, [R4,#0x1C]                                         ; +0x70, 0x4fd58\nMOV             R0, R5                                                 ; +0x72, 0x4fd5a\nMOV             R1, R4                                                 ; +0x74, 0x4fd5c\nBL              sub_4FDAC                                              ; +0x76, 0x4fd5e\nSTR             R0, [R4,#0x20]                                         ; +0x7a, 0x4fd62\nMOV             R0, R5                                                 ; +0x7c, 0x4fd64\nMOV             R1, R4                                                 ; +0x7e, 0x4fd66\nBL              sub_4FDE4                                              ; +0x80, 0x4fd68\nSTR             R0, [R4,#0x24]                                         ; +0x84, 0x4fd6c\nMOV             R0, R5                                                 ; +0x86, 0x4fd6e\nMOV             R1, R4                                                 ; +0x88, 0x4fd70\nBL              sub_4FE1C                                              ; +0x8a, 0x4fd72\nSTR             R0, [R4,#0x28]                                         ; +0x8e, 0x4fd76\nLDR             R1, [R5]                                               ; +0x90, 0x4fd78\nCBZ             R1, loc_4FD88                                          ; +0x92, 0x4fd7a\nMOV             R0, R5                                                 ; +0x94, 0x4fd7c\nMOV             R2, R4                                                 ; +0x96, 0x4fd7e\nPOP.W           {R4,R5,R7,LR}                                          ; +0x98, 0x4fd80\nB.W             sub_4FE54                                              ; +0x9c, 0x4fd84\nSTR             R4, [R5]                                               ; +0xa0, 0x4fd88\nPOP             {R4,R5,R7,PC}                                          ; +0xa2, 0x4fd8a", "xrefs": ["sub_4DD08 @ 0x4df5a", "sub_50210 @ 0x502d4"], "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"}