Function at 0x4b4cf0
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov esi, edx
push 0
push 1
mov eax, dword [edi + 0x2c]
mov ebx, dword [edi + 4]
and eax, 0x400000
neg eax
sbb eax, eax
and eax, 0x15
add eax, 2
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x4b4d72
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call ebp
test eax, eax
jg 0x4b4d30
call ebp
jmp 0x4b4d3a
call ebp
movzx eax, ax
or eax, 0x80070000
mov dword [esi + 0x20], eax
mov dword [esi + 0x38], 0
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x4b4d63
mov eax, dword [eax + 0x38]
mov dword [esi + 0x38], eax
mov eax, dword [ebx + 0x28]
mov dword [eax + 0x38], esi
mov dword [ebx + 0x28], esi
inc dword [edi + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [esi + 0x38], esi
mov dword [ebx + 0x28], esi
inc dword [edi + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 0
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
jne 0x4b4de4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
jg 0x4b4d94
call eax
jmp 0x4b4d9e
call eax
movzx eax, ax
or eax, 0x80070000
mov dword [esi + 0x20], eax
mov dword [esi + 0x38], 0
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x4b4dce
mov eax, dword [eax + 0x38]
mov dword [esi + 0x38], eax
mov eax, dword [ebx + 0x28]
push ebp
mov dword [eax + 0x38], esi
mov dword [ebx + 0x28], esi
inc dword [edi + 0x3c]
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [esi + 0x38], esi
mov dword [ebx + 0x28], esi
inc dword [edi + 0x3c]
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
lea ecx, [esi + 0x20]
xorps xmm0, xmm0
movups xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
test dword [edi + 0x2c], 0x80000
je 0x4b4e09
mov eax, dword [esi + 0x160]
or eax, 1
mov dword [esi + 0x30], eax
push ecx
lea eax, [esp + 0x14]
push eax
push 0x80
push 0x80
push 0
lea eax, [esi + 0x40]
push eax
mov eax, dword [edi + 0xa4]
push ebp
push dword [edi + 0x90]
call eax
test eax, eax
je 0x4b4e50
test dword [edi + 0x2c], 0x20000
je 0x4b4eb6
mov dword [esi + 0x3c], ebp
mov edx, esi
inc dword [edi + 0x3c]
mov ecx, ebx
call fcn.004b4810
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x4b4eb6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
jg 0x4b4e70
call eax
jmp 0x4b4e7a
call eax
movzx eax, ax
or eax, 0x80070000
mov edx, esi
mov dword [esi + 0x20], eax
mov ecx, ebx
call fcn.004b4810
inc dword [edi + 0x3c]
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
test dword [edi + 0x2c], 0x80000
je 0x4b4f25
push dword [esi + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi + 0x160], 0
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [esi + 0x3c], ebp
inc dword [edi + 0x3c]
test dword [edi + 0x2c], 0x80000
je 0x4b4f25
cmp dword [esi + 0x164], 0xffffffff
lea eax, [esi + 0x164]
jne 0x4b4f25
push 4
push 0xffffffffffffffff
push esi
push 0x4b4cb0
push dword [esi + 0x160]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
test eax, eax
jne 0x4b4f25
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jg 0x4b4f0f
call edi
mov edx, esi
mov dword [esi + 0x20], eax
mov ecx, ebx
call fcn.004b4810
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
call edi
movzx eax, ax
mov edx, esi
or eax, 0x80070000
mov ecx, ebx
mov dword [esi + 0x20], eax
call fcn.004b4810
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret