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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0
push 1
mov eax, dword [esi + 0x2c]
mov ebx, dword [esi + 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 edi, eax
mov dword [ebp + 8], edi
cmp edi, 0xffffffff
jne 0x487dab
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
test eax, eax
jg 0x487d64
call edi
jmp 0x487d6e
call edi
movzx eax, ax
or eax, 0x80070000
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x20], eax
mov dword [ecx + 0x38], 0
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x487d9b
mov eax, dword [eax + 0x38]
mov dword [ecx + 0x38], eax
mov eax, dword [ebx + 0x28]
pop edi
mov dword [eax + 0x38], ecx
mov dword [ebx + 0x28], ecx
inc dword [esi + 0x3c]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ecx + 0x38], ecx
mov dword [ebx + 0x28], ecx
inc dword [esi + 0x3c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 1
push edi
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
jne 0x487e22
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
jg 0x487dcd
call eax
jmp 0x487dd7
call eax
movzx eax, ax
or eax, 0x80070000
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x20], eax
mov dword [ecx + 0x38], 0
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x487e0b
mov eax, dword [eax + 0x38]
mov dword [ecx + 0x38], eax
mov eax, dword [ebx + 0x28]
push edi
mov dword [eax + 0x38], ecx
mov dword [ebx + 0x28], ecx
inc dword [esi + 0x3c]
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ecx + 0x38], ecx
mov dword [ebx + 0x28], ecx
inc dword [esi + 0x3c]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
xorps xmm0, xmm0
lea ecx, [edi + 0x20]
movups xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
test dword [esi + 0x2c], 0x80000
je 0x487e4a
mov eax, dword [edi + 0x160]
or eax, 1
mov dword [edi + 0x30], eax
push ecx
lea eax, [ebp - 4]
push eax
push 0x80
push 0x80
push 0
lea eax, [edi + 0x40]
push eax
push dword [ebp + 8]
mov eax, dword [esi + 0xa4]
push dword [esi + 0x90]
call eax
test eax, eax
je 0x487e9b
test dword [esi + 0x2c], 0x20000
je 0x487f08
mov eax, dword [ebp + 8]
push edi
mov dword [edi + 0x3c], eax
inc dword [esi + 0x3c]
push ebx
call fcn.004855a0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x487f08
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
jg 0x487ebb
call eax
jmp 0x487ec5
call eax
movzx eax, ax
or eax, 0x80070000
push edi
push ebx
mov dword [edi + 0x20], eax
call fcn.004855a0
inc dword [esi + 0x3c]
add esp, 8
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_closesocket]
test dword [esi + 0x2c], 0x80000
je 0x487f7d
push dword [edi + 0x160]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x160], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
mov dword [edi + 0x3c], eax
inc dword [esi + 0x3c]
test dword [esi + 0x2c], 0x80000
je 0x487f7d
cmp dword [edi + 0x164], 0xffffffff
lea eax, [edi + 0x164]
jne 0x487f7d
push 4
push 0xffffffffffffffff
push edi
push 0x484a80
push dword [edi + 0x160]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
test eax, eax
jne 0x487f7d
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x487f66
call esi
push edi
push ebx
mov dword [edi + 0x20], eax
call fcn.004855a0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call esi
movzx eax, ax
or eax, 0x80070000
push edi
push ebx
mov dword [edi + 0x20], eax
call fcn.004855a0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret