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

Disassembly:
sub esp, 0x7e8
push ebx
xor ebx, ebx
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x11], ecx
mov dword [esp + 0x25], eax
mov dword [esp + 0x15], ecx
mov dword [esp + 0x29], eax
mov dword [esp + 0x19], ecx
mov dword [esp + 0x2d], eax
mov dword [esp + 0x1d], ecx
push ebp
mov word [esp + 0x25], cx
push esi
mov dword [esp + 0x39], eax
push edi
mov byte [esp + 0x2f], cl
mov word [esp + 0x41], ax
mov ecx, 9
lea edi, [esp + 0x58]
mov dword [esp + 0x54], ebx
mov byte [esp + 0xe0], bl
rep stosd dword es:[edi], eax
mov ecx, 0x31
lea edi, [esp + 0xe1]
mov edx, dword [esp + 0x800]
mov byte [esp + 0x1a8], bl
rep stosd dword es:[edi], eax
mov ecx, 0x31
lea edi, [esp + 0x1a9]
rep stosd dword es:[edi], eax
mov ecx, 0x18
lea edi, [esp + 0x7d]
mov byte [esp + 0x7c], bl
mov byte [esp + 0x30], bl
rep stosd dword es:[edi], eax
mov byte [esp + 0x43], al
mov dword [esp + 0x10], ebx
mov byte [esp + 0x1c], bl
lea esi, [edx + 0x44]
mov edi, 0xa
mov eax, dword [esi]
cmp eax, ebx
je 0x40a204
push eax
call fcn.0040ac60
add esp, 4
add esi, 4
dec edi
jne 0x40a1f5
mov ecx, 0x10
xor eax, eax
mov edi, 0x4223ac
rep stosd dword es:[edi], eax
mov ecx, 0x10
mov edi, 0x4223f0
rep stosd dword es:[edi], eax
mov ecx, 0x10
mov edi, 0x422434
rep stosd dword es:[edi], eax
call fcn.0040d640
test eax, eax
je 0x40a548
mov edi, 0x422c34
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, dword [esp + 0x7fc]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x44]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
push eax
mov dword [esp + 0x4c], ecx
push ebp
mov dword [esp + 0x54], ecx
mov dword [esp + 0x20], 0x10
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], ecx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x40a2a6
push str.ERROR::_getsockname_error
call fcn.0040b9a0
add esp, 4
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x30]
push ecx
mov esi, eax
push eax
lea edx, [esp + 0x5c]
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 + 0x1a8]
lea edx, [esp + 0xe0]
push ecx
push edx
mov dword [esp + 0x20], eax
call fcn.0040b0b0
add esp, 8
test eax, eax
jne 0x40a2f8
push str.ERROR::_Get_Account_and_Domain_failed_
call fcn.0040b9a0
add esp, 4
cmp word [0x4223ac], bx
je 0x40a336
lea eax, [esp + 0x7c]
push 0x60
push eax
push 0x4223ac
call fcn.0040bae0
mov al, byte [esp + 0x88]
add esp, 0xc
cmp al, bl
je 0x40a375
lea eax, [esp + 0x7c]
cmp byte [eax], 0x20
jne 0x40a32c
mov byte [eax], 0x2b
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x40a324
jmp 0x40a375
lea ecx, [esp + 0xe0]
push 0xc4
lea edx, [esp + 0xe4]
push ecx
push edx
call fcn.0040ba70
mov al, byte [esp + 0xec]
add esp, 0xc
cmp al, bl
je 0x40a375
lea eax, [esp + 0xe0]
cmp byte [eax], 0x20
jne 0x40a36d
mov byte [eax], 0x2b
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x40a365
lea eax, [esp + 0x1a8]
push 0xc4
lea ecx, [esp + 0x1ac]
push eax
push ecx
call fcn.0040ba70
mov al, byte [esp + 0x1b4]
add esp, 0xc
cmp al, bl
je 0x40a3b4
lea eax, [esp + 0x1a8]
cmp byte [eax], 0x20
jne 0x40a3ac
mov byte [eax], 0x2b
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x40a3a4
mov ecx, 0x162
xor eax, eax
lea edi, [esp + 0x270]
lea edx, [esp + 0x270]
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 + 0x1a8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0xe0]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x30]
mov dword [esp + 0x274], 0x18
push ecx
push edx
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x24]
push eax
push ecx
push edx
lea eax, [esp + 0x294]
push str._10u__s__s__s_pro_authenticate__s
push eax
mov dword [esp + 0x294], 1
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
lea ecx, [esp + 0x270]
push ebx
push 0x588
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x40a46d
push str.ERROR::_Send_local_auth_info_failed_
call fcn.0040b9a0
add esp, 4
mov eax, 0xffffffec
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7e8
ret
push ebx
lea edx, [esp + 0x274]
mov ecx, 0x162
xor eax, eax
lea edi, [esp + 0x274]
push 0x588
push edx
push ebp
rep stosd dword es:[edi], eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x40a4b3
push str.ERROR::_Recv_local_auth_result_failed_
call fcn.0040b9a0
add esp, 4
mov eax, 0xffffffec
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7e8
ret
push 3
lea eax, [esp + 0x274]
push 0x41e0e4
push eax
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x40a52b
cmp dword [esp + 0x274], 0x26
jne 0x40a52b
lea ecx, [esp + 0x280]
push ecx
call fcn.004092f0
add esp, 4
cmp eax, ebx
jne 0x40a4fd
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x7e8
ret
cmp dword [0x4225c4], ebx
je 0x40a50e
push eax
call fcn.0040bd20
add esp, 4
push str.ERROR::_Local_auth_info_error
call fcn.0040b9a0
add esp, 4
mov eax, 0xfffffff5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7e8
ret
push str.ERROR::_Recved_bad_usbad_auth_result_info_
call fcn.0040b9a0
add esp, 4
mov eax, 0xfffffff4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7e8
ret
pop edi
pop esi
pop ebp
mov eax, 0xfffffff7
pop ebx
add esp, 0x7e8
ret