{"type": "func", "start": 6442929424, "end": 6442929576, "name": "cocos2d::CCDevice::getDPI", "pseudocode": "// \n// cocos2d::CCDevice::getDPI from 0x180074d10 to 0x180074da8 (152 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x18013b290\n// > <???> @ 0x18013b2a0\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b45cc\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 cocos2d::CCDevice::getDPI()\n{\n  __int64 result; // rax\n  HDC DC; // rsi\n  int DeviceCaps; // edi\n  int v3; // ebx\n\n  result = (unsigned int)dword_1801A2BB0;\n  if ( dword_1801A2BB0 == -1 )\n  {\n    DC = GetDC(nullptr);\n    DeviceCaps = GetDeviceCaps(DC, 8);\n    v3 = GetDeviceCaps(DC, 4);\n    ReleaseDC(nullptr, DC);\n    dword_1801A2BB0 = (int)(float)((float)((float)((float)DeviceCaps * 254.0) / (float)v3) / 10.0);\n    return (unsigned int)dword_1801A2BB0;\n  }\n  return result;\n}", "assembly": "; \n; cocos2d::CCDevice::getDPI from 0x180074d10 to 0x180074da8 (152 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x18013b290\n; > <???> @ 0x18013b2a0\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b45cc\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\nsub     rsp, 28h                                                       ; +0x0, 0x180074d10\nmov     eax, cs:dword_1801A2BB0                                        ; +0x4, 0x180074d14\ncmp     eax, 0FFFFFFFFh                                                ; +0xa, 0x180074d1a\njnz     loc_180074DA3                                                  ; +0xd, 0x180074d1d\nmov     [rsp+28h+arg_0], rbx                                           ; +0x13, 0x180074d23\nxor     ecx, ecx; hWnd                                                 ; +0x18, 0x180074d28\nmov     [rsp+28h+arg_8], rsi                                           ; +0x1a, 0x180074d2a\nmov     [rsp+28h+var_8], rdi                                           ; +0x1f, 0x180074d2f\ncall    cs:GetDC                                                       ; +0x24, 0x180074d34\nmov     rcx, rax; hdc                                                  ; +0x2a, 0x180074d3a\nmov     edx, 8; index                                                  ; +0x2d, 0x180074d3d\nmov     rsi, rax                                                       ; +0x32, 0x180074d42\ncall    cs:GetDeviceCaps                                               ; +0x35, 0x180074d45\nmov     edx, 4; index                                                  ; +0x3b, 0x180074d4b\nmov     rcx, rsi; hdc                                                  ; +0x40, 0x180074d50\nmov     edi, eax                                                       ; +0x43, 0x180074d53\ncall    cs:GetDeviceCaps                                               ; +0x45, 0x180074d55\nmov     rdx, rsi; hDC                                                  ; +0x4b, 0x180074d5b\nxor     ecx, ecx; hWnd                                                 ; +0x4e, 0x180074d5e\nmov     ebx, eax                                                       ; +0x50, 0x180074d60\ncall    cs:ReleaseDC                                                   ; +0x52, 0x180074d62\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x58, 0x180074d68\nmovd    xmm1, edi                                                      ; +0x5d, 0x180074d6d\nmov     rdi, [rsp+28h+var_8]                                           ; +0x61, 0x180074d71\ncvtdq2ps xmm1, xmm1                                                    ; +0x66, 0x180074d76\nmovd    xmm0, ebx                                                      ; +0x69, 0x180074d79\nmulss   xmm1, cs:dword_18010087C                                       ; +0x6d, 0x180074d7d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x75, 0x180074d85\ncvtdq2ps xmm0, xmm0                                                    ; +0x7a, 0x180074d8a\ndivss   xmm1, xmm0                                                     ; +0x7d, 0x180074d8d\ndivss   xmm1, cs:dword_1800E8440                                       ; +0x81, 0x180074d91\ncvttss2si eax, xmm1                                                    ; +0x89, 0x180074d99\nmov     cs:dword_1801A2BB0, eax                                        ; +0x8d, 0x180074d9d\nadd     rsp, 28h                                                       ; +0x93, 0x180074da3\nretn                                                                   ; +0x97, 0x180074da7", "xrefs": ["<???> @ 0x18013b290", "<???> @ 0x18013b2a0", "<???> @ 0x1801438a8", "<???> @ 0x1801b45cc"], "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"}