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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x20], ebx
mov esi, ecx
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x497b93
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
push 0
push 0
push 0
push 1
push 2
call sub.ws2_32.dll_WSASocketA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x497954
lea eax, [ebp - 0x20]
push eax
call sub.ws2_32.dll_WSAGetLastError
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x24], 0
lea edx, [ebp - 0x28]
xor ecx, ecx
mov eax, 0x497bac
call fcn.0040e844
mov edx, dword [ebp - 0x20]
mov eax, ebx
call fcn.004978a8
mov eax, dword [ebx + 0x20]
push eax
call sub.kernel32.dll_CloseHandle
mov dword [ebx + 0x20], 0xffffffff
mov word [ebp - 0x1c], 2
push edi
call sub.ws2_32.dll_htons
mov word [ebp - 0x1a], ax
xor eax, eax
mov dword [ebp - 0x18], eax
push 0x10
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.ws2_32.dll_bind
inc eax
jne 0x4979c6
lea eax, [ebp - 0xc]
call fcn.00480ecc
mov eax, dword [ebx + 0x20]
push eax
call sub.kernel32.dll_CloseHandle
mov dword [ebx + 0x20], 0xffffffff
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x3c], edi
mov byte [ebp - 0x38], 0
call sub.ws2_32.dll_WSAGetLastError
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], 0
lea edx, [ebp - 0x3c]
mov ecx, 1
mov eax, 0x497bd4
call fcn.0040e844
mov edx, dword [ebp - 0x2c]
mov eax, ebx
call fcn.004978a8
lea edx, [esi + esi*2]
lea eax, [ebx + edx*4 + 0x48]
mov ecx, dword [ebp - 0xc]
mov dword [ebx + edx*4 + 0x48], ecx
push 0
push eax
mov eax, dword [ebx + 0x20]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CreateIoCompletionPort
test eax, eax
jne 0x497a29
lea eax, [ebp - 0xc]
call fcn.00480ecc
mov eax, dword [ebx + 0x20]
push eax
call sub.kernel32.dll_CloseHandle
mov dword [ebx + 0x20], 0xffffffff
lea eax, [ebp - 0x40]
push eax
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x24], 0
lea edx, [ebp - 0x28]
xor ecx, ecx
mov eax, 0x497c00
call fcn.0040e844
mov edx, dword [ebp - 0x40]
mov eax, ebx
call fcn.004978a8
push 0
push 0
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 4]
push eax
push 0x10
mov eax, dword [0x49d78c]
push eax
push 0xc8000006
mov eax, dword [ebp - 0xc]
push eax
call sub.ws2_32.dll_WSAIoctl
inc eax
jne 0x497a91
lea eax, [ebp - 0xc]
call fcn.00480ecc
mov eax, dword [ebx + 0x20]
push eax
call sub.kernel32.dll_CloseHandle
mov dword [ebx + 0x20], 0xffffffff
lea eax, [ebp - 0x44]
push eax
call sub.ws2_32.dll_WSAGetLastError
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x24], 0
lea edx, [ebp - 0x28]
xor ecx, ecx
mov eax, 0x497c2c
call fcn.0040e844
mov edx, dword [ebp - 0x44]
mov eax, ebx
call fcn.004978a8
mov eax, dword [ebp - 4]
mov dword [ebx + 4], eax
push 0
push 0
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 4]
push eax
push 0x10
mov eax, dword [0x49d7a4]
push eax
push 0xc8000006
mov eax, dword [ebp - 0xc]
push eax
call sub.ws2_32.dll_WSAIoctl
inc eax
jne 0x497aff
lea eax, [ebp - 0xc]
call fcn.00480ecc
mov eax, dword [ebx + 0x20]
push eax
call sub.kernel32.dll_CloseHandle
mov dword [ebx + 0x20], 0xffffffff
lea eax, [ebp - 0x48]
push eax
call sub.ws2_32.dll_WSAGetLastError
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x24], 0
lea edx, [ebp - 0x28]
xor ecx, ecx
mov eax, 0x497c5c
call fcn.0040e844
mov edx, dword [ebp - 0x48]
mov eax, ebx
call fcn.004978a8
mov eax, dword [ebp - 4]
mov dword [ebx + 8], eax
push 0x64
mov eax, dword [ebp - 0xc]
push eax
call sub.ws2_32.dll_listen
inc eax
jne 0x497b54
lea eax, [ebp - 0xc]
call fcn.00480ecc
mov eax, dword [ebx + 0x20]
push eax
call sub.kernel32.dll_CloseHandle
mov dword [ebx + 0x20], 0xffffffff
lea eax, [ebp - 0x4c]
push eax
call sub.ws2_32.dll_WSAGetLastError
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x24], 0
lea edx, [ebp - 0x28]
xor ecx, ecx
mov eax, 0x497c98
call fcn.0040e844
mov edx, dword [ebp - 0x4c]
mov eax, ebx
call fcn.004978a8
mov esi, 0x80
xor ecx, ecx
mov edx, dword [ebp - 0xc]
mov eax, ebx
call fcn.00497d20
dec esi
jne 0x497b59
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x497b9a
lea eax, [ebp - 0x4c]
mov edx, 4
call fcn.00404dd4
lea eax, [ebp - 0x2c]
call fcn.00404db0
lea eax, [ebp - 0x20]
call fcn.00404db0
ret