Function at 0x1004c970
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration
Start tcp server

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101db28d
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x10284f40]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x50], ecx
push 1
push 0
push 0
push 6
push 1
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
push 2
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0x1026c678
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, eax
lea ecx, [ebp - 0x1c]
cmp edi, 0xffffffff
sete dl
call fcn.1004bf30
or eax, 0xffffffff
cmp edi, eax
cmove edi, eax
mov dword [ebp - 0x54], edi
mov dword [ebp - 4], 0
cmp edi, eax
jne 0x1004c9f6
cmp byte [ebp - 0x18], 0
jne 0x1004ce2d
mov dword [ebp - 0x24], 1
cmp edi, 0xffffffff
jne 0x1004ca4e
mov ebx, dword [sym.imp.WS2_32.dll_htonl]
xorps xmm0, xmm0
mov eax, 2
movlpd qword [ebp - 0x30], xmm0
push 0x7f000001
mov word [ebp - 0x38], ax
call ebx
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x48], 0x2719
mov byte [ebp - 0x44], 1
movq xmm0, qword [ebp - 0x48]
mov word [ebp - 0x36], ax
mov dword [ebp - 0x4c], 0x10
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0x1026c678
jmp 0x1004cabe
push 4
lea eax, [ebp - 0x24]
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x1c]
setne dl
call fcn.1004bf30
mov ebx, dword [sym.imp.WS2_32.dll_htonl]
xorps xmm0, xmm0
mov eax, 2
movlpd qword [ebp - 0x30], xmm0
push 0x7f000001
mov word [ebp - 0x38], ax
call ebx
mov dword [ebp - 0x34], eax
xor eax, eax
mov word [ebp - 0x36], ax
lea eax, [ebp - 0x38]
push 0x10
push eax
push edi
mov dword [ebp - 0x4c], 0x10
call dword [sym.imp.WS2_32.dll_bind]
mov esi, eax
lea ecx, [ebp - 0x1c]
test esi, esi
setne dl
call fcn.1004bf30
cmp esi, 0xffffffff
jne 0x1004caeb
cmp byte [ebp - 0x18], 0
jne 0x1004ce2d
cmp edi, 0xffffffff
jne 0x1004caeb
mov dword [ebp - 0x48], 0x2719
mov byte [ebp - 0x44], 1
movq xmm0, qword [ebp - 0x48]
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0x1026c678
jmp 0x1004cb1b
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x10
push eax
lea eax, [ebp - 0x38]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
mov esi, eax
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
test esi, esi
mov dword [ebp - 0x4c], eax
setne dl
call fcn.1004bf30
cmp esi, 0xffffffff
jne 0x1004cb25
cmp byte [ebp - 0x18], 0
jne 0x1004ce2d
push 0
call ebx
cmp dword [ebp - 0x34], eax
jne 0x1004cb38
push 0x7f000001
call ebx
mov dword [ebp - 0x34], eax
cmp edi, 0xffffffff
jne 0x1004cb5b
mov dword [ebp - 0x48], 0x2719
mov byte [ebp - 0x44], 1
movq xmm0, qword [ebp - 0x48]
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0x1026c678
jmp 0x1004cb7b
push accept
push edi
call dword [sym.imp.WS2_32.dll_listen]
mov esi, eax
lea ecx, [ebp - 0x1c]
test esi, esi
setne dl
call fcn.1004bf30
cmp esi, 0xffffffff
jne 0x1004cb85
cmp byte [ebp - 0x18], 0
jne 0x1004ce2d
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov ebx, eax
lea ecx, [ebp - 0x1c]
cmp ebx, 0xffffffff
sete dl
call fcn.1004bf30
cmp ebx, 0xffffffff
mov eax, 0xffffffff
cmove ebx, eax
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 1
cmp ebx, eax
jne 0x1004cbe5
cmp byte [ebp - 0x18], 0
jne 0x1004ce3a
mov dword [ebp - 0x48], 0x2719
mov byte [ebp - 0x44], 1
movq xmm0, qword [ebp - 0x48]
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0x1026c678
jmp 0x1004cc07
push dword [ebp - 0x4c]
lea eax, [ebp - 0x38]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
mov esi, eax
lea ecx, [ebp - 0x1c]
test esi, esi
setne dl
call fcn.1004bf30
cmp esi, 0xffffffff
jne 0x1004cc11
cmp byte [ebp - 0x18], 0
jne 0x1004ce3a
cmp edi, 0xffffffff
jne 0x1004cc36
mov dword [ebp - 0x48], 0x2719
or ebx, edi
mov byte [ebp - 0x44], 1
movq xmm0, qword [ebp - 0x48]
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0x1026c678
jmp 0x1004cc98
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov ebx, eax
lea ecx, [ebp - 0x1c]
cmp ebx, 0xffffffff
sete dl
call fcn.1004bf30
cmp ebx, 0xffffffff
jne 0x1004cc5a
or ebx, ebx
jmp 0x1004cc98
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], 0
mov edx, dword [ecx + 8]
mov eax, dword [ecx + 0xc]
cmp edx, 0x25c5e09b
jne 0x1004cc79
cmp eax, 0x8fafd21e
je 0x1004cc88
cmp edx, 0x257edf0d
jne 0x1004cc8c
cmp eax, 0xb2ab117a
jne 0x1004cc8c
xor al, al
jmp 0x1004cc95
mov eax, dword [ecx]
push 0
mov eax, dword [eax + 0x18]
call eax
mov byte [ebp - 0x18], al
mov dword [ebp - 0x4c], ebx
mov byte [ebp - 4], 2
cmp ebx, 0xffffffff
jne 0x1004ccae
cmp byte [ebp - 0x18], 0
jne 0x1004ce47
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], 1
cmp eax, 0xffffffff
jne 0x1004ccdb
mov dword [ebp - 0x48], 0x2719
mov byte [ebp - 0x44], 1
movq xmm0, qword [ebp - 0x48]
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0x1026c678
jmp 0x1004ccfe
lea ecx, [ebp - 0x28]
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov esi, eax
lea ecx, [ebp - 0x1c]
test esi, esi
sets dl
call fcn.1004bf30
test esi, esi
je 0x1004cd08
cmp byte [ebp - 0x18], 0
jne 0x1004ce47
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], 1
cmp eax, 0xffffffff
jne 0x1004cd35
mov dword [ebp - 0x48], 0x2719
mov byte [ebp - 0x44], 1
movq xmm0, qword [ebp - 0x48]
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0x1026c678
jmp 0x1004cd53
push 4
lea ecx, [ebp - 0x24]
push ecx
push 1
push 6
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x1c]
setne dl
call fcn.1004bf30
mov dword [ebp - 0x28], 1
cmp ebx, 0xffffffff
jne 0x1004cd7d
mov dword [ebp - 0x48], 0x2719
mov byte [ebp - 0x44], 1
movq xmm0, qword [ebp - 0x48]
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0x1026c678
jmp 0x1004cda0
lea eax, [ebp - 0x28]
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov esi, eax
lea ecx, [ebp - 0x1c]
test esi, esi
sets dl
call fcn.1004bf30
test esi, esi
je 0x1004cdaa
cmp byte [ebp - 0x18], 0
jne 0x1004ce47
mov dword [ebp - 0x24], 1
cmp ebx, 0xffffffff
je 0x1004cdd4
push 4
lea eax, [ebp - 0x24]
push eax
push 1
push 6
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x1c]
setne dl
call fcn.1004bf30
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x20]
mov dword [ecx], ebx
mov dword [ecx + 4], eax
cmp edi, 0xffffffff
je 0x1004ce11
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x14], 0
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0x1026c678
push 1
lea edx, [ebp - 0x39]
movq qword [ebp - 0x1c], xmm0
mov ecx, edi
mov byte [ebp - 0x39], 0
call fcn.1004bfc0
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100e40d6
mov esp, ebp
pop ebp
ret
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x1c]
call fcn.10049f90
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x1c]
call fcn.10049f90
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x1c]
call fcn.10049f90
int3