Function at 0x45d2fb
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x270
xor ecx, ecx
push ebx
mov ebx, ecx
cmp dword [esp + 0x278], ecx
je 0x45d6e3
mov eax, dword [esp + 0x280]
push ebp
push edi
push 2
pop ebp
push 0x17
pop edx
test eax, 0x10000000
je 0x45d33d
mov edi, edx
and eax, 0xefffffff
mov dword [esp + 0x14], edi
mov dword [esp + 0x288], eax
jmp 0x45d343
mov edi, ebp
mov dword [esp + 0x14], ebp
test eax, eax
jne 0x45d34f
inc eax
mov dword [esp + 0x288], eax
push ecx
push eax
push edi
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x45d6e1
push esi
push dword [esp + 0x284]
call fcn.0049b6d0
push 0x17
pop ecx
mov esi, eax
mov dword [esp + 0x20], esi
cmp edi, ecx
jne 0x45d3e5
cmp dword [0x6d76c4], ebx
je 0x45d6cc
lea eax, [esp + 0x68]
push eax
push esi
push ecx
call fcn.0045d911
add esp, 0xc
test eax, eax
jg 0x45d3db
lea eax, [esp + 0x1c]
push eax
xor eax, eax
push eax
push eax
push esi
call dword [0x6d76cc]
test eax, eax
jne 0x45d6cc
mov eax, dword [esp + 0x1c]
lea edi, [esp + 0x68]
push eax
mov esi, dword [eax + 0x18]
add esi, 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [0x6d76d0]
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x10], eax
jmp 0x45d426
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
jmp 0x45d426
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov ecx, eax
mov dword [esp + 0x10], ecx
cmp ecx, 0xffffffff
jne 0x45d416
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x45d412
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
jmp 0x45d416
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp ecx, 0xffffffff
setne al
test eax, eax
je 0x45d6cc
mov esi, dword [esp + 0x294]
cmp dword [esp + 0x298], ebx
jne 0x45d443
xor eax, eax
test esi, esi
je 0x45d4b8
cmp word [esi], ax
je 0x45d4b8
jmp 0x45d445
xor eax, eax
push 0x10
push eax
lea eax, [esp + 0x44]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
mov word [esp + 0x3c], ax
cmp dword [esp + 0x298], ebx
je 0x45d478
push dword [esp + 0x298]
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x3e], ax
xor eax, eax
test esi, esi
je 0x45d49e
cmp word [esi], ax
je 0x45d49e
push esi
call fcn.0049b890
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
push esi
mov dword [esp + 0x44], eax
call fcn.0049b880
jmp 0x45d4a2
mov dword [esp + 0x40], eax
push 0x10
lea eax, [esp + 0x40]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x45d6cc
push 0x17
pop esi
cmp edi, esi
jne 0x45d4fb
push 0x1c
push eax
lea eax, [esp + 0x54]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov word [esp + 0x4c], si
push dword [esp + 0x288]
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x4e], ax
lea esi, [esp + 0x68]
lea edi, [esp + 0x54]
movsd dword es:[edi], dword [esi]
push 0x17
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x1c]
pop esi
jmp 0x45d52d
push 0x10
push eax
lea eax, [esp + 0x2c]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
push dword [esp + 0x288]
mov word [esp + 0x28], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x28], eax
xor eax, eax
inc eax
cmp dword [esp + 0x28c], eax
jne 0x45d66a
mov esi, dword [esp + 0x290]
test esi, esi
jle 0x45d616
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x45d6cc
push 0x17
pop ecx
cmp edi, ecx
jne 0x45d578
push 0x1c
lea eax, [esp + 0x50]
jmp 0x45d57e
push 0x10
lea eax, [esp + 0x28]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x45d6cc
mov eax, esi
mov dword [esp + 0x7c], ebp
cdq
mov ecx, 0x3e8
idiv ecx
xor edi, edi
mov dword [esp + 0x180], ebp
mov dword [esp + 0x34], eax
inc edi
imul eax, eax, 0x3e8
mov dword [esp + 0x78], edi
mov dword [esp + 0x17c], edi
sub esi, eax
imul eax, esi, 0x3e8
xor esi, esi
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x180]
push eax
lea eax, [esp + 0x80]
push eax
push esi
lea eax, [ebp + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, edi
jne 0x45d5ff
lea eax, [esp + 0x78]
push eax
push ebp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x45d5ff
mov ebx, edi
lea eax, [esp + 0x14]
mov dword [esp + 0x14], esi
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WS2_32.dll_ioctlsocket]
jmp 0x45d643
push 0x17
pop ecx
cmp edi, ecx
jne 0x45d625
push 0x1c
lea eax, [esp + 0x50]
jmp 0x45d62b
push 0x10
lea eax, [esp + 0x28]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x45d6cc
xor edi, edi
inc edi
xor esi, esi
mov ebx, edi
test ebx, ebx
je 0x45d6cc
push 0x10
push esi
push dword [0x6d6de4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x45d6cc
mov dword [ebx], edi
mov dword [ebx + 8], ebp
mov dword [ebx + 0xc], esi
jmp 0x45d6cc
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x45d6cc
push 0x38
push eax
push dword [0x6d6de4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x45d6cc
push 2
pop eax
cmp edi, esi
mov dword [ebx], eax
lea edi, [ebx + 4]
jne 0x45d6af
push 7
pop ecx
lea esi, [esp + 0x4c]
rep movsd dword es:[edi], dword [esi]
jmp 0x45d6b7
lea esi, [esp + 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0x17
pop ecx
cmp dword [esp + 0x18], ecx
mov dword [ebx + 0x28], ebp
sete al
mov byte [ebx + 0x20], al
xor eax, eax
mov dword [ebx + 0x24], eax
push dword [esp + 0x20]
call fcn.0049b6c0
pop esi
test ebx, ebx
jne 0x45d6e1
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x270
ret 0x18