{"type": "func", "start": 6442976000, "end": 6442976108, "name": "sub_180080300", "pseudocode": "// \n// sub_180080300 from 0x180080300 to 0x18008036c (108 bytes)\n// \n// 2 xrefs:\n// > cocos2d::CCImage::_initWithPngData @ 0x18007e8a2\n// > <???> @ 0x1801bf19c\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:02 +0000\n// \n\nvoid *__fastcall sub_180080300(__int64 a1, void *a2, size_t a3)\n{\n  __int64 io_ptr; // rbx\n  __int64 v7; // rax\n  void *result; // rax\n\n  io_ptr = png_get_io_ptr();\n  v7 = *(int *)(io_ptr + 12);\n  if ( (int)v7 + (int)a3 > *(_DWORD *)(io_ptr + 8) )\n  {\n    png_error(a1, \"pngReaderCallback failed\");\n    JUMPOUT(0x18008036BLL);\n  }\n  result = memcpy(a2, (const void *)(*(_QWORD *)io_ptr + v7), a3);\n  *(_DWORD *)(io_ptr + 12) += a3;\n  return result;\n}", "assembly": "; \n; sub_180080300 from 0x180080300 to 0x18008036c (108 bytes)\n; \n; 2 xrefs:\n; > cocos2d::CCImage::_initWithPngData @ 0x18007e8a2\n; > <???> @ 0x1801bf19c\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:02 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180080300\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180080305\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18008030a\npush    rdi                                                            ; +0xf, 0x18008030f\nsub     rsp, 20h                                                       ; +0x10, 0x180080310\nmov     rdi, r8                                                        ; +0x14, 0x180080314\nmov     rbp, rdx                                                       ; +0x17, 0x180080317\nmov     rsi, rcx                                                       ; +0x1a, 0x18008031a\ncall    png_get_io_ptr                                                 ; +0x1d, 0x18008031d\nmov     rbx, rax                                                       ; +0x22, 0x180080322\nmovsxd  rax, dword ptr [rax+0Ch]                                       ; +0x25, 0x180080325\nlea     r9d, [rax+rdi]                                                 ; +0x29, 0x180080329\ncmp     r9d, [rbx+8]                                                   ; +0x2d, 0x18008032d\njg      short loc_18008035C                                            ; +0x31, 0x180080331\nmov     rdx, rax                                                       ; +0x33, 0x180080333\nmov     r8, rdi; Size                                                  ; +0x36, 0x180080336\nadd     rdx, [rbx]; Src                                                ; +0x39, 0x180080339\nmov     rcx, rbp; void *                                               ; +0x3c, 0x18008033c\ncall    memcpy                                                         ; +0x3f, 0x18008033f\nadd     [rbx+0Ch], edi                                                 ; +0x44, 0x180080344\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x47, 0x180080347\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x4c, 0x18008034c\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x51, 0x180080351\nadd     rsp, 20h                                                       ; +0x56, 0x180080356\npop     rdi                                                            ; +0x5a, 0x18008035a\nretn                                                                   ; +0x5b, 0x18008035b\nlea     rdx, aPngreadercallb; \"pngReaderCallback failed\"               ; +0x5c, 0x18008035c\nmov     rcx, rsi                                                       ; +0x63, 0x180080363\ncall    png_error                                                      ; +0x66, 0x180080366\ndb 0CCh                                                                ; +0x6b, 0x18008036b", "xrefs": ["cocos2d::CCImage::_initWithPngData @ 0x18007e8a2", "<???> @ 0x1801bf19c"], "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"}