{"type": "func", "start": 6443157568, "end": 6443158208, "name": "sub_1800AC840", "pseudocode": "// \n// sub_1800AC840 from 0x1800ac840 to 0x1800acac0 (640 bytes)\n// \n// 2 xrefs:\n// > sub_1800ACB60 @ 0x1800acc2e\n// > <???> @ 0x1801c2118\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:22:18 +0000\n// \n\n__int64 __fastcall sub_1800AC840(_QWORD *a1)\n{\n  _QWORD *v2; // rsi\n  unsigned __int64 v3; // rax\n  char *v4; // rbx\n  __int64 v5; // rax\n  _QWORD *v6; // rsi\n  unsigned __int64 v7; // rax\n  char *v8; // rbx\n  __int64 v9; // rax\n  _QWORD *v11; // rsi\n  unsigned __int64 v12; // rax\n  char *v13; // rbx\n  __int64 v14; // rax\n  _QWORD *v15; // rsi\n  unsigned __int64 v16; // rax\n  char *v17; // rbx\n  __int64 v18; // rax\n  _QWORD *v19; // rsi\n  unsigned __int64 v20; // rax\n  char *v21; // rbx\n  __int64 v22; // rax\n  _QWORD *v23; // rsi\n  unsigned __int64 v24; // rax\n  char *v25; // rbx\n  __int64 v26; // rax\n  _QWORD *v27; // rsi\n  unsigned __int64 v28; // rax\n  char *v29; // rbx\n  __int64 v30; // rax\n  _QWORD *v31; // rsi\n  unsigned __int64 v32; // rax\n  char *v33; // rbx\n  __int64 v34; // rax\n\n  v2 = a1;\n  if ( a1[3] > 0xFu )\n    v2 = (_QWORD *)*a1;\n  v3 = a1[2];\n  if ( v3 >= 4 )\n  {\n    v4 = (char *)v2 + v3;\n    v5 = sub_1800E4930(v2, (char *)v2 + v3, \".jpg\");\n    if ( (char *)v5 != v4 && v5 - (_QWORD)v2 != -1 )\n      return 0;\n  }\n  v6 = a1;\n  if ( a1[3] > 0xFu )\n    v6 = (_QWORD *)*a1;\n  v7 = a1[2];\n  if ( v7 >= 5 )\n  {\n    v8 = (char *)v6 + v7;\n    v9 = sub_1800E4930(v6, (char *)v6 + v7, \".jpeg\");\n    if ( (char *)v9 != v8 && v9 - (_QWORD)v6 != -1 )\n      return 0;\n  }\n  v11 = a1;\n  if ( a1[3] > 0xFu )\n    v11 = (_QWORD *)*a1;\n  v12 = a1[2];\n  if ( v12 >= 4 )\n  {\n    v13 = (char *)v11 + v12;\n    v14 = sub_1800E4930(v11, (char *)v11 + v12, \".png\");\n    if ( (char *)v14 != v13 && v14 - (_QWORD)v11 != -1 )\n      return 1;\n  }\n  v15 = a1;\n  if ( a1[3] > 0xFu )\n    v15 = (_QWORD *)*a1;\n  v16 = a1[2];\n  if ( v16 >= 4 )\n  {\n    v17 = (char *)v15 + v16;\n    v18 = sub_1800E4930(v15, (char *)v15 + v16, \".PNG\");\n    if ( (char *)v18 != v17 && v18 - (_QWORD)v15 != -1 )\n      return 1;\n  }\n  v19 = a1;\n  if ( a1[3] > 0xFu )\n    v19 = (_QWORD *)*a1;\n  v20 = a1[2];\n  if ( v20 >= 5 )\n  {\n    v21 = (char *)v19 + v20;\n    v22 = sub_1800E4930(v19, (char *)v19 + v20, \".tiff\");\n    if ( (char *)v22 != v21 && v22 - (_QWORD)v19 != -1 )\n      return 2;\n  }\n  v23 = a1;\n  if ( a1[3] > 0xFu )\n    v23 = (_QWORD *)*a1;\n  v24 = a1[2];\n  if ( v24 >= 5 )\n  {\n    v25 = (char *)v23 + v24;\n    v26 = sub_1800E4930(v23, (char *)v23 + v24, \".TIFF\");\n    if ( (char *)v26 != v25 && v26 - (_QWORD)v23 != -1 )\n      return 2;\n  }\n  v27 = a1;\n  if ( a1[3] > 0xFu )\n    v27 = (_QWORD *)*a1;\n  v28 = a1[2];\n  if ( v28 >= 5 )\n  {\n    v29 = (char *)v27 + v28;\n    v30 = sub_1800E4930(v27, (char *)v27 + v28, \".webp\");\n    if ( (char *)v30 != v29 && v30 - (_QWORD)v27 != -1 )\n      return 3;\n  }\n  v31 = a1;\n  if ( a1[3] > 0xFu )\n    v31 = (_QWORD *)*a1;\n  v32 = a1[2];\n  if ( v32 < 5 )\n    return 5;\n  v33 = (char *)v31 + v32;\n  v34 = sub_1800E4930(v31, (char *)v31 + v32, \".WEBP\");\n  if ( (char *)v34 == v33 || v34 - (_QWORD)v31 == -1 )\n    return 5;\n  else\n    return 3;\n}", "assembly": "; \n; sub_1800AC840 from 0x1800ac840 to 0x1800acac0 (640 bytes)\n; \n; 2 xrefs:\n; > sub_1800ACB60 @ 0x1800acc2e\n; > <???> @ 0x1801c2118\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:22:18 +0000\n; \nmov     [rsp+arg_8], rsi                                               ; +0x0, 0x1800ac840\npush    rdi                                                            ; +0x5, 0x1800ac845\nsub     rsp, 20h                                                       ; +0x6, 0x1800ac846\ncmp     qword ptr [rcx+18h], 0Fh                                       ; +0xa, 0x1800ac84a\nmov     rdi, rcx                                                       ; +0xf, 0x1800ac84f\nmov     rsi, rcx                                                       ; +0x12, 0x1800ac852\njbe     short loc_1800AC85A                                            ; +0x15, 0x1800ac855\nmov     rsi, [rcx]                                                     ; +0x17, 0x1800ac857\nmov     rax, [rcx+10h]                                                 ; +0x1a, 0x1800ac85a\nmov     [rsp+28h+arg_0], rbx                                           ; +0x1e, 0x1800ac85e\ncmp     rax, 4                                                         ; +0x23, 0x1800ac863\njb      short loc_1800AC893                                            ; +0x27, 0x1800ac867\nlea     rbx, [rax+rsi]                                                 ; +0x29, 0x1800ac869\nmov     r9d, 4                                                         ; +0x2d, 0x1800ac86d\nmov     rdx, rbx                                                       ; +0x33, 0x1800ac873\nlea     r8, aJpg; \".jpg\"                                               ; +0x36, 0x1800ac876\nmov     rcx, rsi                                                       ; +0x3d, 0x1800ac87d\ncall    sub_1800E4930                                                  ; +0x40, 0x1800ac880\ncmp     rax, rbx                                                       ; +0x45, 0x1800ac885\njz      short loc_1800AC893                                            ; +0x48, 0x1800ac888\nsub     rax, rsi                                                       ; +0x4a, 0x1800ac88a\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x4d, 0x1800ac88d\njnz     short loc_1800AC8D4                                            ; +0x51, 0x1800ac891\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x53, 0x1800ac893\nmov     rsi, rdi                                                       ; +0x58, 0x1800ac898\njbe     short loc_1800AC8A0                                            ; +0x5b, 0x1800ac89b\nmov     rsi, [rdi]                                                     ; +0x5d, 0x1800ac89d\nmov     rax, [rdi+10h]                                                 ; +0x60, 0x1800ac8a0\ncmp     rax, 5                                                         ; +0x64, 0x1800ac8a4\njb      short loc_1800AC8E6                                            ; +0x68, 0x1800ac8a8\nlea     rbx, [rax+rsi]                                                 ; +0x6a, 0x1800ac8aa\nmov     r9d, 5                                                         ; +0x6e, 0x1800ac8ae\nmov     rdx, rbx                                                       ; +0x74, 0x1800ac8b4\nlea     r8, aJpeg; \".jpeg\"                                             ; +0x77, 0x1800ac8b7\nmov     rcx, rsi                                                       ; +0x7e, 0x1800ac8be\ncall    sub_1800E4930                                                  ; +0x81, 0x1800ac8c1\ncmp     rax, rbx                                                       ; +0x86, 0x1800ac8c6\njz      short loc_1800AC8E6                                            ; +0x89, 0x1800ac8c9\nsub     rax, rsi                                                       ; +0x8b, 0x1800ac8cb\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x8e, 0x1800ac8ce\njz      short loc_1800AC8E6                                            ; +0x92, 0x1800ac8d2\nxor     eax, eax                                                       ; +0x94, 0x1800ac8d4\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x96, 0x1800ac8d6\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x9b, 0x1800ac8db\nadd     rsp, 20h                                                       ; +0xa0, 0x1800ac8e0\npop     rdi                                                            ; +0xa4, 0x1800ac8e4\nretn                                                                   ; +0xa5, 0x1800ac8e5\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0xa6, 0x1800ac8e6\nmov     rsi, rdi                                                       ; +0xab, 0x1800ac8eb\njbe     short loc_1800AC8F3                                            ; +0xae, 0x1800ac8ee\nmov     rsi, [rdi]                                                     ; +0xb0, 0x1800ac8f0\nmov     rax, [rdi+10h]                                                 ; +0xb3, 0x1800ac8f3\ncmp     rax, 4                                                         ; +0xb7, 0x1800ac8f7\njb      short loc_1800AC927                                            ; +0xbb, 0x1800ac8fb\nlea     rbx, [rax+rsi]                                                 ; +0xbd, 0x1800ac8fd\nmov     r9d, 4                                                         ; +0xc1, 0x1800ac901\nmov     rdx, rbx                                                       ; +0xc7, 0x1800ac907\nlea     r8, aPng; \".png\"                                               ; +0xca, 0x1800ac90a\nmov     rcx, rsi                                                       ; +0xd1, 0x1800ac911\ncall    sub_1800E4930                                                  ; +0xd4, 0x1800ac914\ncmp     rax, rbx                                                       ; +0xd9, 0x1800ac919\njz      short loc_1800AC927                                            ; +0xdc, 0x1800ac91c\nsub     rax, rsi                                                       ; +0xde, 0x1800ac91e\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0xe1, 0x1800ac921\njnz     short loc_1800AC968                                            ; +0xe5, 0x1800ac925\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0xe7, 0x1800ac927\nmov     rsi, rdi                                                       ; +0xec, 0x1800ac92c\njbe     short loc_1800AC934                                            ; +0xef, 0x1800ac92f\nmov     rsi, [rdi]                                                     ; +0xf1, 0x1800ac931\nmov     rax, [rdi+10h]                                                 ; +0xf4, 0x1800ac934\ncmp     rax, 4                                                         ; +0xf8, 0x1800ac938\njb      short loc_1800AC97D                                            ; +0xfc, 0x1800ac93c\nlea     rbx, [rax+rsi]                                                 ; +0xfe, 0x1800ac93e\nmov     r9d, 4                                                         ; +0x102, 0x1800ac942\nmov     rdx, rbx                                                       ; +0x108, 0x1800ac948\nlea     r8, aPng_0; \".PNG\"                                             ; +0x10b, 0x1800ac94b\nmov     rcx, rsi                                                       ; +0x112, 0x1800ac952\ncall    sub_1800E4930                                                  ; +0x115, 0x1800ac955\ncmp     rax, rbx                                                       ; +0x11a, 0x1800ac95a\njz      short loc_1800AC97D                                            ; +0x11d, 0x1800ac95d\nsub     rax, rsi                                                       ; +0x11f, 0x1800ac95f\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x122, 0x1800ac962\njz      short loc_1800AC97D                                            ; +0x126, 0x1800ac966\nmov     eax, 1                                                         ; +0x128, 0x1800ac968\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x12d, 0x1800ac96d\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x132, 0x1800ac972\nadd     rsp, 20h                                                       ; +0x137, 0x1800ac977\npop     rdi                                                            ; +0x13b, 0x1800ac97b\nretn                                                                   ; +0x13c, 0x1800ac97c\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x13d, 0x1800ac97d\nmov     rsi, rdi                                                       ; +0x142, 0x1800ac982\njbe     short loc_1800AC98A                                            ; +0x145, 0x1800ac985\nmov     rsi, [rdi]                                                     ; +0x147, 0x1800ac987\nmov     rax, [rdi+10h]                                                 ; +0x14a, 0x1800ac98a\ncmp     rax, 5                                                         ; +0x14e, 0x1800ac98e\njb      short loc_1800AC9BE                                            ; +0x152, 0x1800ac992\nlea     rbx, [rax+rsi]                                                 ; +0x154, 0x1800ac994\nmov     r9d, 5                                                         ; +0x158, 0x1800ac998\nmov     rdx, rbx                                                       ; +0x15e, 0x1800ac99e\nlea     r8, aTiff; \".tiff\"                                             ; +0x161, 0x1800ac9a1\nmov     rcx, rsi                                                       ; +0x168, 0x1800ac9a8\ncall    sub_1800E4930                                                  ; +0x16b, 0x1800ac9ab\ncmp     rax, rbx                                                       ; +0x170, 0x1800ac9b0\njz      short loc_1800AC9BE                                            ; +0x173, 0x1800ac9b3\nsub     rax, rsi                                                       ; +0x175, 0x1800ac9b5\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x178, 0x1800ac9b8\njnz     short loc_1800AC9FF                                            ; +0x17c, 0x1800ac9bc\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x17e, 0x1800ac9be\nmov     rsi, rdi                                                       ; +0x183, 0x1800ac9c3\njbe     short loc_1800AC9CB                                            ; +0x186, 0x1800ac9c6\nmov     rsi, [rdi]                                                     ; +0x188, 0x1800ac9c8\nmov     rax, [rdi+10h]                                                 ; +0x18b, 0x1800ac9cb\ncmp     rax, 5                                                         ; +0x18f, 0x1800ac9cf\njb      short loc_1800ACA14                                            ; +0x193, 0x1800ac9d3\nlea     rbx, [rax+rsi]                                                 ; +0x195, 0x1800ac9d5\nmov     r9d, 5                                                         ; +0x199, 0x1800ac9d9\nmov     rdx, rbx                                                       ; +0x19f, 0x1800ac9df\nlea     r8, aTiff_0; \".TIFF\"                                           ; +0x1a2, 0x1800ac9e2\nmov     rcx, rsi                                                       ; +0x1a9, 0x1800ac9e9\ncall    sub_1800E4930                                                  ; +0x1ac, 0x1800ac9ec\ncmp     rax, rbx                                                       ; +0x1b1, 0x1800ac9f1\njz      short loc_1800ACA14                                            ; +0x1b4, 0x1800ac9f4\nsub     rax, rsi                                                       ; +0x1b6, 0x1800ac9f6\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x1b9, 0x1800ac9f9\njz      short loc_1800ACA14                                            ; +0x1bd, 0x1800ac9fd\nmov     eax, 2                                                         ; +0x1bf, 0x1800ac9ff\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1c4, 0x1800aca04\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x1c9, 0x1800aca09\nadd     rsp, 20h                                                       ; +0x1ce, 0x1800aca0e\npop     rdi                                                            ; +0x1d2, 0x1800aca12\nretn                                                                   ; +0x1d3, 0x1800aca13\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x1d4, 0x1800aca14\nmov     rsi, rdi                                                       ; +0x1d9, 0x1800aca19\njbe     short loc_1800ACA21                                            ; +0x1dc, 0x1800aca1c\nmov     rsi, [rdi]                                                     ; +0x1de, 0x1800aca1e\nmov     rax, [rdi+10h]                                                 ; +0x1e1, 0x1800aca21\ncmp     rax, 5                                                         ; +0x1e5, 0x1800aca25\njb      short loc_1800ACA55                                            ; +0x1e9, 0x1800aca29\nlea     rbx, [rax+rsi]                                                 ; +0x1eb, 0x1800aca2b\nmov     r9d, 5                                                         ; +0x1ef, 0x1800aca2f\nmov     rdx, rbx                                                       ; +0x1f5, 0x1800aca35\nlea     r8, aWebp; \".webp\"                                             ; +0x1f8, 0x1800aca38\nmov     rcx, rsi                                                       ; +0x1ff, 0x1800aca3f\ncall    sub_1800E4930                                                  ; +0x202, 0x1800aca42\ncmp     rax, rbx                                                       ; +0x207, 0x1800aca47\njz      short loc_1800ACA55                                            ; +0x20a, 0x1800aca4a\nsub     rax, rsi                                                       ; +0x20c, 0x1800aca4c\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x20f, 0x1800aca4f\njnz     short loc_1800ACA96                                            ; +0x213, 0x1800aca53\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x215, 0x1800aca55\nmov     rsi, rdi                                                       ; +0x21a, 0x1800aca5a\njbe     short loc_1800ACA62                                            ; +0x21d, 0x1800aca5d\nmov     rsi, [rdi]                                                     ; +0x21f, 0x1800aca5f\nmov     rax, [rdi+10h]                                                 ; +0x222, 0x1800aca62\ncmp     rax, 5                                                         ; +0x226, 0x1800aca66\njb      short loc_1800ACAAB                                            ; +0x22a, 0x1800aca6a\nlea     rbx, [rax+rsi]                                                 ; +0x22c, 0x1800aca6c\nmov     r9d, 5                                                         ; +0x230, 0x1800aca70\nmov     rdx, rbx                                                       ; +0x236, 0x1800aca76\nlea     r8, aWebp_0; \".WEBP\"                                           ; +0x239, 0x1800aca79\nmov     rcx, rsi                                                       ; +0x240, 0x1800aca80\ncall    sub_1800E4930                                                  ; +0x243, 0x1800aca83\ncmp     rax, rbx                                                       ; +0x248, 0x1800aca88\njz      short loc_1800ACAAB                                            ; +0x24b, 0x1800aca8b\nsub     rax, rsi                                                       ; +0x24d, 0x1800aca8d\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x250, 0x1800aca90\njz      short loc_1800ACAAB                                            ; +0x254, 0x1800aca94\nmov     eax, 3                                                         ; +0x256, 0x1800aca96\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x25b, 0x1800aca9b\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x260, 0x1800acaa0\nadd     rsp, 20h                                                       ; +0x265, 0x1800acaa5\npop     rdi                                                            ; +0x269, 0x1800acaa9\nretn                                                                   ; +0x26a, 0x1800acaaa\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x26b, 0x1800acaab\nmov     eax, 5                                                         ; +0x270, 0x1800acab0\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x275, 0x1800acab5\nadd     rsp, 20h                                                       ; +0x27a, 0x1800acaba\npop     rdi                                                            ; +0x27e, 0x1800acabe\nretn                                                                   ; +0x27f, 0x1800acabf", "xrefs": ["sub_1800ACB60 @ 0x1800acc2e", "<???> @ 0x1801c2118"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}