Function at 0x4f3ea0
Capabilities:
Connect socket
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
push esi
push edi
lea edi, [ebp - 0x268]
mov ecx, 0x9a
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 0xffffffff
je 0x4f3ecf
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x10], 0
jne 0x4f3ed9
mov eax, 0x975ef
jmp 0x4f428b
mov esi, esp
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x28
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp esi, esp
call fcn.0052354c
cmp eax, 0xffffffff
jne 0x4f4239
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.0052354c
test eax, eax
jne 0x4f3f25
mov dword [ebp - 0x254], 0
jmp 0x4f3f3f
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.0052354c
add eax, 0xafc80
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x254]
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0xb23b3
je 0x4f3f59
mov eax, dword [ebp - 4]
jmp 0x4f428b
mov edx, dword [ebp + 8]
mov dword [ebp - 0x258], edx
mov eax, dword [ebp - 0x258]
mov ecx, dword [ebp - 0x258]
mov edx, dword [eax + 0x20]
or edx, dword [ecx + 0x24]
jne 0x4f3f80
mov eax, 0xb23b4
jmp 0x4f428b
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x240], 0
jmp 0x4f3fa5
mov eax, dword [ebp - 0x240]
add eax, 1
mov dword [ebp - 0x240], eax
mov ecx, dword [ebp - 0x240]
cmp ecx, dword [ebp - 0x12c]
jae 0x4f3fcc
mov edx, dword [ebp - 0x240]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + edx*4 - 0x128]
cmp ecx, dword [eax + 4]
jne 0x4f3fca
jmp 0x4f3fcc
jmp 0x4f3f96
mov edx, dword [ebp - 0x240]
cmp edx, dword [ebp - 0x12c]
jne 0x4f4005
cmp dword [ebp - 0x12c], 0x40
jae 0x4f4005
mov eax, dword [ebp - 0x240]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
mov dword [ebp + eax*4 - 0x128], edx
mov eax, dword [ebp - 0x12c]
add eax, 1
mov dword [ebp - 0x12c], eax
xor ecx, ecx
jne 0x4f3f8a
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x244], 0
jmp 0x4f402e
mov edx, dword [ebp - 0x244]
add edx, 1
mov dword [ebp - 0x244], edx
mov eax, dword [ebp - 0x244]
cmp eax, dword [ebp - 0x238]
jae 0x4f4055
mov ecx, dword [ebp - 0x244]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + ecx*4 - 0x234]
cmp eax, dword [edx + 4]
jne 0x4f4053
jmp 0x4f4055
jmp 0x4f401f
mov ecx, dword [ebp - 0x244]
cmp ecx, dword [ebp - 0x238]
jne 0x4f408e
cmp dword [ebp - 0x238], 0x40
jae 0x4f408e
mov edx, dword [ebp - 0x244]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov dword [ebp + edx*4 - 0x234], ecx
mov edx, dword [ebp - 0x238]
add edx, 1
mov dword [ebp - 0x238], edx
xor eax, eax
jne 0x4f4013
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
mov edx, dword [ebp - 0x25c]
cmp dword [edx + 0x24], 0
jg 0x4f40be
jl 0x4f40b5
mov eax, dword [ebp - 0x25c]
cmp dword [eax + 0x20], 0
jae 0x4f40be
mov dword [ebp - 0x24], 0
jmp 0x4f40f8
mov ecx, dword [ebp + 8]
push 0
push 0xf4240
mov edx, dword [ecx + 0x24]
push edx
mov eax, dword [ecx + 0x20]
push eax
call fcn.005252e0
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 8]
push 0
push 0xf4240
mov edx, dword [ecx + 0x24]
push edx
mov eax, dword [ecx + 0x20]
push eax
call fcn.00526990
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x24], ecx
mov esi, esp
mov edx, dword [ebp - 0x24]
push edx
lea eax, [ebp - 0x238]
push eax
lea ecx, [ebp - 0x12c]
push ecx
push 0
push 0x41
call dword [sym.imp.WS2_32.dll_select]
cmp esi, esp
call fcn.0052354c
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x4f416c
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.0052354c
test eax, eax
jne 0x4f4145
mov dword [ebp - 0x260], 0
jmp 0x4f415f
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.0052354c
add eax, 0xafc80
mov dword [ebp - 0x260], eax
mov eax, dword [ebp - 0x260]
jmp 0x4f428b
cmp dword [ebp - 0xc], 0
jne 0x4f417c
mov eax, 0xb23cc
jmp 0x4f428b
lea edx, [ebp - 0x238]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4f4239
mov dword [ebp - 0x24c], 4
mov esi, esp
lea edx, [ebp - 0x24c]
push edx
lea eax, [ebp - 0xc]
push eax
push 0x1007
push 0xffff
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_getsockopt]
cmp esi, esp
call fcn.0052354c
test eax, eax
je 0x4f4211
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.0052354c
test eax, eax
jne 0x4f41ef
mov dword [ebp - 0x264], 0
jmp 0x4f4209
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.0052354c
add eax, 0xafc80
mov dword [ebp - 0x264], eax
mov eax, dword [ebp - 0x264]
jmp 0x4f428b
cmp dword [ebp - 0xc], 0
jne 0x4f4223
mov dword [ebp - 0x268], 0
jmp 0x4f4231
mov eax, dword [ebp - 0xc]
add eax, 0xafc80
mov dword [ebp - 0x268], eax
mov eax, dword [ebp - 0x268]
jmp 0x4f428b
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 0x14], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
movzx edx, word [ecx + 0x2a]
test edx, edx
jne 0x4f425a
mov eax, dword [ebp + 8]
mov dword [eax + 0x2c], 1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x18]
push eax
push 0x5a59a8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x20]
push eax
call fcn.00523c5a
add esp, 0xc
test eax, eax
jne 0x4f4289
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x30], 1
xor eax, eax
push edx
mov ecx, ebp
push eax
lea edx, [0x4f42b4]
call fcn.0052356f
pop eax
pop edx
pop edi
pop esi
add esp, 0x268
cmp ebp, esp
call fcn.0052354c
mov esp, ebp
pop ebp
ret 8