Function at 0x10022790
Capabilities:
Connect socket

Disassembly:
sub esp, 0x16c
mov eax, dword [0x10076610]
xor eax, esp
mov dword [esp + 0x168], eax
mov eax, dword [esp + 0x174]
push ebp
mov ebp, dword [esp + 0x174]
mov edx, dword [ebp]
mov dword [esp + 8], ecx
mov dword [ecx], 0xffffffff
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x18], edx
lea edx, [esp + 0x30]
push edx
push eax
push ebp
mov dword [esp + 0x1c], 0
call fcn.100225d0
add esp, 0x10
mov dword [esp + 4], eax
test eax, eax
je 0x10022800
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.1004b0b2
add esp, 0x16c
ret
push ebx
push esi
push edi
lea ebx, [esp + 0x24]
lea edi, [esp + 0xc8]
lea esi, [esp + 0x48]
call fcn.100220c0
test eax, eax
jne 0x10022864
call fcn.1004e6a6
mov esi, eax
call fcn.1004e6a6
mov ecx, dword [esi]
mov edi, eax
push 0x80
lea eax, [esp + 0xfc]
push eax
push ecx
call fcn.10012a60
mov edx, dword [edi]
push eax
mov eax, dword [esp + 0x30]
push edx
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.1001bea0
mov ecx, dword [esp + 0x38]
push ecx
push ebp
call fcn.10022550
add esp, 0x24
jmp 0x10022a95
mov esi, dword [esp + 0x20]
lea edx, [esp + 0xc8]
push edx
push str.__Trying__s..._n
push esi
call fcn.1001bdc0
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x28]
add esp, 0xc
cmp eax, 2
je 0x10022890
cmp eax, 0x17
jne 0x1002289b
mov ebx, 1
cmp dword [esp + 0x3c], ebx
je 0x1002289f
xor ebx, ebx
jmp 0x100228b3
test byte [esi + 0xa90], 8
je 0x100228b3
push ebp
mov ecx, edi
call fcn.10022320
add esp, 4
push edi
call fcn.100223c0
add esp, 4
test ebx, ebx
je 0x100228d1
test dword [esi + 0xa90], 0x1000
je 0x100228d1
call fcn.10021910
cmp dword [esi + 0x610], 0
je 0x1002290e
push 1
push esi
call fcn.1001efd0
mov eax, dword [esi + 0x614]
mov ecx, dword [esi + 0x610]
push 0
push edi
push eax
call ecx
push 0
push esi
mov ebx, eax
call fcn.1001efd0
add esp, 0x1c
cmp ebx, 2
jne 0x10022957
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x38]
cmp eax, 2
je 0x1002291c
cmp eax, 0x17
jne 0x1002296f
lea edx, [esp + 0x48]
push edx
call fcn.10045a00
push eax
mov eax, dword [esp + 0x40]
push eax
push edi
push ebp
call fcn.10021af0
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x10022973
push edi
push ebp
call fcn.10022550
add esp, 8
cmp ebx, 1
jne 0x10022a8b
lea eax, [ebx + 6]
jmp 0x10022a97
test ebx, ebx
je 0x1002290e
push edi
push ebp
call fcn.10022550
add esp, 8
mov eax, 0x2a
jmp 0x10022a97
mov ebx, dword [esp + 0x10]
push 1
push edi
call fcn.10045aa0
lea ecx, [esp + 0x30]
push ecx
call fcn.1003caf0
mov edx, dword [eax]
mov dword [ebp + 0x288], edx
mov ecx, dword [eax + 4]
mov dword [ebp + 0x28c], ecx
mov edx, dword [eax + 8]
mov dword [ebp + 0x290], edx
mov eax, dword [eax + 0xc]
add esp, 0xc
cmp dword [ebp + 0x298], 1
mov dword [ebp + 0x294], eax
jle 0x100229cd
mov ecx, dword [ebp + 0x2a4]
mov edx, dword [ebp + 0x2a0]
push 3
push ecx
push edx
push esi
call fcn.1001ecc0
add esp, 0x10
cmp dword [esp + 0x18], 0
jne 0x10022a8f
cmp dword [ebp + 0x90], 1
jne 0x10022a8f
test dword [ebp + 0x280], 0x8000000
jne 0x10022a07
mov eax, dword [esp + 0x44]
push eax
lea ecx, [esp + 0x4c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x10022a81
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0xb
je 0x10022a6b
cmp ebx, 0x2732
jle 0x10022a24
cmp ebx, 0x2734
jle 0x10022a6b
push 0x80
lea edx, [esp + 0xfc]
push edx
push ebx
call fcn.10012a60
push eax
lea eax, [esp + 0xd8]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.1001bdc0
push edi
push ebp
mov dword [esi + 0xcac], ebx
call fcn.10022550
mov dword [esp + 0x34], 7
mov ebx, dword [esp + 0x34]
add esp, 0x24
mov eax, ebx
jmp 0x10022a97
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x10]
mov dword [ecx], edi
mov eax, ebx
jmp 0x10022a97
test ebx, ebx
jne 0x10022a8b
mov ecx, dword [esp + 0x14]
mov dword [ecx], edi
mov eax, ebx
jmp 0x10022a97
mov edx, dword [esp + 0x14]
mov dword [edx], edi
xor eax, eax
mov ecx, dword [esp + 0x178]
pop edi
pop esi
pop ebx
pop ebp
xor ecx, esp
call fcn.1004b0b2
add esp, 0x16c
ret