{"type": "func", "start": 6443651040, "end": 6443651374, "name": "try_get_function", "pseudocode": "// \n// try_get_function from 0x180124fe0 to 0x18012512e (334 bytes)\n// \n// 6 xrefs:\n// > __vcrt_FlsAlloc @ 0x180125150\n// > __vcrt_FlsFree @ 0x18012519a\n// > __vcrt_FlsGetValue @ 0x1801251e2\n// > __vcrt_FlsSetValue @ 0x180125231\n// > __vcrt_InitializeCriticalSectionEx @ 0x18012528d\n// > <???> @ 0x18020278c\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:54:54 +0000\n// \n\nFARPROC __fastcall try_get_function(unsigned int a1, const CHAR *a2, unsigned int *a3, unsigned int *a4)\n{\n  __int64 v4; // rdi\n  unsigned int *v6; // rbp\n  FARPROC result; // rax\n  bool i; // zf\n  __int64 v10; // rsi\n  HMODULE Library; // rbx\n  const WCHAR *v12; // r15\n\n  v4 = a1;\n  v6 = a3;\n  result = (FARPROC)qword_1801F4BA0[a1];\n  if ( result != (FARPROC)-1LL )\n  {\n    if ( result )\n      return result;\n    for ( i = a3 == a4; !i; i = v6 == a4 )\n    {\n      v10 = *v6;\n      Library = (HMODULE)qword_1801F4B88[v10];\n      if ( Library )\n      {\n        if ( Library != (HMODULE)-1LL )\n          goto LABEL_16;\n      }\n      else\n      {\n        v12 = off_1801709F0[v10];\n        Library = LoadLibraryExW(v12, nullptr, 0x800u);\n        if ( Library\n          || GetLastError() == 87\n          && wcsncmp(v12, L\"api-ms-\", 7u)\n          && (Library = LoadLibraryExW(v12, nullptr, 0)) != nullptr )\n        {\n          if ( _InterlockedExchange64(&qword_1801F4B88[v10], (__int64)Library) )\n            FreeLibrary(Library);\nLABEL_16:\n          result = GetProcAddress(Library, a2);\n          if ( result )\n          {\n            _InterlockedExchange64(&qword_1801F4BA0[v4], (__int64)result);\n            return result;\n          }\n          break;\n        }\n        _InterlockedExchange64(&qword_1801F4B88[v10], -1);\n      }\n      ++v6;\n    }\n    _InterlockedExchange64(&qword_1801F4BA0[v4], -1);\n  }\n  return nullptr;\n}", "assembly": "; \n; try_get_function from 0x180124fe0 to 0x18012512e (334 bytes)\n; \n; 6 xrefs:\n; > __vcrt_FlsAlloc @ 0x180125150\n; > __vcrt_FlsFree @ 0x18012519a\n; > __vcrt_FlsGetValue @ 0x1801251e2\n; > __vcrt_FlsSetValue @ 0x180125231\n; > __vcrt_InitializeCriticalSectionEx @ 0x18012528d\n; > <???> @ 0x18020278c\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:54:54 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180124fe0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180124fe5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x180124fea\npush    rdi                                                            ; +0xf, 0x180124fef\npush    r12                                                            ; +0x10, 0x180124ff0\npush    r13                                                            ; +0x12, 0x180124ff2\npush    r14                                                            ; +0x14, 0x180124ff4\npush    r15                                                            ; +0x16, 0x180124ff6\nsub     rsp, 20h                                                       ; +0x18, 0x180124ff8\nmov     edi, ecx                                                       ; +0x1c, 0x180124ffc\nlea     r15, cs:180000000h                                             ; +0x1e, 0x180124ffe\nor      r14, 0FFFFFFFFFFFFFFFFh                                        ; +0x25, 0x180125005\nmov     r12, r9                                                        ; +0x29, 0x180125009\nmov     rbp, r8                                                        ; +0x2c, 0x18012500c\nmov     r13, rdx                                                       ; +0x2f, 0x18012500f\nmov     rax, rva qword_1801F4BA0[r15+rdi*8]                            ; +0x32, 0x180125012\nnop                                                                    ; +0x3a, 0x18012501a\ncmp     rax, r14                                                       ; +0x3b, 0x18012501b\njz      loc_18012510F                                                  ; +0x3e, 0x18012501e\ntest    rax, rax                                                       ; +0x44, 0x180125024\njnz     loc_180125111                                                  ; +0x47, 0x180125027\ncmp     r8, r9                                                         ; +0x4d, 0x18012502d\njz      loc_180125107                                                  ; +0x50, 0x180125030\nmov     esi, [rbp+0]                                                   ; +0x56, 0x180125036\nmov     rbx, rva qword_1801F4B88[r15+rsi*8]                            ; +0x59, 0x180125039\nnop                                                                    ; +0x61, 0x180125041\ntest    rbx, rbx                                                       ; +0x62, 0x180125042\njz      short loc_180125052                                            ; +0x65, 0x180125045\ncmp     rbx, r14                                                       ; +0x67, 0x180125047\njnz     loc_1801250E9                                                  ; +0x6a, 0x18012504a\njmp     short loc_1801250BD                                            ; +0x70, 0x180125050\nmov     r15, ds:rva off_1801709F0[r15+rsi*8]                           ; +0x72, 0x180125052\nxor     edx, edx; hFile                                                ; +0x7a, 0x18012505a\nmov     rcx, r15; lpLibFileName                                        ; +0x7c, 0x18012505c\nmov     r8d, 800h; dwFlags                                             ; +0x7f, 0x18012505f\ncall    cs:LoadLibraryExW                                              ; +0x85, 0x180125065\nmov     rbx, rax                                                       ; +0x8b, 0x18012506b\ntest    rax, rax                                                       ; +0x8e, 0x18012506e\njnz     short loc_1801250C9                                            ; +0x91, 0x180125071\ncall    cs:GetLastError                                                ; +0x93, 0x180125073\ncmp     eax, 57h ; 'W'                                                 ; +0x99, 0x180125079\njnz     short loc_1801250AB                                            ; +0x9c, 0x18012507c\nlea     r8d, [rbx+7]; MaxCount                                         ; +0x9e, 0x18012507e\nmov     rcx, r15; String1                                              ; +0xa2, 0x180125082\nlea     rdx, aApiMs                                                    ; +0xa5, 0x180125085\ncall    wcsncmp                                                        ; +0xac, 0x18012508c\ntest    eax, eax                                                       ; +0xb1, 0x180125091\njz      short loc_1801250AB                                            ; +0xb3, 0x180125093\nxor     r8d, r8d; dwFlags                                              ; +0xb5, 0x180125095\nxor     edx, edx; hFile                                                ; +0xb8, 0x180125098\nmov     rcx, r15; lpLibFileName                                        ; +0xba, 0x18012509a\ncall    cs:LoadLibraryExW                                              ; +0xbd, 0x18012509d\nmov     rbx, rax                                                       ; +0xc3, 0x1801250a3\ntest    rax, rax                                                       ; +0xc6, 0x1801250a6\njnz     short loc_1801250C9                                            ; +0xc9, 0x1801250a9\nmov     rax, r14                                                       ; +0xcb, 0x1801250ab\nlea     r15, cs:180000000h                                             ; +0xce, 0x1801250ae\nxchg    rax, rva qword_1801F4B88[r15+rsi*8]                            ; +0xd5, 0x1801250b5\nadd     rbp, 4                                                         ; +0xdd, 0x1801250bd\ncmp     rbp, r12                                                       ; +0xe1, 0x1801250c1\njmp     loc_180125030                                                  ; +0xe4, 0x1801250c4\nmov     rax, rbx                                                       ; +0xe9, 0x1801250c9\nlea     r15, cs:180000000h                                             ; +0xec, 0x1801250cc\nxchg    rax, rva qword_1801F4B88[r15+rsi*8]                            ; +0xf3, 0x1801250d3\ntest    rax, rax                                                       ; +0xfb, 0x1801250db\njz      short loc_1801250E9                                            ; +0xfe, 0x1801250de\nmov     rcx, rbx; hLibModule                                           ; +0x100, 0x1801250e0\ncall    cs:FreeLibrary                                                 ; +0x103, 0x1801250e3\nmov     rdx, r13; lpProcName                                           ; +0x109, 0x1801250e9\nmov     rcx, rbx; hModule                                              ; +0x10c, 0x1801250ec\ncall    cs:GetProcAddress                                              ; +0x10f, 0x1801250ef\ntest    rax, rax                                                       ; +0x115, 0x1801250f5\njz      short loc_180125107                                            ; +0x118, 0x1801250f8\nmov     rcx, rax                                                       ; +0x11a, 0x1801250fa\nxchg    rcx, rva qword_1801F4BA0[r15+rdi*8]                            ; +0x11d, 0x1801250fd\njmp     short loc_180125111                                            ; +0x125, 0x180125105\nxchg    r14, rva qword_1801F4BA0[r15+rdi*8]                            ; +0x127, 0x180125107\nxor     eax, eax                                                       ; +0x12f, 0x18012510f\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x131, 0x180125111\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x136, 0x180125116\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x13b, 0x18012511b\nadd     rsp, 20h                                                       ; +0x140, 0x180125120\npop     r15                                                            ; +0x144, 0x180125124\npop     r14                                                            ; +0x146, 0x180125126\npop     r13                                                            ; +0x148, 0x180125128\npop     r12                                                            ; +0x14a, 0x18012512a\npop     rdi                                                            ; +0x14c, 0x18012512c\nretn                                                                   ; +0x14d, 0x18012512d", "xrefs": ["__vcrt_FlsAlloc @ 0x180125150", "__vcrt_FlsFree @ 0x18012519a", "__vcrt_FlsGetValue @ 0x1801251e2", "__vcrt_FlsSetValue @ 0x180125231", "__vcrt_InitializeCriticalSectionEx @ 0x18012528d", "<???> @ 0x18020278c"], "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"}