Function at 0x403970
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, 0x10
push ebx
mov ebx, ecx
mov ecx, dword [ebx + 8]
mov eax, dword [ecx + 0x40]
test eax, 0x800
mov dword [esp + 0x10], ebx
je 0x403999
test eax, 0x200000
jne 0x403999
mov ecx, ebx
pop ebx
add esp, 0x10
jmp fcn.004032b0
shr eax, 0xb
and al, 1
cmp dword [ecx + 0x24], 0
mov byte [esp + 6], al
setne byte [esp + 7]
test al, al
mov eax, dword [ebx + 4]
mov byte [esp + 5], 0
mov dword [esp + 8], 0
je 0x4039c2
add eax, 0xc
cmp dword [ecx + 4], 0
mov dword [esp + 0xc], eax
je 0x4039da
push ecx
mov byte [esp + 9], 1
call fcn.00408e90
add esp, 4
mov ecx, dword [ebx + 8]
push ebp
push esi
push edi
lea ebp, [ebx + 0xc]
push ebp
push ecx
call fcn.00406cb0
mov edx, dword [ebp]
add esp, 8
mov dword [edx + 0x44], 1
mov eax, dword [ebp]
push eax
mov ecx, ebx
call fcn.00403160
mov ecx, dword [ebp]
cmp dword [ecx + 0x2c], 0xffffffff
je 0x403ca7
cmp dword [0x425534], 0
jne 0x403c9b
mov eax, dword [ebx + 8]
test dword [eax + 0x40], 0x100000
je 0x403a5a
cmp dword [0x425520], 0
jne 0x403a5a
lea esi, [ecx + 0x78]
lea edi, [eax + 0x78]
mov ecx, 0x20
rep movsd dword es:[edi], dword [esi]
add dword [ebx], 0xffffffff
mov byte [esp + 0x11], 1
jne 0x403a61
push 0
call fcn.004095b0
add esp, 4
mov dword [ebx], 1
jmp 0x403a61
cmp byte [esp + 0x11], 0
je 0x403aab
mov ecx, dword [ebp]
mov edx, dword [ebx + 8]
add ecx, 0x78
push ecx
add edx, 0x78
push edx
call fcn.00408db0
add esp, 8
test eax, eax
jne 0x403aab
mov eax, dword [ebp]
mov ecx, dword [eax + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebx + 8]
test dword [eax + 0x40], 0x800
je 0x403c5f
mov ecx, ebx
mov dword [eax + 0x2c], 0xffffffff
call fcn.00402fc0
jmp 0x403c5f
push 0x90
call fcn.00409dbb
mov esi, dword [ebp]
mov ebx, eax
add esi, 0x78
mov ecx, 0x20
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add esp, 4
xor edi, edi
mov dword [ebx + 0x88], edi
mov edx, dword [0x42551c]
push 0xffffffffffffffff
push edx
call esi
mov eax, dword [0x425520]
mov ecx, dword [ebp]
push eax
add ecx, 0x78
push ecx
call fcn.00402e80
add esp, 8
cmp eax, edi
je 0x403b15
mov edx, dword [eax + 0x80]
mov dword [ebx + 0x80], edx
mov ecx, dword [ebp]
mov edx, dword [eax + 0x80]
mov dword [ecx + 0x18], edx
jmp 0x403b59
mov eax, dword [ebp]
mov dword [eax + 0x24], edi
mov ecx, dword [0x425524]
push 0xffffffffffffffff
push ecx
call esi
mov eax, dword [0x425538]
sub eax, 1
mov dword [0x425538], eax
mov edx, dword [ebp]
push eax
push edx
call fcn.00404a90
mov dword [ebx + 0x80], eax
mov ecx, dword [ebp]
mov dword [ecx + 0x18], eax
mov edx, dword [0x425524]
add esp, 8
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push 0x425520
push ebx
call fcn.00402df0
mov eax, dword [0x42551c]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [esp + 0x1c]
mov ecx, dword [ebx + 8]
mov dword [esp + 0x14], edi
mov eax, dword [ecx + 0x40]
test al, 2
jne 0x403bee
test eax, 0x4000
jne 0x403bee
cmp byte [esp + 0x12], 0
mov edx, dword [ebp]
jne 0x403bb2
mov esi, dword [esp + 0x18]
mov eax, dword [edx + 0x2c]
push edi
push 0x18
push esi
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x403bc5
mov edx, dword [ebp]
push esi
jmp 0x403bb7
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
push edx
call fcn.00407040
add esp, 0xc
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x403bee
push eax
call fcn.00402c70
mov eax, dword [esp + 0x18]
add esp, 4
cmp dword [eax + 0x4c], 1
jne 0x403be8
mov ecx, dword [ebp]
mov dword [ecx + 0x1c], eax
jmp 0x403bee
mov edx, dword [ebp]
mov dword [edx + 0x20], eax
cmp byte [esp + 0x12], 0
mov eax, dword [ebp]
je 0x403c90
mov eax, dword [eax + 0x1c]
cmp eax, edi
je 0x403c0c
push eax
call fcn.00409630
add esp, 4
mov ecx, dword [ebp]
push ecx
call fcn.00402d60
mov edx, dword [ebp]
mov eax, dword [edx + 0x20]
add esp, 4
cmp eax, edi
je 0x403c2b
push eax
call fcn.00409630
add esp, 4
mov ecx, dword [ebx + 8]
mov dword [ecx + 0x2c], 0xffffffff
mov ecx, ebx
call fcn.00402fc0
mov eax, dword [ebx + 8]
test dword [eax + 0x40], 0x100000
jne 0x403c4b
add dword [ebx], 0xffffffff
push ebp
push eax
call fcn.00406cb0
mov edx, dword [ebp]
add esp, 8
mov dword [edx + 0x44], 1
cmp dword [0x425534], 0
jne 0x403ca7
cmp byte [esp + 0x13], 0
je 0x4039f7
cmp dword [ebx], 0
jg 0x4039f7
mov edx, dword [ebp]
push edx
call fcn.00406e00
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push eax
call fcn.00409630
add esp, 4
jmp 0x403c3c
mov eax, ecx
mov ecx, dword [eax + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp]
push edx
call fcn.00406e00
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret