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

Disassembly:
sub esp, 0x840
xor eax, eax
push ebx
mov dword [esp + 0xd], eax
push edi
mov dword [esp + 0x15], eax
mov ecx, 9
mov dword [esp + 0x19], eax
lea edi, [esp + 0x38]
mov dword [esp + 0x1d], eax
mov byte [esp + 0x5c], 0
mov word [esp + 0x21], ax
mov byte [esp + 0x13c], 0
mov dword [esp + 0x34], eax
mov byte [esp + 0x23], al
rep stosd dword es:[edi], eax
mov ecx, 0x1f
lea edi, [esp + 0xbd]
mov dword [esp + 8], eax
mov byte [esp + 0xbc], al
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x17
xor eax, eax
lea edi, [esp + 0x5d]
mov byte [esp + 0x1bc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x13d]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1bd]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.0040d640
test eax, eax
je 0x40a884
mov edi, 0x422c34
or ecx, 0xffffffff
xor eax, eax
push ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push esi
lea edx, [esp + 0x1c4]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov ebx, dword [esp + 0x854]
and ecx, 3
lea edx, [esp + 0x14]
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], ecx
push edx
mov dword [esp + 0x34], ecx
push eax
mov dword [esp + 0x3c], ecx
push ebx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x20], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x40a679
push str.ERROR::_getsockname_error
call fcn.0040b9a0
add esp, 4
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x18]
push ecx
mov esi, eax
push eax
lea edx, [esp + 0x44]
lea eax, [esp + 0x18]
push edx
push eax
call fcn.0040b5a0
add esp, 0x10
push esi
call dword [sym.imp.WS2_32.dll_ntohl]
lea ecx, [esp + 0x64]
push 0x60
push ecx
push 0x422a38
mov ebp, eax
call fcn.0040ba70
lea edx, [esp + 0xd0]
push 0x80
push edx
push eax
lea eax, [esp + 0x7c]
push eax
call fcn.0040bf70
lea ecx, [esp + 0x160]
push 0x80
push ecx
mov edi, 0x422a58
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x422a58
call fcn.0040bf70
mov ecx, 0x162
xor eax, eax
lea edi, [esp + 0x2f4]
lea edx, [esp + 0x2f4]
rep stosd dword es:[edi], eax
mov edi, 0x41e0e4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x170]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0xf0]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x44]
mov dword [esp + 0x2f8], 0x17
push ecx
push edx
lea ecx, [esp + 0x1f8]
push eax
push ecx
push ebp
lea edx, [esp + 0x318]
push str._10u__s__s__s_pro_authenticate__s
push edx
mov dword [esp + 0x318], 1
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x48
lea eax, [esp + 0x2c8]
push 0
push 0x588
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
pop esi
pop ebp
cmp eax, 0xffffffff
jne 0x40a7a9
push str.ERROR::_Send_local_auth_info_failed_
call fcn.0040b9a0
add esp, 4
mov eax, 0xfffffff1
pop edi
pop ebx
add esp, 0x840
ret
mov ecx, 0x162
xor eax, eax
lea edi, [esp + 0x2c0]
push eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x2c4]
push 0x588
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x40a7ed
push str.ERROR::_Recv_usb_local_auth_result_failed_
call fcn.0040b9a0
add esp, 4
mov eax, 0xfffffff1
pop edi
pop ebx
add esp, 0x840
ret
push 3
lea edx, [esp + 0x2c4]
push 0x41e0e4
push edx
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x40a866
cmp dword [esp + 0x2c4], 0x26
jne 0x40a866
lea eax, [esp + 0x2d0]
push eax
call fcn.004092f0
add esp, 4
test eax, eax
jne 0x40a835
pop edi
mov eax, 1
pop ebx
add esp, 0x840
ret
mov ecx, dword [0x4225c4]
test ecx, ecx
je 0x40a848
push eax
call fcn.0040bd20
add esp, 4
push str.ERROR::_usb_Local_auth_info_error
call fcn.0040b9a0
movsx eax, byte [esp + 0x2d4]
add esp, 4
pop edi
pop ebx
add esp, 0x840
ret
push str.ERROR::_Recved_bad_usblocal_auth_result_info_
call fcn.0040b9a0
movsx eax, byte [esp + 0x2d4]
add esp, 4
pop edi
pop ebx
add esp, 0x840
ret
pop edi
mov eax, 0xfffffff7
pop ebx
add esp, 0x840
ret