Function at 0x18004aa40
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
xor edi, edi
mov r14d, 1
mov ebx, edi
xor eax, eax
lock cmpxchg dword [0x18013e3f0], r14d
je 0x180006f14
cmp rbx, 0x20
jae 0x180006efb
xor ecx, ecx
jmp 0x180006efe
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_Sleep]
inc rbx
xor eax, eax
lock cmpxchg dword [0x18013e3f0], r14d
jne 0x180006ef1
cmp qword [0x18013e3f8], rdi
jne 0x180006f31
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x18013e3f8], rax
xchg dword [0x18013e3f0], edi
lea rcx, str.opengl32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rcx, str.Kernel32.dll
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rcx, str.Winmm.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rcx, [0x180121ed0]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, str.wglSwapBuffers
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x180121ef0]
mov rcx, rsi
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.WSASend
mov rcx, rbx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.glCallList
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea r8, [0x180135430]
mov rcx, rbx
lea rdx, [0x180006ea0]
mov rsi, rax
call fcn.18004a6c0
lea r8, [0x18013e340]
mov rcx, rdi
lea rdx, [0x1800065c0]
call fcn.18004a6c0
lea r8, [0x18013e348]
mov rcx, rbp
lea rdx, [0x180005e70]
call fcn.18004a6c0
lea r8, [0x18013e338]
mov rcx, rsi
lea rdx, [0x180005d70]
call fcn.18004a6c0
mov edx, r14d
call fcn.18004a9b0
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
jmp 0x18004aa40
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rdi
push r15
sub rsp, 0x30
xor r15d, r15d
mov edi, 1
mov ebp, r15d
mov ebx, r15d
xor eax, eax
lock cmpxchg dword [0x18013e3f0], edi
je 0x18004aa91
nop
cmp rbx, 0x20
jae 0x18004aa7a
xor ecx, ecx
jmp 0x18004aa7c
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
inc rbx
xor eax, eax
lock cmpxchg dword [0x18013e3f0], edi
jne 0x18004aa70
cmp qword [0x18013e3f8], rbp
je 0x18004abbd
mov r8d, dword [0x18013e68c]
mov ebx, r15d
test r8d, r8d
je 0x18004abc2
mov rdx, qword [0x18013e680]
add rdx, 0x20
nop dword [rax]
movzx ecx, byte [rdx]
shr cl, 1
xor cl, byte [rdx]
test cl, 2
jne 0x18004aadc
inc ebx
add rdx, 0x38
cmp ebx, r8d
jb 0x18004aac0
jmp 0x18004abc2
cmp ebx, 0xffffffff
je 0x18004abc2
mov edx, 0xffffffff
lea rcx, [rsp + 0x20]
mov r8d, 2
call fcn.18004a290
mov edx, dword [0x18013e68c]
cmp ebx, edx
jae 0x18004ab51
nop dword [rax]
nop dword [rax + rax]
mov eax, ebx
imul rcx, rax, 0x38
mov rax, qword [0x18013e680]
movzx r8d, byte [rcx + rax + 0x20]
movzx eax, r8b
shr al, 1
xor al, r8b
test al, 2
je 0x18004ab4b
mov edx, r8d
mov ecx, ebx
shr edx, 2
and edx, edi
call fcn.18004a440
mov ebp, eax
test eax, eax
jne 0x18004ab51
mov edx, dword [0x18013e68c]
inc ebx
cmp ebx, edx
jb 0x18004ab10
cmp qword [rsp + 0x20], r15
je 0x18004abc2
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x18004aba7
mov rbx, qword [rsp + 0x20]
mov qword [rsp + 0x40], rsi
mov esi, eax
nop dword [rax]
mov r8d, dword [rbx]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rdi, rax
test rax, rax
je 0x18004ab98
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbx, 4
sub rsi, 1
jne 0x18004ab70
mov rsi, qword [rsp + 0x40]
mov r8, qword [rsp + 0x20]
xor edx, edx
mov rcx, qword [0x18013e3f8]
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x18004abc2
mov ebp, 2
xchg dword [0x18013e3f0], r15d
mov rbx, qword [rsp + 0x48]
mov eax, ebp
mov rbp, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop r15
ret