Function at 0x10022460
Capabilities:
Connect socket

Disassembly:
sub esp, 0x16c
mov eax, dword [0x10075610]
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.100222a0
add esp, 0x10
mov dword [esp + 4], eax
test eax, eax
je 0x100224d0
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.1004ada2
add esp, 0x16c
ret
push ebx
push esi
push edi
lea ebx, [esp + 0x24]
lea edi, [esp + 0xc8]
lea esi, [esp + 0x48]
call fcn.10021d90
test eax, eax
jne 0x10022534
call fcn.1004e396
mov esi, eax
call fcn.1004e396
mov ecx, dword [esi]
mov edi, eax
push 0x80
lea eax, [esp + 0xfc]
push eax
push ecx
call fcn.10012730
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.1001bb50
mov ecx, dword [esp + 0x38]
push ecx
push ebp
call fcn.10022220
add esp, 0x24
jmp 0x10022765
mov esi, dword [esp + 0x20]
lea edx, [esp + 0xc8]
push edx
push str.__Trying__s..._n
push esi
call fcn.1001ba70
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x28]
add esp, 0xc
cmp eax, 2
je 0x10022560
cmp eax, 0x17
jne 0x1002256b
mov ebx, 1
cmp dword [esp + 0x3c], ebx
je 0x1002256f
xor ebx, ebx
jmp 0x10022583
test byte [esi + 0xa90], 8
je 0x10022583
push ebp
mov ecx, edi
call fcn.10021ff0
add esp, 4
push edi
call fcn.10022090
add esp, 4
test ebx, ebx
je 0x100225a1
test dword [esi + 0xa90], 0x1000
je 0x100225a1
call fcn.100215e0
cmp dword [esi + 0x610], 0
je 0x100225de
push 1
push esi
call fcn.1001eca0
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.1001eca0
add esp, 0x1c
cmp ebx, 2
jne 0x10022627
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x38]
cmp eax, 2
je 0x100225ec
cmp eax, 0x17
jne 0x1002263f
lea edx, [esp + 0x48]
push edx
call fcn.100456e0
push eax
mov eax, dword [esp + 0x40]
push eax
push edi
push ebp
call fcn.100217c0
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x10022643
push edi
push ebp
call fcn.10022220
add esp, 8
cmp ebx, 1
jne 0x1002275b
lea eax, [ebx + 6]
jmp 0x10022767
test ebx, ebx
je 0x100225de
push edi
push ebp
call fcn.10022220
add esp, 8
mov eax, 0x2a
jmp 0x10022767
mov ebx, dword [esp + 0x10]
push 1
push edi
call fcn.10045780
lea ecx, [esp + 0x30]
push ecx
call fcn.1003c7e0
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 0x1002269d
mov ecx, dword [ebp + 0x2a4]
mov edx, dword [ebp + 0x2a0]
push 3
push ecx
push edx
push esi
call fcn.1001e990
add esp, 0x10
cmp dword [esp + 0x18], 0
jne 0x1002275f
cmp dword [ebp + 0x90], 1
jne 0x1002275f
test dword [ebp + 0x280], 0x8000000
jne 0x100226d7
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 0x10022751
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0xb
je 0x1002273b
cmp ebx, 0x2732
jle 0x100226f4
cmp ebx, 0x2734
jle 0x1002273b
push 0x80
lea edx, [esp + 0xfc]
push edx
push ebx
call fcn.10012730
push eax
lea eax, [esp + 0xd8]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.1001ba70
push edi
push ebp
mov dword [esi + 0xcac], ebx
call fcn.10022220
mov dword [esp + 0x34], 7
mov ebx, dword [esp + 0x34]
add esp, 0x24
mov eax, ebx
jmp 0x10022767
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x10]
mov dword [ecx], edi
mov eax, ebx
jmp 0x10022767
test ebx, ebx
jne 0x1002275b
mov ecx, dword [esp + 0x14]
mov dword [ecx], edi
mov eax, ebx
jmp 0x10022767
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.1004ada2
add esp, 0x16c
ret