Function at 0x140040d18
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x40
mov rcx, qword [0x14011b940]
xor esi, esi
cmp rcx, rsi
je 0x140040d52
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x14011b940]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14011b940], rsi
lea rdx, str.shell
lea rcx, [0x14011c020]
call fcn.14002415c
lea rcx, str.shell
call fcn.14002ba94
mov rcx, qword [rsp + 0x70]
mov edx, 0x2d
mov qword [rsp + 0x30], rcx
cmp dx, word [rcx]
mov al, 0x2a
cmove eax, edx
mov rbx, rsi
lea ebp, [rdx - 0x2b]
movsx edi, al
movzx eax, word [rcx]
cmp edi, eax
jne 0x140040e13
movzx eax, word [rcx + 2]
cmp edi, eax
jne 0x140040e13
lea rdx, [rcx + 4]
lea rcx, [0x1401033ec]
mov r8d, ebp
call fcn.14005615c
cmp al, sil
je 0x140040e0e
mov rax, qword [rsp + 0x30]
add rax, 8
mov rbx, rax
jmp 0x140040de3
mov edx, 9
cmp dx, cx
ja 0x140040dd6
cmp cx, 0xd
jbe 0x140040df0
mov edx, 0x20
cmp dx, cx
je 0x140040df0
add rax, rbp
mov qword [rsp + 0x30], rax
movzx ecx, word [rax]
cmp cx, si
jne 0x140040dc6
mov word [rax], si
add qword [rsp + 0x30], rbp
lea rcx, [rsp + 0x30]
call fcn.140015d64
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x70], rcx
jmp 0x140040e13
mov rcx, qword [rsp + 0x30]
movzx eax, word [rcx]
mov r12d, 1
cmp edi, eax
jne 0x140040e7c
movzx eax, word [rcx + 2]
cmp edi, eax
jne 0x140040e7c
add rcx, 4
lea rdx, [rsp + 0x30]
mov r8d, r12d
mov qword [rsp + 0x30], rcx
lea rcx, [0x1401033e8]
call fcn.14005f144
cmp al, sil
je 0x140040e59
mov edi, r12d
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x70], rax
jmp 0x140040ed2
add qword [rsp + 0x30], 4
lea rdx, [rsp + 0x30]
lea rcx, [0x140102b18]
mov r8d, r12d
call fcn.14005f144
cmp al, sil
je 0x140040ebd
mov edi, ebp
jmp 0x140040e4d
lea rdx, [rsp + 0x70]
lea rcx, str._user
mov r8d, 5
call fcn.14005f144
cmp al, sil
je 0x140040e9d
mov edi, r12d
jmp 0x140040ed2
lea rdx, [rsp + 0x70]
lea rcx, str._sys
mov r8d, 4
call fcn.14005f144
cmp al, sil
je 0x140040ebd
mov edi, ebp
jmp 0x140040ed2
lea rcx, str.UCallBackhWnd
call fcn.1400191b8
mov edi, esi
cmp rax, rsi
setne dil
mov qword [rsp + 0x38], rbx
cmp rbx, rsi
jne 0x140040f0f
mov rax, qword [rsp + 0x70]
lea rcx, [rsp + 0x38]
mov edx, 0x2c
mov qword [rsp + 0x38], rax
call fcn.1400da4f4
mov rbx, qword [rsp + 0x38]
cmp word [rbx], si
je 0x140040f0f
mov word [rbx], si
mov rbx, qword [rsp + 0x38]
add rbx, rbp
mov qword [rsp + 0x38], rbx
cmp edi, esi
jne 0x140040f20
cmp word [rbx], si
je 0x140040f20
mov rcx, rbx
call fcn.140040ca8
mov rbp, 0xffffffff80000002
lea r8, str.Shell.x
lea rdx, str.SOFTWAREPELOGON
mov rcx, rbp
call qword [0x14011c2a8]
xor edx, edx
xor ecx, ecx
call fcn.14003b2f4
mov rcx, qword [rsp + 0x70]
call fcn.1400e1c30
mov r8, qword [0x140119270]
cmp edi, r12d
lea ecx, [rax + rax]
lea rax, str.UShell
lea rdx, str.SOFTWAREPELOGON
mov dword [rsp + 0x28], ecx
cmove r8, rax
mov rax, qword [rsp + 0x70]
mov r9d, r12d
mov rcx, rbp
mov qword [rsp + 0x20], rax
call qword [0x14011c2a0]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
xor ecx, ecx
mov ebx, eax
call fcn.140019d84
lea rax, [rsp + 0x80]
lea r9, [rsp + 0x88]
lea r8, str.SysShel.ack
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x78]
lea rdx, str.SOFTWAREPELOGONRAMDATA
mov rcx, rbp
mov dword [rsp + 0x78], esi
mov dword [rsp + 0x80], 4
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x88], 4
call qword [0x14011bcc0]
cmp eax, esi
jne 0x140040ff3
cmp dword [rsp + 0x78], esi
jne 0x14004101d
xor r9d, r9d
lea rcx, [0x14011c020]
xor r8d, r8d
lea edx, [r9 + 5]
call fcn.14001df90
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x1770
ja 0x140041034
jmp 0x140040f99
lea rcx, [0x14011c020]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x96
call fcn.14001df90
xor eax, eax
add rsp, 0x40
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret