Function at 0x428580
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0xec
mov eax, dword [0x4bb0c4]
xor eax, esp
mov dword [esp + 0xe8], eax
mov edx, dword [esp + 0xf8]
xor eax, eax
mov ecx, dword [esp + 0xf4]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x100]
mov dword [esp + 0x18], eax
mov byte [esp + 0x13], al
mov dword [esp + 0x28], edx
mov ebp, dword [edi]
mov dword [edx], 0xffffffff
mov eax, dword [ecx + 4]
mov esi, dword [edi]
mov dword [esp + 0x38], eax
mov eax, dword [edi + 0x8c]
cmp eax, 2
mov dword [esp + 0x3c], eax
mov eax, 0x11
mov dword [esp + 0x24], 0xffffffff
je 0x4285eb
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x40], eax
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x44], eax
cmp eax, 0x80
jbe 0x42860a
mov dword [esp + 0x44], 0x80
mov eax, 0x80
push eax
push dword [ecx + 0x18]
lea eax, [esp + 0x50]
push eax
call fcn.0046ad00
mov eax, dword [esi + 0x1a0]
add esp, 0xc
test eax, eax
je 0x428639
lea ecx, [esp + 0x38]
push ecx
push 0
push dword [esi + 0x1a4]
call eax
add esp, 0xc
jmp 0x42864b
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x428a2f
mov ecx, dword [edi + 0x88]
test ecx, ecx
je 0x428670
mov eax, dword [esp + 0x60]
cmp dword [esp + 0x38], 0x17
cmove eax, ecx
mov dword [esp + 0x60], eax
lea eax, [esp + 0x20]
xor esi, esi
push eax
lea eax, [esp + 0xcc]
push eax
lea eax, [esp + 0x50]
push eax
call fcn.004284f0
add esp, 0xc
test al, al
jne 0x4286bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
call fcn.00415220
push eax
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00426770
push ebx
push edi
call fcn.004271c0
add esp, 0x20
jmp 0x428a2f
lea eax, [esp + 0xc8]
push eax
push str.__Trying__s..._n
push ebp
call fcn.00426850
mov eax, dword [esp + 0x44]
add esp, 0xc
cmp eax, 2
je 0x4286df
cmp eax, 0x17
jne 0x42874c
cmp dword [esp + 0x3c], 1
jne 0x42874c
cmp byte [ebp + 0x366], 0
mov byte [esp + 0x12], 1
je 0x428751
mov eax, dword [edi]
push 4
mov dword [esp + 0x18], eax
lea eax, [esp + 0x20]
push eax
push 1
push 6
push ebx
mov dword [esp + 0x30], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x428739
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.00415220
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push dword [esp + 0x24]
call fcn.00426850
add esp, 0x14
jmp 0x428751
push str.TCP_NODELAY_set_n
push dword [esp + 0x18]
call fcn.00426850
add esp, 8
jmp 0x428751
mov byte [esp + 0x12], 0
mov eax, dword [0x4bd74c]
mov dword [esp + 0x1c], 0x4020
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], 4
test eax, eax
jne 0x428799
push 3
push 2
push eax
push 6
call fcn.00434810
add esp, 0x10
test al, al
je 0x42878d
mov dword [0x4bd74c], 2
jmp 0x4287df
mov dword [0x4bd74c], 1
jmp 0x42879e
cmp eax, 2
je 0x4287df
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x18]
push eax
push 0x1001
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4287c7
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x1c]
jg 0x4287df
push 4
lea eax, [esp + 0x20]
push eax
push 0x1001
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [esp + 0x12], 0
je 0x4288a0
cmp byte [ebp + 0x49c], 0
je 0x4288a0
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 1
push eax
push 8
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x428829
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push ebp
call fcn.00426850
add esp, 0xc
jmp 0x4288a0
push dword [ebp + 0x4a0]
mov dword [esp + 0x30], 1
call fcn.004159f0
push dword [ebp + 0x4a4]
imul eax, eax, 0x3e8
mov dword [esp + 0x1c], eax
mov dword [esp + 0x38], eax
call fcn.004159f0
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x28]
push eax
push 0
push 0
push 0xc
lea eax, [esp + 0x44]
push eax
push 0x98000004
push ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4288a0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push ebp
call fcn.00426850
add esp, 0x10
mov eax, dword [ebp + 0x198]
test eax, eax
je 0x4288c6
push 0
push ebx
push dword [ebp + 0x19c]
call eax
add esp, 0xc
mov dword [esp + 0x18], eax
cmp eax, 2
jne 0x42890f
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x38]
cmp eax, 2
je 0x4288d4
cmp eax, 0x17
jne 0x428927
lea eax, [esp + 0x48]
push eax
call fcn.00446ed0
push eax
push dword [esp + 0x40]
push ebx
push edi
call fcn.00428000
mov esi, eax
add esp, 0x14
test esi, esi
je 0x428927
push ebx
push edi
call fcn.004271c0
add esp, 8
mov eax, 7
cmp esi, 1
cmove esi, eax
mov eax, esi
jmp 0x428a31
test eax, eax
je 0x4288c6
push ebx
push edi
call fcn.004271c0
add esp, 8
mov eax, 0x2a
jmp 0x428a31
push 1
push ebx
call fcn.00446f50
add esp, 8
call fcn.0041c880
cmp dword [edi + 0x390], 1
mov dword [edi + 0x388], eax
mov dword [edi + 0x38c], edx
jle 0x428961
push dword [edi + 0x39c]
push dword [edi + 0x398]
push ebp
call fcn.00418140
add esp, 0xc
cmp byte [esp + 0x13], 0
jne 0x428a29
cmp dword [edi + 0x8c], 1
jne 0x428a29
cmp byte [edi + 0x382], 0
jne 0x42899b
push dword [esp + 0x44]
lea eax, [esp + 0x4c]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [esp + 0x24], eax
cmp eax, 0xffffffff
jne 0x4289a9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [esp + 0x18], ecx
jmp 0x4289ad
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x38], 0x17
sete al
cmp dword [esp + 0x24], 0xffffffff
mov byte [edi + 0x36f], al
jne 0x428a1b
cmp ecx, 0xb
je 0x428a0f
cmp ecx, 0x2732
jle 0x4289d7
cmp ecx, 0x2734
jle 0x428a0f
push ecx
push edi
call fcn.00415220
push eax
lea eax, [esp + 0xd4]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push ebp
call fcn.00426850
mov eax, dword [esp + 0x30]
push ebx
push edi
mov dword [ebp + 0x4694], eax
call fcn.004271c0
mov esi, 7
add esp, 0x20
mov eax, esi
jmp 0x428a31
mov eax, dword [esp + 0x28]
xor esi, esi
mov dword [eax], ebx
mov eax, esi
jmp 0x428a31
test esi, esi
jne 0x428a25
mov eax, dword [esp + 0x28]
mov dword [eax], ebx
mov eax, esi
jmp 0x428a31
mov eax, dword [esp + 0x28]
mov dword [eax], ebx
xor eax, eax
mov ecx, dword [esp + 0xf8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00453227
add esp, 0xec
ret