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

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x10c8]
mov eax, 0x11c8
call fcn.1400af850
sub rsp, rax
xor r15d, r15d
mov rdi, rcx
mov dword [rbp + 0x1118], r15d
mov ecx, r15d
mov dword [rbp - 0x68], ecx
mov r12d, r8d
mov qword [rbp - 0x58], r15
mov r14, rdx
mov qword [rbp - 0x50], r15
mov ebx, r15d
test rdx, rdx
je 0x14005949d
test r8d, r8d
je 0x14005875c
cmp r8d, 0x8000
jae 0x14005874b
mov r12d, 0x8000
jmp 0x140058762
cmp r8d, 0x400000
jbe 0x140058769
mov r12d, 0x400000
jmp 0x140058762
mov r12d, 0x20000
mov dword [rbp + 0x1110], r12d
mov eax, r12d
shr eax, 0x10
test eax, eax
je 0x14005877c
inc ecx
shr eax, 1
jne 0x140058773
mov dword [rbp - 0x68], ecx
lea rax, [rdi + 0x380]
mov qword [rsp + 0x1200], rsi
mov rcx, rax
mov qword [rsp + 0x11c0], r13
mov qword [rbp], rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp qword [rdi + 0x20], rbx
je 0x1400587b0
mov esi, 0x57
jmp 0x14005945f
xor eax, eax
mov dword [rbp - 0x78], r15d
mov qword [rsp + 0x70], rax
lea rcx, [rbp + 0x430]
xor edx, edx
mov byte [rsp + 0x70], shutdown
mov r8d, 0x428
mov byte [rsp + 0x74], 0x24
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], rax
mov dword [rbp - 8], eax
mov qword [rsp + 0x78], rax
call fcn.1400b5f30
movups xmm0, xmmword [rsp + 0x70]
lea rax, [rbp - 0x28]
mov dword [rbp + 0x440], 0x24
mov qword [rbp + 0x430], rax
lea rdx, [rbp + 0x430]
lea rax, [rbp - 0x74]
mov dword [rbp + 0x448], 0x1e
mov qword [rdi + 0x378], rax
mov rcx, r14
mov rax, qword [r14]
mov byte [rbp + 0x44d], 0xff
movups xmmword [rbp + 0x554], xmm0
mov dword [rbp - 0x74], 0x3e5
call qword [rax + reloc.imgengine.dll_Ordinal_8]
cmp eax, 0x3e5
jne 0x140058878
mov eax, dword [rbp - 0x74]
cmp eax, 0x3e5
jne 0x140058875
nop word [rax + rax]
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [rbp - 0x74]
cmp eax, 0x3e5
je 0x140058860
mov eax, dword [rbp - 0x74]
mov qword [rdi + 0x378], r15
test eax, eax
jne 0x14005945a
cmp byte [rbp + 0x44d], bl
jne 0x14005945a
cmp dword [rbp + 0x440], 0x24
jne 0x14005945a
xor edx, edx
lea rcx, [rbp + 0x10]
mov r8d, 0xff
call fcn.1400b5f30
xor eax, eax
lea r8, [rbp + 0x10]
mov qword [rsp + 0x70], rax
mov r9d, 0xff
mov qword [rsp + 0x78], rax
mov rdx, r14
lea rax, [rbp - 0x78]
mov word [rsp + 0x70], VarUI4FromDisp
mov qword [rsp + 0x28], rax
mov rcx, rdi
lea rax, [rsp + 0x70]
mov byte [rsp + 0x72], 0x80
mov qword [rsp + 0x20], rax
mov byte [rsp + 0x74], 0xff
call fcn.140058370
test al, al
je 0x140058927
cmp byte [rbp + 0x11], 0x80
jne 0x140058927
movzx eax, byte [rbp + 0x13]
cmp al, 0xfb
jbe 0x140058916
mov al, 0xfb
lea rdx, [rbp + 0x14]
mov byte [rbp + 0x13], al
jmp 0x1400589d3
test al, al
je 0x140058a7f
lea rdx, [rbp + 0x14]
jmp 0x1400589d3
cmp byte [rbp - 0x28], 5
jne 0x140058a7f
xor edx, edx
lea rcx, [rbp + 0x10]
mov r8d, 0xff
call fcn.1400b5f30
xor eax, eax
lea r8, [rbp + 0x10]
mov qword [rsp + 0x70], rax
mov r9d, 0xff
mov qword [rsp + 0x78], rax
mov rdx, r14
lea rax, [rbp - 0x78]
mov dword [rsp + 0x70], 0x8010246
mov qword [rsp + 0x28], rax
mov rcx, rdi
lea rax, [rsp + 0x70]
mov byte [rsp + 0x78], 0xff
mov qword [rsp + 0x20], rax
call fcn.140058370
test al, al
je 0x140058a7f
cmp byte [rbp + 0x10], bl
jne 0x1400589a4
cmp byte [rbp + 0x11], bl
jne 0x1400589a4
cmp byte [rbp + 0x12], bl
jne 0x1400589a4
cmp byte [rbp + 0x13], 8
jbe 0x140058a7f
cmp byte [rbp + 0x18], 1
jne 0x140058a7f
cmp byte [rbp + 0x19], 8
jne 0x140058a7f
movzx eax, byte [rbp + 0x1b]
cmp al, 0xf3
jbe 0x1400589c7
mov al, 0xf3
mov byte [rbp + 0x1b], al
jmp 0x1400589cf
test al, al
je 0x140058a7f
lea rdx, [rbp + 0x1c]
movzx ebx, al
lea rcx, [rbp + 0x120]
mov r8d, ebx
call fcn.1400b4ef0
mov byte [rbp + rbx + 0x120], r15b
test rbx, rbx
je 0x140058a7f
xor r8b, r8b
mov ecx, ebx
test ebx, ebx
je 0x140058a2b
nop
dec ecx
lea rdx, [rbp + 0x120]
mov eax, ecx
add rdx, rax
movzx eax, byte [rdx]
sub al, 0x21
cmp al, 0x5d
ja 0x140058a1c
mov r8b, 1
jmp 0x140058a27
mov byte [rdx], 0x20
test r8b, r8b
jne 0x140058a27
dec rbx
test ecx, ecx
jne 0x140058a00
test rbx, rbx
je 0x140058a7f
mov rdx, r15
mov ecx, r15d
mov rax, r15
nop dword [rax]
cmp byte [rbp + rax + 0x120], 0x20
jne 0x140058a56
inc ecx
inc rdx
mov eax, ecx
cmp rax, rbx
jb 0x140058a40
test rdx, rdx
je 0x140058a77
sub rbx, rdx
lea rax, [rbp + 0x120]
add rdx, rax
lea rcx, [rbp + 0x120]
mov r8, rbx
call fcn.1400b4ef0
mov byte [rbp + rbx + 0x120], r15b
xor edx, edx
lea rcx, [rbp + 0x10]
mov r8d, 0xff
call fcn.1400b5f30
xor eax, eax
mov dword [rbp - 0x78], r15d
mov qword [rsp + 0x70], rax
lea rcx, [rbp + 0x860]
xor edx, edx
mov word [rsp + 0x70], VarUI4FromDisp
mov r8d, 0x428
mov byte [rsp + 0x72], 0x83
mov byte [rsp + 0x74], 0xff
mov qword [rsp + 0x78], rax
call fcn.1400b5f30
movups xmm0, xmmword [rsp + 0x70]
lea rax, [rbp + 0x10]
mov dword [rbp + 0x870], 0xff
mov qword [rbp + 0x860], rax
lea rdx, [rbp + 0x860]
lea rax, [rbp - 0x70]
mov dword [rbp + 0x878], 0x1e
mov qword [rdi + 0x378], rax
mov rcx, r14
mov rax, qword [r14]
mov byte [rbp + 0x87d], 0xff
movups xmmword [rbp + 0x984], xmm0
mov dword [rbp - 0x70], 0x3e5
call qword [rax + reloc.imgengine.dll_Ordinal_8]
cmp eax, 0x3e5
jne 0x140058b48
mov eax, dword [rbp - 0x70]
cmp eax, 0x3e5
jne 0x140058b45
nop word [rax + rax]
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [rbp - 0x70]
cmp eax, 0x3e5
je 0x140058b30
mov eax, dword [rbp - 0x70]
mov qword [rdi + 0x378], r15
test eax, eax
jne 0x140058ca9
cmp byte [rbp + 0x87d], r15b
jne 0x140058ca9
cmp dword [rbp + 0x870], 4
jb 0x140058ca9
cmp byte [rbp + 0x11], 0x83
jne 0x140058ca9
movzx r15d, byte [rbp + 0x12]
lea rdx, [0x1401336e4]
movzx eax, byte [rbp + 0x13]
shl r15d, 8
add r15d, eax
mov dword [rbp + 0x1118], r15d
lea r14d, [r15 + 4]
mov ecx, r14d
mov esi, r14d
call fcn.1400af724
mov qword [rbp - 0x58], rax
mov r13, rax
test rax, rax
je 0x140059370
mov r8d, esi
mov rcx, rax
cmp r15d, 0xfb
jbe 0x140058c50
xor edx, edx
call fcn.1400b5f30
xor eax, eax
mov r9d, r14d
mov qword [rsp + 0x70], rax
mov r8, r13
mov qword [rsp + 0x78], rax
mov rcx, rdi
mov eax, r14d
mov word [rsp + 0x70], VarUI4FromDisp
mov r14, qword [rbp + 0x1108]
shr eax, 8
mov rdx, r14
mov byte [rsp + 0x73], al
lea eax, [r15 + 4]
mov byte [rsp + 0x74], al
lea rax, [rbp - 0x78]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov byte [rsp + 0x72], 0x83
call fcn.140058370
test al, al
je 0x140058c44
cmp byte [r13 + 1], 0x83
jne 0x140058c44
mov eax, r15d
shr eax, 8
cmp byte [r13 + 2], al
jne 0x140058c44
cmp byte [r13 + 3], r15b
je 0x140058c60
xor r15d, r15d
mov dword [rbp + 0x1118], r15d
jmp 0x140058ca9
lea rdx, [rbp + 0x10]
call fcn.1400b4ef0
mov r14, qword [rbp + 0x1108]
test r15d, r15d
je 0x140058ca6
mov edx, r15d
lea r8, [r13 + 4]
xor r9d, r9d
nop
cmp edx, 4
jb 0x140058c98
movzx ecx, byte [r8 + 3]
add ecx, 4
cmp ecx, edx
ja 0x140058c98
lea eax, [rcx + r9]
cmp eax, 0x3fff
ja 0x140058c98
mov r9d, eax
mov eax, ecx
add r8, rax
sub edx, ecx
jne 0x140058c70
cmp r9d, r15d
cmovb r15d, r9d
mov dword [rbp + 0x1118], r15d
xor r15d, r15d
xor esi, esi
mov qword [rbp - 0x48], rsi
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x38], rsi
lea r13d, [rsi + 0x20]
mov dword [rbp - 0x30], esi
cmp byte [rbp - 0x28], sil
jne 0x140058e10
test byte [rbp - 0x27], 0x80
jne 0x140058e10
xor eax, eax
mov dword [rbp - 0x78], r15d
mov qword [rsp + 0x70], rax
lea rcx, [rbp + 0xc90]
mov qword [rsp + 0x78], rax
xor edx, edx
mov r8d, 0x428
mov word [rsp + 0x70], 0x109e
mov byte [rsp + 0x7d], r13b
mov qword [rbp + 0x10], rax
mov qword [rbp + 0x18], rax
mov qword [rbp + 0x20], rax
mov qword [rbp + 0x28], rax
call fcn.1400b5f30
movups xmm0, xmmword [rsp + 0x70]
lea rax, [rbp + 0x10]
mov dword [rbp + 0xca0], r13d
mov qword [rbp + 0xc90], rax
lea rdx, [rbp + 0xc90]
lea rax, [rbp - 0x6c]
mov dword [rbp + 0xca8], 0x1e
mov qword [rdi + 0x378], rax
mov rcx, r14
mov rax, qword [r14]
mov byte [rbp + 0xcad], 0xff
movups xmmword [rbp + 0xdb4], xmm0
mov dword [rbp - 0x6c], 0x3e5
call qword [rax + reloc.imgengine.dll_Ordinal_8]
cmp eax, 0x3e5
jne 0x140058d93
mov eax, dword [rbp - 0x6c]
cmp eax, 0x3e5
jne 0x140058d89
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [rbp - 0x6c]
cmp eax, 0x3e5
je 0x140058d74
mov eax, dword [rbp - 0x6c]
mov ecx, dword [rbp - 0x30]
mov qword [rbp - 0x48], rcx
mov qword [rdi + 0x378], r15
test eax, eax
jne 0x140058e10
cmp byte [rbp + 0xcad], sil
jne 0x140058e10
cmp dword [rbp + 0xca0], 0x10
jb 0x140058e10
movzx ecx, byte [rbp + 0x1d]
mov edx, 1
movzx eax, byte [rbp + 0x1f]
and ecx, 0xf
shl edx, cl
movzx ecx, byte [rbp + 0x1e]
and ecx, 0x3f
shl ecx, 8
add ecx, eax
cmp ecx, edx
ja 0x140058e10
movzx eax, byte [rbp + 0x19]
movzx r15d, byte [rbp + 0x18]
shl r15d, 8
add r15d, eax
movzx eax, byte [rbp + 0x1a]
shl r15d, 8
add r15d, eax
movzx eax, byte [rbp + 0x1b]
shl r15d, 8
add r15d, eax
mov esi, r15d
imul esi, edx
mov dword [rbp - 0x80], esi
test ecx, ecx
je 0x140058e1a
sub edx, ecx
imul edx, r15d
mov dword [rbp - 0x48], edx
jmp 0x140058e1a
mov eax, dword [rbp - 0x34]
mov r15d, dword [rbp - 0x38]
mov dword [rbp - 0x80], eax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov qword [rdi + 0x258], rax
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
cmp qword [rdi + 0x258], 0
mov qword [rdi + 0x260], rax
je 0x140059370
test rax, rax
je 0x140059370
test byte [rbp - 0x21], 2
je 0x140058e6d
test byte [rbp - 0x27], 0x80
je 0x140058e73
mov r13d, 1
xor r14d, r14d
lea r12d, [r12*2 + 0x650]
lea rsi, [rdi + 0x270]
nop word [rax + rax]
lea rdx, [0x1401336e4]
mov rcx, r12
call fcn.1400af724
mov qword [rsi], rax
test rax, rax
je 0x140058f01
xor edx, edx
mov r8d, 0x650
mov rcx, rax
call fcn.1400b5f30
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rcx, rax
mov rax, qword [rsi]
mov qword [rax + 0x428], rcx
mov rcx, qword [rsi]
cmp qword [rcx + 0x428], 0
je 0x140058ef7
inc byte [rdi + 0x268]
inc r14d
add rsi, 8
cmp r14d, r13d
jb 0x140058e90
jmp 0x140058f01
mov edx, 0x658
call fcn.1400aee84
cmp byte [rdi + 0x268], 0
je 0x140059370
movups xmm0, xmmword [rdi]
mov eax, dword [rbp + 0x1110]
lea rdx, [rbp - 0x50]
lea rcx, [rbp + 0x110]
mov dword [rdi + 0x30], eax
movaps xmmword [rbp + 0x110], xmm0
call fcn.1400565f0
xor r13d, r13d
mov esi, eax
test eax, eax
jne 0x140059378
xor edx, edx
mov dword [rbp - 0x64], r13d
mov r8d, 0x20c
lea rcx, [rbp + 0x220]
call fcn.1400b5f30
lea r8, [rbp - 0x64]
mov dword [rbp + 0x220], 8
lea rdx, [rbp + 0x220]
mov rcx, rdi
call fcn.140057d80
mov esi, eax
test eax, eax
jne 0x140059358
lea r8, [rbp - 0x60]
mov edx, 0x104
lea rcx, [rbp + 0x224]
call fcn.1400accd8
test eax, eax
js 0x140059353
mov r12d, dword [rbp + 0x1118]
mov r14d, SysAllocStringByteLen
test r12d, r12d
je 0x140058fb3
lea ecx, [r12 + r12]
add r14, rcx
test rbx, rbx
je 0x140058fbc
lea r14, [r14 + rbx*2]
mov rcx, qword [rbp - 0x60]
mov eax, 2
inc rcx
add rcx, r14
mul rcx
mov rcx, 0xffffffffffffffff
lea rdx, [0x1401336e4]
cmovo rax, rcx
mov rcx, rax
call fcn.1400af724
mov rsi, rax
test rax, rax
je 0x14005934c
mov rax, qword [rbp - 0x48]
mov rdx, qword [rbp - 0x60]
movzx r9d, byte [rbp - 0x68]
inc rdx
movzx r10d, byte [rdi + 0x18]
add rdx, r14
movzx r11d, byte [rdi + 0x14]
movzx ecx, bl
mov dword [rsp + 0x68], ecx
mov rcx, rsi
mov dword [rsp + 0x60], eax
mov eax, dword [rbp - 0x80]
mov dword [rsp + 0x58], eax
mov eax, dword [rbp - 0x3c]
mov dword [rsp + 0x50], r15d
mov dword [rsp + 0x48], eax
mov eax, dword [rbp - 0x40]
mov dword [rsp + 0x40], eax
movzx r8d, r12w
mov dword [rsp + 0x38], r8d
lea r8, str._wsdev_02Xbus_02Xmax_01Xdid_04Xaln_08X_08X_08X_08X_08Xser_02Xinq
mov dword [rsp + 0x30], r9d
lea r9, [rbp + 0x224]
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], r11d
call fcn.140013d30
lea r14, [rbp - 0x28]
mov r15, r13
mov r12d, 0x24
mov rcx, qword [rbp - 0x60]
lea r8, [0x1400e39e0]
movzx r9d, byte [r14]
add rcx, 0x49
add rcx, r15
mov edx, 3
lea rcx, [rsi + rcx*2]
call fcn.140013d30
add r15, 2
lea r14, [r14 + 1]
sub r12, 1
jne 0x140059071
mov r12d, dword [rbp + 0x1118]
cmp r12d, 1
jb 0x1400590fc
mov r15, qword [rbp - 0x58]
mov r14, r13
add r15, 4
nop dword [rax + rax]
mov rcx, qword [rbp - 0x60]
lea r8, [0x1400e39e0]
movzx r9d, byte [r15]
add rcx, 0x91
add rcx, r14
mov edx, 3
lea rcx, [rsi + rcx*2]
call fcn.140013d30
add r14, 2
lea r15, [r15 + 1]
sub r12, 1
jne 0x1400590c0
mov r12d, dword [rbp + 0x1118]
mov rax, qword [rbp - 0x58]
test rax, rax
je 0x140059111
mov rcx, rax
call fcn.1400aee84
mov qword [rbp - 0x58], r13
test rbx, rbx
je 0x14005916d
mov r14d, r13d
mov rcx, r13
add r12d, r12d
mov r15d, r13d
nop dword [rax]
nop word [rax + rax]
movsx r9d, byte [rbp + rcx + 0x120]
lea r8, [0x1400e39e0]
mov eax, r15d
mov edx, 3
add rax, 0x91
add rax, r12
add rax, qword [rbp - 0x60]
lea rcx, [rsi + rax*2]
call fcn.140013d30
inc r14d
add r15d, 2
mov ecx, r14d
cmp rcx, rbx
jb 0x140059130
xor r9d, r9d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x40000000
mov edx, 0xc0000000
mov rcx, rsi
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, rsi
mov qword [rdi + 0x28], rax
call fcn.1400aee84
cmp qword [rdi + 0x28], 0xffffffffffffffff
jne 0x1400591ae
mov qword [rdi + 0x28], r13
cmp qword [rdi + 0x28], r13
je 0x140059338
mov rax, qword [rbp + 0x1108]
lea r8, [0x140057d70]
mov qword [rsp + 0x28], r13
mov r9, rdi
xor edx, edx
mov qword [rdi + 0x38], rax
xor ecx, ecx
mov dword [rsp + 0x20], r13d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rdi + 0x20], rax
test rax, rax
je 0x14005932d
mov r14d, 0x102
mov dword [rbp - 0x7c], r13d
mov dword [rbp - 0x80], r13d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r12d, dword [rbp - 0x64]
mov ebx, r13d
mov r15d, eax
nop dword [rax]
mov ecx, 0xa
cmp ebx, 0x2710
jae 0x140059225
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14005922d
call sub.SETUPAPI.dll_CMP_WaitNoPendingInstallEvents
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
sub ebx, r15d
cmp dword [rdi + 0x10], r13d
jne 0x140059261
mov r8d, dword [rdi + 0x14]
lea r9, [rdi + 0x10]
mov edx, r12d
mov rcx, rdi
call fcn.140057f70
cmp dword [rdi + 0x10], r13d
jne 0x140059261
cmp ebx, 0x2710
jae 0x1400592b9
jmp 0x1400592ac
mov rcx, qword [rbp - 0x50]
test rcx, rcx
je 0x140059273
call fcn.1400a9540
mov qword [rbp - 0x50], r13
mov r8d, dword [rdi + 0x10]
lea rdx, [rbp - 0x80]
xor r9d, r9d
lea rcx, [rbp - 0x7c]
call qword [sym.imp.SETUPAPI.dll_CM_Get_DevNode_Status]
mov ecx, dword [rbp - 0x7c]
test eax, eax
cmovne ecx, r13d
mov dword [rbp - 0x7c], ecx
test cl, 8
jne 0x1400592b9
bt ecx, 0xa
jae 0x1400592ac
mov eax, dword [rbp - 0x80]
cmp eax, 0x12
je 0x1400592ac
cmp eax, 1
jne 0x1400592b9
cmp r14d, 0x102
je 0x140059210
cmp dword [rdi + 0x10], r13d
je 0x140059326
or ecx, 0xffffffff
call sub.SETUPAPI.dll_CMP_WaitNoPendingInstallEvents
movzx eax, byte [rbp - 0x28]
test al, al
jne 0x1400592e4
lea rax, str.disk.inf
mov qword [rsp + 0x28], rax
lea rax, str.disk
jmp 0x1400592fb
cmp al, 5
jne 0x140059317
lea rax, str.cdrom.inf
mov qword [rsp + 0x28], rax
lea rax, str.cdrom
mov r9d, dword [rbp - 0x80]
mov rcx, rdi
mov r8d, dword [rbp - 0x7c]
mov edx, dword [rdi + 0x10]
mov qword [rsp + 0x20], rax
call fcn.140057700
mov esi, eax
jmp 0x140059358
test byte [rbp - 0x7c], 8
mov esi, 0x37
cmovne esi, r13d
jmp 0x140059358
mov esi, 0x37
jmp 0x140059358
mov qword [rdi + 0x38], r13
mov esi, 8
jmp 0x140059358
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp eax, 8
je 0x14005934c
cmp eax, 0x5aa
jne 0x140059358
mov esi, 8
jmp 0x140059358
mov esi, 0x57
mov rcx, qword [rbp - 0x50]
test rcx, rcx
je 0x140059366
call fcn.1400a9540
test esi, esi
je 0x14005945f
jmp 0x140059378
mov esi, 8
xor r13d, r13d
cmp qword [rdi + 0x20], 0
je 0x1400593c0
mov rcx, qword [rdi + 0x260]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rdi + 0x20]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rdi + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rdi + 0x40]
mov qword [rdi + 0x20], r13
xor edx, edx
mov qword [rdi + 0x38], r13
mov r8d, 0x218
mov dword [rdi + 0x10], r13d
call fcn.1400b5f30
mov rcx, qword [rdi + 0x28]
test rcx, rcx
je 0x1400593d3
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x28], r13
cmp byte [rdi + 0x268], 0
mov r14d, r13d
jbe 0x14005941b
nop
mov eax, r14d
lea rbx, [rdi + rax*8]
mov rcx, qword [rbx + 0x270]
mov rcx, qword [rcx + 0x428]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x270]
mov edx, 0x658
call fcn.1400aee84
movzx eax, byte [rdi + 0x268]
inc r14d
cmp r14d, eax
jb 0x1400593e0
mov rcx, qword [rdi + 0x258]
mov byte [rdi + 0x268], 0
mov dword [rdi + 0x30], r13d
test rcx, rcx
je 0x14005943f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x258], r13
mov rcx, qword [rdi + 0x260]
test rcx, rcx
je 0x14005945f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x260], r13
jmp 0x14005945f
mov esi, 0x45d
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, qword [rbp - 0x58]
mov r13, qword [rsp + 0x11c0]
test rax, rax
je 0x140059482
mov rcx, rax
call fcn.1400aee84
mov eax, esi
mov rsi, qword [rsp + 0x1200]
add rsp, 0x11c8
pop r15
pop r14
pop r12
pop rdi
pop rbx
pop rbp
ret
mov eax, 0x57
add rsp, 0x11c8
pop r15
pop r14
pop r12
pop rdi
pop rbx
pop rbp
ret
mov rcx, qword [rcx + 8]
jmp 0x1400586e0