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

Disassembly:
sub esp, 0x478
push ebx
push esi
push edi
push ebp
push 0x3e8
push 2
push 6
call fcn.004f5a80
mov dword [esp + 0x1c], eax
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4f5ea4
mov eax, 0x3f
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x478
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.004f5d80
add esp, 4
push 1
call fcn.004f5d70
push eax
call fcn.004f7430
add esp, 8
cmp eax, 0xffffffff
jne 0x4f5ed6
mov eax, 0x41
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x478
ret
cmp dword [0x4e9480], 0
je 0x4f5fb9
push 0x4eb980
call fcn.004f2060
add esp, 4
mov ebx, dword [sym.imp.MSVCRT.dll_malloc]
push 0xe
call ebx
add esp, 4
mov edi, eax
test edi, edi
jne 0x4f5f2d
push 0
call fcn.004f5d70
push eax
call fcn.004f7430
mov eax, dword [esp + 0x18]
add esp, 8
push eax
call sub.WSOCK32.dll_closesocket
mov eax, 0x40
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x478
ret
xor esi, esi
mov dword [edi], esi
mov dword [edi + 4], esi
mov dword [edi + 8], esi
mov word [edi + 0xc], si
mov word [edi], 6
call fcn.004f5d90
push eax
call fcn.004f5bb0
mov word [edi + 0xc], ax
add esp, 4
lea eax, [edi + 6]
mov dword [edi + 2], esi
push edi
push 0x4eb980
mov dword [eax], 0xffffffff
mov word [eax + 4], 0xffff
call fcn.004f2070
add esp, 8
mov eax, dword [0x4eb980]
push eax
call fcn.004f2030
add esp, 4
test eax, eax
je 0x4f5fad
push esi
call fcn.004f5d70
push eax
call fcn.004f7430
mov eax, dword [esp + 0x18]
add esp, 8
push eax
call sub.WSOCK32.dll_closesocket
mov eax, 0x41
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x478
ret
mov dword [0x4e9480], 0
jmp 0x4f5fbf
mov ebx, dword [sym.imp.MSVCRT.dll_malloc]
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
test eax, eax
jge 0x4f5fde
mov eax, 0x4a
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x478
ret
xor ebp, ebp
push ebp
call dword [sym.imp.MSVCRT.dll_time]
cdq
add esp, 4
xor eax, edx
sub eax, edx
mov dword [esp + 0x4c], ebp
and eax, 0x1fff
lea edi, [esp + 0x54]
xor eax, edx
mov ecx, 0x64
mov dword [esp + 0x50], 0xffffffff
mov dword [esp + 0x44], 0x189d
sub eax, edx
mov dword [esp + 0x48], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov esi, dword [esp + 0x490]
mov ecx, 0xffffffff
mov edi, esi
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
mov eax, ecx
lea edi, [esp + 0x54]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [0x4eb980]
push esi
call fcn.004f2030
add esp, 4
test eax, eax
jne 0x4f610d
push esi
call fcn.004f2040
add esp, 4
push 0x10
push eax
call fcn.004f5d70
push eax
call sub.WSOCK32.dll_connect
lea eax, [esp + 0x44]
push 0
push 0x1a0
push eax
call fcn.004f5d70
push eax
call sub.WSOCK32.dll_send
cmp eax, 0x1a0
jne 0x4f6092
inc ebp
jmp 0x4f60f1
mov dword [esp + 0x14], 0xe
push 0x10
call ebx
add esp, 4
mov edi, eax
test edi, edi
je 0x4f613b
mov word [edi], 6
call fcn.004f5d90
push eax
call fcn.004f5bb0
mov word [edi + 0xc], ax
add esp, 4
mov dword [esp + 0x14], 0x10
lea eax, [esp + 0x14]
push eax
push edi
call fcn.004f5d70
push eax
call sub.WSOCK32.dll_getsockname
push edi
test eax, eax
jne 0x4f6165
push 0x4eb7d0
call fcn.004f2070
add esp, 8
push esi
call fcn.004f2050
add esp, 4
mov esi, eax
push esi
call fcn.004f2030
add esp, 4
test eax, eax
je 0x4f605a
push 0
test ebp, ebp
jne 0x4f6188
call fcn.004f5d70
push eax
call fcn.004f7430
mov eax, dword [esp + 0x18]
add esp, 8
push eax
call sub.WSOCK32.dll_closesocket
mov eax, 0x3e
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x478
ret
push 0
call fcn.004f5d70
push eax
call fcn.004f7430
mov eax, dword [esp + 0x18]
add esp, 8
push eax
call sub.WSOCK32.dll_closesocket
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x478
ret
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call sub.WSOCK32.dll_closesocket
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x478
ret
xor ebx, ebx
call dword [sym.imp.MSVCRT.dll_time]
add eax, dword [esp + 0x498]
mov esi, dword [esp + 0x49c]
mov edi, dword [esp + 0x4a8]
mov dword [esp + 0x18], eax
add esp, 4
mov ebp, dword [esp + 0x14]
push 0
mov dword [esp + 0x24], 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
sub ebp, eax
mov dword [esp + 0x1c], ebp
jns 0x4f61d3
mov dword [esp + 0x1c], 0
mov dword [esp + 0x1e4], 0
call fcn.004f5d70
lea ecx, [esp + 0x1e4]
mov dword [esp + 0x1e8], eax
lea eax, [esp + 0x1c]
inc dword [esp + 0x1e4]
push eax
push 0
push 0
push ecx
call fcn.004f5d70
inc eax
push eax
call fcn.004f5ab0
add esp, 0x14
cmp eax, 0xffffffff
je 0x4f62b7
test eax, eax
je 0x4f62fe
lea eax, [esp + 0x2e8]
push 0
mov dword [esp + 0x1c], 0xe
push 0x1a0
push eax
call fcn.004f5d70
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0x1a0
jne 0x4f6303
lea eax, [esp + 0x18]
lea ecx, [esp + 0x34]
mov dword [esp + 0x18], 0x10
push eax
push ecx
call fcn.004f5d70
push eax
call sub.WSOCK32.dll_getpeername
lea ecx, [esp + 0x24]
push ecx
call fcn.004f8e00
mov ecx, dword [esp + 0x4a4]
mov edx, dword [esp + 0x4a0]
add esp, 4
push edi
push ecx
push edx
push esi
push eax
lea eax, [esp + 0x30c]
push eax
call fcn.004f6350
add esp, 0x18
cmp esi, 4
jne 0x4f62a8
cmp word [edi + 0x20], 0
ja 0x4f62fe
cmp eax, 0x40
je 0x4f6332
test eax, eax
jne 0x4f6303
jmp 0x4f62fe
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x4f6303
push 0
call fcn.004f5d70
push eax
call fcn.004f7430
mov eax, dword [esp + 0x18]
add esp, 8
push eax
call sub.WSOCK32.dll_closesocket
mov ecx, dword [esp + 0x49c]
mov eax, 0
cmp dword [ecx], 0
jg 0x4f6327
pop ebp
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x478
ret
mov ebx, 1
test ebx, ebx
je 0x4f61ac
push 0
call fcn.004f5d70
push eax
call fcn.004f7430
mov eax, dword [esp + 0x18]
add esp, 8
push eax
call sub.WSOCK32.dll_closesocket
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x478
ret
mov eax, dword [esp + 0x10]
push eax
call sub.WSOCK32.dll_closesocket
mov eax, 0x40
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x478
ret