Function at 0x52f030
Capabilities:
Connect socket

Disassembly:
sub esp, 0xcc
mov eax, dword [esp + 0xd8]
push ebx
push ebp
push esi
mov esi, dword [esp + 0xdc]
push edi
lea ecx, [esp + 0x10]
lea edx, [esp + 0x4c]
mov edi, dword [esi]
mov dword [eax], 0xffffffff
mov eax, dword [esp + 0xe4]
push ecx
push edx
xor ebp, ebp
push eax
push esi
mov dword [esp + 0x24], ebp
call fcn.0052fa30
mov ebx, eax
add esp, 0x10
cmp ebx, ebp
jne 0x52f2f0
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
lea eax, [esp + 0x60]
push edx
push eax
call fcn.0052ea10
add esp, 0xc
test eax, eax
jne 0x52f0cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
push esi
call fcn.005311d0
push eax
push ebx
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push edi
call fcn.0052bb20
mov ecx, dword [esp + 0x28]
push ecx
push esi
call fcn.0052f9d0
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xcc
ret
lea edx, [esp + 0x1c]
push edx
push str.__Trying__s..._n
push edi
call fcn.0052bab0
mov eax, dword [esp + 0x58]
add esp, 0xc
cmp eax, 2
jne 0x52f10d
cmp dword [esp + 0x50], 1
jne 0x52f10d
mov eax, dword [edi + 0x3e4]
mov ebp, 1
test eax, eax
je 0x52f10d
mov eax, dword [esp + 0x10]
push eax
push esi
call fcn.0052ef20
add esp, 8
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0052ef80
add esp, 4
test ebp, ebp
je 0x52f136
mov eax, dword [edi + 0x520]
test eax, eax
je 0x52f136
mov edx, dword [esp + 0x10]
push edx
push edi
call fcn.0052f300
add esp, 8
mov eax, dword [edi + 0x1a8]
test eax, eax
je 0x52f160
mov ecx, dword [esp + 0x10]
mov edx, dword [edi + 0x1ac]
push 0
push ecx
push edx
call eax
add esp, 0xc
cmp eax, 2
jne 0x52f1b2
mov dword [esp + 0x14], 1
cmp dword [esp + 0x4c], 2
jne 0x52f1d4
lea ecx, [esp + 0x5c]
push ecx
call fcn.0054e6e0
mov edx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x18]
push edx
push eax
push esi
call fcn.0052f3e0
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x52f1d4
mov ecx, dword [esp + 0x10]
push ecx
push esi
call fcn.0052f9d0
add esp, 8
cmp ebx, 1
jne 0x52f2d6
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0xcc
ret
test eax, eax
je 0x52f160
mov eax, dword [esp + 0x10]
push eax
push esi
call fcn.0052f9d0
add esp, 8
mov eax, 0x2a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xcc
ret
mov edx, dword [esp + 0x10]
mov ebp, 1
push ebp
push edx
call fcn.0054e6b0
add esp, 8
call fcn.0052c590
mov dword [esi + 0x2f8], eax
mov eax, dword [esi + 0x300]
cmp eax, ebp
mov dword [esi + 0x2fc], edx
jle 0x52f212
mov eax, dword [esi + 0x304]
push eax
push edi
call fcn.0052b860
add esp, 8
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x52f2e3
cmp dword [esi + 0x8c], ebp
jne 0x52f2e3
mov eax, dword [esi + 0x2e0]
test eax, eax
jne 0x52f24e
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x5c]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x52f2c5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0xb
je 0x52f2a9
cmp ebx, 0x2732
jle 0x52f26b
cmp ebx, 0x2734
jle 0x52f2a9
push ebx
push esi
call fcn.005311d0
lea ecx, [esp + 0x24]
push eax
push ecx
push str.Immediate_connect_fail_for__s:__s_n
push edi
call fcn.0052bab0
mov dword [edi + 0x4724], ebx
mov edx, dword [esp + 0x28]
push edx
push esi
call fcn.0052f9d0
add esp, 0x20
mov ebx, 7
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xcc
ret
mov ecx, dword [esp + 0xe8]
mov eax, dword [esp + 0x10]
xor ebx, ebx
pop edi
mov dword [ecx], eax
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0xcc
ret
test ebx, ebx
jne 0x52f2d6
mov ecx, dword [esp + 0xe8]
mov eax, dword [esp + 0x10]
mov dword [ecx], eax
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0xcc
ret
mov eax, dword [esp + 0xe8]
mov edx, dword [esp + 0x10]
mov dword [eax], edx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xcc
ret