{"type": "func", "start": 6443541248, "end": 6443541480, "name": "sub_18010A300", "pseudocode": "// \n// sub_18010A300 from 0x18010a300 to 0x18010a3e8 (232 bytes)\n// \n// 4 xrefs:\n// > sub_180109DF0 @ 0x180109e4f\n// > sub_180109EC0 @ 0x180109fb2\n// > sub_18010A160 @ 0x18010a1a9\n// > <???> @ 0x1802017b4\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 sub_18010A300(SOCKET s, unsigned __int8 a2)\n{\n  u_long argp; // [rsp+50h] [rbp-38h] BYREF\n  char optval[4]; // [rsp+54h] [rbp-34h] BYREF\n  DWORD cbBytesReturned; // [rsp+58h] [rbp-30h] BYREF\n  _DWORD vInBuffer[4]; // [rsp+60h] [rbp-28h] BYREF\n\n  argp = a2;\n  if ( ioctlsocket(s, -2147195266, &argp) == -1 )\n    return 43;\n  *(_DWORD *)optval = 1;\n  if ( setsockopt(s, 0xFFFF, 8, optval, 4) == -1 )\n    return 43;\n  vInBuffer[0] = 1;\n  vInBuffer[2] = dword_1801AEA7C / 10;\n  vInBuffer[1] = dword_1801AEA7C / 10;\n  if ( WSAIoctl(s, 0x98000004, vInBuffer, 0xCu, nullptr, 0, &cbBytesReturned, nullptr, nullptr) == -1 )\n    return 43;\n  else\n    return 0;\n}", "assembly": "; \n; sub_18010A300 from 0x18010a300 to 0x18010a3e8 (232 bytes)\n; \n; 4 xrefs:\n; > sub_180109DF0 @ 0x180109e4f\n; > sub_180109EC0 @ 0x180109fb2\n; > sub_18010A160 @ 0x18010a1a9\n; > <???> @ 0x1802017b4\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    rbx                                                            ; +0x0, 0x18010a300\nsub     rsp, 80h                                                       ; +0x2, 0x18010a302\nmov     rax, cs:__security_cookie                                      ; +0x9, 0x18010a309\nxor     rax, rsp                                                       ; +0x10, 0x18010a310\nmov     [rsp+88h+var_18], rax                                          ; +0x13, 0x18010a313\nmovzx   eax, dl                                                        ; +0x18, 0x18010a318\nlea     r8, [rsp+88h+argp]; argp                                       ; +0x1b, 0x18010a31b\nmov     edx, 8004667Eh; cmd                                            ; +0x20, 0x18010a320\nmov     [rsp+88h+argp], eax                                            ; +0x25, 0x18010a325\nmov     rbx, rcx                                                       ; +0x29, 0x18010a329\ncall    cs:ioctlsocket                                                 ; +0x2c, 0x18010a32c\ncmp     eax, 0FFFFFFFFh                                                ; +0x32, 0x18010a332\njz      loc_18010A3CD                                                  ; +0x35, 0x18010a335\nlea     r9, [rsp+88h+optval]; optval                                   ; +0x3b, 0x18010a33b\nmov     dword ptr [rsp+88h+optval], 1                                  ; +0x40, 0x18010a340\nmov     edx, 0FFFFh; level                                             ; +0x48, 0x18010a348\nmov     [rsp+88h+optlen], 4; optlen                                    ; +0x4d, 0x18010a34d\nmov     r8d, 8; optname                                                ; +0x55, 0x18010a355\nmov     rcx, rbx; s                                                    ; +0x5b, 0x18010a35b\ncall    cs:setsockopt                                                  ; +0x5e, 0x18010a35e\ncmp     eax, 0FFFFFFFFh                                                ; +0x64, 0x18010a364\njz      short loc_18010A3CD                                            ; +0x67, 0x18010a367\nxor     ecx, ecx                                                       ; +0x69, 0x18010a369\nmov     [rsp+88h+vInBuffer], 1                                         ; +0x6b, 0x18010a36b\nmov     [rsp+88h+lpCompletionRoutine], rcx; lpCompletionRoutine        ; +0x73, 0x18010a373\nlea     r8, [rsp+88h+vInBuffer]; lpvInBuffer                           ; +0x78, 0x18010a378\nmov     [rsp+88h+lpOverlapped], rcx; lpOverlapped                      ; +0x7d, 0x18010a37d\nmov     eax, 66666667h                                                 ; +0x82, 0x18010a382\nimul    cs:dword_1801AEA7C                                             ; +0x87, 0x18010a387\nlea     r9d, [rcx+0Ch]; cbInBuffer                                     ; +0x8d, 0x18010a38d\nsar     edx, 2                                                         ; +0x91, 0x18010a391\nmov     eax, edx                                                       ; +0x94, 0x18010a394\nshr     eax, 1Fh                                                       ; +0x96, 0x18010a396\nadd     edx, eax                                                       ; +0x99, 0x18010a399\nlea     rax, [rsp+88h+cbBytesReturned]                                 ; +0x9b, 0x18010a39b\nmov     [rsp+88h+lpcbBytesReturned], rax; lpcbBytesReturned            ; +0xa0, 0x18010a3a0\nmov     [rsp+88h+cbOutBuffer], ecx; cbOutBuffer                        ; +0xa5, 0x18010a3a5\nmov     qword ptr [rsp+88h+optlen], rcx; lpvOutBuffer                  ; +0xa9, 0x18010a3a9\nmov     rcx, rbx; s                                                    ; +0xae, 0x18010a3ae\nmov     [rsp+88h+var_20], edx                                          ; +0xb1, 0x18010a3b1\nmov     [rsp+88h+var_24], edx                                          ; +0xb5, 0x18010a3b5\nmov     edx, 98000004h; dwIoControlCode                                ; +0xb9, 0x18010a3b9\ncall    cs:WSAIoctl                                                    ; +0xbe, 0x18010a3be\ncmp     eax, 0FFFFFFFFh                                                ; +0xc4, 0x18010a3c4\njz      short loc_18010A3CD                                            ; +0xc7, 0x18010a3c7\nxor     eax, eax                                                       ; +0xc9, 0x18010a3c9\njmp     short loc_18010A3D2                                            ; +0xcb, 0x18010a3cb\nmov     eax, 2Bh ; '+'                                                 ; +0xcd, 0x18010a3cd\nmov     rcx, [rsp+88h+var_18]                                          ; +0xd2, 0x18010a3d2\nxor     rcx, rsp; StackCookie                                          ; +0xd7, 0x18010a3d7\ncall    __security_check_cookie                                        ; +0xda, 0x18010a3da\nadd     rsp, 80h                                                       ; +0xdf, 0x18010a3df\npop     rbx                                                            ; +0xe6, 0x18010a3e6\nretn                                                                   ; +0xe7, 0x18010a3e7", "xrefs": ["sub_180109DF0 @ 0x180109e4f", "sub_180109EC0 @ 0x180109fb2", "sub_18010A160 @ 0x18010a1a9", "<???> @ 0x1802017b4"], "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"}