{"type": "func", "start": 6443728252, "end": 6443728584, "name": "sub_180137D7C", "pseudocode": "// \n// sub_180137D7C from 0x180137d7c to 0x180137ec8 (332 bytes)\n// \n// 2 xrefs:\n// > sub_180137FE0 @ 0x1801381d0\n// > <???> @ 0x180203620\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 10:55:01 +0000\n// \n\n__int64 __fastcall sub_180137D7C(\n        __int64 *a1,\n        char *a2,\n        unsigned __int64 a3,\n        char *a4,\n        rsize_t a5,\n        int a6,\n        char a7,\n        unsigned int a8,\n        int a9,\n        struct __crt_locale_pointers *a10)\n{\n  __int64 v11; // rcx\n  int v13; // eax\n  int v14; // r14d\n  char *v15; // rbx\n  __int64 result; // rax\n  int v17; // eax\n  __int128 v19; // [rsp+40h] [rbp-18h] BYREF\n\n  v11 = *a1;\n  v19 = 0;\n  v13 = _acrt_fltout(v11, a6, 0, (int)&v19, a4, a5);\n  v14 = DWORD1(v19) - 1;\n  v15 = &a2[(_DWORD)v19 == 45];\n  result = sub_18013DC24(v15, v13, a9);\n  if ( (_DWORD)result )\n  {\n    *a2 = 0;\n  }\n  else\n  {\n    v17 = DWORD1(v19) - 1;\n    if ( DWORD1(v19) - 1 < -4 || v17 >= a6 )\n    {\n      return fp_format_e_internal(a2, a3, a6, a7, a8, (struct _strflt *const)&v19, 1, a10);\n    }\n    else\n    {\n      if ( v14 < v17 )\n      {\n        while ( *v15++ )\n          ;\n        *(v15 - 2) = 0;\n      }\n      return fp_format_f_internal(a2, a3, a6, (struct _strflt *const)&v19, 1, a10);\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_180137D7C from 0x180137d7c to 0x180137ec8 (332 bytes)\n; \n; 2 xrefs:\n; > sub_180137FE0 @ 0x1801381d0\n; > <???> @ 0x180203620\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 10:55:01 +0000\n; \nmov     r11, rsp                                                       ; +0x0, 0x180137d7c\nmov     [r11+8], rbx                                                   ; +0x3, 0x180137d7f\nmov     [r11+10h], rbp                                                 ; +0x7, 0x180137d83\nmov     [r11+18h], rdi                                                 ; +0xb, 0x180137d87\npush    r14                                                            ; +0xf, 0x180137d8b\nsub     rsp, 50h                                                       ; +0x11, 0x180137d8d\nmov     rax, [rsp+58h+arg_20]                                          ; +0x15, 0x180137d91\nmov     rbp, r8                                                        ; +0x1d, 0x180137d99\nmov     rcx, [rcx]; int                                                ; +0x20, 0x180137d9c\nmov     rdi, rdx                                                       ; +0x23, 0x180137d9f\nmov     edx, [rsp+58h+arg_28]; int                                     ; +0x26, 0x180137da2\nxorps   xmm0, xmm0                                                     ; +0x2d, 0x180137da9\nmov     [r11-30h], rax                                                 ; +0x30, 0x180137dac\nxor     r8d, r8d; int                                                  ; +0x34, 0x180137db0\nmov     [r11-38h], r9                                                  ; +0x37, 0x180137db3\nlea     r9, [r11-18h]; int                                             ; +0x3b, 0x180137db7\nmovups  [rsp+58h+var_18], xmm0                                         ; +0x3f, 0x180137dbb\ncall    __acrt_fltout                                                  ; +0x44, 0x180137dc0\nmov     r14d, dword ptr [rsp+58h+var_18+4]                             ; +0x49, 0x180137dc5\nxor     r8d, r8d                                                       ; +0x4e, 0x180137dca\ncmp     dword ptr [rsp+58h+var_18], 2Dh ; '-'                          ; +0x51, 0x180137dcd\nmov     r9d, eax                                                       ; +0x56, 0x180137dd2\nmov     eax, [rsp+58h+arg_40]                                          ; +0x59, 0x180137dd5\nmov     rdx, rbp                                                       ; +0x60, 0x180137ddc\nsetz    r8b                                                            ; +0x63, 0x180137ddf\nmov     dword ptr [rsp+58h+var_30], eax; int                           ; +0x67, 0x180137de3\nsub     rdx, r8                                                        ; +0x6b, 0x180137de7\nmov     dword ptr [rsp+58h+var_38], r9d; int                           ; +0x6e, 0x180137dea\ndec     r14d                                                           ; +0x73, 0x180137def\nlea     r9, [rsp+58h+var_18]                                           ; +0x76, 0x180137df2\ncmp     rbp, 0FFFFFFFFFFFFFFFFh                                        ; +0x7b, 0x180137df7\nlea     rbx, [r8+rdi]                                                  ; +0x7f, 0x180137dfb\nmov     r8d, [rsp+58h+arg_28]                                          ; +0x83, 0x180137dff\ncmovz   rdx, rbp                                                       ; +0x8b, 0x180137e07\nmov     rcx, rbx; void *                                               ; +0x8f, 0x180137e0b\ncall    sub_18013DC24                                                  ; +0x92, 0x180137e0e\ntest    eax, eax                                                       ; +0x97, 0x180137e13\njz      short loc_180137E1F                                            ; +0x99, 0x180137e15\nmov     byte ptr [rdi], 0                                              ; +0x9b, 0x180137e17\njmp     loc_180137EB2                                                  ; +0x9e, 0x180137e1a\nmov     eax, dword ptr [rsp+58h+var_18+4]                              ; +0xa3, 0x180137e1f\ndec     eax                                                            ; +0xa7, 0x180137e23\ncmp     eax, 0FFFFFFFCh                                                ; +0xa9, 0x180137e25\njl      short loc_180137E70                                            ; +0xac, 0x180137e28\ncmp     eax, [rsp+58h+arg_28]                                          ; +0xae, 0x180137e2a\njge     short loc_180137E70                                            ; +0xb5, 0x180137e31\ncmp     r14d, eax                                                      ; +0xb7, 0x180137e33\njge     short loc_180137E44                                            ; +0xba, 0x180137e36\nmov     al, [rbx]                                                      ; +0xbc, 0x180137e38\ninc     rbx                                                            ; +0xbe, 0x180137e3a\ntest    al, al                                                         ; +0xc1, 0x180137e3d\njnz     short loc_180137E38                                            ; +0xc3, 0x180137e3f\nmov     [rbx-2], al                                                    ; +0xc5, 0x180137e41\nmov     rax, [rsp+58h+arg_48]                                          ; +0xc8, 0x180137e44\nlea     r9, [rsp+58h+var_18]; struct _strflt *                         ; +0xd0, 0x180137e4c\nmov     r8d, [rsp+58h+arg_28]; int                                     ; +0xd5, 0x180137e51\nmov     rdx, rbp; unsigned __int64                                     ; +0xdd, 0x180137e59\nmov     [rsp+58h+var_30], rax; struct __crt_locale_pointers *          ; +0xe0, 0x180137e5c\nmov     rcx, rdi; Src                                                  ; +0xe5, 0x180137e61\nmov     [rsp+58h+var_38], 1; bool                                      ; +0xe8, 0x180137e64\ncall    ?fp_format_f_internal@@YAHQEAD_KHQEAU_strflt@@_NQEAU__crt_locale_pointers@@@Z; fp_format_f_internal(char * const,unsigned __int64,int,_strflt * const,bool,__crt_locale_pointers * const) ; +0xed, 0x180137e69\njmp     short loc_180137EB2                                            ; +0xf2, 0x180137e6e\nmov     rax, [rsp+58h+arg_48]                                          ; +0xf4, 0x180137e70\nmov     rdx, rbp; unsigned __int64                                     ; +0xfc, 0x180137e78\nmov     r9b, [rsp+58h+arg_30]; bool                                    ; +0xff, 0x180137e7b\nmov     rcx, rdi; char *                                               ; +0x107, 0x180137e83\nmov     r8d, [rsp+58h+arg_28]; int                                     ; +0x10a, 0x180137e86\nmov     [rsp+58h+var_20], rax; struct __crt_locale_pointers *          ; +0x112, 0x180137e8e\nlea     rax, [rsp+58h+var_18]                                          ; +0x117, 0x180137e93\nmov     [rsp+58h+var_28], 1; bool                                      ; +0x11c, 0x180137e98\nmov     [rsp+58h+var_30], rax; struct _strflt *                        ; +0x121, 0x180137e9d\nmov     eax, [rsp+58h+arg_38]                                          ; +0x126, 0x180137ea2\nmov     dword ptr [rsp+58h+var_38], eax; unsigned int                  ; +0x12d, 0x180137ea9\ncall    ?fp_format_e_internal@@YAHQEAD_KH_NIQEAU_strflt@@2QEAU__crt_locale_pointers@@@Z; fp_format_e_internal(char * const,unsigned __int64,int,bool,uint,_strflt * const,bool,__crt_locale_pointers * const) ; +0x131, 0x180137ead\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x136, 0x180137eb2\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x13b, 0x180137eb7\nmov     rdi, [rsp+58h+arg_10]                                          ; +0x140, 0x180137ebc\nadd     rsp, 50h                                                       ; +0x145, 0x180137ec1\npop     r14                                                            ; +0x149, 0x180137ec5\nretn                                                                   ; +0x14b, 0x180137ec7", "xrefs": ["sub_180137FE0 @ 0x1801381d0", "<???> @ 0x180203620"], "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"}