Function at 0x180031350
Capabilities:
Create thread

Disassembly:
mov rax, rsp
push r14
sub rsp, 0xb0
mov qword [rax - 0x60], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x180001b10]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov r14, rcx
cmp edx, 1
jne 0x1800315eb
xor edi, edi
mov ebx, edi
lea rsi, [0x1800f0f30]
mov dword [rsp + 0x30], ebx
cmp ebx, 5
jge 0x1800313bd
movsxd rax, ebx
lea rcx, [rax + rax*2]
shl rcx, 5
add rcx, rsi
call fcn.18005bf70
test al, al
jne 0x1800313cd
inc ebx
jmp 0x180031399
call fcn.18005c330
test al, al
jne 0x1800313cd
xor eax, eax
jmp 0x1800315f0
call fcn.18005c330
test al, al
je 0x1800313e0
mov eax, 1
jmp 0x1800315f0
mov qword [0x1800f0ea8], r14
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x1800f0ea0], eax
mov rcx, r14
call fcn.180031170
lea rax, [rsp + 0x60]
mov qword [rsp + 0x88], rax
call fcn.180031620
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x50], 7
mov qword [rsp + 0x48], rdi
mov word [rsp + 0x38], di
or rsi, 0xffffffffffffffff
cmp word [rax], 0
jne 0x180031439
mov r8, rdi
jmp 0x18003144b
mov r8, rsi
nop dword [rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x180031440
mov rdx, rax
lea rcx, [rsp + 0x38]
call fcn.180012740
nop
call fcn.180031710
mov r8, rax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x60]
call fcn.180032730
nop
mov rcx, rax
call fcn.18005d610
nop
cmp qword [rsp + 0x50], 8
jb 0x18003148c
mov rcx, qword [rsp + 0x38]
call fcn.18008fc70
mov qword [rsp + 0x50], 7
mov qword [rsp + 0x48], rdi
mov word [rsp + 0x38], di
mov rcx, r14
call fcn.18005d210
nop
call fcn.1800115c0
test al, al
je 0x1800314b6
call fcn.18004dca0
call fcn.180011710
test al, al
je 0x1800314c4
call fcn.18004dca0
call fcn.1800116a0
test al, al
je 0x180031531
call fcn.18005bc20
test al, al
je 0x1800314dd
xor eax, eax
jmp 0x1800315f0
call fcn.18004dca0
mov dword [rsp + 0x88], edi
lea rax, [rsp + 0x88]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], edi
xor r9d, r9d
lea r8, [0x180030ba0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, reloc.WS2_32.dll_ntohs
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
jne 0x180031527
call fcn.18005d720
jmp 0x180031527
mov eax, 1
jmp 0x1800315f0
mov dword [rsp + 0x80], edi
xor eax, eax
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x98], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], edi
xor r9d, r9d
lea r8, [0x180030ba0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rdx, rax
lea rcx, [rsp + 0x90]
call fcn.180071e20
nop
mov rax, qword [rsp + 0x90]
test rax, rax
je 0x180031590
mov rdi, qword [rax]
mov edx, reloc.WS2_32.dll_ntohs
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
jne 0x1800315a7
call fcn.18005d720
mov ecx, 0x5dc
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
mov rbx, qword [rsp + 0x98]
test rbx, rbx
je 0x1800315eb
mov eax, esi
lock xadd dword [rbx + 8], eax
dec eax
jne 0x1800315eb
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], esi
dec esi
jne 0x1800315eb
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x1800315eb
mov eax, 1
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.1800b1390
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret