Function at 0x140041bd8
Capabilities:
Check for time delay via gettickcount
Create thread

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x40
xor r12d, r12d
mov bl, r12b
lea esi, [r12 + 1]
lea r8d, [r12 + 0x2a]
jmp 0x140041c05
add bl, sil
add rcx, 2
mov qword [rsp + 0x70], rcx
cmp r8w, word [rcx]
je 0x140041bf9
jmp 0x140041c30
mov edx, 9
cmp dx, ax
ja 0x140041c1d
cmp ax, 0xd
jbe 0x140041c39
mov edx, 0x20
cmp dx, ax
je 0x140041c39
add rcx, 2
mov qword [rsp + 0x70], rcx
movzx eax, word [rcx]
cmp ax, r12w
jne 0x140041c0d
lea rcx, [rsp + 0x70]
call fcn.140015d64
mov rdi, qword [rsp + 0x70]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov byte [rsp + 0x80], r8b
lea rax, [rsp + 0x80]
lea r9, [rsp + 0x31]
lea r8, [rsp + 0x88]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov byte [0x14011be7d], bl
mov byte [rsp + 0x30], r12b
mov byte [rsp + 0x88], sil
mov byte [rsp + 0x31], sil
mov byte [rsp + 0x78], r12b
call fcn.14002663c
mov r11, qword [rsp + 0x70]
cmp word [r11], r12w
je 0x140041dde
lea rbp, [0x14011cf88]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp bl, r12b
je 0x140041cdb
cmp qword [0x14011be58], r12
je 0x140041cdb
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140041e4f
mov rcx, qword [rsp + 0x70]
movsx edx, byte [rsp + 0x80]
mov r8b, 0xff
mov byte [0x140119229], r8b
movzx eax, word [rcx]
mov byte [0x14011be7a], sil
cmp edx, eax
jne 0x140041d14
movzx eax, word [rcx + 2]
movzx ecx, r8b
cmp edx, eax
cmove ecx, r12d
mov byte [0x140119229], cl
lea rax, [0x14011b960]
lea r8, [0x14003d228]
mov r9, rdi
mov qword [rsp + 0x28], rax
mov edx, 0x100000
xor ecx, ecx
mov dword [rsp + 0x20], 0x10000
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
movzx ecx, word [rdi]
cmp cx, r12w
jne 0x140041d6d
mov cl, byte [0x14011be7a]
cmp cl, r12b
je 0x140041d92
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x30d40
jae 0x140041d92
lea rcx, [0x14011c020]
xor r9d, r9d
mov r8d, esi
xor edx, edx
call fcn.14001df90
jmp 0x140041d59
cmp byte [rsp + 0x78], r12b
je 0x140041e4f
test byte [rsp + 0x88], 0x40
je 0x140041e4f
mov rax, qword [0x14011be58]
cmp rax, r12
je 0x140041e4f
lea rcx, [0x14011c020]
xor r9d, r9d
xor r8d, r8d
mov rdx, rsi
call fcn.14001df90
mov r11, qword [0x14011be58]
cmp r11, r12
jne 0x140041dbb
jmp 0x140041e4f
movsx ebx, byte [rsp + 0x78]
movsx edx, byte [rsp + 0x30]
lea rcx, [rsp + 0x38]
mov r8d, ebx
mov qword [rsp + 0x38], r12
lea rdi, [rsp + 0x38]
mov esi, 0xbb8
call fcn.14001a178
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebp, eax
cmp bl, r12b
je 0x140041e1d
lea rdi, [0x14011be58]
mov esi, 0xfa0
mov rcx, qword [rdi]
cmp rcx, r12
je 0x140041e4f
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebp
cmp eax, esi
jae 0x140041e4f
xor r9d, r9d
lea rcx, [0x14011c020]
xor r8d, r8d
lea edx, [r9 + 0xa]
call fcn.14001df90
mov r11, qword [rdi]
cmp r11, r12
jne 0x140041e25
xor eax, eax
add rsp, 0x40
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret