Function at 0x14002a040
Capabilities:
Check mutex on windows
Create thread

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x4d0
mov qword [rsp + 0x4b0], 0xfffffffffffffffe
mov rax, qword [0x1403710d8]
xor rax, rsp
mov qword [rsp + 0x4c8], rax
mov rax, qword [rsp + 0x4e0]
cmp qword [rax + 0x30], 0
jne 0x14002a107
mov ecx, reloc.WS2_32.dll_getservbyport
call sub.MSVCR90.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov qword [rsp + 0x490], rax
cmp qword [rsp + 0x490], 0
je 0x14002a0bd
mov rcx, qword [rsp + 0x490]
call fcn.14002ab50
mov qword [rsp + 0x4b8], rax
jmp 0x14002a0c9
mov qword [rsp + 0x4b8], 0
mov rax, qword [rsp + 0x4b8]
mov qword [rsp + 0x488], rax
mov rcx, qword [rsp + 0x4e0]
mov rax, qword [rsp + 0x488]
mov qword [rcx + 0x30], rax
mov rax, qword [rsp + 0x4e0]
cmp qword [rax + 0x30], 0
jne 0x14002a107
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14002a43b
mov rax, qword [rsp + 0x4e0]
mov dword [rax + 0x24], 0
mov dword [rsp + 0x34], 0
jmp 0x14002a12b
mov eax, dword [rsp + 0x34]
add eax, 1
mov dword [rsp + 0x34], eax
movsxd rax, dword [rsp + 0x34]
cmp rax, 7
jae 0x14002a2fd
xor eax, eax
mov word [rsp + 0x60], ax
lea rdi, [rsp + 0x62]
xor eax, eax
mov ecx, 0x206
rep stosb byte [rdi], al
mov dword [rsp + 0x38], 1
movsxd rcx, dword [rsp + 0x34]
imul rcx, rcx, 0x210
lea rax, [0x14036ae00]
cmp dword [rax + rcx + 4], 1
jne 0x14002a1b7
movsxd rcx, dword [rsp + 0x34]
imul rcx, rcx, 0x210
lea rax, [0x14036ae00]
lea rdi, [rax + rcx + 8]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov qword [rsp + 0x20], rdi
mov r9d, eax
lea r8, str.E9DFA1AC_02BC_49af_8364_28A525776275__d__s
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.14000e460
mov dword [rsp + 0x38], 0
jmp 0x14002a1f2
movsxd rcx, dword [rsp + 0x34]
imul rcx, rcx, 0x210
lea rax, [0x14036ae00]
lea rax, [rax + rcx + 8]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x4e8]
lea r8, str.E9DFA1AC_02BC_49af_8364_28A525776275__s__s
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.14000e460
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.140012e40
nop
movsxd rcx, dword [rsp + 0x34]
imul rcx, rcx, 0x210
lea rax, [0x14036ae00]
cmp dword [rax + rcx], 0
je 0x14002a231
lea r8, [rsp + 0x60]
lea rdx, str.Global_s
lea rcx, [rsp + 0x40]
call fcn.140013e60
mov ecx, reloc.WS2_32.dll_recv
call sub.MSVCR90.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov qword [rsp + 0x4a0], rax
cmp qword [rsp + 0x4a0], 0
je 0x14002a282
lea rcx, [rsp + 0x40]
call fcn.140267cb0
mov qword [rsp + 0x20], 0
mov r9, rax
mov r8d, dword [rsp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x4a0]
call fcn.14002eac0
mov qword [rsp + 0x4c0], rax
jmp 0x14002a28e
mov qword [rsp + 0x4c0], 0
mov rax, qword [rsp + 0x4c0]
mov qword [rsp + 0x498], rax
mov rax, qword [rsp + 0x498]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x14002a2d4
mov dword [rsp + 0x4a8], 0x57
lea rcx, [rsp + 0x40]
call fcn.140012ea0
mov eax, dword [rsp + 0x4a8]
jmp 0x14002a43b
movsxd rdx, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x4e0]
mov rcx, qword [rcx + 0x30]
mov rax, qword [rsp + 0x48]
mov qword [rcx + rdx*8], rax
lea rcx, [rsp + 0x40]
call fcn.140012ea0
jmp 0x14002a120
cmp dword [rsp + 0x4f0], 1
jne 0x14002a398
xor eax, eax
mov word [rsp + 0x270], ax
lea rdi, [rsp + 0x272]
xor eax, eax
mov ecx, 0x206
rep stosb byte [rdi], al
mov r9, qword [rsp + 0x4e8]
lea r8, str.C7D23C7F_0173_4d80_830D_69C174A31EF6__s
mov edx, 0x104
lea rcx, [rsp + 0x270]
call fcn.14000e460
lea r8, [rsp + 0x270]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov rdx, rax
mov rax, qword [rsp + 0x4e0]
mov qword [rax + 0x18], rdx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x480], eax
cmp dword [rsp + 0x480], 0xb7
je 0x14002a38c
cmp dword [rsp + 0x480], 5
jne 0x14002a398
mov eax, dword [rsp + 0x480]
jmp 0x14002a43b
mov rcx, qword [rsp + 0x4e0]
mov eax, dword [rsp + 0x4f8]
mov dword [rcx + 0x20], eax
mov rcx, qword [rsp + 0x4e0]
mov rax, qword [rsp + 0x500]
mov qword [rcx + 8], rax
mov dword [rsp + 0x30], 0
mov rcx, qword [rsp + 0x4e0]
mov rax, qword [rsp + 0x508]
mov qword [rcx + 0x28], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9, qword [rsp + 0x4e0]
lea r8, [0x14002a5c0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.MSVCR90.dll__beginthreadex]
mov rdx, rax
mov rax, qword [rsp + 0x4e0]
mov qword [rax + 0x10], rdx
mov rax, qword [rsp + 0x4e0]
cmp qword [rax + 0x10], 0
jne 0x14002a439
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x484], eax
mov eax, dword [rsp + 0x484]
jmp 0x14002a43b
xor eax, eax
mov rcx, qword [rsp + 0x4c8]
xor rcx, rsp
call fcn.14028a900
add rsp, 0x4d0
pop rdi
ret