{"type": "func", "start": 6443717984, "end": 6443718454, "name": "try_get_function", "pseudocode": "// \n// try_get_function from 0x180135560 to 0x180135736 (470 bytes)\n// \n// 23 xrefs:\n// > __acrt_AppPolicyGetProcessTerminationMethodInternal @ 0x18013575b\n// > __acrt_AppPolicyGetShowDeveloperDiagnosticInternal @ 0x1801357ab\n// > __acrt_AppPolicyGetThreadInitializationTypeInternal @ 0x1801357fb\n// > __acrt_AppPolicyGetWindowingModelInternal @ 0x18013584b\n// > __acrt_AreFileApisANSI @ 0x180135893\n// > __acrt_CompareStringEx @ 0x1801358ed\n// > __acrt_FlsAlloc @ 0x1801359b3\n// > __acrt_FlsFree @ 0x1801359fa\n// > __acrt_FlsGetValue @ 0x180135a42\n// > __acrt_FlsSetValue @ 0x180135a91\n// > __vcrt_InitializeCriticalSectionEx_0 @ 0x180135aed\n// > __acrt_LCMapStringEx @ 0x180135b59\n// > __acrt_LocaleNameToLCID @ 0x180135c25\n// > __acrt_MessageBoxW @ 0x180135c86\n// > __acrt_RoInitialize @ 0x180135ce2\n// > __acrt_RoUninitialize @ 0x180135d1e\n// > __acrt_can_show_message_box @ 0x180135d64\n// > __acrt_can_show_message_box @ 0x180135d86\n// > __acrt_get_parent_window @ 0x180135dc4\n// > __acrt_get_parent_window @ 0x180135df6\n// > __acrt_is_interactive @ 0x180135e83\n// > __acrt_is_interactive @ 0x180135eaa\n// > <???> @ 0x180203398\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\nFARPROC __fastcall try_get_function(unsigned int a1, const CHAR *a2, unsigned int *a3, unsigned int *a4)\n{\n  __int64 v4; // r15\n  unsigned int *v6; // rbp\n  uintptr_t v8; // r10\n  __int64 v9; // rdx\n  FARPROC result; // rax\n  __int64 v11; // rsi\n  HMODULE Library; // rbx\n  const WCHAR *v13; // r14\n\n  v4 = a1;\n  v6 = a3;\n  v8 = _security_cookie;\n  v9 = __ROR8__(qword_1801F5040[a1] ^ _security_cookie, _security_cookie & 0x3F);\n  if ( v9 == -1 )\n    return nullptr;\n  if ( v9 )\n    return (FARPROC)v9;\n  if ( a3 == a4 )\n  {\nLABEL_21:\n    Library = nullptr;\n    goto LABEL_22;\n  }\n  while ( 1 )\n  {\n    v11 = *v6;\n    Library = (HMODULE)qword_1801F4FA0[v11];\n    if ( !Library )\n      break;\n    if ( Library != (HMODULE)-1LL )\n      goto LABEL_25;\nLABEL_19:\n    if ( ++v6 == a4 )\n    {\n      v8 = _security_cookie;\n      goto LABEL_21;\n    }\n  }\n  v13 = off_180174480[v11];\n  Library = LoadLibraryExW(v13, nullptr, 0x800u);\n  if ( !Library )\n  {\n    if ( GetLastError() != 87 || !wcsncmp(v13, L\"api-ms-\", 7u) || !wcsncmp(v13, L\"ext-ms-\", 7u) )\n      Library = nullptr;\n    else\n      Library = LoadLibraryExW(v13, nullptr, 0);\n  }\n  if ( !Library )\n  {\n    _InterlockedExchange64(&qword_1801F4FA0[v11], -1);\n    goto LABEL_19;\n  }\n  if ( _InterlockedExchange64(&qword_1801F4FA0[v11], (__int64)Library) )\n    FreeLibrary(Library);\nLABEL_25:\n  v8 = _security_cookie;\nLABEL_22:\n  if ( Library )\n  {\n    result = GetProcAddress(Library, a2);\n    if ( result )\n    {\n      _InterlockedExchange64(\n        &qword_1801F5040[v4],\n        _security_cookie ^ __ROR8__(result, 64 - ((unsigned __int8)_security_cookie & 0x3Fu)));\n      return result;\n    }\n    v8 = _security_cookie;\n  }\n  _InterlockedExchange64(&qword_1801F5040[v4], v8 ^ __ROR8__(-1, 64 - ((unsigned __int8)v8 & 0x3Fu)));\n  return nullptr;\n}", "assembly": "; \n; try_get_function from 0x180135560 to 0x180135736 (470 bytes)\n; \n; 23 xrefs:\n; > __acrt_AppPolicyGetProcessTerminationMethodInternal @ 0x18013575b\n; > __acrt_AppPolicyGetShowDeveloperDiagnosticInternal @ 0x1801357ab\n; > __acrt_AppPolicyGetThreadInitializationTypeInternal @ 0x1801357fb\n; > __acrt_AppPolicyGetWindowingModelInternal @ 0x18013584b\n; > __acrt_AreFileApisANSI @ 0x180135893\n; > __acrt_CompareStringEx @ 0x1801358ed\n; > __acrt_FlsAlloc @ 0x1801359b3\n; > __acrt_FlsFree @ 0x1801359fa\n; > __acrt_FlsGetValue @ 0x180135a42\n; > __acrt_FlsSetValue @ 0x180135a91\n; > __vcrt_InitializeCriticalSectionEx_0 @ 0x180135aed\n; > __acrt_LCMapStringEx @ 0x180135b59\n; > __acrt_LocaleNameToLCID @ 0x180135c25\n; > __acrt_MessageBoxW @ 0x180135c86\n; > __acrt_RoInitialize @ 0x180135ce2\n; > __acrt_RoUninitialize @ 0x180135d1e\n; > __acrt_can_show_message_box @ 0x180135d64\n; > __acrt_can_show_message_box @ 0x180135d86\n; > __acrt_get_parent_window @ 0x180135dc4\n; > __acrt_get_parent_window @ 0x180135df6\n; > __acrt_is_interactive @ 0x180135e83\n; > __acrt_is_interactive @ 0x180135eaa\n; > <???> @ 0x180203398\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+arg_0], rbx                                               ; +0x0, 0x180135560\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180135565\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18013556a\npush    rdi                                                            ; +0xf, 0x18013556f\npush    r12                                                            ; +0x10, 0x180135570\npush    r13                                                            ; +0x12, 0x180135572\npush    r14                                                            ; +0x14, 0x180135574\npush    r15                                                            ; +0x16, 0x180135576\nsub     rsp, 20h                                                       ; +0x18, 0x180135578\nmov     r15d, ecx                                                      ; +0x1c, 0x18013557c\nlea     r14, cs:180000000h                                             ; +0x1f, 0x18013557f\nmov     r12, r9                                                        ; +0x26, 0x180135586\nmov     rbp, r8                                                        ; +0x29, 0x180135589\nmov     r13, rdx                                                       ; +0x2c, 0x18013558c\nmov     rcx, rva qword_1801F5040[r14+r15*8]                            ; +0x2f, 0x18013558f\nmov     r10, cs:__security_cookie                                      ; +0x37, 0x180135597\nor      rdi, 0FFFFFFFFFFFFFFFFh                                        ; +0x3e, 0x18013559e\nmov     eax, r10d                                                      ; +0x42, 0x1801355a2\nmov     rdx, r10                                                       ; +0x45, 0x1801355a5\nxor     rdx, rcx                                                       ; +0x48, 0x1801355a8\nand     eax, 3Fh                                                       ; +0x4b, 0x1801355ab\nmov     cl, al                                                         ; +0x4e, 0x1801355ae\nror     rdx, cl                                                        ; +0x50, 0x1801355b0\ncmp     rdx, rdi                                                       ; +0x53, 0x1801355b3\njz      loc_180135717                                                  ; +0x56, 0x1801355b6\ntest    rdx, rdx                                                       ; +0x5c, 0x1801355bc\njz      short loc_1801355C9                                            ; +0x5f, 0x1801355bf\nmov     rax, rdx                                                       ; +0x61, 0x1801355c1\njmp     loc_180135719                                                  ; +0x64, 0x1801355c4\ncmp     r8, r12                                                        ; +0x69, 0x1801355c9\njz      loc_1801356AB                                                  ; +0x6c, 0x1801355cc\nmov     esi, [rbp+0]                                                   ; +0x72, 0x1801355d2\nmov     rbx, rva qword_1801F4FA0[r14+rsi*8]                            ; +0x75, 0x1801355d5\ntest    rbx, rbx                                                       ; +0x7d, 0x1801355dd\njz      short loc_1801355F0                                            ; +0x80, 0x1801355e0\ncmp     rbx, rdi                                                       ; +0x82, 0x1801355e2\njz      loc_180135697                                                  ; +0x85, 0x1801355e5\njmp     loc_180135692                                                  ; +0x8b, 0x1801355eb\nmov     r14, ds:rva off_180174480[r14+rsi*8]                           ; +0x90, 0x1801355f0\nxor     edx, edx; hFile                                                ; +0x98, 0x1801355f8\nmov     rcx, r14; lpLibFileName                                        ; +0x9a, 0x1801355fa\nmov     r8d, 800h; dwFlags                                             ; +0x9d, 0x1801355fd\ncall    cs:LoadLibraryExW                                              ; +0xa3, 0x180135603\nmov     rbx, rax                                                       ; +0xa9, 0x180135609\ntest    rax, rax                                                       ; +0xac, 0x18013560c\njnz     short loc_180135660                                            ; +0xaf, 0x18013560f\ncall    cs:GetLastError                                                ; +0xb1, 0x180135611\ncmp     eax, 57h ; 'W'                                                 ; +0xb7, 0x180135617\njnz     short loc_18013565E                                            ; +0xba, 0x18013561a\nlea     ebx, [rax-50h]                                                 ; +0xbc, 0x18013561c\nmov     rcx, r14; String1                                              ; +0xbf, 0x18013561f\nmov     r8d, ebx; MaxCount                                             ; +0xc2, 0x180135622\nlea     rdx, aApiMs                                                    ; +0xc5, 0x180135625\ncall    wcsncmp                                                        ; +0xcc, 0x18013562c\ntest    eax, eax                                                       ; +0xd1, 0x180135631\njz      short loc_18013565E                                            ; +0xd3, 0x180135633\nmov     r8d, ebx; MaxCount                                             ; +0xd5, 0x180135635\nlea     rdx, aExtMs                                                    ; +0xd8, 0x180135638\nmov     rcx, r14; String1                                              ; +0xdf, 0x18013563f\ncall    wcsncmp                                                        ; +0xe2, 0x180135642\ntest    eax, eax                                                       ; +0xe7, 0x180135647\njz      short loc_18013565E                                            ; +0xe9, 0x180135649\nxor     r8d, r8d; dwFlags                                              ; +0xeb, 0x18013564b\nxor     edx, edx; hFile                                                ; +0xee, 0x18013564e\nmov     rcx, r14; lpLibFileName                                        ; +0xf0, 0x180135650\ncall    cs:LoadLibraryExW                                              ; +0xf3, 0x180135653\nmov     rbx, rax                                                       ; +0xf9, 0x180135659\njmp     short loc_180135660                                            ; +0xfc, 0x18013565c\nxor     ebx, ebx                                                       ; +0xfe, 0x18013565e\nlea     r14, cs:180000000h                                             ; +0x100, 0x180135660\ntest    rbx, rbx                                                       ; +0x107, 0x180135667\njnz     short loc_180135679                                            ; +0x10a, 0x18013566a\nmov     rax, rdi                                                       ; +0x10c, 0x18013566c\nxchg    rax, rva qword_1801F4FA0[r14+rsi*8]                            ; +0x10f, 0x18013566f\njmp     short loc_180135697                                            ; +0x117, 0x180135677\nmov     rax, rbx                                                       ; +0x119, 0x180135679\nxchg    rax, rva qword_1801F4FA0[r14+rsi*8]                            ; +0x11c, 0x18013567c\ntest    rax, rax                                                       ; +0x124, 0x180135684\njz      short loc_180135692                                            ; +0x127, 0x180135687\nmov     rcx, rbx; hLibModule                                           ; +0x129, 0x180135689\ncall    cs:FreeLibrary                                                 ; +0x12c, 0x18013568c\ntest    rbx, rbx                                                       ; +0x132, 0x180135692\njnz     short loc_1801356EC                                            ; +0x135, 0x180135695\nadd     rbp, 4                                                         ; +0x137, 0x180135697\ncmp     rbp, r12                                                       ; +0x13b, 0x18013569b\njnz     loc_1801355D2                                                  ; +0x13e, 0x18013569e\nmov     r10, cs:__security_cookie                                      ; +0x144, 0x1801356a4\nxor     ebx, ebx                                                       ; +0x14b, 0x1801356ab\ntest    rbx, rbx                                                       ; +0x14d, 0x1801356ad\njz      short loc_1801356FC                                            ; +0x150, 0x1801356b0\nmov     rdx, r13; lpProcName                                           ; +0x152, 0x1801356b2\nmov     rcx, rbx; hModule                                              ; +0x155, 0x1801356b5\ncall    cs:GetProcAddress                                              ; +0x158, 0x1801356b8\ntest    rax, rax                                                       ; +0x15e, 0x1801356be\njz      short loc_1801356F5                                            ; +0x161, 0x1801356c1\nmov     r8, cs:__security_cookie                                       ; +0x163, 0x1801356c3\nmov     edx, 40h ; '@'                                                 ; +0x16a, 0x1801356ca\nmov     ecx, r8d                                                       ; +0x16f, 0x1801356cf\nand     ecx, 3Fh                                                       ; +0x172, 0x1801356d2\nsub     edx, ecx                                                       ; +0x175, 0x1801356d5\nmov     cl, dl                                                         ; +0x177, 0x1801356d7\nmov     rdx, rax                                                       ; +0x179, 0x1801356d9\nror     rdx, cl                                                        ; +0x17c, 0x1801356dc\nxor     rdx, r8                                                        ; +0x17f, 0x1801356df\nxchg    rdx, rva qword_1801F5040[r14+r15*8]                            ; +0x182, 0x1801356e2\njmp     short loc_180135719                                            ; +0x18a, 0x1801356ea\nmov     r10, cs:__security_cookie                                      ; +0x18c, 0x1801356ec\njmp     short loc_1801356AD                                            ; +0x193, 0x1801356f3\nmov     r10, cs:__security_cookie                                      ; +0x195, 0x1801356f5\nmov     eax, r10d                                                      ; +0x19c, 0x1801356fc\nmov     ecx, 40h ; '@'                                                 ; +0x19f, 0x1801356ff\nand     eax, 3Fh                                                       ; +0x1a4, 0x180135704\nsub     ecx, eax                                                       ; +0x1a7, 0x180135707\nror     rdi, cl                                                        ; +0x1a9, 0x180135709\nxor     rdi, r10                                                       ; +0x1ac, 0x18013570c\nxchg    rdi, rva qword_1801F5040[r14+r15*8]                            ; +0x1af, 0x18013570f\nxor     eax, eax                                                       ; +0x1b7, 0x180135717\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x1b9, 0x180135719\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x1be, 0x18013571e\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x1c3, 0x180135723\nadd     rsp, 20h                                                       ; +0x1c8, 0x180135728\npop     r15                                                            ; +0x1cc, 0x18013572c\npop     r14                                                            ; +0x1ce, 0x18013572e\npop     r13                                                            ; +0x1d0, 0x180135730\npop     r12                                                            ; +0x1d2, 0x180135732\npop     rdi                                                            ; +0x1d4, 0x180135734\nretn                                                                   ; +0x1d5, 0x180135735", "xrefs": ["__acrt_AppPolicyGetProcessTerminationMethodInternal @ 0x18013575b", "__acrt_AppPolicyGetShowDeveloperDiagnosticInternal @ 0x1801357ab", "__acrt_AppPolicyGetThreadInitializationTypeInternal @ 0x1801357fb", "__acrt_AppPolicyGetWindowingModelInternal @ 0x18013584b", "__acrt_AreFileApisANSI @ 0x180135893", "__acrt_CompareStringEx @ 0x1801358ed", "__acrt_FlsAlloc @ 0x1801359b3", "__acrt_FlsFree @ 0x1801359fa", "__acrt_FlsGetValue @ 0x180135a42", "__acrt_FlsSetValue @ 0x180135a91", "__vcrt_InitializeCriticalSectionEx_0 @ 0x180135aed", "__acrt_LCMapStringEx @ 0x180135b59", "__acrt_LocaleNameToLCID @ 0x180135c25", "__acrt_MessageBoxW @ 0x180135c86", "__acrt_RoInitialize @ 0x180135ce2", "__acrt_RoUninitialize @ 0x180135d1e", "__acrt_can_show_message_box @ 0x180135d64", "__acrt_can_show_message_box @ 0x180135d86", "__acrt_get_parent_window @ 0x180135dc4", "__acrt_get_parent_window @ 0x180135df6", "__acrt_is_interactive @ 0x180135e83", "__acrt_is_interactive @ 0x180135eaa", "<???> @ 0x180203398"], "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"}