Function at 0x45f0c2
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 ebp
mov ebp, esp
sub esp, 0x148
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x24], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0045f54a
add esp, 4
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
mov ecx, dword [ebp + 0xc]
push ecx
call sub.WSOCK32.dll_inet_addr
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jae 0x45f11c
call fcn.0045f4c6
mov edx, dword [ebp + 8]
mov dword [edx + 8], eax
xor eax, eax
jmp 0x45f3d3
push 0x55062c
call sub.WSOCK32.dll_getprotobyname
mov dword [ebp - 0x20], eax
push 0x10
push 0
lea eax, [ebp - 0x18]
push eax
call fcn.00518980
add esp, 0xc
mov cx, word [ebp + 0x10]
push ecx
call sub.WSOCK32.dll_htons
mov word [ebp - 0x16], ax
mov word [ebp - 0x18], 2
push 4
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x14]
push eax
call fcn.00518610
add esp, 0xc
mov ecx, dword [ebp - 0x20]
movsx edx, word [ecx + 8]
push edx
push 1
push 2
call sub.WSOCK32.dll_socket
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 4], 0
jge 0x45f191
call fcn.0045f4c6
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
xor eax, eax
jmp 0x45f3d3
cmp dword [ebp + 0x14], 0
je 0x45f1a1
mov edx, dword [ebp + 8]
mov dword [edx + 0xc], 1
mov eax, dword [ebp + 8]
push eax
call fcn.0045f70c
add esp, 4
push 0x10
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call sub.WSOCK32.dll_connect
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jge 0x45f1e9
cmp dword [ebp + 0x14], 0
jne 0x45f1e9
call fcn.0045f4c6
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0xc], ecx
xor eax, eax
jmp 0x45f3d3
cmp dword [ebp - 4], 0
jge 0x45f39b
cmp dword [ebp + 0x14], 0
je 0x45f39b
call fcn.0045f4c6
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], 0
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x2c]
mov dword [edx + 8], eax
cmp dword [ebp - 0x2c], 0x2734
je 0x45f22b
cmp dword [ebp - 0x2c], 0x2733
jne 0x45f388
mov dword [ebp - 0x134], 0
cmp dword [ebp - 0x134], 0x40
jae 0x45f260
mov ecx, dword [ebp - 0x134]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp + ecx*4 - 0x130], eax
mov ecx, dword [ebp - 0x134]
add ecx, 1
mov dword [ebp - 0x134], ecx
xor edx, edx
test edx, edx
jne 0x45f235
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x144], eax
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x140], edx
push 0
call fcn.005256d7
add esp, 4
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x30], 0
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x13c], eax
mov edx, 1
test edx, edx
je 0x45f34c
lea eax, [ebp - 0x144]
push eax
push 0
lea ecx, [ebp - 0x134]
push ecx
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
add eax, 1
push eax
call sub.WSOCK32.dll_select
mov dword [ebp - 0x138], eax
cmp dword [ebp - 0x138], 0
jge 0x45f34c
call fcn.0045f4c6
cmp eax, 0x2714
jne 0x45f341
push 0
call fcn.005256d7
add esp, 4
sub eax, dword [ebp - 0x148]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
cmp ecx, dword [ebp - 0x13c]
jg 0x45f335
mov edx, dword [ebp - 0x13c]
sub edx, dword [ebp - 0x30]
mov dword [ebp - 0x144], edx
mov dword [ebp - 0x140], 0
jmp 0x45f2b0
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0x274c
jmp 0x45f34c
call fcn.0045f4c6
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
cmp dword [ebp - 0x138], 0
jl 0x45f388
cmp dword [ebp - 0x138], 0
jne 0x45f36a
mov edx, dword [ebp + 8]
mov dword [edx + 8], 0x274c
jmp 0x45f388
lea eax, [ebp - 0x134]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x45f388
mov dword [ebp - 0x28], 1
cmp dword [ebp - 0x28], 0
jne 0x45f39b
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0xc], ecx
xor eax, eax
jmp 0x45f3d3
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x1c]
mov dword [edx + 0xc], eax
push 0x10
lea ecx, [ebp - 0x18]
push ecx
call fcn.00473e39
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x45f3ce
call fcn.0045f4c6
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
xor eax, eax
jmp 0x45f3d3
mov eax, 1
mov esp, ebp
pop ebp
ret