Function at 0x14008e7c4
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x5b0]
sub rsp, 0x6b0
mov rax, qword [0x1402aaed0]
xor rax, rsp
mov qword [rbp + 0x5a0], rax
lea r14, [rcx + 0x500]
mov rbx, rcx
mov rcx, r14
xor edx, edx
mov r8d, 0x400
call fcn.1401bad90
xor r15d, r15d
test rbx, rbx
je 0x14008ee00
mov qword [rbx + 0x944], r15
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [rbx + 8], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r8d, dword [rbx + 8]
xor edx, edx
mov ecx, 0x1fffff
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_OpenThread]
lea ecx, [r15 + 0x20]
mov qword [rbx + 0x18], rax
call fcn.1400920bc
mov qword [rbx + 0x4f8], rax
lea r12d, [r15 + 1]
mov rax, qword [0x1402ae528]
mov edx, r12d
test rax, rax
cmove rax, rbx
xor r9d, r9d
xor r8d, r8d
mov qword [0x1402ae528], rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x960], rax
cmp dword [rbx + 0x958], r15d
jne 0x14008e8ba
mov qword [rsp + 0x28], r15
lea r8, [0x14008d5c8]
mov r9, rbx
mov dword [rsp + 0x20], r15d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x950], rax
mov dword [rbp + 0x390], r15d
mov dword [rsp + 0x70], r15d
mov dword [rbp + 0x180], r15d
mov dword [rbx + 4], r12d
jmp 0x14008ebb3
cmp dword [rbx + 0x940], 2
mov dword [rbp + 0x390], r15d
mov dword [rsp + 0x70], r15d
mov dword [rbp + 0x180], r15d
jne 0x14008e8f9
mov dword [rbx + 0x940], r15d
mov rax, qword [rbx + 0x928]
mov rcx, qword [rax + 0x18]
mov dword [rbx + 0x968], 0x5265c00
jmp 0x14008e9a0
mov r10, qword [rbx + 0x970]
test r10, r10
je 0x14008e924
mov r10, qword [r10]
jmp 0x14008e927
mov r10, r15
test r10, r10
je 0x14008e9b0
cmp qword [r10], r15
je 0x14008e974
mov eax, dword [rbx + 0x968]
lea r9, [rsp + 0x70]
mov dword [rsp + 0x50], eax
lea r8, [rbp + 0x180]
lea rax, [rsp + 0x50]
mov rcx, r10
lea rdx, [rbp + 0x390]
mov qword [rsp + 0x20], rax
call qword [r10]
mov eax, dword [rsp + 0x50]
cmp eax, dword [rbx + 0x968]
jge 0x14008e974
mov dword [rbx + 0x968], eax
mov rcx, qword [rbx + 0x970]
call fcn.140092210
mov ecx, dword [rax + 8]
test ecx, ecx
jle 0x14008e995
cmp ecx, dword [rbx + 0x968]
jge 0x14008e995
mov dword [rbx + 0x968], ecx
mov rax, qword [rbx + 0x970]
mov rcx, qword [rax + 0x10]
mov qword [rbx + 0x970], rcx
test rcx, rcx
jne 0x14008e913
mov ecx, dword [rbx + 0x968]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x3e8
mov dword [rsp + 0x60], edx
or edx, 0xffffffff
sub ecx, eax
imul eax, ecx, 0x3e8
mov rcx, qword [0x1402ae538]
mov dword [rsp + 0x64], eax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x14008ea51
mov rax, qword [rbx + 0x930]
mov rdi, qword [rax + 0x18]
mov qword [rbx + 0x970], rdi
test rdi, rdi
je 0x14008ea0b
mov rdi, qword [rdi]
jmp 0x14008ea0e
mov rdi, r15
mov rcx, qword [rbx + 0x928]
mov rdx, rdi
call fcn.140092334
mov rcx, qword [rbx + 0x970]
call fcn.1400922b0
test rdi, rdi
je 0x14008ea51
mov rax, qword [rdi + 0x10]
test rax, rax
je 0x14008ea3c
mov rcx, rdi
call rax
mov rcx, qword [rdi + 0x30]
call fcn.14008bb80
or dword [rdi + 0x38], 0xffffffff
mov rcx, rdi
call fcn.1401c141c
mov rax, qword [rbx + 0x930]
cmp dword [rax + 8], r15d
jg 0x14008e9ef
mov rcx, qword [0x1402ae538]
xor r8d, r8d
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov rax, qword [rbx + 0x4f8]
lea r9, [rsp + 0x58]
add dword [rbx + 0x944], r12d
lea r8, [rsp + 0x60]
mov qword [rsp + 0x40], r15
lea rdx, [rsp + 0x54]
mov qword [rsp + 0x38], rax
mov rcx, r14
lea rax, [rsp + 0x70]
mov dword [rsp + 0x54], r15d
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x180]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x390]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x58], r15d
call fcn.14008c558
mov ecx, dword [rsp + 0x54]
lea r9, [rsp + 0x70]
mov eax, dword [rsp + 0x58]
lea r8, [rbp + 0x180]
mov dword [rsp + 0x30], eax
lea rdx, [rbp + 0x390]
mov dword [rsp + 0x28], ecx
mov dword [rbx + 0x978], ecx
mov rcx, rbx
mov qword [rsp + 0x20], r14
call fcn.14008c2d0
add dword [rbx + 0x948], r12d
mov esi, eax
cmp eax, 0xffffffff
jne 0x14008eb23
mov dword [rbp + 0x390], r15d
mov dword [rbp + 0x180], r15d
mov dword [rsp + 0x70], r15d
mov rcx, qword [rbx + 0x928]
mov rdx, qword [rcx + 0x18]
mov qword [rbx + 0x970], rdx
test rdx, rdx
je 0x14008ebb3
mov rdi, qword [rbx + 0x970]
test rdi, rdi
je 0x14008eb4b
mov rdi, qword [rdi]
jmp 0x14008eb4e
mov rdi, r15
test rdi, rdi
je 0x14008ebb3
mov rax, qword [rdi + 8]
test rax, rax
je 0x14008eb7b
lea rcx, [rsp + 0x70]
mov edx, esi
mov qword [rsp + 0x20], rcx
lea r9, [rbp + 0x180]
mov rcx, rdi
lea r8, [rbp + 0x390]
call rax
mov rcx, qword [rbx + 0x970]
call fcn.140092210
mov r8, qword [rax]
test r8, r8
je 0x14008eb9c
mov rdx, qword [rbx + 0x970]
mov rcx, rdi
call r8
mov rax, qword [rbx + 0x970]
mov rcx, qword [rax + 0x10]
mov qword [rbx + 0x970], rcx
test rcx, rcx
jne 0x14008eb3a
cmp dword [rbx], r15d
je 0x14008e8d6
cmp qword [rbx + 0x950], r15
je 0x14008ebd2
mov rcx, qword [rbx + 0x960]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rdi, qword [rbx + 0x920]
test rdi, rdi
je 0x14008ec19
mov rdi, qword [rdi + 0x18]
jmp 0x14008ec01
mov rsi, qword [rdi]
test rsi, rsi
je 0x14008ebfd
mov rdx, qword [rsi + 8]
mov rcx, rbx
call qword [rsi]
mov rcx, rsi
call fcn.1401c141c
mov rdi, qword [rdi + 0x10]
test rdi, rdi
jne 0x14008ebe4
mov rcx, qword [rbx + 0x920]
call fcn.140092530
mov qword [rbx + 0x920], r15
mov rax, qword [rbx + 0x928]
mov rax, qword [rax + 0x18]
mov qword [rbx + 0x970], rax
test rax, rax
je 0x14008ec3b
mov rax, qword [rax + 0x10]
mov qword [rbx + 0x970], rax
mov dword [rbx], r12d
cmp qword [rbx + 0x970], r15
je 0x14008ec9b
mov rdi, qword [rbx + 0x970]
test rdi, rdi
je 0x14008ec58
mov rdi, qword [rdi]
jmp 0x14008ec5b
mov rdi, r15
test rdi, rdi
je 0x14008ec9b
mov rax, qword [rdi + 0x10]
test rax, rax
je 0x14008ec6e
mov rcx, rdi
call rax
mov rcx, qword [rdi + 0x30]
call fcn.14008bb80
or dword [rdi + 0x38], 0xffffffff
mov rcx, rdi
call fcn.1401c141c
mov rcx, qword [rbx + 0x970]
call fcn.1400922b0
mov qword [rbx + 0x970], rax
test rax, rax
jne 0x14008ec47
mov edx, r15d
mov dword [rsp + 0x50], edx
movsxd rax, edx
mov r8, qword [rbx + rax*8 + 0x500]
test r8, r8
je 0x14008eccf
lea eax, [rdx + 0x40]
movsxd rcx, eax
cmp qword [rbx + rcx*8 + 0x500], r15
jne 0x14008eccf
mov rcx, r8
call qword [sym.imp.WS2_32.dll_WSACloseEvent]
mov edx, dword [rsp + 0x50]
add edx, r12d
mov dword [rsp + 0x50], edx
cmp edx, 0x40
jl 0x14008eca2
mov rcx, qword [rbx + 0x4f8]
call fcn.140092530
mov rax, qword [0x1402ae528]
cmp rax, rbx
cmove rax, r15
mov qword [0x1402ae528], rax
mov rax, qword [rbx + 0x928]
mov rdi, qword [rax + 0x18]
mov qword [rbx + 0x970], rdi
test rdi, rdi
je 0x14008ed3d
mov rdi, qword [rdi]
test rdi, rdi
je 0x14008ed3d
mov rcx, rdi
call qword [rdi + reloc.WS2_32.dll_recv]
mov rcx, qword [rdi + 0x30]
call fcn.14008bb80
or dword [rdi + 0x38], 0xffffffff
mov rcx, rdi
call fcn.1401c141c
mov qword [rbx + 0x910], r15
mov rcx, qword [rbx + 0x928]
call fcn.140092530
mov rax, qword [rbx + 0x930]
mov rcx, qword [rax + 0x18]
jmp 0x14008ed9d
mov rdi, qword [rbx + 0x970]
test rdi, rdi
je 0x14008ed67
mov rdi, qword [rdi]
jmp 0x14008ed6a
mov rdi, r15
test rdi, rdi
je 0x14008eda9
mov rax, qword [rdi + 0x10]
test rax, rax
je 0x14008ed7d
mov rcx, rdi
call rax
mov rcx, qword [rdi + 0x30]
call fcn.14008bb80
or dword [rdi + 0x38], 0xffffffff
mov rcx, rdi
call fcn.1401c141c
mov rax, qword [rbx + 0x970]
mov rcx, qword [rax + 0x10]
mov qword [rbx + 0x970], rcx
test rcx, rcx
jne 0x14008ed56
mov rcx, qword [rbx + 0x930]
call fcn.140092530
mov rcx, qword [rbx + 0x938]
test rcx, rcx
je 0x14008edcb
xor r8d, r8d
xor edx, edx
call fcn.140092754
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [0x1402ae524]
cmp eax, r12d
jne 0x14008edef
mov rcx, qword [0x1402ae538]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x1402ae524]
sub eax, r12d
mov rcx, rbx
mov dword [0x1402ae524], eax
call fcn.1401c141c
mov rcx, qword [rbp + 0x5a0]
xor rcx, rsp
call fcn.1401b98c0
lea r11, [rsp + 0x6b0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret