Function at 0x4a5ba0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5eac68
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x64c874]
xor eax, esp
mov dword [esp + 0x38], eax
push ebx
push esi
push edi
mov eax, dword [0x64c874]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x2c], eax
call fcn.005d95d0
mov ebx, dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0
call ebx
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
call fcn.005d95d0
mov edi, eax
call sub.WS2_32.dll_WSAGetLastError
cmp esi, 0xffffffff
mov ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edi
jne 0x4a5c24
or edi, esi
mov dword [esp + 0x24], edi
jmp 0x4a5c3b
xor edi, edi
call fcn.005d95d0
mov ecx, edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], esi
mov edi, esi
mov dword [esp + 0x34], edi
cmp edi, 0xffffffff
mov dword [esp + 0x58], 0
jne 0x4a5c67
neg ecx
sbb ecx, ecx
test ecx, fcn.00489120
je 0x4a5c67
lea ecx, [esp + 0x10]
push ecx
mov edx, str.socket_select_interrupter
call fcn.004a6540
cmp edi, 0xffffffff
mov dword [esp + 0x20], 1
jne 0x4a5c84
call fcn.005d95d0
mov ecx, 0x2719
mov dword [esp + 0x10], ecx
jmp 0x4a5cbf
push 0
call ebx
push 4
lea edx, [esp + 0x24]
push edx
push 4
push 0xffff
push edi
call sub.WS2_32.dll_setsockopt
mov esi, eax
call fcn.005d95d0
mov ebx, eax
call sub.WS2_32.dll_WSAGetLastError
test esi, esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebx
jne 0x4a5cc3
call fcn.005d95d0
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x38], eax
push str.127.0.0.1
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov word [esp + 0x3c], 2
call sub.WS2_32.dll_inet_addr
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x38]
push 0x10
push eax
lea esi, [esp + 0x18]
mov eax, edi
mov word [esp + 0x42], 0
call fcn.004a3e40
add esp, 8
cmp eax, 0xffffffff
jne 0x4a5d30
mov ecx, dword [esp + 0x10]
neg ecx
sbb ecx, ecx
test ecx, fcn.00489120
je 0x4a5d30
mov edx, esi
push edx
mov edx, str.socket_select_interrupter
call fcn.004a6540
lea eax, [esp + 0x38]
push eax
lea esi, [esp + 0x14]
lea eax, [esp + 0x1c]
mov ecx, edi
call fcn.004a4890
add esp, 4
cmp eax, 0xffffffff
jne 0x4a5d69
mov ecx, dword [esp + 0x10]
neg ecx
sbb ecx, ecx
test ecx, fcn.00489120
je 0x4a5d69
mov edx, esi
push edx
mov edx, str.socket_select_interrupter
call fcn.004a6540
push str.127.0.0.1
call sub.WS2_32.dll_inet_addr
mov dword [esp + 0x3c], eax
push SysReAllocString
lea esi, [esp + 0x14]
mov eax, edi
call fcn.004a4170
add esp, 4
cmp eax, 0xffffffff
jne 0x4a5dab
mov eax, dword [esp + 0x10]
neg eax
sbb eax, eax
test eax, fcn.00489120
je 0x4a5dab
mov ecx, esi
push ecx
mov edx, str.socket_select_interrupter
call fcn.004a6540
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
call fcn.005d95d0
mov edi, eax
call sub.WS2_32.dll_WSAGetLastError
cmp esi, 0xffffffff
mov ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edi
jne 0x4a5de6
or ebx, esi
jmp 0x4a5df9
xor edi, edi
call fcn.005d95d0
mov ecx, edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov ebx, esi
mov dword [esp + 0x30], ebx
cmp ebx, 0xffffffff
mov byte [esp + 0x58], 1
jne 0x4a5e22
neg ecx
sbb ecx, ecx
test ecx, fcn.00489120
je 0x4a5e22
lea edx, [esp + 0x10]
push edx
mov edx, str.socket_select_interrupter
call fcn.004a6540
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea esi, [esp + 0x18]
mov eax, ebx
call fcn.004a4050
add esp, 8
cmp eax, 0xffffffff
jne 0x4a5e5c
mov edx, dword [esp + 0x10]
neg edx
sbb edx, edx
test edx, fcn.00489120
je 0x4a5e5c
mov eax, esi
push eax
mov edx, str.socket_select_interrupter
call fcn.004a6540
mov eax, dword [esp + 0x24]
lea esi, [esp + 0x10]
call fcn.004a3cc0
mov esi, eax
mov dword [esp + 0x18], esi
cmp esi, 0xffffffff
mov byte [esp + 0x58], 2
jne 0x4a5e98
mov ecx, dword [esp + 0x10]
neg ecx
sbb ecx, ecx
test ecx, fcn.00489120
je 0x4a5e98
lea edx, [esp + 0x10]
push edx
mov edx, str.socket_select_interrupter
call fcn.004a6540
cmp ebx, 0xffffffff
mov dword [esp + 0x28], 1
jne 0x4a5eb9
call fcn.005d95d0
mov ecx, 0x2719
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x4a5f07
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
lea eax, [esp + 0x28]
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov esi, eax
call fcn.005d95d0
mov edi, eax
call sub.WS2_32.dll_WSAGetLastError
test esi, esi
mov ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edi
jl 0x4a5f03
xor edi, edi
call fcn.005d95d0
test esi, esi
mov ecx, edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
je 0x4a5f22
mov esi, dword [esp + 0x18]
neg ecx
sbb ecx, ecx
test ecx, fcn.00489120
je 0x4a5f26
lea ecx, [esp + 0x10]
push ecx
mov edx, str.socket_select_interrupter
call fcn.004a6540
mov esi, dword [esp + 0x18]
cmp ebx, 0xffffffff
mov dword [esp + 0x20], 1
je 0x4a5f5c
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea edx, [esp + 0x24]
push edx
push 1
push 6
push ebx
call sub.WS2_32.dll_setsockopt
mov edi, eax
call fcn.005d95d0
call sub.WS2_32.dll_WSAGetLastError
test edi, edi
jne 0x4a5f61
call fcn.005d95d0
cmp esi, 0xffffffff
mov dword [esp + 0x28], 1
jne 0x4a5f82
call fcn.005d95d0
mov ecx, 0x2719
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x4a5fd0
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
lea eax, [esp + 0x28]
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov esi, eax
call fcn.005d95d0
mov edi, eax
call sub.WS2_32.dll_WSAGetLastError
test esi, esi
mov ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edi
jl 0x4a5fcc
xor edi, edi
call fcn.005d95d0
test esi, esi
mov ecx, edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
je 0x4a5feb
mov esi, dword [esp + 0x18]
neg ecx
sbb ecx, ecx
test ecx, fcn.00489120
je 0x4a5fef
lea ecx, [esp + 0x10]
push ecx
mov edx, str.socket_select_interrupter
call fcn.004a6540
mov esi, dword [esp + 0x18]
cmp esi, 0xffffffff
mov dword [esp + 0x20], 1
je 0x4a6025
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea edx, [esp + 0x24]
push edx
push 1
push 6
push esi
call sub.WS2_32.dll_setsockopt
mov edi, eax
call fcn.005d95d0
call sub.WS2_32.dll_WSAGetLastError
test edi, edi
jne 0x4a602a
call fcn.005d95d0
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
cmp edi, 0xffffffff
mov dword [eax], esi
mov dword [eax + 4], ebx
mov dword [esp + 0x58], 0xffffffff
je 0x4a606f
mov dword [esp + 0x10], 0
call fcn.005d95d0
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1f]
push 1
push eax
lea esi, [esp + 0x18]
mov eax, edi
mov byte [esp + 0x27], 0
call fcn.004a3eb0
add esp, 8
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.005b88a9
mov esp, ebp
pop ebp
ret 4