Function at 0x14004d480
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x47]
sub rsp, 0xa0
mov rax, qword [0x140135558]
xor rax, rsp
mov qword [rbp + 0x37], rax
xor edi, edi
mov r14d, ecx
cmp dword [0x14013c608], edi
mov esi, 2
jne 0x14004d624
xor r8d, r8d
mov dword [rbp + 7], 0xb5367df1
lea edx, [rsi - 1]
mov dword [rbp + 0xb], 0x11cfcbac
mov ecx, esi
mov dword [rbp + 0xf], 0x8000ca95
mov dword [rbp + 0x13], 0x92a1485f
mov dword [rbp + 0x17], 0x25a207b9
mov dword [rbp + 0x1b], 0x4660ddf3
mov dword [rbp + 0x1f], 0xe576e98e
mov dword [rbp + 0x23], 0x3e06748c
mov dword [rbp + 0x27], 0xb5367df2
mov dword [rbp + 0x2b], 0x11cfcbac
mov dword [rbp + 0x2f], 0x8000ca95
mov dword [rbp + 0x33], 0x92a1485f
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14004d624
mov qword [rsp + 0x40], rdi
lea rax, [rbp - 9]
mov qword [rsp + 0x38], rdi
lea r9d, [rsi + 0xe]
mov qword [rsp + 0x30], rax
lea r8, [rbp + 7]
lea rax, [rbp - 1]
mov dword [rsp + 0x28], 8
mov edx, 0xc8000006
mov qword [rsp + 0x20], rax
mov rcx, rbx
mov qword [rbp - 1], rdi
mov dword [rbp - 9], edi
call qword [sym.imp.WS2_32.dll_WSAIoctl]
mov rax, qword [rbp - 1]
lea r9d, [rsi + 0xe]
mov qword [rsp + 0x40], rdi
lea r8, [rbp + 0x17]
mov qword [0x14013c610], rax
mov edx, 0xc8000006
mov qword [rsp + 0x38], rdi
lea rax, [rbp - 9]
mov qword [rsp + 0x30], rax
mov rcx, rbx
lea rax, [rbp - 1]
mov dword [rsp + 0x28], 8
mov qword [rsp + 0x20], rax
mov qword [rbp - 1], rdi
mov dword [rbp - 9], edi
call qword [sym.imp.WS2_32.dll_WSAIoctl]
mov rax, qword [rbp - 1]
lea r9d, [rsi + 0xe]
mov qword [rsp + 0x40], rdi
lea r8, [rbp + 0x27]
mov qword [0x14013c618], rax
mov edx, 0xc8000006
mov qword [rsp + 0x38], rdi
lea rax, [rbp - 9]
mov qword [rsp + 0x30], rax
mov rcx, rbx
lea rax, [rbp - 1]
mov dword [rsp + 0x28], 8
mov qword [rsp + 0x20], rax
mov qword [rbp - 1], rdi
mov dword [rbp - 9], edi
call qword [sym.imp.WS2_32.dll_WSAIoctl]
mov rax, qword [rbp - 1]
mov rcx, rbx
mov qword [0x14013c620], rax
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [0x14013c608], 1
mov edx, 0x50
lea ecx, [rdx - 0x4f]
call fcn.140047b50
mov rbx, rax
test rax, rax
je 0x14004d728
test r14d, r14d
mov edx, 8
cmovg esi, r14d
movzx eax, si
add ax, ax
movsx rcx, ax
mov word [rbx + 0x30], ax
call fcn.140047b50
mov qword [rbx + 0x38], rax
test rax, rax
je 0x14004d6f5
xor edx, edx
mov r9d, esi
xor r8d, r8d
lea rcx, [rdx - 1]
call qword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov qword [rbx], rax
mov dword [rbx + 0x34], 0xffffffff
test rax, rax
je 0x14004d6f5
xor r9d, r9d
xor edx, edx
xor ecx, ecx
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov qword [rbx + 0x48], rax
test rax, rax
je 0x14004d6f5
cmp di, word [rbx + 0x30]
jge 0x14004d6e1
mov rsi, rdi
nop dword [rax]
mov r8, rbx
lea rcx, [0x14004d830]
xor edx, edx
call fcn.1400c2e0c
cmp rax, 0xffffffffffffffff
je 0x14004d6f5
mov rcx, qword [rbx + 0x38]
inc edi
mov qword [rsi + rcx], rax
add rsi, 8
inc word [rbx + 0x40]
movsx eax, word [rbx + 0x30]
cmp edi, eax
jl 0x14004d6b0
lea rcx, [rbx + 8]
mov edx, 0x3e8
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
mov rax, rbx
jmp 0x14004d72a
mov rcx, qword [rbx]
test rcx, rcx
je 0x14004d703
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x14004d711
call fcn.140047be0
mov rcx, qword [rbx + 0x48]
test rcx, rcx
je 0x14004d720
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call fcn.140047be0
xor eax, eax
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1400b9890
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret