Function at 0x180031f30
Capabilities:
Create thread

Disassembly:
mov rax, rsp
push r12
push r14
push r15
sub rsp, 0xb0
mov qword [rax - 0x50], 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 + 0xa8], rax
mov r15, r8
mov r14, rcx
cmp edx, 1
jne 0x180032224
xor edi, edi
mov ebx, edi
lea r12, [0x1800f8440]
mov dword [rsp + 0x34], ebx
cmp ebx, 0xa
jge 0x180031fab
movsxd rax, ebx
imul rcx, rax, 0x88
add rcx, r12
call fcn.180081740
test al, al
je 0x180031fa7
mov dword [reloc.WS2_32.dll_ioctlsocket], ebx
jmp 0x180031fbb
inc ebx
jmp 0x180031f80
call fcn.180081b00
test al, al
jne 0x180031fbb
xor eax, eax
jmp 0x180032229
call fcn.180081b00
test al, al
je 0x180031fce
mov eax, 1
jmp 0x180032229
mov qword [0x1800f7f88], r14
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x1800f7f80], eax
mov rcx, r14
call fcn.180031d50
call fcn.180032260
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 0x18003201a
mov r8, rdi
jmp 0x18003202b
mov r8, rsi
nop dword [rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x180032020
mov rdx, rax
lea rcx, [rsp + 0x38]
call fcn.1800329a0
nop
call fcn.180032350
mov r8, rax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x58]
call fcn.180033ab0
nop
mov rcx, rax
call fcn.180031d00
nop
cmp qword [rsp + 0x70], 8
jb 0x18003206c
mov rcx, qword [rsp + 0x58]
call fcn.1800958e0
mov qword [rsp + 0x70], 7
mov qword [rsp + 0x68], rdi
mov word [rsp + 0x58], di
cmp qword [rsp + 0x50], 8
jb 0x180032091
mov rcx, qword [rsp + 0x38]
call fcn.1800958e0
mov qword [rsp + 0x50], 7
mov qword [rsp + 0x48], rdi
mov word [rsp + 0x38], di
test r15, r15
jne 0x1800320b3
mov rcx, r14
call fcn.180078a00
jmp 0x1800320b9
call fcn.180078df0
nop
mov eax, dword [reloc.WS2_32.dll_ioctlsocket]
cmp eax, 1
jne 0x1800320cf
call fcn.18004d500
mov eax, dword [reloc.WS2_32.dll_ioctlsocket]
cmp eax, 4
jne 0x1800320df
call fcn.18004d500
mov eax, dword [reloc.WS2_32.dll_ioctlsocket]
cmp eax, 0xa
jl 0x1800320e9
jmp 0x180032179
cdqe
imul rcx, rax, 0x88
movzx eax, byte [rcx + r12 + 0x80]
mov byte [rsp + 0x30], al
test al, al
je 0x180032179
lea rcx, [rsp + 0x80]
call fcn.18007a6b0
cmp dword [rax + 0xc], 5
jne 0x180032118
jmp 0x180032136
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
call fcn.18009df80
cmp eax, 3
setge al
test al, al
jne 0x180032136
xor eax, eax
jmp 0x180032229
call fcn.18004d500
mov dword [rsp + 0x94], edi
lea rax, [rsp + 0x94]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], edi
xor r9d, r9d
lea r8, [0x180031730]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, rax
call fcn.1800797f0
mov eax, 1
jmp 0x180032229
mov dword [rsp + 0x90], edi
xor eax, eax
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa0], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], edi
xor r9d, r9d
lea r8, [0x180031730]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.180085f80
nop
mov rax, qword [rsp + 0x98]
test rax, rax
je 0x1800321d8
mov rdi, qword [rax]
mov rcx, rdi
call fcn.1800797f0
mov ecx, 0x5dc
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
mov rbx, qword [rsp + 0xa0]
test rbx, rbx
je 0x180032224
mov eax, esi
lock xadd dword [rbx + 8], eax
dec eax
jne 0x180032224
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], esi
dec esi
jne 0x180032224
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x180032224
mov eax, 1
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.1800b8aa0
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret