{"type": "func", "start": 333826, "end": 333894, "name": "sub_51802", "pseudocode": "// \n// sub_51802 from 0x51802 to 0x51846 (68 bytes)\n// \n// 3 xrefs:\n// > sub_50EB0 @ 0x50ebe\n// > sub_51AF4 @ 0x51afc\n// > sub_51B12 @ 0x51b2e\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_51802(int a1, int a2, int a3, int a4)\n{\n  int v7; // [sp+4h] [bp-14h] BYREF\n  int v8; // [sp+8h] [bp-10h] BYREF\n  int v9; // [sp+Ch] [bp-Ch]\n\n  v7 = a2;\n  v8 = a3;\n  v9 = a4;\n  if ( !sub_51A4C(a1) )\n    return *(_DWORD *)(v9 + 68);\n  if ( !sub_519F8(a1, a2, &v8) )\n    return *(_DWORD *)(v8 + 148);\n  if ( sub_51A22(a1, a2, &v7) )\n    return 0;\n  return *(_DWORD *)(v7 + 140);\n}", "assembly": "; \n; sub_51802 from 0x51802 to 0x51846 (68 bytes)\n; \n; 3 xrefs:\n; > sub_50EB0 @ 0x50ebe\n; > sub_51AF4 @ 0x51afc\n; > sub_51B12 @ 0x51b2e\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            {R0-R5,R7,LR}                                          ; +0x0, 0x51802\nADD             R7, SP, #0x18                                          ; +0x2, 0x51804\nADD             R2, SP, #0x10+var_4                                    ; +0x4, 0x51806\nMOV             R4, R1                                                 ; +0x6, 0x51808\nMOV             R5, R0                                                 ; +0x8, 0x5180a\nBL              sub_51A4C                                              ; +0xa, 0x5180c\nCBZ             R0, loc_51836                                          ; +0xe, 0x51810\nADD             R2, SP, #0x10+var_8                                    ; +0x10, 0x51812\nMOV             R0, R5                                                 ; +0x12, 0x51814\nMOV             R1, R4                                                 ; +0x14, 0x51816\nBL              sub_519F8                                              ; +0x16, 0x51818\nCBZ             R0, loc_5183C                                          ; +0x1a, 0x5181c\nADD             R2, SP, #0x10+var_C                                    ; +0x1c, 0x5181e\nMOV             R0, R5                                                 ; +0x1e, 0x51820\nMOV             R1, R4                                                 ; +0x20, 0x51822\nBL              sub_51A22                                              ; +0x22, 0x51824\nCMP             R0, #0                                                 ; +0x26, 0x51828\nITTE EQ                                                                ; +0x28, 0x5182a\nLDREQ           R0, [SP,#0x10+var_C]                                   ; +0x2a, 0x5182c\nLDREQ.W         R0, [R0,#0x8C]                                         ; +0x2c, 0x5182e\nMOVNE           R0, #0                                                 ; +0x30, 0x51832\nB               loc_51842                                              ; +0x32, 0x51834\nLDR             R0, [SP,#0x10+var_4]                                   ; +0x34, 0x51836\nLDR             R0, [R0,#0x44]                                         ; +0x36, 0x51838\nB               loc_51842                                              ; +0x38, 0x5183a\nLDR             R0, [SP,#0x10+var_8]                                   ; +0x3a, 0x5183c\nLDR.W           R0, [R0,#0x94]                                         ; +0x3c, 0x5183e\nADD             SP, SP, #0x10                                          ; +0x40, 0x51842\nPOP             {R4,R5,R7,PC}                                          ; +0x42, 0x51844", "xrefs": ["sub_50EB0 @ 0x50ebe", "sub_51AF4 @ 0x51afc", "sub_51B12 @ 0x51b2e"], "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"}