Function at 0x140041880
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 r8d, [r12 + 0x2a]
jmp 0x1400418a7
inc bl
add rcx, 2
mov qword [rsp + 0x70], rcx
cmp r8w, word [rcx]
je 0x14004189c
jmp 0x1400418d2
mov edx, 9
cmp dx, ax
ja 0x1400418bf
cmp ax, 0xd
jbe 0x1400418db
mov edx, 0x20
cmp dx, ax
je 0x1400418db
add rcx, 2
mov qword [rsp + 0x70], rcx
movzx eax, word [rcx]
cmp ax, r12w
jne 0x1400418af
lea rcx, [rsp + 0x70]
call fcn.1400157dc
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 [0x140117e05], bl
mov byte [rsp + 0x30], r12b
mov byte [rsp + 0x88], 1
mov byte [rsp + 0x31], 1
mov byte [rsp + 0x78], r12b
call fcn.140027fb8
mov r11, qword [rsp + 0x70]
cmp word [r11], r12w
je 0x140041a83
lea rsi, [0x140118f08]
mov rcx, rsi
call qword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
cmp bl, r12b
je 0x14004197d
cmp qword [0x140117de0], r12
je 0x14004197d
mov rcx, rsi
call qword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
jmp 0x140041af4
mov rcx, qword [rsp + 0x70]
movsx edx, byte [rsp + 0x80]
mov r8b, 0xff
mov byte [0x140115219], r8b
movzx eax, word [rcx]
mov byte [0x140117e02], 1
cmp edx, eax
jne 0x1400419b6
movzx eax, word [rcx + 2]
movzx ecx, r8b
cmp edx, eax
cmove ecx, r12d
mov byte [0x140115219], cl
lea rax, [0x1401178e4]
lea r8, [0x14003deb0]
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, rsi
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 0x140041a0f
mov cl, byte [0x140117e02]
cmp cl, r12b
je 0x140041a36
call qword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, ebx
cmp eax, 0x7d0
jae 0x140041a36
xor r9d, r9d
lea rcx, [0x140117fa0]
xor r8d, r8d
lea edx, [r9 + 0x14]
call fcn.14001d848
jmp 0x1400419fb
cmp byte [rsp + 0x78], r12b
je 0x140041af4
test byte [rsp + 0x88], 0x40
je 0x140041af4
mov rax, qword [0x140117de0]
cmp rax, r12
je 0x140041af4
xor r9d, r9d
lea rcx, [0x140117fa0]
xor r8d, r8d
lea edx, [r9 + 1]
call fcn.14001d848
mov r11, qword [0x140117de0]
cmp r11, r12
jne 0x140041a5f
jmp 0x140041af4
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.140019ba0
call qword [sym.imp.KERNEL32.DLL_GetTickCount]
mov ebp, eax
cmp bl, r12b
je 0x140041ac2
lea rdi, [0x140117de0]
mov esi, 0xfa0
mov rcx, qword [rdi]
cmp rcx, r12
je 0x140041af4
call qword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, ebp
cmp eax, esi
jae 0x140041af4
xor r9d, r9d
lea rcx, [0x140117fa0]
xor r8d, r8d
lea edx, [r9 + 0xa]
call fcn.14001d848
mov r11, qword [rdi]
cmp r11, r12
jne 0x140041aca
xor eax, eax
add rsp, 0x40
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret