Function at 0x1017aca0
Capabilities:
Connect socket

Disassembly:
sub esp, 0x134
mov eax, dword [0x10291440]
xor eax, esp
mov dword [esp + 0x130], eax
mov eax, dword [esp + 0x13c]
push ebx
push ebp
mov ebp, dword [esp + 0x140]
lea ecx, [eax + eax*8]
mov dword [esp + 0x18], eax
push esi
push edi
mov edx, dword [ebp + 0x80]
mov edi, 0x10282d89
mov dword [esp + 0x1c], edx
mov eax, dword [edx + 0xb0]
mov ebx, dword [eax + ecx*8 + 0xc]
lea esi, [eax + ecx*8]
mov dword [esp + 0x10], esi
test ebx, ebx
je 0x1017ad81
push dword [ebx + 0xc]
push dword [ebx + 8]
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1017ad15
mov dword [esp + 0x18], str.cant_create_socket_to_connect
jmp 0x1017ad6c
push edi
call fcn.1017a170
mov esi, eax
add esp, 4
test esi, esi
jne 0x1017ae15
push dword [ebx + 0x10]
push dword [ebx + 0x18]
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x1017ade6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
test esi, esi
je 0x1017ade6
cmp esi, 0x2733
je 0x1017ade6
push edi
mov dword [esp + 0x1c], str.connection_failed
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0xc]
mov ebx, dword [eax + 0x1c]
mov dword [esi + 0xc], ebx
test ebx, ebx
jne 0x1017acf5
mov edi, dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x14]
call fcn.1012d230
push eax
push edi
push str._s_to__s
push esi
push ebp
call fcn.100d0600
mov edi, dword [esp + 0x3c]
add esp, 0x1c
test esi, esi
je 0x1017ae40
cmp esi, 0x2733
je 0x1017ae31
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
push 0
push ecx
mov eax, dword [eax + 0x5c]
push ebp
add dword [eax + 0x310], 1
adc dword [eax + 0x314], 0
call fcn.1012dbd0
add esp, 0xc
jmp 0x1017afe1
mov eax, dword [ebp]
test byte [eax + 0x80], 0xa0
je 0x1017adac
push esi
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x18]
call fcn.1012d230
add esp, 8
push eax
push str.init_connection_to__s_with_result__d
push ebp
call fcn.1013af50
add esp, 0x10
jmp 0x1017adac
push str.cant_make_nonblock_socket_to_connect
push esi
push ebp
call fcn.100d0600
add esp, 0xc
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, dword [esp + 0x20]
jmp 0x1017adb4
mov esi, 3
mov dword [esp + 0x18], 0x10
jmp 0x1017ae4d
mov esi, 2
mov dword [esp + 0x18], 0x21
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov ebx, eax
test ebx, ebx
jne 0x1017ae7e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push str.cant_create_WSA_event
push esi
push ebp
call fcn.100d0600
add esp, 0xc
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
jmp 0x1017afe1
push dword [esp + 0x18]
push ebx
push edi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x1017aebb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push str.cant_set_desired_event_bits
push esi
push ebp
call fcn.100d0600
add esp, 0xc
push ebx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
jmp 0x1017afe1
push esi
push edi
lea eax, [esp + 0x1c]
push eax
push ebp
call fcn.1012d6c0
add esp, 0x10
mov dword [esp + 0x1c], eax
test eax, eax
je 0x1017aeea
push ebx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esp + 0x1c]
jmp 0x1017afe1
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
mov dword [eax + 0x10], ebx
mov eax, dword [esp + 0x14]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [ecx + 0x30], eax
mov dword [ecx + 0x3c], 2
cmp esi, 2
jne 0x1017afdf
push 1
lea eax, [ecx + 0x20]
push eax
push ebp
call fcn.1017d6b0
mov ebx, dword [ebp + 0x80]
add esp, 0xc
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
mov esi, dword [ebx + 0xe0]
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x1017af40
sub esi, ecx
lea ecx, [esp + 0x10]
push ecx
lea eax, [esi + 0xa]
push eax
push ebp
call fcn.100dc800
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x1017afc0
mov edi, dword [esp + 0x10]
mov edx, edi
mov ecx, dword [ebx + 0xe0]
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x1017af70
lea eax, [edi + 1]
mov dword [esp + 0x20], 1
add eax, esi
mov dword [esp + 0x24], 3
push eax
lea eax, [esp + 0x24]
push eax
push ebp
call fcn.101af170
lea eax, [esi + 0xa]
push eax
push dword [esp + 0x20]
push dword [esp + 0x30]
push ebp
call fcn.1017c360
push dword [esp + 0x2c]
mov edi, eax
push ebp
call fcn.100dc7e0
add esp, 0x24
cmp edi, 0xffff8701
je 0x1017afd0
test edi, edi
je 0x1017afdf
mov eax, edi
jmp 0x1017afe1
push dword [esp + 0x14]
push ebp
call fcn.101781a0
add esp, 8
jmp 0x1017afe1
xor eax, eax
mov ecx, dword [esp + 0x140]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1021eb98
add esp, 0x134
ret