Function at 0x10016000
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov edx, str.Setting_up_OpenGL_hooks...
push ebx
push esi
push edi
push 0x10002960
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.10002740
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push str.opengl32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x1001606e
push 0x10002960
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Failed_to_get_handle_for_opengl32.dll._Error_code:
push eax
call fcn.10002740
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.wglSwapBuffers
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
jne 0x100160aa
push 0x10002960
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Failed_to_get_address_for_wglSwapBuffers.
call fcn.10002740
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x10022ab8
mov edx, 0x10015cd0
mov ecx, ebx
call fcn.10017b56
test eax, eax
je 0x100160cf
push 0x10002960
push eax
mov edx, str.Failed_to_create_hook_for_wglSwapBuffers._MH_STATUS:
jmp 0x1001624f
xor esi, esi
mov ecx, 1
mov edx, 0x10022abc
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x10016112
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
nop dword [eax + eax]
cmp esi, 0x20
jae 0x100160f9
push 0
jmp 0x100160fb
push 1
call edi
inc esi
mov ecx, 1
xor eax, eax
mov edx, 0x10022abc
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x100160f0
cmp dword [0x10022b40], 0
je 0x1001623b
mov ecx, dword [0x10022d08]
xor edx, edx
test ecx, ecx
je 0x1001613f
mov esi, dword [0x10022d00]
mov eax, esi
cmp ebx, dword [eax]
je 0x1001617f
inc edx
add eax, 0x2c
cmp edx, ecx
jb 0x10016133
mov esi, 4
xor eax, eax
mov ecx, 0x10022abc
xchg dword [ecx], eax
test esi, esi
jne 0x10016244
push 0x10002960
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.OpenGL_hooks_set_up_successfully.
call fcn.10002740
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edx, 0xffffffff
je 0x1001613f
imul edi, edx, 0x2c
test byte [edi + esi + 0x14], 2
jne 0x10016231
push 1
lea ecx, [ebp - 0x10]
call fcn.100178ca
mov esi, eax
add esp, 4
test esi, esi
jne 0x10016144
add edi, dword [0x10022d00]
mov eax, dword [edi]
mov cl, byte [edi + 0x14]
and cl, 1
lea esi, [eax - 5]
cmove esi, eax
movzx eax, cl
lea ebx, [eax*2 + 5]
lea eax, [ebp - 4]
push eax
push 0x40
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x100161e5
lea ecx, [ebp - 0x10]
lea esi, [eax + 0xa]
call fcn.10017955
jmp 0x10016144
mov byte [esi], 0xe9
mov eax, dword [edi + 4]
sub eax, esi
sub eax, 5
mov dword [esi + 1], eax
test byte [edi + 0x14], 1
je 0x10016200
mov eax, dword [edi]
mov word [eax], 0xf9eb
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
or byte [edi + 0x14], 6
lea ecx, [ebp - 0x10]
xor esi, esi
call fcn.10017955
jmp 0x10016144
mov esi, 5
jmp 0x10016144
mov esi, 2
xor eax, eax
xchg dword [edx], eax
push 0x10002960
push esi
mov edx, str.Failed_to_enable_hook_for_wglSwapBuffers._MH_STATUS:
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.10002740
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret