Function at 0x45c320
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x1c
push ebx
push ebp
mov ebp, ecx
push esi
mov ecx, dword [esp + 0x30]
xor esi, esi
cmp ecx, esi
push edi
je 0x45c60c
cmp dword [esp + 0x38], esi
je 0x45c60c
mov eax, dword [ebp + 4]
cmp eax, 0xffffffff
je 0x45c412
push eax
call sub.wsock32.dll_closesocket
mov edi, 0x7c4d88
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp + 4], esi
mov dword [ebp + 8], esi
lea ebx, [ebp + 0xc]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov edi, ecx
mov ecx, ebx
push edi
mov dword [esp + 0x1c], edi
call fcn.00401450
test al, al
je 0x45c3a3
mov ecx, edi
mov edi, dword [ebx + 4]
mov eax, ecx
mov esi, 0x7c4d88
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov dword [ebx + 8], eax
xor esi, esi
mov byte [ecx + eax], 0
mov edx, dword [ebp + 0x4003c]
mov dword [ebp + 0x1c], esi
push edx
mov dword [ebp + 0x40020], esi
mov dword [ebp + 0x40094], 1
mov dword [ebp + 0x40038], esi
call fcn.00726ea6
add esp, 4
mov ecx, 0x8f63f8
mov dword [ebp + 0x4003c], esi
call fcn.00737290
push esi
push esi
mov ecx, 0x8f63f8
call fcn.00737250
push 0x12570915
push 0x82190465
mov ecx, 0x8f63f8
call fcn.00737270
mov ecx, dword [esp + 0x34]
mov dword [0x9365b4], esi
mov word [0x9365b8], si
mov dword [0x9365b0], esi
mov al, byte [ecx]
cmp al, 0x30
jl 0x45c450
cmp al, 0x39
jg 0x45c450
xor eax, eax
push ecx
mov dword [esp + 0x20], eax
mov word [esp + 0x20], 2
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
call sub.wsock32.dll_inet_addr
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x20], eax
push ecx
call sub.wsock32.dll_htons
mov word [esp + 0x1e], ax
jmp 0x45c4a5
push ecx
call sub.wsock32.dll_gethostbyname
cmp eax, esi
je 0x45c60c
xor edx, edx
lea edi, [esp + 0x20]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov edx, dword [eax + 0xc]
movsx ecx, word [eax + 0xa]
mov esi, dword [edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x38]
mov ax, word [eax + 8]
push ecx
mov word [esp + 0x20], ax
call sub.wsock32.dll_htons
mov word [esp + 0x1e], ax
xor esi, esi
push esi
push 1
push 2
call sub.wsock32.dll_socket
cmp eax, 1
mov dword [ebp + 4], eax
jae 0x45c4c6
call sub.wsock32.dll_WSAGetLastError
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
lea edx, [esp + 0x18]
push 4
push edx
push 0x1002
push 0xffff
push eax
mov dword [esp + 0x2c], 0x40000
call sub.wsock32.dll_setsockopt
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x10]
push 4
push eax
push 0x80
push 0xffff
push ecx
mov word [esp + 0x24], 1
mov word [esp + 0x26], si
call sub.wsock32.dll_setsockopt
mov eax, dword [ebp + 4]
lea edx, [esp + 0x1c]
push 0x10
push edx
push eax
call sub.wsock32.dll_connect
test eax, eax
je 0x45c542
call sub.wsock32.dll_WSAGetLastError
mov ecx, dword [ebp + 4]
mov esi, eax
push ecx
call sub.wsock32.dll_closesocket
mov eax, esi
pop edi
mov dword [ebp + 4], 0xffffffff
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
mov esi, dword [esp + 0x30]
mov edx, dword [ebp + 4]
push 0x31
push 0x401
push esi
push edx
call sub.wsock32.dll_WSAAsyncSelect
mov dword [ebp + 8], esi
mov esi, dword [esp + 0x34]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
lea ebx, [ebp + 0xc]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
cmp edi, 0xfffffffd
mov dword [esp + 0x34], edi
jbe 0x45c57d
call fcn.007373b0
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x45c5a2
mov al, byte [ecx - 1]
test al, al
je 0x45c5a2
cmp al, 0xff
je 0x45c5a2
test edi, edi
jne 0x45c5c6
dec al
push edi
mov byte [ecx - 1], al
mov ecx, ebx
call fcn.00404760
jmp 0x45c5ef
test edi, edi
jne 0x45c5b1
push 1
mov ecx, ebx
call fcn.00404760
jmp 0x45c5ef
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x45c5bd
cmp eax, edi
jae 0x45c5ce
push 1
mov ecx, ebx
call fcn.00404760
push edi
mov ecx, ebx
call fcn.00401570
mov ecx, edi
mov edi, dword [ebx + 4]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x34]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov dword [ebx + 8], eax
mov byte [ecx + eax], 0
mov edx, dword [esp + 0x38]
pop edi
mov dword [ebp + 0x1c], edx
mov dword [ebp + 0x40020], 1
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret 0xc
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret 0xc