Function at 0x513e30
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
sub esp, 0x80
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 4]
xor ebp, ebp
xor esi, esi
cmp eax, ebp
mov dword [esp + 0x18], edx
mov ebx, 1
mov dword [esp + 0x10], ebp
je 0x513e96
cmp byte [eax], 0x2d
jne 0x513e96
push 0x575cf0
push eax
call fcn.00572b46
add esp, 8
test eax, eax
jne 0x513e6d
mov esi, ebx
cmp esi, ebp
mov ebx, 2
je 0x513e96
mov eax, dword [edi + 8]
cmp eax, ebp
je 0x513e9d
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x513f31
mov dword [esp + 0x10], ebx
mov ebx, 3
mov ecx, dword [edi + ebx*4]
cmp ecx, ebp
jne 0x513eb3
mov edx, dword [edi]
push ebp
push ebp
xor ecx, ecx
call fcn.00475f10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x513eb8
sub eax, esi
cmp eax, 0x5a
jbe 0x513ef7
xor edx, edx
mov ecx, 0x1452
call fcn.0041c9e0
push eax
mov eax, dword [edi + ebx*4]
push eax
push str.__socklisten:__s__s
push 0x595d60
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x80
ret
call fcn.00513240
test eax, eax
je 0x513f13
xor edx, edx
mov ecx, 0x1453
call fcn.0041c9e0
mov ecx, dword [edi + ebx*4]
push eax
push ecx
jmp 0x513ed7
mov eax, dword [edi + ebx*4 + 4]
cmp eax, ebp
mov dword [esp + 0x14], ebp
je 0x513f48
push eax
call fcn.00563a14
add esp, 4
cmp ax, bp
mov dword [esp + 0x14], eax
ja 0x513f48
mov edx, dword [edi]
push 3
push ebp
xor ecx, ecx
call fcn.00475f10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret
call fcn.00513010
mov esi, eax
cmp esi, ebp
jne 0x513f6a
mov edx, dword [edi]
push 2
push ebp
xor ecx, ecx
call fcn.00475f10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret
mov ebx, dword [edi + ebx*4]
mov ecx, esi
nop
mov al, byte [ebx]
inc ebx
mov byte [ecx], al
inc ecx
test al, al
jne 0x513f70
mov eax, dword [esp + 0x18]
lea ebp, [esi + 0x64]
add eax, 0x1510
mov edx, ebp
sub edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x513f90
mov dx, word [esp + 0x14]
lea ebx, [esi + 0xc8]
push 0
mov word [ebx], dx
mov dword [esi + 0x14c], 1
call fcn.00563e36
mov dword [esi + 0x17c], eax
mov dword [esi + 0x180], eax
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x513ff8
mov eax, dword [edi + eax*4]
push eax
mov edx, 0x64
mov ecx, ebp
call fcn.0041e120
mov ecx, dword [esp + 0x10]
mov edx, dword [edi + ecx*4]
push edx
lea ecx, [esi + 0xca]
mov edx, 0x64
call fcn.0041e120
cmp word [esp + 0x14], 0
mov eax, dword [esp + 0x18]
mov dword [esi + 0x190], eax
jne 0x5140a7
push 0x59c9f8
mov edx, 0x64
lea ecx, [esp + 0x30]
call fcn.0041e120
mov al, byte [esi + 0xca]
test al, al
mov ebp, dword [0x59c9f4]
lea edi, [esi + 0xca]
je 0x514051
push edi
mov edx, 0x64
mov ecx, 0x59c9f8
call fcn.0041e120
mov dword [0x59c9f4], 2
mov dx, word [0x589910]
mov cx, word [0x58990c]
push 0
push 0
push ebx
call fcn.004fd380
lea ecx, [esp + 0x2c]
push ecx
mov edx, 0x64
mov ecx, 0x59c9f8
mov dword [esi + 0x18c], eax
call fcn.0041e120
mov dword [0x59c9f4], ebp
cmp dword [esi + 0x18c], 0xffffffff
jne 0x514195
mov ecx, esi
call fcn.00513140
mov ecx, 0x1454
jmp 0x51416d
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x18c], eax
jne 0x5140cf
mov ecx, esi
call fcn.00513140
mov ecx, 0x1455
jmp 0x51416d
push 0x59c9f8
mov edx, 0x64
lea ecx, [esp + 0x30]
call fcn.0041e120
mov al, byte [esi + 0xca]
test al, al
mov ebp, dword [0x59c9f4]
lea edi, [esi + 0xca]
je 0x514112
push edi
mov edx, 0x64
mov ecx, 0x59c9f8
call fcn.0041e120
mov dword [0x59c9f4], 2
mov dx, word [ebx]
mov ecx, dword [esi + 0x18c]
call fcn.004fd2b0
lea edx, [esp + 0x2c]
push edx
mov edx, 0x64
mov ecx, 0x59c9f8
mov ebx, eax
call fcn.0041e120
test ebx, ebx
mov dword [0x59c9f4], ebp
jne 0x51414e
mov ecx, esi
call fcn.00513140
mov ecx, 0x1456
jmp 0x51416d
mov eax, dword [esi + 0x18c]
push 5
push eax
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
je 0x514195
mov ecx, esi
call fcn.00513140
mov ecx, 0x145a
xor edx, edx
call fcn.0041c9e0
push eax
push str.__socklisten:__s
push 0x595d60
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x80
ret
mov ecx, dword [0x5a1b00]
mov edx, dword [esi + 0x18c]
push 8
push 0x8037
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov eax, dword [esi + 0x18c]
cmp eax, 0xffffffff
je 0x514202
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x20]
push edx
push eax
mov dword [esp + 0x24], 0x10
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jne 0x514202
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
push eax
mov edx, 0x64
mov ecx, edi
call fcn.0041e120
mov ecx, dword [esp + 0x1e]
push ecx
call dword [sym.imp.WSOCK32.dll_ntohs]
mov word [esi + 0x12e], ax
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x80
ret