Function at 0x10002050
Capabilities:
Get socket status
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
mov r11, rsp
sub rsp, 0x608
mov rax, qword [0x1001b2a8]
mov qword [rsp + 0x5d0], rax
mov qword [r11 + 0x20], rbx
mov qword [r11 - 0x10], rsi
xor r9d, r9d
mov qword [r11 - 0x20], r12
mov rbx, rcx
mov rcx, qword [rcx + 0x130]
mov r12d, r8d
mov rsi, rdx
lea r8d, [r9 + 4]
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x38], 3
mov dword [rsp + 0x3c], 0
mov byte [rsp + 0x30], 5
mov byte [rsp + 0x31], 2
mov byte [rsp + 0x32], 0
mov byte [rsp + 0x33], 2
call qword [sym.imp.WS2_32.dll_send]
lea rcx, [rsp + 0x370]
xor edx, edx
mov r8d, 0x258
call sub.msvcrt.dll_memset
mov rdx, qword [rbx + 0x130]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x58], rdx
lea rdx, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov dword [rsp + 0x50], 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x10002116
mov rcx, qword [rbx + 0x130]
call qword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x1000217d
mov rcx, qword [rbx + 0x130]
lea rdx, [rsp + 0x370]
xor r9d, r9d
mov r8d, 0x258
mov qword [rsp + 0x600], rbp
mov qword [rsp + 0x5f0], rdi
call qword [sym.imp.WS2_32.dll_recv]
cmp byte [rsp + 0x370], 5
jne 0x1000215e
movzx eax, byte [rsp + 0x371]
test al, al
je 0x100021aa
cmp al, 2
je 0x100021b2
mov rcx, qword [rbx + 0x130]
call qword [sym.imp.WS2_32.dll_closesocket]
xor al, al
mov rbp, qword [rsp + 0x600]
mov rdi, qword [rsp + 0x5f0]
mov r12, qword [rsp + 0x5e8]
mov rsi, qword [rsp + 0x5f8]
mov rbx, qword [rsp + 0x628]
mov rcx, qword [rsp + 0x5d0]
call fcn.100120f0
add rsp, 0x608
ret
cmp al, 2
jne 0x100022e8
xor eax, eax
lea rdi, [0x1001b3d0]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rbp, rcx
je 0x100022e8
lea rdi, [0x1001b4d0]
mov rcx, 0xffffffffffffffff
xor edx, edx
repne scasb al, byte [rdi]
mov r8d, 0x102
not rcx
lea rdi, [rcx - 1]
lea rcx, [rsp + 0x260]
call sub.msvcrt.dll_memset
lea rdx, [0x1001b3d0]
lea rcx, [rsp + 0x262]
mov byte [rsp + 0x260], 5
mov byte [rsp + 0x261], bpl
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
movsxd rax, ebp
lea rdx, [0x1001b4d0]
lea rcx, [rsp + rax + 0x263]
mov dword [rsp + rax + 0x262], edi
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
mov rcx, qword [rbx + 0x130]
lea r8d, [rdi + rbp + 3]
lea rdx, [rsp + 0x260]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
lea rcx, [rsp + 0x370]
xor edx, edx
mov r8d, 0x258
call sub.msvcrt.dll_memset
mov rdx, qword [rbx + 0x130]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x58], rdx
lea rdx, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov dword [rsp + 0x50], 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x1000215e
mov rcx, qword [rbx + 0x130]
lea rdx, [rsp + 0x370]
xor r9d, r9d
mov r8d, 0x258
call qword [sym.imp.WS2_32.dll_recv]
cmp byte [rsp + 0x370], 5
jne 0x1000215e
cmp byte [rsp + 0x371], 0
jne 0x1000215e
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x1000216b
mov byte [rsp + 0x40], 5
mov byte [rsp + 0x41], 1
mov byte [rsp + 0x42], 0
mov byte [rsp + 0x43], 1
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov eax, dword [rcx]
movzx ecx, r12w
mov dword [rsp + 0x44], eax
call qword [sym.imp.WS2_32.dll_ntohs]
mov rcx, qword [rbx + 0x130]
xor r9d, r9d
lea rdx, [rsp + 0x40]
mov word [rsp + 0x48], ax
lea r8d, [r9 + 0xa]
call qword [sym.imp.WS2_32.dll_send]
lea rcx, [rsp + 0x370]
xor edx, edx
mov r8d, 0x258
call sub.msvcrt.dll_memset
mov rdx, qword [rbx + 0x130]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x58], rdx
lea rdx, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov dword [rsp + 0x50], 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x1000215e
mov rcx, qword [rbx + 0x130]
lea rdx, [rsp + 0x370]
xor r9d, r9d
mov r8d, 0x258
call qword [sym.imp.WS2_32.dll_recv]
cmp byte [rsp + 0x370], 5
jne 0x1000215e
cmp byte [rsp + 0x371], 0
jne 0x1000215e
mov al, 1
jmp 0x1000216d