Function at 0x180021c74
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x300]
sub rsp, 0x400
mov rcx, qword [0x180029078]
xor r15d, r15d
or eax, 0xffffffff
mov dword [0x180028f78], r15d
mov dword [0x180027064], eax
mov r13d, r15d
mov dword [0x180027060], eax
mov r14d, r15d
mov byte [0x180028f80], r15b
mov dword [rbp + 0x348], r15d
test rcx, rcx
je 0x180021cdd
lea rdx, [0x180001644]
call fcn.18000c674
mov rbx, rax
jmp 0x180021ce0
mov rbx, r15
lea r12, [0x18000175a]
test rbx, rbx
je 0x180021ea7
cmp byte [rbx], 8
jne 0x180021d68
mov r12d, dword [rbx + 0x118]
mov esi, r15d
test r12d, r12d
je 0x180022047
mov eax, esi
lea rdx, [0x180001674]
or eax, 1
bsr ecx, eax
mov rcx, qword [rbx + rcx*8 + 0x10]
mov rdi, qword [r15 + rcx]
mov rcx, rdi
call fcn.18000c674
test rax, rax
je 0x180021d38
cmp byte [rax], 4
jne 0x180021d38
mov rcx, qword [rax + 0x10]
jmp 0x180021d3f
lea rcx, [0x18000175a]
lea rdx, [0x1800020d0]
call fcn.180025cc8
test eax, eax
je 0x180021de1
inc esi
add r15, 8
cmp esi, r12d
jb 0x180021d08
lea r12, [0x18000175a]
xor r15d, r15d
mov ebx, r13d
cmp byte [0x180028f36], r15b
je 0x18002222d
mov esi, 2
lea rdx, [rbp + 0x60]
mov ecx, esi
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea edi, [rsi + 0xf]
mov edx, esi
mov r8d, edi
mov ecx, esi
call qword [sym.imp.WS2_32.dll_socket]
mov ecx, esi
lea rdx, [rbp + 0x60]
mov dword [0x180027064], eax
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov r8d, edi
lea ecx, [rsi + 0x15]
mov edx, esi
call qword [sym.imp.WS2_32.dll_socket]
mov dword [0x180027060], eax
lea eax, [rsi + 0x7e]
mov dword [0x180028f78], ebx
lea rbx, [0x180028f80]
cmp byte [r13], r15b
je 0x180022056
mov rdx, r13
jmp 0x18002205e
lea rdx, [0x180001bb8]
mov rcx, rdi
call fcn.18000c674
xor r15d, r15d
test rax, rax
je 0x18002203b
lea rdx, [0x1800020d8]
mov rcx, rax
call fcn.18000c674
test rax, rax
jne 0x180021e15
mov eax, r15d
jmp 0x180021e20
cmp byte [rax], 8
jne 0x180021e10
mov eax, dword [rax + 0x118]
test al, al
je 0x18002203b
lea rdx, [0x180001ff4]
mov rcx, rdi
call fcn.18000c674
test rax, rax
je 0x180021e46
cmp byte [rax], 2
jne 0x180021e46
mov ebx, dword [rax + 0x10]
jmp 0x180021e49
mov ebx, r15d
lea rdx, [0x1800048a4]
mov rcx, rdi
call fcn.18000c674
test rax, rax
je 0x180021e6f
cmp byte [rax], 4
jne 0x180021e6f
mov r13, qword [rax + 0x10]
lea r12, [0x18000175a]
jmp 0x180021e79
lea r12, [0x18000175a]
mov r13, r12
lea rdx, [0x1800048ac]
mov rcx, rdi
call fcn.18000c674
test rax, rax
je 0x180021e98
cmp byte [rax], 4
jne 0x180021e98
mov r14, qword [rax + 0x10]
jmp 0x180021e9b
mov r14, r12
mov byte [0x180028f36], 1
jmp 0x180021d6b
mov rdx, qword [0x180029058]
lea rcx, [rsp + 0x30]
call fcn.18000c9a0
test rax, rax
je 0x180021d68
lea r8, [rbp + 0x350]
mov byte [rbp + 0x340], r15b
lea rdx, [rbp + 0x340]
mov dword [rbp + 0x350], r15d
mov rcx, rax
call fcn.18000ce90
lea rdx, [0x180001644]
mov rcx, rax
call fcn.18000c674
mov rdi, rax
test rax, rax
je 0x180021f64
cmp byte [rax], 8
jne 0x180021f64
mov ebx, r15d
cmp dword [rax + 0x118], r15d
jbe 0x180021f64
mov rsi, r15
mov eax, ebx
lea rdx, [0x180001674]
or eax, 1
bsr ecx, eax
mov rcx, qword [rdi + rcx*8 + 0x10]
mov r15, qword [rsi + rcx]
mov rcx, r15
call fcn.18000c674
test rax, rax
je 0x180021f40
cmp byte [rax], 4
jne 0x180021f40
mov rcx, qword [rax + 0x10]
jmp 0x180021f43
mov rcx, r12
lea rdx, [0x1800020d0]
call fcn.180025cc8
test eax, eax
je 0x180021f82
inc ebx
add rsi, 8
cmp ebx, dword [rdi + 0x118]
jb 0x180021f10
xor r15d, r15d
lea rcx, [rsp + 0x30]
call fcn.18000c938
test rax, rax
jne 0x180021ec1
mov ebx, dword [rbp + 0x348]
jmp 0x180021d6b
lea rdx, [0x180001bb8]
mov rcx, r15
call fcn.18000c674
test rax, rax
je 0x180021f61
lea rdx, [0x1800020d8]
mov rcx, rax
call fcn.18000c674
test rax, rax
jne 0x180021fae
xor eax, eax
jmp 0x180021fb9
cmp byte [rax], 8
jne 0x180021faa
mov eax, dword [rax + 0x118]
test al, al
je 0x180021f61
lea rdx, [0x180001ff4]
mov rcx, r15
call fcn.18000c674
test rax, rax
je 0x180021fe1
cmp byte [rax], 2
jne 0x180021fe1
mov ebx, dword [rax + 0x10]
mov dword [rbp + 0x348], ebx
jmp 0x180021fe8
and dword [rbp + 0x348], 0
lea rdx, [0x1800048a4]
mov rcx, r15
call fcn.18000c674
test rax, rax
je 0x180022007
cmp byte [rax], 4
jne 0x180022007
mov r13, qword [rax + 0x10]
jmp 0x18002200a
mov r13, r12
lea rdx, [0x1800048ac]
mov rcx, r15
call fcn.18000c674
xor r15d, r15d
test rax, rax
je 0x18002202c
cmp byte [rax], 4
jne 0x18002202c
mov r14, qword [rax + 0x10]
jmp 0x18002202f
mov r14, r12
mov byte [0x180028f36], 1
jmp 0x180021f64
lea r12, [0x18000175a]
jmp 0x180021d68
lea r12, [0x18000175a]
mov ebx, r15d
jmp 0x180021d6b
cmp byte [r14], r15b
je 0x180022070
mov rdx, r14
mov r8, rax
mov rcx, rbx
call fcn.1800049c4
mov byte [0x180028f37], 1
xor r8d, r8d
mov byte [rbp + 0x200], r15b
lea rcx, [rbp + 0x200]
mov byte [rbp + 0x60], r15b
mov byte [rsp + 0x50], r15b
mov dword [rbp + 0x340], 0x104
call fcn.180005038
lea r9, [0x180001f54]
lea r8, [rbp + 0x200]
lea rdx, [0x180001f58]
lea rcx, [rbp + 0x60]
call fcn.18000542c
lea rax, [rbp + 0x340]
mov qword [rsp + 0x28], rax
lea r8, [0x1800048b8]
lea rax, [rsp + 0x50]
lea rdx, [rbp + 0x60]
mov qword [rsp + 0x20], rax
call fcn.180004b30
cmp byte [rsp + 0x50], r15b
je 0x180022172
lea rdx, [0x180001f90]
lea rcx, [rsp + 0x50]
call fcn.180005170
mov rcx, rax
test rax, rax
je 0x180022172
lea r11, [rax + 1]
test r11, r11
je 0x180022172
lea rax, [rsp + 0x50]
mov rdx, rcx
sub rdx, rax
mov r8, rbx
add rdx, 1
je 0x180022155
mov rax, rdx
lea r9, [rbp - 0x31]
sub rax, rcx
lea r10, [rsp + 0x50]
add r9, rax
sub r10, rbx
test rdx, rdx
je 0x180022151
mov al, byte [r10 + r8]
dec rdx
mov byte [r8], al
dec r9
inc r8
test al, al
je 0x180022155
test r9, r9
jne 0x180022133
mov byte [r8 - 1], r15b
mov rcx, r11
call fcn.1800051b4
mov dil, 1
mov dword [0x180028f78], eax
mov byte [0x180028f37], dil
mov rbx, rax
jmp 0x18002217f
mov ebx, dword [0x180028f78]
mov dil, byte [0x180028f37]
cmp byte [0x180028f80], r15b
mov rsi, qword [0x1800281b0]
jne 0x1800221c1
lea rdx, [0x180002018]
mov rcx, rsi
call fcn.18000c674
test rax, rax
je 0x1800221ac
cmp byte [rax], 4
jne 0x1800221ac
mov r12, qword [rax + 0x10]
mov r8d, 0x80
lea rcx, [0x180028f80]
mov rdx, r12
call fcn.1800049c4
test ebx, ebx
jne 0x1800221ee
lea rdx, [0x180001ff4]
mov rcx, rsi
call fcn.18000c674
test rax, rax
je 0x1800221e3
cmp byte [rax], 2
jne 0x1800221e3
mov ecx, dword [rax + 0x10]
jmp 0x1800221e6
mov ecx, r15d
mov ebx, ecx
mov dword [0x180028f78], ecx
lea rcx, [0x180004870]
call fcn.180004a90
test rax, rax
je 0x180022208
call fcn.180004a90
lea rcx, [rax + 1]
movzx eax, dil
lea r9, [0x180028f80]
mov dword [rsp + 0x28], eax
lea r8, [0x1800048c8]
mov edx, 0xab
mov dword [rsp + 0x20], ebx
call qword [0x180029278]
mov rbx, qword [rsp + 0x458]
add rsp, 0x400
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret