Function at 0x401c90
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], ecx
call edi
push 0
mov dword [eax], 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
cmp word [0x40740c], 0
je 0x401cc5
push 0x11
push 2
jmp 0x401cc9
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x4074c4], eax
test eax, eax
js 0x401eae
jne 0x401cef
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__dup]
add esp, 4
mov dword [0x4074c4], eax
push 4
push dword [0x4074d4]
push 4
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x401d17
push str.nnetfd_reuseaddr_failed
call fcn.00401470
add esp, 4
mov ecx, dword [0x407428]
mov edx, 2
mov eax, dword [0x407444]
mov esi, dword [ebp + 8]
mov word [ecx], dx
mov word [eax], dx
test esi, esi
je 0x401d39
mov eax, dword [esi]
mov dword [ecx + 4], eax
mov ebx, dword [ebp + 0xc]
test bx, bx
je 0x401d52
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [0x407428]
mov word [ecx + 2], ax
test esi, esi
jne 0x401d5d
xor edx, edx
test bx, bx
je 0x401dd2
mov dword [ebp - 4], 4
push 0x10
push ecx
push dword [0x4074c4]
call dword [sym.imp.WS2_32.dll_bind]
mov esi, eax
mov edx, eax
test esi, esi
je 0x401dcc
call edi
mov edx, esi
cmp dword [eax], 0x2740
jne 0x401dcc
movzx eax, bx
push eax
mov eax, dword [0x407428]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.retrying_local__s:_d
call fcn.00401470
add esp, 0xc
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
call edi
mov edx, esi
mov dword [eax], 0
mov eax, dword [ebp - 4]
dec eax
mov dword [ebp - 4], eax
test eax, eax
jle 0x401dcc
mov ecx, dword [0x407428]
jmp 0x401d64
mov ecx, dword [0x407428]
test edx, edx
jne 0x401eb8
cmp word [0x407418], dx
jne 0x401ea2
mov ecx, dword [ebp - 8]
mov eax, dword [0x407444]
push dword [ebp - 0xc]
mov ecx, dword [ecx]
mov dword [eax + 4], ecx
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [0x407408], 0
mov ecx, dword [0x407444]
mov word [ecx + 2], ax
je 0x401e1d
push str.Warning:_source_routing_unavailable_on_this_machine__ignoring
call fcn.00401470
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff5
call esi
push 0
push 0x407480
call sub.VCRUNTIME140.dll__setjmp3
add esp, 8
test eax, eax
jne 0x401e52
push 0x10
push dword [0x407444]
push dword [0x4074c4]
call dword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
jmp 0x401e60
push 0x274c
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or ebx, 0xffffffff
push 0xfffffffffffffff5
call esi
test ebx, ebx
je 0x401ea2
call edi
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 2
push dword [0x4074c4]
mov dword [esi], eax
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [0x4074c4]
call dword [sym.imp.WS2_32.dll_closesocket]
call edi
push dword [eax]
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x4074c4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Cant_get_socket
call fcn.00401850
movzx eax, bx
push eax
push dword [ecx + 4]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.Cant_grab__s:_d_with_bind
call fcn.00401850
int3