{"type": "func", "start": 6442574112, "end": 6442574565, "name": "CWin32InputBox::InputBox", "pseudocode": "// \n// CWin32InputBox::InputBox from 0x18001e120 to 0x18001e2e5 (453 bytes)\n// \n// 3 xrefs:\n// > cocos2d::extension::CCEditBoxImplWin::openKeyboard @ 0x180011f6d\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004b0e8\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\nINT_PTR __fastcall CWin32InputBox::InputBox(const char *a1, const char *a2, char *a3, int a4, bool a5)\n{\n  int v10; // eax\n  int v11; // eax\n  LPARAM dwInitParam[2]; // [rsp+30h] [rbp-49h] BYREF\n  bool v13; // [rsp+40h] [rbp-39h] BYREF\n  void *v14; // [rsp+48h] [rbp-31h]\n  __int64 v15; // [rsp+50h] [rbp-29h]\n  char v16; // [rsp+58h] [rbp-21h]\n  int v17; // [rsp+5Ch] [rbp-1Dh]\n  int v18; // [rsp+60h] [rbp-19h]\n  int v19; // [rsp+64h] [rbp-15h]\n  int v20; // [rsp+68h] [rbp-11h]\n  const char *v21; // [rsp+70h] [rbp-9h]\n  const char *v22; // [rsp+78h] [rbp-1h]\n  char *v23; // [rsp+80h] [rbp+7h]\n  int v24; // [rsp+88h] [rbp+Fh]\n  HWND hWndParent; // [rsp+90h] [rbp+17h]\n  HINSTANCE hInstance; // [rsp+98h] [rbp+1Fh]\n  int v27; // [rsp+A0h] [rbp+27h]\n\n  hWndParent = nullptr;\n  v15 = 0;\n  v16 = 1;\n  hInstance = GetModuleHandleW(nullptr);\n  v13 = a5;\n  v14 = &unk_1800470A4;\n  v17 = 0;\n  v19 = 0;\n  v18 = -1;\n  v20 = -1;\n  v27 = -1;\n  v21 = a1;\n  v22 = a2;\n  v23 = a3;\n  v24 = a4;\n  if ( a3 )\n  {\n    if ( unk_1800470A4 == 1 && unk_1800470A6 == 0xFFFF && &unk_1800470A4 )\n    {\n      unk_1800470AC &= v20;\n      v10 = v18 & (dword_1800470B0[0] | v17);\n      dword_1800470B0[0] = v10;\n      dword_1800470B0[0] = v10 | 0x800;\n      if ( (_WORD)v27 != 0xFFFF )\n        HIWORD(dword_1800470B0[1]) = v27;\n      if ( HIWORD(v27) != 0xFFFF )\n        LOWORD(dword_1800470B0[2]) = HIWORD(v27);\n    }\n    else\n    {\n      unk_1800470A4 |= v17;\n      unk_1800470A8 &= v20;\n      v11 = v18 & unk_1800470A4;\n      unk_1800470A4 &= v18;\n      unk_1800470A4 = v11 | 0x800;\n      if ( (_WORD)v27 != 0xFFFF )\n        unk_1800470AE = v27;\n      if ( HIWORD(v27) != 0xFFFF )\n        LOWORD(dword_1800470B0[0]) = HIWORD(v27);\n    }\n    dwInitParam[0] = (LPARAM)&v13;\n    return DialogBoxIndirectParamW(\n             hInstance,\n             (LPCDLGTEMPLATEW)&unk_1800470A4,\n             hWndParent,\n             CWin32InputBox::DlgProc,\n             (LPARAM)dwInitParam);\n  }\n  else\n  {\n    SetLastError(0x57u);\n    return 0;\n  }\n}", "assembly": "; \n; CWin32InputBox::InputBox from 0x18001e120 to 0x18001e2e5 (453 bytes)\n; \n; 3 xrefs:\n; > cocos2d::extension::CCEditBoxImplWin::openKeyboard @ 0x180011f6d\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004b0e8\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\nmov     [rsp-8+arg_0], rbx                                             ; +0x0, 0x18001e120\nmov     [rsp-8+arg_8], rsi                                             ; +0x5, 0x18001e125\nmov     [rsp-8+arg_10], rdi                                            ; +0xa, 0x18001e12a\nmov     [rsp-8+arg_18], r12                                            ; +0xf, 0x18001e12f\npush    rbp                                                            ; +0x14, 0x18001e134\npush    r14                                                            ; +0x15, 0x18001e135\npush    r15                                                            ; +0x17, 0x18001e137\nlea     rbp, [rsp-37h]                                                 ; +0x19, 0x18001e139\nsub     rsp, 0B0h                                                      ; +0x1e, 0x18001e13e\nmov     rbx, rcx                                                       ; +0x25, 0x18001e145\nxor     r15d, r15d                                                     ; +0x28, 0x18001e148\nxor     ecx, ecx; lpModuleName                                         ; +0x2b, 0x18001e14b\nmov     [rbp+47h+hWndParent], r15                                      ; +0x2d, 0x18001e14d\nmov     [rbp+47h+var_70], r15                                          ; +0x31, 0x18001e151\nmov     esi, r9d                                                       ; +0x35, 0x18001e155\nmov     r14, r8                                                        ; +0x38, 0x18001e158\nmov     rdi, rdx                                                       ; +0x3b, 0x18001e15b\ncall    cs:GetModuleHandleW                                            ; +0x3e, 0x18001e15e\nmov     [rbp+47h+var_68], 1                                            ; +0x44, 0x18001e164\nmov     r12, rax                                                       ; +0x48, 0x18001e168\nmov     [rbp+47h+hInstance], rax                                       ; +0x4b, 0x18001e16b\nlea     rdx, unk_1800470A4                                             ; +0x4f, 0x18001e16f\nmovzx   eax, [rbp+47h+arg_20]                                          ; +0x56, 0x18001e176\nmov     [rbp+47h+var_80], al                                           ; +0x5a, 0x18001e17a\nmov     [rbp+47h+var_78], rdx                                          ; +0x5d, 0x18001e17d\nmov     [rbp+47h+var_64], r15d                                         ; +0x61, 0x18001e181\nmov     [rbp+47h+var_5C], r15d                                         ; +0x65, 0x18001e185\nmov     [rbp+47h+var_60], 0FFFFFFFFh                                   ; +0x69, 0x18001e189\nmov     [rbp+47h+var_58], 0FFFFFFFFh                                   ; +0x70, 0x18001e190\nmov     [rbp+47h+var_20], 0FFFFFFFFh                                   ; +0x77, 0x18001e197\nmov     [rbp+47h+var_50], rbx                                          ; +0x7e, 0x18001e19e\nmov     [rbp+47h+var_48], rdi                                          ; +0x82, 0x18001e1a2\nmov     [rbp+47h+var_40], r14                                          ; +0x86, 0x18001e1a6\nmov     [rbp+47h+var_38], esi                                          ; +0x8a, 0x18001e1aa\ntest    r14, r14                                                       ; +0x8d, 0x18001e1ad\njnz     short loc_18001E1C4                                            ; +0x90, 0x18001e1b0\nlea     ecx, [r15+57h]; dwErrCode                                      ; +0x92, 0x18001e1b2\ncall    cs:SetLastError                                                ; +0x96, 0x18001e1b6\nmov     rax, r15                                                       ; +0x9c, 0x18001e1bc\njmp     loc_18001E2C4                                                  ; +0x9f, 0x18001e1bf\ncmp     [rbp+47h+var_70], r15                                          ; +0xa4, 0x18001e1c4\njz      short loc_18001E1FA                                            ; +0xa8, 0x18001e1c8\nmovzx   edx, word ptr [rbp+47h+var_70]; lpName                         ; +0xaa, 0x18001e1ca\nmov     r8d, 5; lpType                                                 ; +0xae, 0x18001e1ce\nmov     rcx, r12; hModule                                              ; +0xb4, 0x18001e1d4\ncall    cs:FindResourceW                                               ; +0xb7, 0x18001e1d7\ntest    rax, rax                                                       ; +0xbd, 0x18001e1dd\njz      short loc_18001E1BC                                            ; +0xc0, 0x18001e1e0\nmov     rdx, rax; hResInfo                                             ; +0xc2, 0x18001e1e2\nmov     rcx, r12; hModule                                              ; +0xc5, 0x18001e1e5\ncall    cs:LoadResource                                                ; +0xc8, 0x18001e1e8\nmov     rdx, rax; hDialogTemplate                                      ; +0xce, 0x18001e1ee\ntest    rax, rax                                                       ; +0xd1, 0x18001e1f1\njz      short loc_18001E1BC                                            ; +0xd4, 0x18001e1f4\nmov     r15d, [rbp+47h+var_5C]                                         ; +0xd6, 0x18001e1f6\ncmp     word ptr [rdx], 1                                              ; +0xda, 0x18001e1fa\njnz     short loc_18001E25A                                            ; +0xde, 0x18001e1fe\nmov     eax, 0FFFFh                                                    ; +0xe0, 0x18001e200\ncmp     [rdx+2], ax                                                    ; +0xe5, 0x18001e205\njnz     short loc_18001E25A                                            ; +0xe9, 0x18001e209\ntest    rdx, rdx                                                       ; +0xeb, 0x18001e20b\njz      short loc_18001E25A                                            ; +0xee, 0x18001e20e\nor      r15d, [rdx+8]                                                  ; +0xf0, 0x18001e210\nmov     [rdx+8], r15d                                                  ; +0xf4, 0x18001e214\nmov     eax, [rbp+47h+var_64]                                          ; +0xf8, 0x18001e218\nor      eax, [rdx+0Ch]                                                 ; +0xfb, 0x18001e21b\nmov     [rdx+0Ch], eax                                                 ; +0xfe, 0x18001e21e\nand     r15d, [rbp+47h+var_58]                                         ; +0x101, 0x18001e221\nmov     [rdx+8], r15d                                                  ; +0x105, 0x18001e225\nand     eax, [rbp+47h+var_60]                                          ; +0x109, 0x18001e229\nmov     [rdx+0Ch], eax                                                 ; +0x10c, 0x18001e22c\ncmp     [rbp+47h+var_68], 0                                            ; +0x10f, 0x18001e22f\njz      short loc_18001E23C                                            ; +0x113, 0x18001e233\nbts     eax, 0Bh                                                       ; +0x115, 0x18001e235\nmov     [rdx+0Ch], eax                                                 ; +0x119, 0x18001e239\nmovzx   eax, word ptr [rbp+47h+var_20]                                 ; +0x11c, 0x18001e23c\ncmp     ax, 0FFFFh                                                     ; +0x120, 0x18001e240\njz      short loc_18001E24A                                            ; +0x124, 0x18001e244\nmov     [rdx+12h], ax                                                  ; +0x126, 0x18001e246\nmovzx   eax, word ptr [rbp+47h+var_20+2]                               ; +0x12a, 0x18001e24a\ncmp     ax, 0FFFFh                                                     ; +0x12e, 0x18001e24e\njz      short loc_18001E29E                                            ; +0x132, 0x18001e252\nmov     [rdx+14h], ax                                                  ; +0x134, 0x18001e254\njmp     short loc_18001E29E                                            ; +0x138, 0x18001e258\nor      r15d, [rdx+4]                                                  ; +0x13a, 0x18001e25a\nmov     [rdx+4], r15d                                                  ; +0x13e, 0x18001e25e\nmov     eax, [rbp+47h+var_64]                                          ; +0x142, 0x18001e262\nor      [rdx], eax                                                     ; +0x145, 0x18001e265\nand     r15d, [rbp+47h+var_58]                                         ; +0x147, 0x18001e267\nmov     eax, [rdx]                                                     ; +0x14b, 0x18001e26b\nmov     [rdx+4], r15d                                                  ; +0x14d, 0x18001e26d\nand     eax, [rbp+47h+var_60]                                          ; +0x151, 0x18001e271\nmov     [rdx], eax                                                     ; +0x154, 0x18001e274\ncmp     [rbp+47h+var_68], 0                                            ; +0x156, 0x18001e276\njz      short loc_18001E282                                            ; +0x15a, 0x18001e27a\nbts     eax, 0Bh                                                       ; +0x15c, 0x18001e27c\nmov     [rdx], eax                                                     ; +0x160, 0x18001e280\nmovzx   eax, word ptr [rbp+47h+var_20]                                 ; +0x162, 0x18001e282\ncmp     ax, 0FFFFh                                                     ; +0x166, 0x18001e286\njz      short loc_18001E290                                            ; +0x16a, 0x18001e28a\nmov     [rdx+0Ah], ax                                                  ; +0x16c, 0x18001e28c\nmovzx   eax, word ptr [rbp+47h+var_20+2]                               ; +0x170, 0x18001e290\ncmp     ax, 0FFFFh                                                     ; +0x174, 0x18001e294\njz      short loc_18001E29E                                            ; +0x178, 0x18001e298\nmov     [rdx+0Ch], ax                                                  ; +0x17a, 0x18001e29a\nmov     r8, [rbp+47h+hWndParent]; hWndParent                           ; +0x17e, 0x18001e29e\nlea     rax, [rbp+47h+var_80]                                          ; +0x182, 0x18001e2a2\nmov     rcx, [rbp+47h+hInstance]; hInstance                            ; +0x186, 0x18001e2a6\nlea     r9, ?DlgProc@CWin32InputBox@@CA_JPEAUHWND__@@I_K_J@Z; lpDialogFunc ; +0x18a, 0x18001e2aa\nmov     [rbp+47h+var_90], rax                                          ; +0x191, 0x18001e2b1\nlea     rax, [rbp+47h+var_90]                                          ; +0x195, 0x18001e2b5\nmov     [rsp+0C0h+dwInitParam], rax; dwInitParam                       ; +0x199, 0x18001e2b9\ncall    cs:DialogBoxIndirectParamW                                     ; +0x19e, 0x18001e2be\nlea     r11, [rsp+0C0h+var_10]                                         ; +0x1a4, 0x18001e2c4\nmov     rbx, [r11+20h]                                                 ; +0x1ac, 0x18001e2cc\nmov     rsi, [r11+28h]                                                 ; +0x1b0, 0x18001e2d0\nmov     rdi, [r11+30h]                                                 ; +0x1b4, 0x18001e2d4\nmov     r12, [r11+38h]                                                 ; +0x1b8, 0x18001e2d8\nmov     rsp, r11                                                       ; +0x1bc, 0x18001e2dc\npop     r15                                                            ; +0x1bf, 0x18001e2df\npop     r14                                                            ; +0x1c1, 0x18001e2e1\npop     rbp                                                            ; +0x1c3, 0x18001e2e3\nretn                                                                   ; +0x1c4, 0x18001e2e4", "xrefs": ["cocos2d::extension::CCEditBoxImplWin::openKeyboard @ 0x180011f6d", "<???> @ 0x18002fdf8", "<???> @ 0x18004b0e8"], "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"}