Function at 0x14009cd08
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xf8
mov ax, word [rdx]
xor r11d, r11d
mov r13, rcx
mov qword [rsp + 0x38], rdx
mov ebp, r11d
mov r9d, r11d
mov dword [rsp + 0x40], r11d
mov dword [rsp + 0x44], r11d
mov edi, r11d
mov dword [rsp + 0x158], r11d
mov dword [rsp + 0x48], r11d
mov r14d, r11d
mov dword [rsp + 0x58], r11d
mov dword [rsp + 0x68], r11d
mov r8d, r11d
mov dword [rsp + 0x30], r11d
movzx r12d, r11w
lea esi, [r11 + 0x2a]
lea r10d, [r11 + 9]
lea r15d, [r11 + 1]
cmp ax, r11w
je 0x14009ce0f
lea r13d, [r11 + 0x20]
cmp r10w, ax
ja 0x14009cd92
cmp ax, 0xd
jbe 0x14009ce00
cmp r13w, ax
je 0x14009ce00
mov ecx, 0x24
cmp cx, ax
jne 0x14009cda7
mov ebp, r15d
jmp 0x14009cdee
cmp si, ax
jne 0x14009cdb8
movsx ecx, byte [rdx]
mov edi, r11d
mov dword [rsp + 0x44], ecx
jmp 0x14009cdee
mov ecx, 0x2b
cmp cx, ax
jne 0x14009cdcc
movsx edi, byte [rdx]
mov dword [rsp + 0x44], r11d
jmp 0x14009cdee
mov ecx, 0x26
cmp cx, ax
jne 0x14009cddd
mov dword [rsp + 0x48], r15d
jmp 0x14009cdee
mov ecx, 0x23
cmp cx, ax
jne 0x14009cdee
movsx eax, byte [rdx]
mov dword [rsp + 0x68], eax
add rdx, 2
mov qword [rsp + 0x38], rdx
mov ax, word [rdx]
cmp ax, r11w
jne 0x14009cd86
mov r13, qword [rsp + 0x140]
mov dword [rsp + 0x158], edi
lea r10, str.__LastTID
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x80], r11
mov qword [rsp + 0x78], r11
mov qword [rsp + 0xa8], r11
mov qword [rsp + 0xa0], r10
call fcn.14004f534
mov rbx, qword [rsp + 0x38]
mov ecx, 0x2d
cmp cx, word [rbx]
movzx eax, sil
mov dword [rsp + 0x64], 0x80000000
cmove eax, ecx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x148], rbx
movsx esi, al
movzx eax, word [rbx]
cmp esi, eax
jne 0x14009d187
lea r13d, [rcx - 0xd]
mov edi, 6
lea rdx, [rsp + 0x38]
lea rcx, [0x1400f1800]
lea r8d, [rdi - 1]
call fcn.1400599c8
xor r11d, r11d
cmp al, r11b
je 0x14009cea7
mov r9d, r15d
mov dword [rsp + 0x40], r15d
jmp 0x14009d159
lea rdx, [rsp + 0x38]
lea rcx, str._waitx
mov r8d, edi
call fcn.1400599c8
xor r11d, r11d
cmp al, r11b
je 0x14009ced1
lea r9d, [r11 + 2]
mov dword [rsp + 0x40], r9d
jmp 0x14009d159
lea rdx, [rsp + 0x38]
lea rcx, str._here
mov r8d, 5
call fcn.1400599c8
xor r11d, r11d
cmp al, r11b
je 0x14009cefa
bts r14d, 8
jmp 0x14009d154
lea rdx, [rsp + 0x38]
lea rcx, str._delay
mov r8d, edi
call fcn.1400599c8
xor r11d, r11d
cmp al, r11b
je 0x14009cf24
mov eax, 0x200
or r12w, ax
jmp 0x14009d154
lea rdx, [rsp + 0x38]
lea rcx, str._waitp
mov r8d, edi
call fcn.1400599c8
xor r11d, r11d
cmp al, r11b
je 0x14009cf55
mov r9d, dword [rsp + 0x40]
mov r8d, 0x400
mov dword [rsp + 0x30], r8d
jmp 0x14009d15e
lea rdx, [rsp + 0x38]
lea rcx, str._idle
mov r8d, 5
call fcn.1400599c8
xor r11d, r11d
cmp al, r11b
je 0x14009cf81
mov dword [rsp + 0x64], 0xfffffff1
jmp 0x14009d154
lea rdx, [rsp + 0x38]
lea rcx, str._exp
mov r8d, 4
call fcn.1400599c8
xor r11d, r11d
cmp al, r11b
je 0x14009cfa8
mov ebp, r15d
jmp 0x14009d154
lea rdx, [rsp + 0x38]
lea rcx, str._link
mov r8d, 5
call fcn.1400599c8
xor r11d, r11d
cmp al, r11b
je 0x14009cfe9
mov r8d, dword [rsp + 0x30]
mov r9d, dword [rsp + 0x40]
mov dword [rsp + 0x44], 0x2a
mov edi, r11d
mov dword [rsp + 0x158], r11d
jmp 0x14009d165
mov rbx, qword [rsp + 0x38]
lea rcx, str._tid:
mov r8d, 5
mov rdx, rbx
call fcn.140050a6c
cmp al, r11b
je 0x14009d09d
mov rdi, rbx
add rbx, 0xa
movzx eax, word [rbx]
mov qword [rsp + 0x38], rbx
mov rdx, rbx
cmp ax, r11w
je 0x14009d04c
mov ecx, 9
cmp cx, ax
ja 0x14009d034
cmp ax, 0xd
jbe 0x14009d04c
cmp r13w, ax
je 0x14009d04c
add rbx, 2
mov qword [rsp + 0x38], rbx
mov ax, word [rbx]
cmp ax, r11w
jne 0x14009d029
mov r8, rbx
lea rcx, [rsp + 0x80]
sub r8, rdx
sar r8, 1
call fcn.1400573bc
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xa0], rax
cmp rdi, rbx
jae 0x14009d08b
sub rbx, rdi
movzx eax, r13w
sub rbx, r15
shr rbx, 1
lea rcx, [r15 + rbx]
rep stosw word [rdi], ax
lea rcx, [rsp + 0x38]
call fcn.14004f534
xor r11d, r11d
jmp 0x14009d154
lea rcx, str._htid:
mov r8d, edi
mov rdx, rbx
call fcn.140050a6c
cmp al, r11b
je 0x14009d119
mov rdi, rbx
add rbx, 0xc
movzx eax, word [rbx]
mov qword [rsp + 0x38], rbx
mov rdx, rbx
cmp ax, r11w
je 0x14009d0f4
mov ecx, 9
cmp cx, ax
ja 0x14009d0dc
cmp ax, 0xd
jbe 0x14009d0f4
cmp r13w, ax
je 0x14009d0f4
add rbx, 2
mov qword [rsp + 0x38], rbx
mov ax, word [rbx]
cmp ax, r11w
jne 0x14009d0d1
mov r8, rbx
lea rcx, [rsp + 0x78]
sub r8, rdx
sar r8, 1
call fcn.1400573bc
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0xa8], rax
jmp 0x14009d072
movzx eax, word [rbx]
cmp ax, r11w
je 0x14009d14a
mov ecx, 9
cmp cx, ax
ja 0x14009d132
cmp ax, 0xd
jbe 0x14009d14a
cmp r13w, ax
je 0x14009d14a
add rbx, 2
mov qword [rsp + 0x38], rbx
mov ax, word [rbx]
cmp ax, r11w
jne 0x14009d127
lea rcx, [rsp + 0x38]
call fcn.14004f534
mov r9d, dword [rsp + 0x40]
mov r8d, dword [rsp + 0x30]
mov edi, dword [rsp + 0x158]
mov rax, qword [rsp + 0x38]
movzx ecx, word [rax]
cmp esi, ecx
je 0x14009ce78
mov rbx, qword [rsp + 0x50]
mov r13, qword [rsp + 0x140]
mov dword [rsp + 0x58], r14d
cmp edi, r11d
jne 0x14009d191
cmp r9d, r11d
je 0x14009d199
mov r8d, r11d
mov dword [rsp + 0x30], r11d
movsx r15d, r12w
lea rcx, [rsp + 0x38]
or r15d, r8d
or r15d, r14d
or r15d, dword [rsp + 0x48]
call fcn.14004f534
mov rcx, qword [rsp + 0x38]
cmp word [rcx], r11w
jne 0x14009d1e0
lea rcx, [rsp + 0x78]
call fcn.14004f564
lea rcx, [rsp + 0x80]
call fcn.14004f564
mov rax, 0xffffffff80070057
jmp 0x14009d7c9
mov qword [rsp + 0x98], r11
cmp ebp, r11d
je 0x14009d23f
lea r8, [rsp + 0x98]
xor r9d, r9d
mov rdx, rbx
mov rcx, r13
mov byte [rsp + 0x20], 1
call fcn.140069518
mov rdx, qword [rsp + 0x98]
lea rcx, [rsp + 0x148]
mov qword [rsp + 0x148], rdx
call fcn.14004f534
mov rbx, qword [rsp + 0x148]
mov qword [rsp + 0x50], rbx
mov rdi, rbx
mov qword [rsp + 0x38], rbx
xor r11d, r11d
jmp 0x14009d253
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x38], rbx
call fcn.14004f534
mov rdi, qword [rsp + 0x38]
cmp word [rdi], r11w
jne 0x14009d265
mov rdi, 0xffffffff80070057
jmp 0x14009d7a2
movzx eax, word [rdi]
mov qword [rsp + 0x88], 0x400000
cmp esi, eax
jne 0x14009d2d7
movzx eax, word [rdi + 2]
cmp esi, eax
jne 0x14009d2d7
lea rdx, [rdi + 4]
lea rcx, [0x1400f9db0]
mov r8d, 3
call fcn.140050a6c
cmp al, r11b
je 0x14009d2d7
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x38]
add rdi, 0xa
mov qword [rsp + 0x38], rdi
call fcn.14005ce78
mov rdx, qword [rsp + 0x88]
add rdx, 0x1fff
and rdx, 0xffffffffffffe000
xor r11d, r11d
mov qword [rsp + 0x88], rdx
movzx eax, word [rbx]
cmp esi, eax
jne 0x14009d334
mov edi, 0x20
cmp ax, r11w
je 0x14009d313
mov ecx, 9
cmp cx, ax
ja 0x14009d2f9
cmp ax, 0xd
jbe 0x14009d313
cmp di, ax
je 0x14009d313
add rbx, 2
mov qword [rsp + 0x148], rbx
mov ax, word [rbx]
cmp ax, r11w
jne 0x14009d2ee
lea rcx, [rsp + 0x148]
call fcn.14004f534
mov rbx, qword [rsp + 0x148]
movzx eax, word [rbx]
cmp esi, eax
je 0x14009d2e3
mov qword [rsp + 0x50], rbx
cmp dword [rsp + 0x44], r11d
je 0x14009d341
mov r12, qword [r13 + 0x40]
jmp 0x14009d344
mov r12, r11
cmp r14d, r11d
jne 0x14009d353
cmp r12, r11
je 0x14009d353
mov rbp, r12
jmp 0x14009d362
mov rbp, r11
cmp r14d, r11d
je 0x14009d362
cmp dword [rsp + 0x40], r11d
jne 0x14009d379
cmp r12, r11
je 0x14009d379
cmp rbp, r11
je 0x14009d379
mov rcx, r12
call fcn.14004fbc4
mov r14, rax
jmp 0x14009d37c
mov r14, r11
mov ecx, 8
call fcn.1400d2278
xor edx, edx
mov rsi, rax
cmp rax, rdx
je 0x14009d3b7
mov rax, qword [r13 + 0x78]
mov qword [rsi], rdx
cmp rax, rdx
je 0x14009d3ad
mov rcx, qword [rax]
cmp rcx, rdx
je 0x14009d3ad
inc dword [rcx + 8]
mov rax, qword [rax]
mov qword [rsi], rax
mov qword [rsp + 0x90], rsi
jmp 0x14009d3c2
mov rsi, rdx
mov qword [rsp + 0x90], rdx
cmp dword [rsp + 0x58], edx
mov r13, qword [r13 + 0x80]
mov rdi, rbp
mov ecx, 0xf0
cmovne rdi, rdx
call fcn.1400d2278
mov rbx, rax
test rax, rax
je 0x14009d40c
mov rdx, qword [rsp + 0x140]
mov rcx, rax
call fcn.140015734
mov rdx, qword [rsp + 0x140]
mov rcx, rbx
call fcn.140015ebc
mov qword [rbx + 0x40], rdi
jmp 0x14009d40e
xor ebx, ebx
cmp dword [rsp + 0x58], 0
mov qword [rsp + 0x70], rbx
lea rdi, [0x14010bee0]
jne 0x14009d431
mov byte [rbx + 0xd9], 1
test rbp, rbp
jne 0x14009d431
mov qword [rbx + 0x38], rdi
mov qword [rbx + 0x80], r13
mov rdx, qword [rsp + 0x98]
xor r8d, r8d
mov rcx, rbx
call fcn.140064b8c
cmp dword [rsp + 0x58], 0
mov r13, qword [rsp + 0x140]
mov qword [rbx + 0x78], rsi
je 0x14009d463
mov rdi, r13
jmp 0x14009d473
test rbp, rbp
je 0x14009d473
mov rdi, qword [rbp + 0x210]
mov qword [rbx + 0x38], rdi
lea rcx, [0x14010ce50]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r8, rdi
mov rdx, r13
mov rcx, rbx
call fcn.1400523ec
cmp dword [rsp + 0x48], 0
je 0x14009d4a2
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.14006a928
cmp dword [rsp + 0x158], 0
jne 0x14009d4db
mov eax, 1
add dword [0x14010c524], eax
cmp dword [rsp + 0x30], 0
je 0x14009d4c4
add dword [0x14010c528], eax
mov rdi, qword [rsp + 0x148]
mov rsi, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x70]
jmp 0x14009d4e0
mov rdi, qword [rsp + 0x50]
movzx eax, byte [0x14010bbb5]
mov ecx, eax
test al, al
mov eax, 1
cmove ecx, eax
mov byte [0x14010bbb5], cl
lea rcx, [0x14010ce50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [rsp + 0x48], 0
mov dl, byte [r13 + 0xda]
mov byte [rbx + 0xda], dl
mov al, byte [r13 + 0xd]
mov byte [rbx + 0xd], al
je 0x14009d529
mov eax, 1
mov byte [rbx + 0xd], al
lea rcx, [rsp + 0x58]
mov rdx, rdi
call fcn.14006160c
lea rcx, [rsp + 0x50]
mov edx, 0x88
call fcn.140056f64
mov rdi, qword [rsp + 0x50]
mov rcx, rdi
call fcn.14004f518
mov rax, qword [rsp + 0x58]
movsxd rdx, dword [rsp + 0x88]
mov qword [rdi], r13
mov qword [rdi + 8], rax
mov rax, qword [rsp + 0x150]
mov qword [rdi + 0x10], 0
mov qword [rdi + 0x18], 4
mov qword [rdi + 0x20], 0
mov qword [rdi + 0x28], rax
movsxd rax, dword [rsp + 0x44]
mov qword [rdi + 0x30], r14
mov qword [rdi + 0x38], r12
mov qword [rdi + 0x40], rax
movsxd rax, dword [rsp + 0x158]
mov qword [rdi + 0x48], rax
movsxd rax, dword [rsp + 0x48]
movsxd rcx, r15d
or rcx, rax
movsxd rax, dword [rsp + 0x68]
xor r15d, r15d
mov qword [rdi + 0x50], rcx
mov qword [rdi + 0x58], rax
mov qword [rdi + 0x60], rsi
mov qword [rdi + 0x68], rbx
mov qword [rdi + 0x70], rbp
lea rax, [rsp + 0x60]
mov qword [rdi + 0x78], rbp
mov qword [rsp + 0x28], rax
lea r8, [0x14009ca50]
mov r9, rdi
xor ecx, ecx
mov dword [rsp + 0x20], 0x10000
mov dword [rsp + 0x60], r15d
mov r12b, r15b
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rdi, rax
cmp rax, r15
jne 0x14009d64a
cmp dword [rsp + 0x158], r15d
jne 0x14009d64a
lea rcx, [0x14010ce50]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
dec dword [0x14010c524]
cmp dword [rsp + 0x30], r15d
je 0x14009d630
dec dword [0x14010c528]
lea rcx, [0x14010ce50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x70]
mov rcx, qword [0x14010bc00]
cmp rcx, r15
je 0x14009d65c
call qword [sym.imp.KERNEL32.dll_SetEvent]
cmp rdi, r15
je 0x14009d666
mov ebp, r15d
jmp 0x14009d679
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
cmp eax, r15d
mov eax, 1
cmove ebp, eax
cmp rdi, r15
je 0x14009d6a4
mov eax, dword [rsp + 0x64]
cmp eax, 0x80000000
je 0x14009d694
mov edx, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x50], r15
mov rsi, r15
mov rbx, r15
mov r8, qword [rsp + 0xa0]
mov edx, dword [rsp + 0x60]
mov rcx, r13
call fcn.14005a184
mov rax, qword [rsp + 0xa8]
cmp rax, r15
je 0x14009d6e9
cmp word [rax], r15w
je 0x14009d6e9
mov r8, rax
mov rdx, rdi
mov rcx, r13
call fcn.1400374e8
movzx r12d, r12b
cmp eax, r15d
mov eax, 1
cmovne r12d, eax
cmp dword [rsp + 0x40], r15d
je 0x14009d724
cmp rdi, r15
je 0x14009d724
mov r8d, dword [rsp + 0x60]
cmp r8d, r15d
je 0x14009d724
lea rdx, [0x1400f9d98]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rdx, [rsp + 0xb0]
mov rcx, r13
call fcn.140036234
cmp r14, r15
je 0x14009d746
cmp rdi, r15
jne 0x14009d74b
mov r9, qword [r13 + 0x40]
mov edx, 0x451
mov r8d, 1
mov rcx, r14
call qword [sym.imp.USER32.dll_SendMessageW]
cmp rdi, r15
je 0x14009d759
cmp r12b, r15b
jne 0x14009d759
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x50]
movsxd rdi, ebp
call fcn.14004f564
lea rcx, [rsp + 0x58]
call fcn.14004f564
cmp rbx, r15
je 0x14009d790
xor edx, edx
mov rcx, rbx
call fcn.140042a24
lea rcx, [rbx + 0x70]
call fcn.14004f564
mov rcx, rbx
call fcn.1400d208c
cmp rsi, r15
je 0x14009d7a2
mov edx, 1
mov rcx, rsi
call fcn.14006c548
lea rcx, [rsp + 0x98]
call fcn.14004f564
lea rcx, [rsp + 0x78]
call fcn.14004f564
lea rcx, [rsp + 0x80]
call fcn.14004f564
mov rax, rdi
add rsp, 0xf8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret