{"type": "func", "start": 6442714240, "end": 6442714354, "name": "sub_180040480", "pseudocode": "// \n// sub_180040480 from 0x180040480 to 0x1800404f2 (114 bytes)\n// \n// 3 xrefs:\n// > fmt::internal::PrintfParser<wchar_t>::ParseHeader @ 0x18004373a\n// > fmt::internal::PrintfParser<wchar_t>::ParseHeader @ 0x1800437df\n// > <???> @ 0x1801bb464\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:21:38 +0000\n// \n\n__int64 __fastcall sub_180040480(_QWORD *a1, _QWORD *a2)\n{\n  unsigned int v2; // r11d\n  int v3; // eax\n  _WORD *v4; // r9\n  unsigned int v5; // r10d\n  __int64 result; // rax\n\n  v2 = 0;\n  do\n  {\n    v3 = *(unsigned __int16 *)*a1;\n    v4 = (_WORD *)(*a1 + 2LL);\n    *a1 = v4;\n    v5 = v3 + 2 * (v2 + 4 * (v2 - 6));\n    LODWORD(result) = -1;\n    if ( v5 >= v2 )\n      LODWORD(result) = v5;\n    v2 = result;\n  }\n  while ( *v4 >= 0x30u && *v4 <= 0x39u );\n  if ( (unsigned int)result <= 0x7FFFFFFF )\n    return (unsigned int)result;\n  if ( !*a2 )\n    *a2 = \"number is too big in format\";\n  return 0;\n}", "assembly": "; \n; sub_180040480 from 0x180040480 to 0x1800404f2 (114 bytes)\n; \n; 3 xrefs:\n; > fmt::internal::PrintfParser<wchar_t>::ParseHeader @ 0x18004373a\n; > fmt::internal::PrintfParser<wchar_t>::ParseHeader @ 0x1800437df\n; > <???> @ 0x1801bb464\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:21:38 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180040480\nxor     r11d, r11d                                                     ; +0x5, 0x180040485\nmov     ebx, 30h ; '0'                                                 ; +0x8, 0x180040488\nnop     dword ptr [rax]                                                ; +0xd, 0x18004048d\nmov     r9, [rcx]                                                      ; +0x10, 0x180040490\nlea     r10d, [r11-6]                                                  ; +0x13, 0x180040493\nlea     r10d, [r11+r10*4]                                              ; +0x17, 0x180040497\nmovzx   eax, word ptr [r9]                                             ; +0x1b, 0x18004049b\nadd     r9, 2                                                          ; +0x1f, 0x18004049f\nmov     [rcx], r9                                                      ; +0x23, 0x1800404a3\nlea     r10d, [rax+r10*2]                                              ; +0x26, 0x1800404a6\nmov     eax, 0FFFFFFFFh                                                ; +0x2a, 0x1800404aa\ncmp     r10d, r11d                                                     ; +0x2f, 0x1800404af\ncmovnb  eax, r10d                                                      ; +0x32, 0x1800404b2\nmov     r11d, eax                                                      ; +0x36, 0x1800404b6\nmovzx   eax, word ptr [r9]                                             ; +0x39, 0x1800404b9\ncmp     bx, ax                                                         ; +0x3d, 0x1800404bd\nja      short loc_1800404C8                                            ; +0x40, 0x1800404c0\ncmp     ax, 39h ; '9'                                                  ; +0x42, 0x1800404c2\njbe     short loc_180040490                                            ; +0x46, 0x1800404c6\ncmp     r11d, 7FFFFFFFh                                                ; +0x48, 0x1800404c8\njbe     short loc_1800404E9                                            ; +0x4f, 0x1800404cf\ncmp     qword ptr [rdx], 0                                             ; +0x51, 0x1800404d1\njnz     short loc_1800404E1                                            ; +0x55, 0x1800404d5\nlea     rax, aNumberIsTooBig; \"number is too big in format\"            ; +0x57, 0x1800404d7\nmov     [rdx], rax                                                     ; +0x5e, 0x1800404de\nxor     eax, eax                                                       ; +0x61, 0x1800404e1\nmov     rbx, [rsp+arg_0]                                               ; +0x63, 0x1800404e3\nretn                                                                   ; +0x68, 0x1800404e8\nmov     rbx, [rsp+arg_0]                                               ; +0x69, 0x1800404e9\nmov     eax, r11d                                                      ; +0x6e, 0x1800404ee\nretn                                                                   ; +0x71, 0x1800404f1", "xrefs": ["fmt::internal::PrintfParser<wchar_t>::ParseHeader @ 0x18004373a", "fmt::internal::PrintfParser<wchar_t>::ParseHeader @ 0x1800437df", "<???> @ 0x1801bb464"], "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"}