{"type": "func", "start": 4300149856, "end": 4300150005, "name": "GameToolbox::createHashString", "pseudocode": "// \n// GameToolbox::createHashString from 0x1004f1460 to 0x1004f14f5 (149 bytes)\n// \n// 0 xrefs:\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\nstd::string *__fastcall GameToolbox::createHashString(std::string *a1, const std::string *a2, int a3)\n{\n  int v3; // r15d\n  const char *data; // rdi\n  int v5; // eax\n  __int64 v6; // r13\n  __int64 v7; // rbx\n  std::string::pointer v8; // rax\n\n  *(_WORD *)&a1->__r_.__value_.__l.0 = 0;\n  if ( a3 > 0 )\n  {\n    v3 = a3;\n    data = a2->__r_.__value_.__s.__data_;\n    if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) != 0 )\n      data = a2->__r_.__value_.__l.__data_;\n    v5 = strlen(data);\n    if ( v5 >= v3 )\n    {\n      v6 = (int)(float)((float)v5 / (float)v3);\n      v7 = 0;\n      do\n      {\n        v8 = a2->__r_.__value_.__s.__data_;\n        if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) != 0 )\n          v8 = a2->__r_.__value_.__l.__data_;\n        std::string::push_back(a1, v8[v7]);\n        v7 += v6;\n        --v3;\n      }\n      while ( v3 );\n    }\n    else\n    {\n      std::string::operator=(a1, a2);\n    }\n  }\n  return a1;\n}", "assembly": "; \n; GameToolbox::createHashString from 0x1004f1460 to 0x1004f14f5 (149 bytes)\n; \n; 0 xrefs:\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    rbp                                                            ; +0x0, 0x1004f1460\nmov     rbp, rsp                                                       ; +0x1, 0x1004f1461\npush    r15                                                            ; +0x4, 0x1004f1464\npush    r14                                                            ; +0x6, 0x1004f1466\npush    r13                                                            ; +0x8, 0x1004f1468\npush    r12                                                            ; +0xa, 0x1004f146a\npush    rbx                                                            ; +0xc, 0x1004f146c\npush    rax                                                            ; +0xd, 0x1004f146d\nmov     [rbp+var_30], rdi                                              ; +0xe, 0x1004f146e\nmov     word ptr [rdi], 0                                              ; +0x12, 0x1004f1472\ntest    edx, edx                                                       ; +0x17, 0x1004f1477\njle     short loc_1004F14E2                                            ; +0x19, 0x1004f1479\nmov     r15d, edx                                                      ; +0x1b, 0x1004f147b\nmov     r14, rsi                                                       ; +0x1e, 0x1004f147e\nlea     r12, [rsi+1]                                                   ; +0x21, 0x1004f1481\ntest    byte ptr [rsi], 1                                              ; +0x25, 0x1004f1485\nmov     rdi, r12                                                       ; +0x28, 0x1004f1488\njz      short loc_1004F1491                                            ; +0x2b, 0x1004f148b\nmov     rdi, [r14+10h]; __s                                            ; +0x2d, 0x1004f148d\ncall    _strlen                                                        ; +0x31, 0x1004f1491\ncmp     eax, r15d                                                      ; +0x36, 0x1004f1496\njge     short loc_1004F14A9                                            ; +0x39, 0x1004f1499\nmov     rdi, [rbp+var_30]; this                                        ; +0x3b, 0x1004f149b\nmov     rsi, r14; __str                                                ; +0x3f, 0x1004f149f\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x42, 0x1004f14a2\njmp     short loc_1004F14E2                                            ; +0x47, 0x1004f14a7\ncvtsi2ss xmm0, eax                                                     ; +0x49, 0x1004f14a9\ncvtsi2ss xmm1, r15d                                                    ; +0x4d, 0x1004f14ad\ndivss   xmm0, xmm1                                                     ; +0x52, 0x1004f14b2\ncvttss2si eax, xmm0                                                    ; +0x56, 0x1004f14b6\nmovsxd  r13, eax                                                       ; +0x5a, 0x1004f14ba\nxor     ebx, ebx                                                       ; +0x5d, 0x1004f14bd\nnop                                                                    ; +0x5f, 0x1004f14bf\ntest    byte ptr [r14], 1                                              ; +0x60, 0x1004f14c0\nmov     rax, r12                                                       ; +0x64, 0x1004f14c4\njz      short loc_1004F14CD                                            ; +0x67, 0x1004f14c7\nmov     rax, [r14+10h]                                                 ; +0x69, 0x1004f14c9\nmovsx   esi, byte ptr [rax+rbx]; __c                                   ; +0x6d, 0x1004f14cd\nmov     rdi, [rbp+var_30]; this                                        ; +0x71, 0x1004f14d1\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc; std::string::push_back(char) ; +0x75, 0x1004f14d5\nadd     rbx, r13                                                       ; +0x7a, 0x1004f14da\ndec     r15d                                                           ; +0x7d, 0x1004f14dd\njnz     short loc_1004F14C0                                            ; +0x80, 0x1004f14e0\nmov     rax, [rbp+var_30]                                              ; +0x82, 0x1004f14e2\nadd     rsp, 8                                                         ; +0x86, 0x1004f14e6\npop     rbx                                                            ; +0x8a, 0x1004f14ea\npop     r12                                                            ; +0x8b, 0x1004f14eb\npop     r13                                                            ; +0x8d, 0x1004f14ed\npop     r14                                                            ; +0x8f, 0x1004f14ef\npop     r15                                                            ; +0x91, 0x1004f14f1\npop     rbp                                                            ; +0x93, 0x1004f14f3\nretn                                                                   ; +0x94, 0x1004f14f4", "xrefs": [], "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"}