Function at 0x4aa530
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb0
mov eax, dword [0x530630]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi]
push edi
xor edi, edi
mov dword [ecx], 0xffffffff
mov dword [ebp - 0xac], ecx
lea ecx, [ebp - 0x98]
push ecx
mov dword [ebp - 0xb0], edx
mov dword [edx], edi
lea edx, [ebp - 0x94]
push edx
push eax
push esi
mov dword [ebp - 0x9c], esi
mov dword [ebp - 0xa4], edi
mov dword [ebp - 0xa8], edi
mov dword [ebp - 0xa0], ebx
call fcn.004aa470
add esp, 0x10
test eax, eax
jne 0x4aa920
lea edi, [esi + 0x9e]
lea ebx, [esi + 0xcc]
lea esi, [ebp - 0x84]
call fcn.004aa100
test eax, eax
jne 0x4aa602
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0x9c]
mov esi, eax
push esi
push edi
call fcn.004acfe0
push eax
mov eax, dword [ebp - 0xa0]
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.004a9660
mov ecx, dword [ebp - 0x98]
push ecx
push edi
call fcn.004aa420
add esp, 0x20
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x9c]
lea eax, [ebx + 0x40]
mov esi, edi
mov edi, eax
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0xa0]
push str.__Trying__s..._n
push esi
call fcn.004a95e0
push ebx
call fcn.004aa0a0
mov ebx, dword [ebp - 0x98]
add esp, 0x10
cmp dword [esi + 0x314], 0
je 0x4aa64f
mov edi, dword [ebp - 0x9c]
mov edx, ebx
call fcn.004aa300
push ebx
call fcn.004aa360
add esp, 4
cmp dword [esi + 0x408], 0
je 0x4aa670
mov edi, dword [ebp - 0xa0]
mov esi, ebx
call fcn.004a9aa0
mov esi, edi
mov eax, dword [esi + 0x16c]
test eax, eax
je 0x4aa69e
mov edx, dword [esi + 0x170]
push 0
push ebx
push edx
call eax
add esp, 0xc
mov dword [ebp - 0xa4], eax
cmp eax, 2
jne 0x4aa6df
mov dword [ebp - 0xa8], 1
mov edi, dword [ebp - 0x9c]
mov ecx, dword [ebp - 0x94]
push ebx
push edi
call fcn.004a9c10
add esp, 8
mov dword [ebp - 0x98], eax
test eax, eax
je 0x4aa709
push ebx
push edi
call fcn.004aa420
mov eax, dword [ebp - 0x98]
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x4aa69e
mov eax, dword [ebp - 0x9c]
push ebx
push eax
call fcn.004aa420
add esp, 8
pop edi
pop esi
mov eax, 0x2a
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
push 1
push ebx
call fcn.004c40b0
mov eax, dword [ebp - 0xa8]
add esp, 8
test eax, eax
jne 0x4aa7d8
cmp dword [edi + 0x74], 1
jne 0x4aa7d8
mov ecx, dword [ebp - 0x88]
push ecx
lea edx, [ebp - 0x84]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x98], eax
cmp eax, 0xffffffff
jne 0x4aa758
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xa4], eax
call fcn.004adcc0
cmp dword [edi + 0x20c], 1
mov dword [edi + 0x204], eax
mov dword [edi + 0x208], edx
jle 0x4aa782
mov eax, dword [edi + 0x210]
push eax
push esi
call fcn.004ad4f0
add esp, 8
cmp dword [ebp - 0x98], 0xffffffff
jne 0x4aa892
mov eax, dword [ebp - 0xa4]
cmp eax, 0xb
je 0x4aa853
cmp eax, 0x2732
jle 0x4aa7b0
cmp eax, 0x2734
jle 0x4aa853
push eax
push edi
call fcn.004acfe0
push eax
add edi, 0x40
push edi
push str.Failed_to_connect_to__s:__s
push esi
call fcn.004a9660
mov ecx, dword [ebp - 0xa4]
add esp, 0x18
mov dword [esi + 0x858c], ecx
jmp 0x4aa7e6
mov dword [ebp - 0x98], 0
test eax, eax
jne 0x4aa817
push ebx
lea esi, [ebp - 0xa4]
call fcn.004aa030
mov ecx, dword [ebp - 0x98]
add esp, 4
test ecx, ecx
jne 0x4aa8c7
test eax, eax
je 0x4aa8e2
mov esi, dword [ebp - 0xa0]
mov edi, dword [ebp - 0x9c]
mov ecx, dword [ebp - 0xb0]
push str.connected_n
push esi
mov dword [ecx], 1
call fcn.004a95e0
push ebx
push edi
call fcn.004aa140
mov edx, dword [ebp - 0xac]
add esp, 0x10
pop edi
pop esi
mov dword [edx], ebx
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
push edi
mov edi, ebx
call fcn.004a9b90
add esp, 4
mov dword [ebp - 0x98], eax
cmp eax, 3
jne 0x4aa892
mov edx, dword [ebp - 0x9c]
push ebx
push edx
call fcn.004aa420
add esp, 8
pop edi
pop esi
mov eax, 0x2a
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x98], 1
jne 0x4aa7e6
cmp dword [esi + 0x540], 2
jne 0x4aa7e6
mov eax, dword [ebp - 0xac]
pop edi
mov dword [eax], ebx
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cab85
mov esp, ebp
pop ebp
ret
cmp ecx, 1
jne 0x4aa8e2
mov eax, dword [ebp - 0xa0]
push str.Timeout_n
push eax
call fcn.004a95e0
add esp, 8
jmp 0x4aa910
mov eax, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0x9c]
mov esi, dword [ebp - 0xa0]
push eax
push ecx
mov dword [esi + 0x858c], eax
call fcn.004acfe0
push eax
push 0x50a7e8
push esi
call fcn.004a95e0
add esp, 0x14
mov edx, dword [ebp - 0x9c]
push ebx
push edx
call fcn.004aa420
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004cab85
mov esp, ebp
pop ebp
ret