Function at 0x689290
Capabilities:
Connect socket
Get socket status
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x78ca90]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x38], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00689890
add esp, 4
push 0
push 0x20
push 0
lea eax, [ebp - 0x58]
push eax
call fcn.00401ca0
add esp, 0x10
mov dword [ebp - 0x58], 4
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x54], 0
mov ecx, dword [ebp + 0x10]
push ecx
push 0x77ffdc
lea edx, [ebp - 0x28]
push edx
call fcn.005d3f03
add esp, 0xc
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
lea ecx, [ebp - 0x38]
push ecx
lea edx, [ebp - 0x58]
push edx
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x68934e
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.00672480
add esp, 4
xor eax, eax
jmp 0x68969b
cmp dword [ebp + 0x14], 0
je 0x68935e
mov edx, dword [ebp + 8]
mov dword [edx + 0xc], 1
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x2c], eax
jmp 0x68936f
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x1c]
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 0x2c], 0
je 0x689633
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 4], 0
jge 0x6893b8
call fcn.006897f0
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp + 8]
push edx
call fcn.00689ab0
add esp, 4
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x18]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jge 0x689403
cmp dword [ebp + 0x14], 0
jne 0x689403
call fcn.006897f0
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x689366
cmp dword [ebp - 0x34], 0
jge 0x68962c
cmp dword [ebp + 0x14], 0
je 0x68962c
call fcn.006897f0
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x60], 0
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x5c]
mov dword [edx + 8], eax
cmp dword [ebp - 0x5c], 0x2734
je 0x689445
cmp dword [ebp - 0x5c], 0x2733
jne 0x68961d
mov dword [ebp - 0x170], 0
mov dword [ebp - 0x188], 0
jmp 0x68946a
mov ecx, dword [ebp - 0x188]
add ecx, 1
mov dword [ebp - 0x188], ecx
mov edx, dword [ebp - 0x188]
cmp edx, dword [ebp - 0x170]
jae 0x689491
mov eax, dword [ebp - 0x188]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + eax*4 - 0x16c]
cmp edx, dword [ecx + 4]
jne 0x68948f
jmp 0x689491
jmp 0x68945b
mov eax, dword [ebp - 0x188]
cmp eax, dword [ebp - 0x170]
jne 0x6894ca
cmp dword [ebp - 0x170], 0x40
jae 0x6894ca
mov ecx, dword [ebp - 0x188]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp + ecx*4 - 0x16c], eax
mov ecx, dword [ebp - 0x170]
add ecx, 1
mov dword [ebp - 0x170], ecx
xor edx, edx
jne 0x68944f
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x180], eax
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x17c], edx
push 0
call fcn.006896b0
add esp, 4
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x174], 0
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x184], eax
mov edx, 1
test edx, edx
je 0x6895d0
lea eax, [ebp - 0x180]
push eax
push 0
lea ecx, [ebp - 0x170]
push ecx
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
add eax, 1
push eax
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x178], eax
cmp dword [ebp - 0x178], 0
jge 0x6895c9
call fcn.006897f0
cmp eax, 0x2714
jne 0x6895ba
push 0
call fcn.006896b0
add esp, 4
sub eax, dword [ebp - 0x68]
sbb edx, dword [ebp - 0x64]
mov dword [ebp - 0x174], eax
mov ecx, dword [ebp - 0x174]
cmp ecx, dword [ebp - 0x184]
jg 0x6895ac
mov edx, dword [ebp - 0x184]
sub edx, dword [ebp - 0x174]
mov dword [ebp - 0x180], edx
mov dword [ebp - 0x17c], 0
jmp 0x68951b
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0x274c
jmp 0x6895d0
call fcn.006897f0
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x6895d0
jmp 0x6895d0
cmp dword [ebp - 0x178], 0
jl 0x68961d
cmp dword [ebp - 0x178], 0
jne 0x6895ee
mov edx, dword [ebp + 8]
mov dword [edx + 8], 0x274c
jmp 0x68961d
lea eax, [ebp - 0x170]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x68961d
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x34], 0
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
cmp dword [ebp - 0x60], 0
jne 0x68962a
jmp 0x689366
jmp 0x689633
jmp 0x689633
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x30]
mov dword [ecx + 0xc], edx
cmp dword [ebp - 0x34], 0
jge 0x689650
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
xor eax, eax
jmp 0x68969b
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x18]
push ecx
call fcn.006b1930
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x68968c
call fcn.006897f0
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
xor eax, eax
jmp 0x68969b
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov eax, 1
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005cfbcb
mov esp, ebp
pop ebp
ret