Function at 0x4033e0
Capabilities:
Create thread

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x298
mov qword [rsp + 0x268], 0xfffffffffffffffe
mov rax, qword [0x00423d58]
mov qword [rsp + 0x280], rax
mov dword [rsp + 0x20], 0x4df
mov rax, qword [rsp + 0x2a0]
cmp qword [rax + 0x30], 0
jne 0x4037b7
mov ecx, 0xa8
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov qword [rsp + 0x260], rax
cmp qword [rsp + 0x260], 0
je 0x403465
mov rcx, qword [rsp + 0x260]
call fcn.00401410
mov qword [rsp + 0x270], rax
jmp 0x403471
mov qword [rsp + 0x270], 0
mov rax, qword [rsp + 0x270]
mov qword [rsp + 0x258], rax
mov rax, qword [rsp + 0x2a0]
mov rcx, qword [rsp + 0x258]
mov qword [rax + 0x30], rcx
mov rax, qword [rsp + 0x2a0]
cmp qword [rax + 0x30], 0
jne 0x4034af
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4037bb
mov r8d, 0x104
lea rdx, [rsp + 0x40]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dx, 0x5c
lea rcx, [rsp + 0x40]
call qword [sym.imp.msvcrt.dll_wcsrchr]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x4034f5
mov rcx, qword [rsp + 0x2a0]
call fcn.004037f0
mov eax, 3
jmp 0x4037bb
mov rax, qword [rsp + 0x28]
mov word [rax], 0
cmp qword [rsp + 0x2a8], 0
je 0x40351c
mov rax, qword [rsp + 0x2a8]
mov qword [rsp + 0x278], rax
jmp 0x403529
lea rax, [rsp + 0x40]
mov qword [rsp + 0x278], rax
mov rax, qword [rsp + 0x2b0]
mov rcx, qword [rsp + 0x278]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x2b0]
mov qword [rax + 0x10], 0
mov rax, qword [rsp + 0x2b0]
mov qword [rax + 0x18], 0
mov rax, qword [rsp + 0x2a0]
mov rax, qword [rax + 0x30]
mov r8, qword [rsp + 0x2b0]
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.00401580
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x2b8], 1
jbe 0x4037a5
mov dword [0x00423d98], 1
cmp dword [rsp + 0x2b8], 0x64
jbe 0x4035af
mov dword [rsp + 0x2b8], 0x64
mov rax, qword [rsp + 0x2a0]
mov ecx, dword [rsp + 0x2b8]
mov dword [rax + 0xdaf8], ecx
xor r9d, r9d
mov r8d, 1
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x00423da0], rax
cmp qword [0x00423da0], 0
jne 0x4035fc
mov dword [rsp + 0x20], 0x65b
mov eax, dword [rsp + 0x20]
jmp 0x4037bb
mov rcx, qword [0x00423da0]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [rsp + 0x250], 0
jmp 0x403626
mov eax, dword [rsp + 0x250]
inc eax
mov dword [rsp + 0x250], eax
mov rax, qword [rsp + 0x2a0]
mov eax, dword [rax + 0xdaf8]
cmp dword [rsp + 0x250], eax
jae 0x4037a3
mov eax, dword [rsp + 0x250]
imul rax, rax, 0x230
mov rcx, qword [rsp + 0x2a0]
mov edx, dword [rsp + 0x250]
mov dword [rcx + rax + 0x38], edx
mov rax, qword [rsp + 0x2a0]
mov rax, qword [rax + 0x30]
mov rcx, rax
call fcn.004020c0
mov ecx, dword [rsp + 0x250]
imul rcx, rcx, 0x230
mov rdx, qword [rsp + 0x2a0]
mov qword [rdx + rcx + 0x48], rax
mov eax, dword [rsp + 0x250]
imul rax, rax, 0x230
mov rcx, qword [rsp + 0x2a0]
mov rdx, qword [rsp + 0x2a0]
mov qword [rcx + rax + 0x40], rdx
xor r9d, r9d
mov r8d, 1
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [rsp + 0x250]
imul rcx, rcx, 0x230
mov rdx, qword [rsp + 0x2a0]
mov qword [rdx + rcx + 0x260], rax
mov eax, dword [rsp + 0x250]
imul rax, rax, 0x230
mov rcx, qword [rsp + 0x2a0]
cmp qword [rcx + rax + 0x48], 0
je 0x403727
mov eax, dword [rsp + 0x250]
imul rax, rax, 0x230
mov rcx, qword [rsp + 0x2a0]
cmp qword [rcx + rax + 0x260], 0
jne 0x403731
mov dword [rsp + 0x20], 0x65b
jmp 0x4037a3
mov eax, dword [rsp + 0x250]
imul rax, rax, 0x230
mov rcx, qword [rsp + 0x2a0]
mov rcx, qword [rcx + rax + 0x260]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [rsp + 0x250]
imul rax, rax, 0x230
mov rcx, qword [rsp + 0x2a0]
lea rax, [rcx + rax + 0x38]
mov r8, rax
xor edx, edx
lea rcx, [0x00402e40]
call qword [sym.imp.msvcrt.dll__beginthread]
cmp rax, 0xffffffffffffffff
je 0x403794
lea rax, [0x00423d90]
lock inc dword [rax]
jmp 0x40379e
mov dword [rsp + 0x20], 0x65b
jmp 0x4037a3
jmp 0x403616
jmp 0x4037b7
mov rax, qword [rsp + 0x2a0]
mov dword [rax + 0xdaf8], 1
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x280]
call fcn.00418760
add rsp, 0x298
ret