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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x380]
sub rsp, 0x480
xor r15d, r15d
mov rsi, rdx
mov rbx, rcx
mov edi, 0x57
test rdx, rdx
je 0x140043952
lea r14, [rcx + 0x20488]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp qword [rbx + 0x20], r15
jne 0x140043949
lea r12d, [rdi - 0x56]
mov byte [rbp + 0x3d0], r15b
mov edx, r12d
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
xor r9d, r9d
xor r8d, r8d
mov edx, r12d
mov qword [rbx + 0x458], rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + 0x460], rax
cmp qword [rbx + 0x458], r15
je 0x140043899
test rax, rax
je 0x140043899
lea r13d, [rdi + 9]
xor edx, edx
mov r8d, r13d
lea rcx, [rbp + 0xc0]
call fcn.1400b5f30
xor eax, eax
lea r8, [rbp + 0xc0]
mov qword [rsp + 0x50], rax
mov r9d, r13d
mov qword [rsp + 0x58], rax
mov rdx, rsi
lea rax, [rbp + 0x3d8]
mov byte [rsp + 0x50], shutdown
mov qword [rsp + 0x28], rax
mov rcx, rbx
lea rax, [rsp + 0x50]
mov byte [rsp + 0x54], r13b
mov qword [rsp + 0x20], rax
call fcn.140043c28
test al, al
je 0x14004388c
cmp dword [rbp + 0x3d8], r13d
jne 0x1400438a0
lea r8d, [rdi - 0x52]
cmp byte [rbp + 0xc0], r8b
jne 0x1400438a0
cmp byte [rbp + 0xc1], 0x80
jne 0x1400438a0
cmp byte [rbp + 0xc2], r15b
jne 0x1400438a0
cmp dword [rbx + 0x10], r15d
je 0x140043557
mov r13d, 0xff
mov qword [rsp + 0x68], r15
mov r8d, r13d
lea rcx, [rbp - 0x70]
xor edx, edx
mov edi, r15d
call fcn.1400b5f30
xor eax, eax
lea r8, [rbp - 0x70]
mov qword [rsp + 0x50], rax
mov r9d, r13d
mov qword [rsp + 0x58], rax
mov rdx, rsi
lea rax, [rbp + 0x3d8]
mov word [rsp + 0x50], VarUI4FromDisp
mov qword [rsp + 0x28], rax
mov rcx, rbx
lea rax, [rsp + 0x50]
mov byte [rsp + 0x52], 0x80
mov qword [rsp + 0x20], rax
mov byte [rsp + 0x54], r13b
call fcn.140043c28
lea r13d, [r15 + 8]
test al, al
je 0x140042eed
cmp byte [rbp - 0x6f], 0x80
jne 0x140042eed
movzx eax, byte [rbp - 0x6d]
lea esi, [r15 + 0x14]
cmp al, sil
mov ecx, eax
cmova ecx, esi
mov byte [rbp - 0x6d], cl
test cl, cl
je 0x14004302f
lea rdx, [rbp - 0x6c]
jmp 0x140042f9a
xor edx, edx
lea rcx, [rbp - 0x70]
mov r8d, 0xff
call fcn.1400b5f30
xor eax, eax
lea r8, [rbp - 0x70]
mov qword [rsp + 0x50], rax
mov r9d, 0xff
mov qword [rsp + 0x58], rax
mov rdx, rsi
lea rax, [rbp + 0x3d8]
mov dword [rsp + 0x50], 0x8010246
mov qword [rsp + 0x28], rax
mov rcx, rbx
lea rax, [rsp + 0x50]
mov byte [rsp + 0x58], 0xff
mov qword [rsp + 0x20], rax
call fcn.140043c28
test al, al
je 0x14004302a
cmp byte [rbp - 0x70], r15b
jne 0x140042f66
cmp byte [rbp - 0x6f], r15b
jne 0x140042f66
cmp byte [rbp - 0x6e], r15b
jne 0x140042f66
cmp byte [rbp - 0x6d], r13b
jbe 0x14004302a
cmp byte [rbp - 0x68], r12b
jne 0x14004302a
mov esi, shutdown
cmp byte [rbp - 0x67], r13b
jne 0x14004302f
movzx eax, byte [rbp - 0x65]
cmp al, sil
mov ecx, eax
cmova ecx, esi
mov byte [rbp - 0x65], cl
test cl, cl
je 0x14004302f
lea rdx, [rbp - 0x64]
movzx edi, cl
lea rcx, [rsp + 0x70]
mov r8d, edi
call fcn.1400b4ef0
mov byte [rsp + rdi + 0x70], r15b
test rdi, rdi
je 0x140043023
mov r8b, r15b
mov ecx, edi
test edi, edi
je 0x140042fdf
dec ecx
mov al, byte [rsp + rcx + 0x70]
sub al, 0x21
cmp al, 0x5d
ja 0x140042fce
mov r8b, r12b
jmp 0x140042fdb
mov byte [rsp + rcx + 0x70], 0x20
test r8b, r8b
jne 0x140042fdb
sub rdi, r12
test ecx, ecx
jne 0x140042fbd
test rdi, rdi
je 0x140043023
mov rax, r15
mov edx, r15d
mov rcx, r15
cmp byte [rsp + rcx + 0x70], 0x20
jne 0x140043001
add edx, r12d
add rax, r12
mov ecx, edx
cmp rcx, rdi
jb 0x140042fed
test rax, rax
je 0x14004301e
sub rdi, rax
lea rdx, [rsp + 0x70]
add rdx, rax
lea rcx, [rsp + 0x70]
mov r8, rdi
call fcn.1400b4ef0
mov byte [rsp + rdi + 0x70], r15b
cmp rdi, rsi
jae 0x140043047
jmp 0x14004302f
mov esi, shutdown
mov r8, rsi
lea rcx, [rsp + 0x70]
sub r8, rdi
add rcx, rdi
mov edx, 0x20
call fcn.1400b5f30
movups xmm0, xmmword [rbx]
mov edx, dword [rbx + 0x10]
lea r8, [rsp + 0x68]
lea rcx, [rsp + 0x50]
mov byte [rbp - 0x7c], r15b
movdqu xmmword [rsp + 0x50], xmm0
call fcn.140040a78
mov edi, eax
test eax, eax
jne 0x1400438a0
movups xmm0, xmmword [rbx]
mov edx, dword [rbx + 0x10]
lea r8, [rbp + 0x90]
lea rcx, [rsp + 0x50]
movdqu xmmword [rsp + 0x50], xmm0
lea edi, [rax + 3]
call fcn.140041574
test eax, eax
jne 0x140043480
mov edx, dword [rbp + 0xa4]
lea r8, [rsp + 0x60]
mov ecx, dword [0x1401329b0]
mov dword [rsp + 0x60], r15d
call fcn.140041044
test eax, eax
jne 0x140043480
cmp byte [rbp + 0x9e], r12b
je 0x1400430d4
mov byte [rbp + 0x3d0], r12b
mov sil, r15b
mov r12b, byte [rbx + 0x18]
jmp 0x1400430ed
movzx esi, byte [rbx + 0x18]
mov r12b, sil
shr r12b, 1
and esi, 0x80000001
jge 0x1400430ed
dec esi
or esi, 0xfffffffe
inc esi
lea r9, str.__sptd2
mov edx, 0x12d
mov qword [rsp + 0x30], r9
lea rax, str._s_app
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x3d8]
lea r8, [rsp + 0x50]
mov qword [rsp + 0x20], r15
lea rcx, [rbp + 0x120]
call fcn.140041a70
test eax, eax
js 0x140043479
mov r14d, r15d
lea rcx, [0x1400e39e0]
mov r15, rbx
movzx eax, byte [r15]
lea r9, [rbp + 0x3d8]
mov rdx, qword [rbp + 0x3d8]
lea r8, [rsp + 0x50]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsp + 0x50]
and qword [rsp + 0x20], 0
call fcn.140041a70
test eax, eax
js 0x140043476
inc r14d
lea rcx, [0x1400e39e0]
inc r15
cmp r14d, 0x10
jb 0x14004313c
mov rdx, qword [rbp + 0x3d8]
lea r9, [rbp + 0x3d8]
movzx eax, sil
lea r8, [rsp + 0x50]
mov dword [rsp + 0x40], eax
xor r15d, r15d
mov eax, dword [rbx + 0x10]
movzx ecx, r12b
mov dword [rsp + 0x38], ecx
mov rcx, qword [rsp + 0x50]
mov dword [rsp + 0x30], eax
lea rax, str.ins_08Xdev_02X_02X00inq
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
call fcn.140041a70
test eax, eax
js 0x140043479
mov esi, r15d
lea r14, [rbp + 0xc0]
lea r12, [0x1400e39e0]
movzx eax, byte [r14]
lea r9, [rbp + 0x3d8]
mov rdx, qword [rbp + 0x3d8]
lea r8, [rsp + 0x50]
mov rcx, qword [rsp + 0x50]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r15
call fcn.140041a70
test eax, eax
js 0x140043479
inc esi
inc r14
cmp esi, 0x60
jb 0x1400431e8
mov esi, r15d
lea r14, [rsp + 0x70]
movsx eax, byte [r14]
lea r9, [rbp + 0x3d8]
mov rdx, qword [rbp + 0x3d8]
lea r8, [rsp + 0x50]
mov rcx, qword [rsp + 0x50]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r15
call fcn.140041a70
test eax, eax
js 0x140043479
inc esi
inc r14
mov eax, shutdown
cmp esi, eax
jb 0x140043231
mov qword [rsp + 0x30], r15
lea rcx, [rbp + 0x120]
mov dword [rsp + 0x28], 0x40000000
xor r9d, r9d
mov r8d, edi
mov dword [rsp + 0x20], edi
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx + 0x28], rax
cmp rax, 0xffffffffffffffff
jne 0x1400432ad
mov qword [rbx + 0x28], r15
cmp qword [rbx + 0x28], r15
je 0x140043456
mov rax, qword [rbp + 0x3c8]
lea r8, [0x14004242c]
mov qword [rsp + 0x28], r15
mov r9, rbx
xor edx, edx
mov qword [rbx + 0x30], rax
xor ecx, ecx
mov dword [rsp + 0x20], r15d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x20], rax
test rax, rax
je 0x140043450
mov r14d, 0x102
mov dword [rbp + 0x3d8], r15d
mov dword [rbp + 0x3c8], r15d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r12b, byte [rbp + 0x3d0]
lea rdi, [rbx + 0x14]
mov r15d, eax
xor eax, eax
mov esi, eax
mov ecx, 0xa
cmp esi, 0x2710
jae 0x14004332e
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140043336
call sub.SETUPAPI.dll_CMP_WaitNoPendingInstallEvents
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
xor eax, eax
sub esi, r15d
cmp dword [rdi], eax
jne 0x1400433a2
movzx edx, byte [rbx + 0x18]
mov ecx, dword [rsp + 0x60]
test r12b, r12b
je 0x14004335f
shl edx, 0x10
or edx, 0xffff
jmp 0x14004338a
shr edx, 1
lea r8, [rbp + 0x3d0]
call fcn.140041044
test eax, eax
jne 0x140043392
movzx edx, byte [rbx + 0x18]
and edx, 0x80000001
jge 0x140043384
dec edx
or edx, 0xfffffffe
inc edx
mov ecx, dword [rbp + 0x3d0]
mov r8, rdi
call fcn.140041044
xor eax, eax
cmp dword [rdi], eax
jne 0x1400433a2
cmp esi, 0x2710
jae 0x14004340e
jmp 0x140043401
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400433b7
call fcn.1400a9540
and qword [rsp + 0x68], 0
mov r8d, dword [rdi]
lea rdx, [rbp + 0x3c8]
xor r9d, r9d
lea rcx, [rbp + 0x3d8]
call qword [sym.imp.SETUPAPI.dll_CM_Get_DevNode_Status]
mov ecx, dword [rbp + 0x3d8]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [rbp + 0x3d8], ecx
test r13b, cl
jne 0x14004340e
bt ecx, 0xa
jae 0x140043401
cmp dword [rbp + 0x3c8], 0x12
je 0x140043401
cmp dword [rbp + 0x3c8], 1
jne 0x14004340e
cmp r14d, 0x102
je 0x140043319
xor r15d, r15d
cmp dword [rdi], r15d
je 0x140043449
or ecx, 0xffffffff
call sub.SETUPAPI.dll_CMP_WaitNoPendingInstallEvents
mov r8d, dword [rbp + 0x3c8]
lea rax, str.cdrom.inf
mov edx, dword [rbp + 0x3d8]
lea r9, str.cdrom
mov ecx, dword [rdi]
mov qword [rsp + 0x20], rax
call fcn.140040f78
mov edi, eax
jmp 0x140043483
mov edi, 0x37
jmp 0x140043483
mov qword [rbx + 0x30], r15
jmp 0x14004346a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, r13d
je 0x14004346a
cmp eax, 0x5aa
jne 0x14004346d
mov edi, r13d
mov r12b, byte [rbp + 0x3d0]
jmp 0x140043483
xor r15d, r15d
mov edi, 0x57
jmp 0x14004346d
mov r12b, r15b
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140043492
call fcn.1400a9540
lea r14, [rbx + 0x20488]
test edi, edi
jne 0x1400438a0
cmp dword [rbx + 0x10], r15d
je 0x140043949
mov r9d, 0x104
lea r8, [rbp + 0x120]
xor edx, edx
mov rcx, rbx
call fcn.140042628
test eax, eax
jne 0x140043949
lea rax, [rbp + 0x3d0]
mov rcx, rbx
mov qword [rsp + 0x40], rax
lea r9d, [rdi + 0x40]
lea rax, [rbp + 0x3d8]
mov qword [rsp + 0x38], rax
lea r8, [rbp - 0x70]
lea rax, [rsp + 0x64]
mov qword [rsp + 0x30], rax
lea rdx, [rbp + 0x120]
lea rax, [rsp + 0x65]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x3c8]
mov qword [rsp + 0x20], rax
call fcn.14004243c
test eax, eax
jne 0x140043949
test r12b, r12b
je 0x140043949
cmp byte [rbp + 0x3c8], r15b
je 0x140043949
mov r9b, byte [rbp + 0x3d0]
mov r8b, byte [rbp + 0x3d8]
mov dl, byte [rsp + 0x64]
mov cl, byte [rsp + 0x65]
call fcn.140043ea8
jmp 0x140043949
lea rsi, [rbx + 0x46]
mov rcx, rsi
lea rdx, str.CdRom
call fcn.1400bb4a8
test eax, eax
je 0x1400435aa
mov qword [rsp + 0x40], r15
lea r8, [rbp - 0x70]
mov qword [rsp + 0x38], r15
mov r9d, 0x40
mov qword [rsp + 0x30], r15
mov rdx, rsi
mov qword [rsp + 0x28], r15
mov rcx, rbx
mov qword [rsp + 0x20], r15
call fcn.14004243c
mov edi, eax
test eax, eax
jne 0x1400438a0
lea rsi, [rbp - 0x70]
lea r9, str.__sptd2
mov qword [rsp + 0x20], rsi
lea r8, str._smod1_s
mov edx, 0x224
lea rcx, [rbp + 0x120]
call fcn.140041a14
test eax, eax
js 0x140043891
mov edi, 3
mov qword [rsp + 0x30], r15
mov r8d, edi
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov dword [rsp + 0x20], edi
mov edx, 0x80000000
lea rcx, [rbp + 0x120]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x140043882
lea rdx, [0x1401336e4]
mov ecx, 0x200
mov r14d, 0x100
call fcn.1400af724
lea r13d, [rdi + 5]
jmp 0x1400436f8
xor eax, eax
mov ecx, r14d
mov qword [rsp + 0x50], rax
mov r9d, r14d
mov qword [rsp + 0x58], rax
mov r8, rsi
shr ecx, 8
lea rax, [rbp + 0x3d8]
mov qword [rsp + 0x28], rax
mov rdx, r12
lea rax, [rsp + 0x50]
mov byte [rsp + 0x57], cl
mov rcx, rbx
mov qword [rsp + 0x20], rax
mov byte [rsp + 0x50], 0x46
mov byte [rsp + 0x58], r14b
call fcn.140042b1c
test al, al
je 0x140043870
mov ecx, dword [rbp + 0x3d8]
cmp ecx, r13d
jb 0x140043870
movzx eax, byte [rsi + 1]
mov r10d, 4
movzx edx, byte [rsi]
shl edx, 8
add edx, eax
movzx eax, byte [rsi + 2]
shl edx, 8
add edx, eax
movzx eax, byte [rsi + 3]
shl edx, 8
add edx, eax
cmp edx, r10d
jb 0x140043870
cmp edx, 0xfffa
ja 0x140043870
lea r15d, [rdx + 4]
cmp r15d, ecx
jbe 0x14004371c
cmp ecx, r14d
jb 0x14004386d
mov rcx, rsi
call fcn.1400aee84
lea ecx, [r15 + r15]
mov r14d, r15d
lea rdx, [0x1401336e4]
call fcn.1400af724
xor r15d, r15d
mov rsi, rax
test rax, rax
jne 0x140043631
mov edi, r13d
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12b, byte [rbp + 0x3d0]
jmp 0x140043492
lea r9, [rsi + 8]
lea r8d, [rdx - 4]
jmp 0x140043746
movzx ecx, byte [r9 + 3]
lea eax, [r8 - 4]
cmp ecx, eax
ja 0x14004374b
mov eax, 0xfffffffc
sub eax, ecx
add r8d, eax
lea eax, [rcx + 4]
movsxd rcx, eax
add r9, rcx
cmp r8d, r10d
jae 0x140043726
lea eax, [rdx + 4]
mov qword [rbx + 0x38], rsi
mov dword [rbx + 0x40], eax
lea r8, [rsp + 0x60]
xor eax, eax
mov r9d, r10d
mov qword [rsp + 0x50], rax
mov rdx, r12
mov qword [rsp + 0x58], rax
mov rcx, rbx
mov dword [rsp + 0x60], eax
lea rax, [rbp + 0x3d8]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov word [rsp + 0x50], 0x14a
mov byte [rsp + 0x58], r10b
call fcn.140042b1c
xor r15d, r15d
test al, al
je 0x1400437c6
cmp dword [rbp + 0x3d8], 4
jne 0x1400437c6
cmp byte [rsp + 0x60], r15b
jne 0x1400437c6
cmp byte [rsp + 0x61], 2
jne 0x1400437c6
cmp byte [rsp + 0x62], 0x80
jne 0x1400437c6
mov al, byte [rsp + 0x63]
mov byte [rbx + 0x44], al
mov eax, 0x32
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x40000000
lea rcx, [rbp + 0x120]
xor r9d, r9d
mov word [rbp + reloc.OLEAUT32.dll_VarR8Pow], ax
mov r8d, edi
mov dword [rsp + 0x20], edi
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx + 0x28], rax
cmp rax, 0xffffffffffffffff
jne 0x140043809
mov qword [rbx + 0x28], r15
cmp qword [rbx + 0x28], r15
je 0x140043860
mov rax, qword [rbp + 0x3c8]
lea r8, [0x14004242c]
mov qword [rsp + 0x28], r15
mov r9, rbx
xor edx, edx
mov qword [rbx + 0x30], rax
xor ecx, ecx
mov dword [rsp + 0x20], r15d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x20], rax
test rax, rax
je 0x140043849
mov edi, r15d
jmp 0x140043707
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0x30], r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x28], r15
jmp 0x140043704
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x140043707
xor r15d, r15d
mov rcx, rsi
call fcn.1400aee84
mov edi, 0x45d
jmp 0x140043707
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x140043891
mov edi, 0x45d
mov r12b, r15b
jmp 0x140043499
mov edi, 8
jmp 0x140043891
cmp qword [rbx + 0x20], r15
je 0x1400438ea
mov rcx, qword [rbx + 0x460]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rbx + 0x20]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x24e]
mov qword [rbx + 0x20], r15
xor edx, edx
mov qword [rbx + 0x30], r15
mov r8d, 0x208
mov dword [rbx + 0x14], r15d
call fcn.1400b5f30
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x1400438fd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x28], r15
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x140043913
call fcn.1400aee84
mov qword [rbx + 0x38], r15
mov dword [rbx + 0x40], r15d
mov rcx, qword [rbx + 0x458]
mov byte [rbx + 0x44], r15b
test rcx, rcx
je 0x140043930
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x458], r15
mov rcx, qword [rbx + 0x460]
test rcx, rcx
je 0x140043949
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x460], r15
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
mov rbx, qword [rsp + 0x4c0]
add rsp, 0x480
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rcx + 8]
jmp 0x140042d14