Function at 0x48977c
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Set socket configuration

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffecc
mov ebp, ecx
mov edi, edx
mov ebx, eax
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov esi, eax
mov dword [ebx + 4], esi
inc esi
jne 0x4897e4
push 2
mov dword [esp + 0x12c], 0x7d1
mov dword [esp + 0x130], 1
mov eax, dword [0x4a0168]
mov eax, dword [eax]
call fcn.00481464
mov dword [esp + 0x134], eax
lea ecx, [esp + 0x12c]
mov edx, 2
mov eax, ebx
call fcn.00489adc
mov esi, eax
jmp 0x489a20
mov word [esp + 0x14], 2
mov eax, dword [0x4a017c]
mov eax, dword [eax]
mov edx, edi
call fcn.004848a8
mov dword [esp + 0x18], eax
push ebp
call sub.wsock32.dll_htons
mov word [esp + 0x16], ax
mov dword [esp + 8], 1
lea eax, [esp + 8]
push eax
push 0x8004667e
mov eax, dword [ebx + 4]
push eax
call sub.wsock32.dll_ioctlsocket
push 0x10
lea eax, [esp + 0x18]
push eax
mov eax, dword [ebx + 4]
push eax
call sub.wsock32.dll_connect
test eax, eax
je 0x4899c2
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
xor eax, eax
mov dword [esp + 4], eax
lea edx, [esp + 0x24]
mov eax, dword [0x4a017c]
mov eax, dword [eax]
call fcn.004846e0
lea ecx, [esp + 0x24]
mov eax, dword [0x4a017c]
mov eax, dword [eax]
mov edx, dword [ebx + 4]
call fcn.004846d4
mov dword [esp + 0x10], 4
push esp
push 0
lea eax, [esp + 0x2c]
push eax
push 0
mov eax, dword [ebx + 4]
inc eax
push eax
call sub.wsock32.dll_select
test eax, eax
jg 0x4898de
push 2
mov dword [esp + 0x12c], 0x7d1
mov dword [esp + 0x130], 2
mov eax, dword [0x4a0168]
mov eax, dword [eax]
call fcn.00481464
mov dword [esp + 0x134], eax
lea ecx, [esp + 0x12c]
mov edx, 2
mov eax, ebx
call fcn.00489adc
mov esi, eax
mov eax, dword [0x4a017c]
mov eax, dword [eax]
mov edx, dword [ebx + 4]
call fcn.004846c0
jmp 0x489a20
lea ecx, [esp + 0x24]
mov eax, dword [0x4a017c]
mov eax, dword [eax]
mov edx, dword [ebx + 4]
call fcn.004846c8
test al, al
jne 0x489949
push 2
mov dword [esp + 0x12c], 0x7d1
mov dword [esp + 0x130], 2
mov eax, dword [0x4a0168]
mov eax, dword [eax]
call fcn.00481464
mov dword [esp + 0x134], eax
lea ecx, [esp + 0x12c]
mov edx, 2
mov eax, ebx
call fcn.00489adc
mov esi, eax
mov eax, dword [0x4a017c]
mov eax, dword [eax]
mov edx, dword [ebx + 4]
call fcn.004846c0
jmp 0x489a20
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x10]
push eax
push 0x1007
push 0xffff
mov eax, dword [ebx + 4]
push eax
call sub.wsock32.dll_getsockopt
test eax, eax
jne 0x489971
cmp dword [esp + 0xc], 0
je 0x4899c2
push 2
mov dword [esp + 0x12c], 0x7d1
mov dword [esp + 0x130], 2
mov eax, dword [0x4a0168]
mov eax, dword [eax]
call fcn.00481464
mov dword [esp + 0x134], eax
lea ecx, [esp + 0x12c]
mov edx, 2
mov eax, ebx
call fcn.00489adc
mov esi, eax
mov eax, dword [0x4a017c]
mov eax, dword [eax]
mov edx, dword [ebx + 4]
call fcn.004846c0
jmp 0x489a20
xor eax, eax
mov dword [esp + 8], eax
lea eax, [esp + 8]
push eax
push 0x8004667e
mov eax, dword [ebx + 4]
push eax
call sub.wsock32.dll_ioctlsocket
mov eax, dword [0x4a017c]
mov eax, dword [eax]
mov ecx, 1
mov edx, dword [ebx + 4]
call fcn.00484888
mov eax, dword [0x4a017c]
mov eax, dword [eax]
mov ecx, 0x40000
mov edx, dword [ebx + 4]
call fcn.00484860
mov eax, dword [0x4a017c]
mov eax, dword [eax]
mov ecx, 0x40000
mov edx, dword [ebx + 4]
call fcn.00484838
mov eax, ebx
call fcn.00489130
mov esi, eax
mov eax, esi
add esp, 0x134
pop ebp
pop edi
pop esi
pop ebx
ret