{"type": "func", "start": 328208, "end": 328422, "name": "sub_50210", "pseudocode": "// \n// sub_50210 from 0x50210 to 0x502e6 (214 bytes)\n// \n// 1 xrefs:\n// > sub_4D314 @ 0x4d474\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\nfloat *__fastcall sub_50210(int a1, int a2)\n{\n  float v4; // s2\n  float v5; // s8\n  int v6; // r6\n  int v7; // r9\n  int v8; // r8\n  int v9; // r0\n  int v10; // r1\n  int v11; // r1\n  int v12; // r0\n\n  if ( (*(_BYTE *)(a2 + 24) & 0x40) == 0 )\n    return (float *)sub_4FCE8(a1, a2);\n  v4 = *(float *)(a2 + 12) - *(float *)(a2 + 8);\n  v5 = *(float *)(a2 + 20) - *(float *)(a2 + 16);\n  if ( (float)(*(float *)(a2 + 4) - *(float *)a2) > v4 )\n    v4 = *(float *)(a2 + 4) - *(float *)a2;\n  if ( v4 > v5 )\n    v5 = v4;\n  v6 = sub_4FD90((int)(float)((float)(*(float *)(a1 + 16) * 1073700000.0) * v5));\n  v7 = sub_4FDAC(a1, (float *)a2);\n  v8 = sub_4FDE4(a1, a2);\n  v9 = sub_4FE1C(a1, a2);\n  v10 = *(_DWORD *)(a2 + 28);\n  if ( v6 != v10\n    || (v11 = -v10, ((*(_DWORD *)(a2 + 32) ^ v7) & v11) != 0)\n    || ((*(_DWORD *)(a2 + 36) ^ v8) & v11) != 0\n    || (v12 = v9 ^ *(_DWORD *)(a2 + 40), (v12 & v11) != 0) )\n  {\n    sub_5006E((_DWORD *)a1, (_DWORD *)a2);\n    return (float *)sub_4FCE8(a1, a2);\n  }\n  return sub_50190(v12, a2);\n}", "assembly": "; \n; sub_50210 from 0x50210 to 0x502e6 (214 bytes)\n; \n; 1 xrefs:\n; > sub_4D314 @ 0x4d474\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-R7,LR}                                             ; +0x0, 0x50210\nADD             R7, SP, #0xC                                           ; +0x2, 0x50212\nPUSH.W          {R8,R9,R11}                                            ; +0x4, 0x50214\nMOV             R5, R0                                                 ; +0x8, 0x50218\nLDRB            R0, [R1,#0x18]                                         ; +0xa, 0x5021a\nMOV             R4, R1                                                 ; +0xc, 0x5021c\nLSLS            R0, R0, #0x19                                          ; +0xe, 0x5021e\nBPL             loc_502C8                                              ; +0x10, 0x50220\nVLDR            S0, [R4]                                               ; +0x12, 0x50222\nVLDR            S2, [R4,#4]                                            ; +0x16, 0x50226\nVLDR            S4, [R4,#8]                                            ; +0x1a, 0x5022a\nVLDR            S6, [R4,#0xC]                                          ; +0x1e, 0x5022e\nVSUB.F32        S0, S2, S0                                             ; +0x22, 0x50232\nVLDR            S8, [R4,#0x10]                                         ; +0x26, 0x50236\nVLDR            S10, [R4,#0x14]                                        ; +0x2a, 0x5023a\nVSUB.F32        S2, S6, S4                                             ; +0x2e, 0x5023e\nVSUB.F32        S8, S10, S8                                            ; +0x32, 0x50242\nVCMPE.F32       S0, S2                                                 ; +0x36, 0x50246\nVMRS            APSR_nzcv, FPSCR                                       ; +0x3a, 0x5024a\nIT GT                                                                  ; +0x3e, 0x5024e\nVMOVGT.F32      S2, S0                                                 ; +0x40, 0x50250\nVCMPE.F32       S2, S8                                                 ; +0x44, 0x50254\nVMRS            APSR_nzcv, FPSCR                                       ; +0x48, 0x50258\nIT GT                                                                  ; +0x4c, 0x5025c\nVMOVGT.F32      S8, S2                                                 ; +0x4e, 0x5025e\nVLDR            S0, [R5,#0x10]                                         ; +0x52, 0x50262\nVLDR            S2, =1.0737e9                                          ; +0x56, 0x50266\nVMUL.F32        S0, S0, S2                                             ; +0x5a, 0x5026a\nVMUL.F32        S0, S0, S8                                             ; +0x5e, 0x5026e\nVCVT.S32.F32    S0, S0                                                 ; +0x62, 0x50272\nVMOV            R0, S0                                                 ; +0x66, 0x50276\nBL              sub_4FD90                                              ; +0x6a, 0x5027a\nMOV             R6, R0                                                 ; +0x6e, 0x5027e\nMOV             R0, R5                                                 ; +0x70, 0x50280\nMOV             R1, R4                                                 ; +0x72, 0x50282\nBL              sub_4FDAC                                              ; +0x74, 0x50284\nMOV             R9, R0                                                 ; +0x78, 0x50288\nMOV             R0, R5                                                 ; +0x7a, 0x5028a\nMOV             R1, R4                                                 ; +0x7c, 0x5028c\nBL              sub_4FDE4                                              ; +0x7e, 0x5028e\nMOV             R8, R0                                                 ; +0x82, 0x50292\nMOV             R0, R5                                                 ; +0x84, 0x50294\nMOV             R1, R4                                                 ; +0x86, 0x50296\nBL              sub_4FE1C                                              ; +0x88, 0x50298\nLDR             R1, [R4,#0x1C]                                         ; +0x8c, 0x5029c\nCMP             R6, R1                                                 ; +0x8e, 0x5029e\nBNE             loc_502C0                                              ; +0x90, 0x502a0\nLDR             R2, [R4,#0x20]                                         ; +0x92, 0x502a2\nNEGS            R1, R1                                                 ; +0x94, 0x502a4\nEOR.W           R2, R2, R9                                             ; +0x96, 0x502a6\nTST             R2, R1                                                 ; +0x9a, 0x502aa\nBNE             loc_502C0                                              ; +0x9c, 0x502ac\nLDR             R2, [R4,#0x24]                                         ; +0x9e, 0x502ae\nEOR.W           R2, R2, R8                                             ; +0xa0, 0x502b0\nTST             R2, R1                                                 ; +0xa4, 0x502b4\nBNE             loc_502C0                                              ; +0xa6, 0x502b6\nLDR             R2, [R4,#0x28]                                         ; +0xa8, 0x502b8\nEORS            R0, R2                                                 ; +0xaa, 0x502ba\nTST             R0, R1                                                 ; +0xac, 0x502bc\nBEQ             loc_502D8                                              ; +0xae, 0x502be\nMOV             R0, R5                                                 ; +0xb0, 0x502c0\nMOV             R1, R4                                                 ; +0xb2, 0x502c2\nBL              sub_5006E                                              ; +0xb4, 0x502c4\nMOV             R0, R5                                                 ; +0xb8, 0x502c8\nMOV             R1, R4                                                 ; +0xba, 0x502ca\nPOP.W           {R8,R9,R11}                                            ; +0xbc, 0x502cc\nPOP.W           {R4-R7,LR}                                             ; +0xc0, 0x502d0\nB.W             sub_4FCE8                                              ; +0xc4, 0x502d4\nMOV             R1, R4                                                 ; +0xc8, 0x502d8\nPOP.W           {R8,R9,R11}                                            ; +0xca, 0x502da\nPOP.W           {R4-R7,LR}                                             ; +0xce, 0x502de\nB.W             sub_50190                                              ; +0xd2, 0x502e2", "xrefs": ["sub_4D314 @ 0x4d474"], "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"}