{"type": "func", "start": 6443262416, "end": 6443262774, "name": "FMOD_Memory_Initialize", "pseudocode": "// \n// FMOD_Memory_Initialize from 0x1800c61d0 to 0x1800c6336 (358 bytes)\n// \n// 3 xrefs:\n// > FMOD5_Memory_Initialize @ 0x1800f44c0\n// > <???> @ 0x180194348\n// > <???> @ 0x1801fdff8\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\n__int64 __fastcall FMOD_Memory_Initialize(__int64 a1, signed int a2, __int64 a3, __int64 a4, __int64 a5, int a6)\n{\n  __int64 v6; // r10\n  _QWORD *v7; // rax\n  __int64 result; // rax\n  _QWORD *v9; // rdx\n  _QWORD *v10; // rcx\n  _QWORD *v11; // rcx\n\n  v6 = 0;\n  v7 = (_QWORD *)((char *)off_1801AED20 + 352);\n  do\n  {\n    if ( *v7 )\n      return 27;\n    ++v6;\n    ++v7;\n  }\n  while ( v6 < 8 );\n  if ( a2 % 256 )\n    return 31;\n  *((_DWORD *)off_1801AED20 + 9) = a6;\n  if ( !a2 )\n  {\n    if ( !a1 )\n    {\n      if ( a3 )\n      {\n        if ( a5 )\n        {\n          v10 = *((_QWORD **)off_1801AED20 + 52);\n          v10[10] = a3;\n          v10[11] = a4;\n          v10[12] = a5;\n          return 0;\n        }\n      }\n      else if ( !a4 && !a5 )\n      {\n        v11 = *((_QWORD **)off_1801AED20 + 52);\n        v11[10] = sub_1800B6410;\n        v11[11] = sub_1800B6420;\n        v11[12] = j_j_free;\n        return 0;\n      }\n    }\n    return 31;\n  }\n  if ( !a1 || a3 || a4 || a5 || a2 < 256 )\n    return 31;\n  result = sub_1800B6C70(*((_QWORD *)off_1801AED20 + 52), a1, a2, 4, 0);\n  if ( !(_DWORD)result )\n  {\n    v9 = *((_QWORD **)off_1801AED20 + 52);\n    v9[10] = 0;\n    v9[11] = 0;\n    v9[12] = 0;\n  }\n  return result;\n}", "assembly": "; \n; FMOD_Memory_Initialize from 0x1800c61d0 to 0x1800c6336 (358 bytes)\n; \n; 3 xrefs:\n; > FMOD5_Memory_Initialize @ 0x1800f44c0\n; > <???> @ 0x180194348\n; > <???> @ 0x1801fdff8\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    rbx                                                            ; +0x0, 0x1800c61d0\nsub     rsp, 30h                                                       ; +0x2, 0x1800c61d2\nmov     r11, cs:off_1801AED20                                          ; +0x6, 0x1800c61d6\nxor     ebx, ebx                                                       ; +0xd, 0x1800c61dd\nmov     r10d, ebx                                                      ; +0xf, 0x1800c61df\nlea     rax, [r11+160h]                                                ; +0x12, 0x1800c61e2\nnop     dword ptr [rax+00000000h]                                      ; +0x19, 0x1800c61e9\ncmp     [rax], rbx                                                     ; +0x20, 0x1800c61f0\njnz     loc_1800C632B                                                  ; +0x23, 0x1800c61f3\ninc     r10                                                            ; +0x29, 0x1800c61f9\nadd     rax, 8                                                         ; +0x2c, 0x1800c61fc\ncmp     r10, 8                                                         ; +0x30, 0x1800c6200\njl      short loc_1800C61F0                                            ; +0x34, 0x1800c6204\nmov     eax, edx                                                       ; +0x36, 0x1800c6206\nand     eax, 800000FFh                                                 ; +0x38, 0x1800c6208\njge     short loc_1800C6218                                            ; +0x3d, 0x1800c620d\ndec     eax                                                            ; +0x3f, 0x1800c620f\nor      eax, 0FFFFFF00h                                                ; +0x41, 0x1800c6211\ninc     eax                                                            ; +0x46, 0x1800c6216\ntest    eax, eax                                                       ; +0x48, 0x1800c6218\njnz     loc_1800C6320                                                  ; +0x4a, 0x1800c621a\nmov     eax, [rsp+38h+arg_28]                                          ; +0x50, 0x1800c6220\nmov     [r11+24h], eax                                                 ; +0x54, 0x1800c6224\ntest    edx, edx                                                       ; +0x58, 0x1800c6228\njz      short loc_1800C62A7                                            ; +0x5a, 0x1800c622a\ntest    rcx, rcx                                                       ; +0x5c, 0x1800c622c\njz      loc_1800C6320                                                  ; +0x5f, 0x1800c622f\ntest    r8, r8                                                         ; +0x65, 0x1800c6235\njnz     loc_1800C6320                                                  ; +0x68, 0x1800c6238\ntest    r9, r9                                                         ; +0x6e, 0x1800c623e\njnz     loc_1800C6320                                                  ; +0x71, 0x1800c6241\ncmp     [rsp+38h+arg_20], rbx                                          ; +0x77, 0x1800c6247\njnz     loc_1800C6320                                                  ; +0x7c, 0x1800c624c\ncmp     edx, 100h                                                      ; +0x82, 0x1800c6252\njl      loc_1800C6320                                                  ; +0x88, 0x1800c6258\nlea     r9d, [r8+4]                                                    ; +0x8e, 0x1800c625e\nmov     [rsp+38h+var_18], ebx                                          ; +0x92, 0x1800c6262\nmov     r8d, edx                                                       ; +0x96, 0x1800c6266\nmov     rdx, rcx                                                       ; +0x99, 0x1800c6269\nmov     rcx, cs:off_1801AED20                                          ; +0x9c, 0x1800c626c\nmov     rcx, [rcx+1A0h]                                                ; +0xa3, 0x1800c6273\ncall    sub_1800B6C70                                                  ; +0xaa, 0x1800c627a\ntest    eax, eax                                                       ; +0xaf, 0x1800c627f\njnz     loc_1800C6330                                                  ; +0xb1, 0x1800c6281\nmov     rcx, cs:off_1801AED20                                          ; +0xb7, 0x1800c6287\nmov     rdx, [rcx+1A0h]                                                ; +0xbe, 0x1800c628e\nmov     [rdx+50h], rbx                                                 ; +0xc5, 0x1800c6295\nmov     [rdx+58h], rbx                                                 ; +0xc9, 0x1800c6299\nmov     [rdx+60h], rbx                                                 ; +0xcd, 0x1800c629d\nadd     rsp, 30h                                                       ; +0xd1, 0x1800c62a1\npop     rbx                                                            ; +0xd5, 0x1800c62a5\nretn                                                                   ; +0xd6, 0x1800c62a6\ntest    rcx, rcx                                                       ; +0xd7, 0x1800c62a7\njnz     short loc_1800C6320                                            ; +0xda, 0x1800c62aa\ntest    r8, r8                                                         ; +0xdc, 0x1800c62ac\njz      short loc_1800C62DD                                            ; +0xdf, 0x1800c62af\nmov     rdx, [rsp+38h+arg_20]                                          ; +0xe1, 0x1800c62b1\ntest    rdx, rdx                                                       ; +0xe6, 0x1800c62b6\njz      short loc_1800C6320                                            ; +0xe9, 0x1800c62b9\nmov     rax, cs:off_1801AED20                                          ; +0xeb, 0x1800c62bb\nmov     rcx, [rax+1A0h]                                                ; +0xf2, 0x1800c62c2\nxor     eax, eax                                                       ; +0xf9, 0x1800c62c9\nmov     [rcx+50h], r8                                                  ; +0xfb, 0x1800c62cb\nmov     [rcx+58h], r9                                                  ; +0xff, 0x1800c62cf\nmov     [rcx+60h], rdx                                                 ; +0x103, 0x1800c62d3\nadd     rsp, 30h                                                       ; +0x107, 0x1800c62d7\npop     rbx                                                            ; +0x10b, 0x1800c62db\nretn                                                                   ; +0x10c, 0x1800c62dc\ntest    r9, r9                                                         ; +0x10d, 0x1800c62dd\njnz     short loc_1800C6320                                            ; +0x110, 0x1800c62e0\ncmp     [rsp+38h+arg_20], rbx                                          ; +0x112, 0x1800c62e2\njnz     short loc_1800C6320                                            ; +0x117, 0x1800c62e7\nmov     rax, cs:off_1801AED20                                          ; +0x119, 0x1800c62e9\nmov     rcx, [rax+1A0h]                                                ; +0x120, 0x1800c62f0\nlea     rax, sub_1800B6410                                             ; +0x127, 0x1800c62f7\nmov     [rcx+50h], rax                                                 ; +0x12e, 0x1800c62fe\nlea     rax, sub_1800B6420                                             ; +0x132, 0x1800c6302\nmov     [rcx+58h], rax                                                 ; +0x139, 0x1800c6309\nlea     rax, j_j_free                                                  ; +0x13d, 0x1800c630d\nmov     [rcx+60h], rax                                                 ; +0x144, 0x1800c6314\nxor     eax, eax                                                       ; +0x148, 0x1800c6318\nadd     rsp, 30h                                                       ; +0x14a, 0x1800c631a\npop     rbx                                                            ; +0x14e, 0x1800c631e\nretn                                                                   ; +0x14f, 0x1800c631f\nmov     eax, 1Fh                                                       ; +0x150, 0x1800c6320\nadd     rsp, 30h                                                       ; +0x155, 0x1800c6325\npop     rbx                                                            ; +0x159, 0x1800c6329\nretn                                                                   ; +0x15a, 0x1800c632a\nmov     eax, 1Bh                                                       ; +0x15b, 0x1800c632b\nadd     rsp, 30h                                                       ; +0x160, 0x1800c6330\npop     rbx                                                            ; +0x164, 0x1800c6334\nretn                                                                   ; +0x165, 0x1800c6335", "xrefs": ["FMOD5_Memory_Initialize @ 0x1800f44c0", "<???> @ 0x180194348", "<???> @ 0x1801fdff8"], "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"}