Function at 0x140048420
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x9b0]
sub rsp, 0xab0
mov rax, qword [0x1400a45f8]
xor rax, rsp
mov qword [rbp + 0x990], rax
mov rax, qword [rbp + 0xa00]
mov rdi, rdx
mov r12, qword [rbp + 0xa10]
mov edx, 2
movsxd r13, r8d
mov r8d, 0x3e8
mov dword [rsp + 0x30], r9d
mov qword [rsp + 0x50], rax
lea ecx, [rdx + 4]
call fcn.140026910
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x14004848c
lea eax, [r14 + 0x40]
jmp 0x140048943
mov qword [rsp + 0xae0], rbx
lea r9, [rsp + 0x38]
mov qword [rsp + 0xaa8], rsi
mov edx, 0xffff
mov r8d, 0x20
mov qword [rsp + 0xaa0], r15
mov rcx, r14
mov qword [0x1400a36c0], r14
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x20], 4
call fcn.1400268a0
or rbx, 0xffffffffffffffff
xor r15d, r15d
cmp dword [0x1400a36b8], r15d
je 0x1400485a4
lea rcx, [0x1400a7368]
call fcn.14004c5e0
lea ecx, [rbx + 0xf]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
jne 0x140048524
mov rcx, qword [0x1400a36c0]
xor edx, edx
call fcn.1400483d0
mov rcx, r14
call sub.WSOCK32.dll_closesocket
mov eax, 0x40
jmp 0x14004892b
xor eax, eax
mov qword [rsi], rax
mov dword [rsi + 8], eax
mov word [rsi + 0xc], ax
mov eax, 6
mov word [rsi], ax
movzx ecx, word [0x1400a36b0]
call fcn.1400265e0
mov word [rsi + 0xc], ax
mov rdx, rsi
xor eax, eax
mov dword [rsi + 2], eax
mov dword [rsi + 6], ebx
mov word [rsi + 0xa], bx
lea rsi, [0x1400a7368]
mov rcx, rsi
call fcn.14004c500
mov rcx, qword [0x1400a7368]
mov qword [0x1400a7358], rsi
call fcn.14004c5d0
test eax, eax
je 0x14004859d
mov rcx, qword [0x1400a36c0]
xor edx, edx
call fcn.1400483d0
mov rcx, r14
call sub.WSOCK32.dll_closesocket
mov eax, 0x41
jmp 0x14004892b
mov dword [0x1400a36b8], r15d
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
test rax, rax
js 0x1400488ee
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov r8d, 0x3e8
mov dword [rbp + 0x19c], 0xffffffff
cqo
mov dword [rbp + 0x190], 0x2c6
and edx, 0x1fff
mov dword [rbp + 0x198], r15d
add rax, rdx
lea rcx, [rbp + 0x1a0]
and eax, 0x1fff
sub rax, rdx
xor edx, edx
mov dword [rbp + 0x194], eax
call sub.VCRUNTIME140.dll_memset
cmp byte [rdi + rbx + 1], r15b
lea rbx, [rbx + 1]
jne 0x140048605
lea eax, [rbx + 1]
cmp eax, 0x3e8
ja 0x14004862c
movsxd r8, eax
lea rcx, [rbp + 0x1a0]
mov rdx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rdi, qword [0x1400a7368]
mov esi, r15d
mov rcx, rdi
call fcn.14004c5d0
test eax, eax
jne 0x1400488f5
mov rcx, rdi
call fcn.14004c4f0
test rax, rax
je 0x1400488ee
mov rcx, qword [0x1400a36c0]
mov r8d, reloc.WSOCK32.dll_recv
mov rdx, rax
call sub.WSOCK32.dll_connect
mov rcx, qword [0x1400a36c0]
lea rdx, [rbp + 0x190]
xor r9d, r9d
mov r8d, 0x1a0
call sub.WSOCK32.dll_send
cmp eax, 0x1a0
jne 0x140048693
inc esi
jmp 0x1400486fd
mov ecx, reloc.WSOCK32.dll_recv
mov dword [rsp + 0x38], sendto
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x1400488d1
mov eax, 6
mov word [rbx], ax
movzx ecx, word [0x1400a36b0]
call fcn.1400265e0
mov rcx, qword [0x1400a36c0]
lea r8, [rsp + 0x38]
mov word [rbx + 0xc], ax
mov rdx, rbx
mov dword [rsp + 0x38], reloc.WSOCK32.dll_recv
call sub.WSOCK32.dll_getsockname
test eax, eax
jne 0x1400488b9
mov rdx, rbx
lea rcx, [0x1400a7370]
call fcn.14004c500
mov rcx, rdi
call fcn.14004c5f0
mov rcx, rax
mov rdi, rax
call fcn.14004c5d0
test eax, eax
je 0x140048646
test esi, esi
je 0x1400488f5
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov rdi, qword [rbp + 0xa08]
mov esi, dword [rsp + 0x30]
lea rbx, [rax + r13]
mov r13, qword [rsp + 0x50]
nop dword [rax]
xor ecx, ecx
mov dword [rsp + 0x4c], r15d
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov ecx, ebx
mov dword [rsp + 0x60], 1
sub ecx, eax
lea rdx, [rsp + 0x60]
mov rax, qword [0x1400a36c0]
cmovs ecx, r15d
mov qword [rsp + 0x68], rax
mov dword [rsp + 0x48], ecx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rax + 1]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call fcn.1400267b0
cmp eax, 0xffffffff
je 0x14004886b
test eax, eax
je 0x140048833
mov rcx, qword [0x1400a36c0]
lea rdx, [rbp + reloc.mfc140.dll_Ordinal_1424]
xor r9d, r9d
mov dword [rsp + 0x40], sendto
mov r8d, 0x3f8
call sub.WSOCK32.dll_recv
cmp eax, 0x3f8
jne 0x140048740
mov rcx, qword [0x1400a36c0]
lea r8, [rsp + 0x40]
lea rdx, [rbp + 0x180]
mov dword [rsp + 0x40], reloc.WSOCK32.dll_recv
call sub.WSOCK32.dll_getpeername
lea rcx, [rbp + 0x170]
call fcn.140028830
mov r9, r13
mov qword [rsp + 0x28], r12
mov r8d, esi
mov qword [rsp + 0x20], rdi
mov rdx, rax
lea rcx, [rbp + 0x5a0]
call fcn.140048170
cmp esi, 4
jne 0x140048822
cmp word [r12 + 0x40], r15w
ja 0x140048833
cmp eax, 0x40
je 0x140048512
test eax, eax
jne 0x140048740
mov rcx, qword [0x1400a36c0]
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov dword [rsp + 0x30], r15d
mov r8d, 0x20
mov dword [rsp + 0x20], 4
call fcn.1400268a0
mov rcx, r14
call sub.WSOCK32.dll_closesocket
xor eax, eax
jmp 0x14004892b
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x140048740
mov rcx, qword [0x1400a36c0]
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov dword [rsp + 0x30], r15d
mov r8d, 0x20
mov dword [rsp + 0x20], 4
call fcn.1400268a0
mov rcx, r14
call sub.WSOCK32.dll_closesocket
cmp dword [r13], r15d
setle r15b
mov eax, r15d
jmp 0x14004892b
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r14
call sub.WSOCK32.dll_closesocket
mov eax, 1
jmp 0x14004892b
mov rcx, qword [0x1400a36c0]
xor edx, edx
call fcn.1400483d0
mov rcx, r14
call sub.WSOCK32.dll_closesocket
mov eax, 1
jmp 0x14004892b
mov eax, 0x4a
jmp 0x14004892b
mov rcx, qword [0x1400a36c0]
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov dword [rsp + 0x30], r15d
mov r8d, 0x20
mov dword [rsp + 0x20], 4
call fcn.1400268a0
mov rcx, r14
call sub.WSOCK32.dll_closesocket
mov eax, 0x3e
mov rsi, qword [rsp + 0xaa8]
mov rbx, qword [rsp + 0xae0]
mov r15, qword [rsp + 0xaa0]
mov rcx, qword [rbp + 0x990]
xor rcx, rsp
call fcn.140077b10
add rsp, 0xab0
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret