Function at 0x403030
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, ecx
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x2ac
mov esi, dword [eax]
mov dword [ecx], 0xffffffff
lea eax, [esp + 0x50]
mov dword [esp + 4], edx
mov dword [esp + 0xc], eax
lea eax, [esp + 0x110]
mov dword [esp + 8], eax
mov dword [esp], ebx
call sym._Curl_socket
test eax, eax
je 0x403080
xor eax, eax
add esp, 0x2ac
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esp + 0x54]
mov dword [esp + 8], eax
lea eax, [esp + 0x62]
mov dword [esp + 4], eax
lea eax, [esp + 0x120]
mov dword [esp], eax
call sym._Curl_getaddressinfo
mov edi, dword [esp + 0x50]
mov byte [esp + 0x41], al
mov dword [esp + 0x34], edi
test al, al
je 0x4034a8
lea eax, [esp + 0x62]
mov dword [esp + 4], str.__Trying__s..._n
mov dword [esp + 8], eax
mov dword [esp], esi
call sym._Curl_infof
mov eax, dword [esp + 0x110]
cmp eax, 2
je 0x403208
cmp eax, 0x17
je 0x403208
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call sym._Curl_sndbufset
mov edi, dword [esi + 0x1b0]
test edi, edi
je 0x403148
mov dword [esp + 4], 1
mov dword [esp], esi
call sym._Curl_set_in_callback
mov eax, dword [esp + 0x34]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [esi + 0x1b4]
mov dword [esp], eax
call dword [esi + 0x1b0]
mov dword [esp + 4], 0
mov dword [esp], esi
mov edi, eax
call sym._Curl_set_in_callback
cmp edi, 2
je 0x40314d
test edi, edi
jne 0x403600
mov byte [esp + 0x41], 0
mov eax, dword [esp + 0x110]
cmp eax, 2
je 0x403350
cmp eax, 0x17
je 0x403350
mov eax, dword [esp + 0x34]
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._curlx_nonblock
call sym._Curl_now
cmp dword [ebx + 0x284], 1
mov dword [ebx + 0x27c], eax
mov dword [ebx + 0x280], edx
jg 0x4031e0
cmp byte [esp + 0x41], 0
jne 0x4031d0
cmp dword [ebx + 0x90], 1
jne 0x4031d0
cmp byte [ebx + 0x276], 0
je 0x4034f8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp eax, 0xb
je 0x4031d0
lea eax, [eax - 0x2733]
cmp eax, 1
ja 0x40361a
lea esi, [esi]
mov eax, dword [esp + 0x34]
mov dword [ebp], eax
jmp 0x403069
mov dword [esp + 8], 3
mov eax, dword [ebx + 0x288]
mov dword [esp], esi
mov dword [esp + 4], eax
call sym._Curl_expire
cmp byte [esp + 0x41], 0
je 0x40319b
jmp 0x4031d0
cmp dword [esp + 0x114], 1
jne 0x4030e4
cmp byte [esi + 0x4f6], 0
jne 0x4035e0
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call sym._Curl_sndbufset
cmp byte [esi + 0x638], 0
je 0x4030f0
mov edi, dword [esp + 0x34]
lea eax, [esp + 0x5c]
mov dword [esp + 0x5c], 1
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 8
mov dword [esp + 4], 0xffff
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
test eax, eax
js 0x403748
mov eax, dword [esi + 0x63c]
mov dword [esp + 0x1a0], 1
mov dword [esp], eax
call sym._curlx_sltosi
imul eax, eax, 0x3e8
mov dword [esp + 0x5c], eax
mov dword [esp + 0x1a4], eax
mov eax, dword [esi + 0x640]
mov dword [esp], eax
call sym._curlx_sltosi
mov dword [esp + 0x20], 0
imul eax, eax, 0x3e8
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x5c], eax
mov dword [esp + 0x1a8], eax
lea eax, [esp + 0x90]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x1a0]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xc], 0xc
mov dword [esp + 4], 0x98000004
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
sub esp, 0x24
test eax, eax
je 0x4030f0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 4], str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
call sym._Curl_infof
jmp 0x4030f0
lea eax, [esp + 0x120]
mov dword [esp], eax
call sym._Curl_ipv6_scope
mov dword [esp + 0x58], 0
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x110]
mov dword [esp + 0x3c], eax
mov eax, dword [ebx]
mov ecx, dword [eax + 0x184]
movzx edi, word [eax + 0x180]
mov dword [esp + 0x38], eax
mov edx, dword [eax + 0x530]
mov word [esp + 0x42], di
mov dword [esp + 0x44], ecx
test edx, edx
jne 0x4033a5
test di, di
je 0x403166
mov ecx, 0x20
lea edi, [esp + 0x90]
xor eax, eax
rep stosd dword es:[edi], eax
test edx, edx
je 0x403530
mov dword [esp], edx
mov dword [esp + 0x4c], edx
call sym._strlen
cmp eax, 0xfe
ja 0x403530
xor eax, eax
mov ecx, 0x3f
lea edi, [esp + 0x1a4]
mov dword [esp + 0x1a0], 0
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x4c]
cmp byte [edx], 0x69
jne 0x4037b0
cmp byte [edx + 1], 0x66
jne 0x4037b0
cmp byte [edx + 2], 0x21
jne 0x4037b0
add edx, 3
lea edi, [esp + 0x1a0]
mov dword [esp + 0x14], 0x100
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], edx
mov eax, dword [ebx + 0x8c]
mov dword [esp + 0x4c], edx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call sym._Curl_if2ip
cmp eax, 1
je 0x403648
cmp eax, 2
mov edx, dword [esp + 0x4c]
je 0x403a84
test eax, eax
je 0x403a6f
mov eax, dword [esp + 0x38]
mov byte [eax + 0x828], 0
mov dword [esp + 8], edx
mov dword [esp + 4], str.Couldnt_bind_to__s
mov dword [esp], eax
call sym._Curl_failf
mov eax, dword [esp + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._Curl_closesocket
mov eax, 0x2d
jmp 0x40306b
mov ebp, dword [sym.imp.msvcrt.dll__errno]
call ebp
mov eax, dword [eax]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._Curl_strerror
mov edi, eax
call ebp
mov dword [esp + 0xc], edi
mov eax, dword [eax]
mov dword [esp + 4], str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov dword [esp], esi
mov dword [esp + 8], eax
call sym._Curl_failf
mov eax, dword [esp + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._Curl_closesocket
jmp 0x403069
mov eax, dword [esp + 0x11c]
mov dword [esp + 8], eax
lea eax, [esp + 0x120]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_connect]
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x4031d0
jmp 0x4031b1
cmp dword [esp + 0x3c], 0x17
je 0x403998
xor edi, edi
cmp dword [esp + 0x3c], 2
je 0x40393b
mov eax, dword [sym.imp.WS2_32.dll_ntohs]
mov dword [esp + 0x48], esi
mov esi, dword [esp + 0x44]
mov dword [esp + 0x44], ebp
mov dword [esp + 0x3c], eax
movzx ebp, word [esp + 0x42]
lea esi, [esi]
lea eax, [esp + 0x90]
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_bind]
sub esp, 0xc
test eax, eax
jns 0x403680
sub esi, 1
test esi, esi
jle 0x4036f8
movzx eax, bp
mov dword [esp + 4], str.Bind_to_local_port__hu_failed__trying_next_n
add ebp, 1
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sym._Curl_infof
movzx eax, bp
cmp word [esp + 0x90], 2
mov dword [esp], eax
je 0x403668
call dword [sym.imp.WS2_32.dll_ntohs]
sub esp, 4
mov word [esp + 0x92], ax
jmp 0x403568
mov edi, dword [esp + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], edi
call sym._Curl_tcpnodelay
mov dword [esp], edi
call sym._Curl_sndbufset
jmp 0x40322f
mov eax, dword [esp + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._Curl_closesocket
mov eax, 0x2a
jmp 0x40306b
mov dword [esp + 4], edi
mov dword [esp], ebx
call sym._Curl_strerror
mov dword [esp + 4], str.Immediate_connect_fail_for__s:__s_n
mov dword [esp + 0xc], eax
lea eax, [esp + 0x62]
mov dword [esp + 8], eax
mov dword [esp], esi
call sym._Curl_infof
mov dword [esi + 0x82c], edi
mov eax, dword [esp + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._Curl_closesocket
mov eax, 7
jmp 0x40306b
mov eax, dword [esp + 0x3c]
call eax
sub esp, 4
mov word [esp + 0x92], ax
jmp 0x403568
xor eax, eax
mov ecx, 0x20
mov word [esp + 0x42], bp
mov esi, dword [esp + 0x48]
lea edx, [esp + 0x1a0]
mov dword [esp + 0x5c], pe_nt_image_headers32
mov ebp, dword [esp + 0x44]
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x34]
lea eax, [esp + 0x5c]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_getsockname]
sub esp, 0xc
test eax, eax
js 0x403768
movzx eax, word [esp + 0x42]
mov dword [esp + 4], str.Local_port:__hu_n
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sym._Curl_infof
mov byte [ebx + 0x273], 1
jmp 0x403166
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [esp + 0x38]
mov esi, eax
mov dword [edi + 0x82c], eax
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._Curl_strerror
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.bind_failed_with_errno__d:__s
mov dword [esp], edi
call sym._Curl_failf
mov eax, dword [esp + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._Curl_closesocket
jmp 0x403499
mov dword [esp + 8], edi
mov dword [esp + 4], str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
mov dword [esp], esi
call sym._Curl_infof
jmp 0x4030f0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, dword [esp + 0x38]
mov esi, eax
mov dword [ebp + 0x82c], eax
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._Curl_strerror
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.getsockname___failed_with_errno__d:__s
mov dword [esp], ebp
call sym._Curl_failf
mov dword [esp + 4], edi
mov dword [esp], ebx
call sym._Curl_closesocket
jmp 0x403499
mov dword [esp + 4], edx
mov dword [esp + 8], 5
mov dword [esp], str.host_
mov dword [esp + 0x4c], edx
call sym._strncmp
mov edx, dword [esp + 0x4c]
test eax, eax
je 0x40396b
lea edi, [esp + 0x1a0]
mov dword [esp + 0x14], 0x100
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], edx
mov eax, dword [ebx + 0x8c]
mov dword [esp + 0x4c], edx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call sym._Curl_if2ip
cmp eax, 1
je 0x403648
cmp eax, 2
mov edx, dword [esp + 0x4c]
je 0x403a84
lea esi, cs:[esi]
nop
mov eax, dword [ebx + 0x294]
cmp dword [esp + 0x3c], 2
mov dword [esp + 0x48], eax
je 0x403a4b
cmp dword [esp + 0x3c], 0x17
jne 0x403856
mov dword [ebx + 0x294], 2
lea edi, [esp + 0x58]
mov dword [esp + 4], edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0
mov dword [esp], ebx
mov dword [esp + 0x4c], edx
call sym._Curl_resolv
mov edx, dword [esp + 0x4c]
cmp eax, 1
je 0x403a5a
mov eax, dword [esp + 0x48]
mov dword [ebx + 0x294], eax
mov eax, dword [esp + 0x58]
test eax, eax
je 0x40346a
lea edi, [esp + 0x1a0]
mov dword [esp + 8], 0x100
mov dword [esp + 4], edi
mov eax, dword [eax]
mov dword [esp + 0x48], edx
mov dword [esp], eax
call sym._Curl_printable_address
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x48]
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x10], edi
mov dword [esp + 8], edx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], str.Name__s_family__i_resolved_to__s_family__i_n
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sym._Curl_infof
mov eax, dword [esp + 0x58]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sym._Curl_resolv_unlock
cmp dword [esp + 0x3c], 0x17
je 0x4039c8
cmp dword [esp + 0x3c], 2
je 0x40391c
xor edi, edi
jmp 0x403548
lea eax, [esp + 0x94]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], 2
call sym._Curl_inet_pton
test eax, eax
jle 0x403915
movzx eax, word [esp + 0x42]
mov edx, 2
mov edi, 0x10
mov word [esp + 0x90], dx
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_htons]
sub esp, 4
mov word [esp + 0x92], ax
jmp 0x403548
add edx, 5
jmp 0x403830
lea eax, [esp + 0x98]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], 0x17
call sym._Curl_inet_pton
test eax, eax
jle 0x4039be
lea esi, [esi]
movzx eax, word [esp + 0x42]
mov ecx, 0x17
mov word [esp + 0x90], cx
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_htons]
sub esp, 4
mov word [esp + 0x92], ax
mov edi, 0x1c
jmp 0x403548
mov dword [esp + 4], 0x25
mov dword [esp], edi
call sym._strchr
test eax, eax
je 0x403973
mov byte [eax], 0
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x98]
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], 0x17
call sym._Curl_inet_pton
mov edx, dword [esp + 0x3c]
test eax, eax
jle 0x4039be
mov eax, 0x17
mov dword [esp + 0x3c], edx
mov word [esp + 0x90], ax
movzx eax, word [esp + 0x42]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_htons]
sub esp, 4
mov edx, dword [esp + 0x3c]
mov word [esp + 0x92], ax
lea eax, [edx + 1]
mov dword [esp], eax
call sym._atoi
mov dword [esp + 0xa8], eax
jmp 0x4039be
mov dword [ebx + 0x294], 1
jmp 0x403856
mov dword [esp + 4], edi
mov dword [esp], ebx
call sym._Curl_resolver_wait_resolv
mov edx, dword [esp + 0x4c]
jmp 0x403883
mov dword [esp + 8], edx
mov eax, dword [esp + 0x38]
mov dword [esp + 4], str.Couldnt_bind_to_interface__s
jmp 0x403481
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], edx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov dword [esp], eax
call sym._Curl_infof
jmp 0x403903