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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x300
mov esi, edx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [edx + ecx*4 + 0x138], 0xffffffff
lea ecx, [esp + 0x28]
lea edx, [esp + 0x1b8]
push ecx
push edx
push eax
push ebx
call fcn.6b445900
add esp, 0x10
test eax, eax
jne 0x6b44574d
lea ecx, [esp + 0x1c8]
sub esp, 0x10
lea eax, [esp + 0x40]
mov dword [esp + 0xc], eax
lea edi, [esp + 0x25a]
mov dword [esp + 8], edi
mov dword [esp], ecx
call fcn.6b443a80
add esp, 0x10
test eax, eax
je 0x6b445185
push dword [esp + 0x30]
push edi
push str.__Trying__s:_d...
push ebx
call fcn.6b4767f0
add esp, 0x10
mov eax, dword [esp + 0x1b8]
cmp eax, 0x17
je 0x6b444f8b
cmp eax, 2
jne 0x6b4450bb
cmp dword [esp + 0x1bc], 1
jne 0x6b4450bb
test byte [ebx + 0x6d8], 8
mov edi, dword [esp + 0x28]
je 0x6b444fef
mov dword [esp + 0x38], 1
lea eax, [esp + 0x38]
push 4
push eax
push 1
push 6
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x6b444fef
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 0xb8]
push 0x100
push ecx
push eax
call fcn.6b481730
add esp, 0xc
push eax
push str.Could_not_set_TCP_NODELAY:__s
push ebx
call fcn.6b4767f0
add esp, 0xc
push edi
call fcn.6b444b90
add esp, 4
mov eax, dword [ebx + 0x6d8]
test eax, 0x1000
je 0x6b4450c8
shr eax, 0xc
and eax, 1
mov dword [esp + 0x38], eax
lea eax, [esp + 0x38]
push 4
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x6b4452ca
mov dword [esp + 0xb8], 1
push dword [ebx + 0x698]
call fcn.6b48f250
add esp, 4
imul eax, eax, 0x3e8
mov dword [esp + 0x38], eax
mov dword [esp + 0xbc], eax
push dword [ebx + 0x69c]
call fcn.6b48f250
add esp, 4
imul eax, eax, 0x3e8
mov dword [esp + 0x38], eax
mov dword [esp + 0xc0], eax
lea eax, [esp + 0x278]
lea ecx, [esp + 0xb8]
push 0
push 0
push eax
push 0
push 0
push 0xc
push ecx
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x6b4450c8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d
push ebx
call fcn.6b4767f0
add esp, 0x10
jmp 0x6b4450c8
mov edi, dword [esp + 0x28]
push edi
call fcn.6b444b90
add esp, 4
mov al, 1
mov dword [esp + 0x2c], eax
cmp dword [ebx + 0x190], 0
mov dword [esp + 8], edi
je 0x6b44511e
push 1
push ebx
call fcn.6b470f50
add esp, 8
push 0
push edi
push dword [ebx + 0x194]
call dword [ebx + 0x190]
add esp, 0xc
mov edi, eax
push 0
push ebx
call fcn.6b470f50
add esp, 8
test edi, edi
je 0x6b44511a
cmp edi, 2
jne 0x6b445273
mov dword [esp + 0x2c], 0
mov edi, dword [esp + 8]
mov eax, dword [esp + 0x1b8]
cmp eax, 0x17
je 0x6b445133
cmp eax, 2
jne 0x6b445693
mov dword [esp + 0xc], eax
mov dword [esp + 0x18], esi
lea eax, [esp + 0x1c8]
push eax
call fcn.6b464830
add esp, 4
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x1c], 0
mov edx, ebx
movzx ebx, word [ebx + 0x168]
mov esi, dword [edx + 0x16c]
mov dword [esp + 0x10], edx
mov edx, dword [edx + 0x52c]
test bx, bx
jne 0x6b4451d2
test edx, edx
jne 0x6b4451d2
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
jmp 0x6b445693
mov dword [esp + 0x18], esi
mov esi, dword [sym.imp.msvcrt.dll__errno]
call esi
mov edi, dword [eax]
call esi
lea ecx, [esp + 0xb8]
push 0x100
push ecx
push dword [eax]
call fcn.6b481730
add esp, 0xc
push eax
push edi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.6b476950
add esp, 0x10
push dword [esp + 0x28]
push dword [esp + 0x1c]
push ebx
call fcn.6b444b10
add esp, 0xc
jmp 0x6b44574b
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], ecx
test edx, edx
mov dword [esp + 4], edx
lea edx, [esp + 0x38]
mov eax, 0
mov ecx, 0x20
mov edi, edx
rep stosd dword es:[edi], eax
je 0x6b44528b
push dword [esp + 4]
call sub.msvcrt.dll_strlen
lea edx, [esp + 0x3c]
add esp, 4
cmp eax, 0xfe
ja 0x6b44528b
lea eax, [esp + 0xb8]
push 0x100
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 3
push dword [esp + 8]
push 0x6b729591
call sub.msvcrt.dll_strncmp
add esp, 0xc
test eax, eax
je 0x6b445302
push 5
push dword [esp + 8]
push str.host_
call sub.msvcrt.dll_strncmp
add esp, 0xc
test eax, eax
mov edi, dword [esp + 8]
je 0x6b44536e
mov al, 1
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 4]
jmp 0x6b445319
push dword [esp + 8]
push esi
push ebx
call fcn.6b444b10
add esp, 0xc
mov eax, 0x2a
jmp 0x6b44574d
mov eax, dword [esp + 0xc]
cmp eax, 2
mov edi, dword [esp + 8]
je 0x6b4452de
cmp eax, 0x17
mov ecx, 0
jne 0x6b445595
mov word [esp + 0x38], 0x17
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_htons]
lea edx, [esp + 0x38]
mov word [esp + 0x3a], ax
mov ecx, 0x1c
jmp 0x6b445595
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d
push ebx
call fcn.6b4767f0
add esp, 0xc
jmp 0x6b4450c8
mov word [esp + 0x38], 2
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_htons]
lea edx, [esp + 0x38]
mov word [esp + 0x3a], ax
mov ecx, 0x10
jmp 0x6b445595
mov edx, dword [esp + 4]
add edx, 3
mov dword [esp + 0x20], 0
mov edi, dword [esp + 8]
mov eax, dword [esp + 0x14]
push 0x100
lea ecx, [esp + 0xbc]
push ecx
mov dword [esp + 0xc], edx
push edx
push dword [eax + 0x54]
push dword [esp + 0x34]
push dword [esp + 0x20]
call fcn.6b4648d0
add esp, 0x18
cmp eax, 2
je 0x6b44537f
cmp eax, 1
je 0x6b4453a9
test eax, eax
jne 0x6b4453b2
cmp byte [esp + 0x20], 0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 4]
jne 0x6b4453c9
push edx
push str.Couldnt_bind_to_interface__s
push dword [esp + 0x18]
jmp 0x6b4454e2
mov edx, dword [esp + 4]
add edx, 5
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
jmp 0x6b4453c9
push dword [esp + 0xc]
lea eax, [esp + 0xbc]
push eax
push dword [esp + 0xc]
push str.Local_Interface__s_is_ip__s_using_address_family__i
push dword [esp + 0x20]
call fcn.6b4767f0
mov eax, dword [esp + 0x20]
add esp, 0x14
jmp 0x6b445496
mov dword [esp + 4], eax
jmp 0x6b4454f2
cmp byte [esp + 0x20], 0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 4]
je 0x6b4454d0
mov edi, ecx
mov cl, byte [ecx + 0x100]
mov byte [esp + 0x24], cl
cmp eax, 2
je 0x6b4453e3
cmp eax, 0x17
jne 0x6b4453eb
mov al, 2
jmp 0x6b4453e5
mov al, 1
mov byte [edi + 0x100], al
lea edi, [esp + 0x1c]
push edi
push 0
push 0
mov dword [esp + 0x10], edx
push edx
push dword [esp + 0x20]
call fcn.6b4587e0
add esp, 0x14
cmp eax, 1
jne 0x6b445417
push edi
push dword [esp + 0x14]
call fcn.6b4423e0
add esp, 8
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x24]
mov byte [eax + 0x100], cl
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x6b4454c8
push 0x100
lea edi, [esp + 0xbc]
push edi
push dword [eax]
call fcn.6b458290
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
push dword [eax + 4]
push edi
push dword [esp + 0x14]
push dword [esp + 0x10]
push str.Name__s_family__i_resolved_to__s_family__i
mov edi, dword [esp + 0x24]
push edi
call fcn.6b4767f0
add esp, 0x18
push dword [esp + 0x1c]
push edi
call fcn.6b458c60
add esp, 8
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
mov dword [esp + 4], 1
mov ecx, dword [esp + 0xc]
cmp dword [eax + 4], ecx
mov eax, ecx
mov edi, dword [esp + 8]
jne 0x6b4454f2
xor ecx, ecx
cmp eax, 2
je 0x6b4454ff
cmp eax, 0x17
jne 0x6b445591
push 0x25
lea eax, [esp + 0xbc]
push eax
call sub.msvcrt.dll_strchr
add esp, 8
test eax, eax
je 0x6b445539
mov ecx, eax
inc ecx
mov dword [esp + 0xc], ecx
mov byte [eax], 0
jmp 0x6b445541
mov edi, dword [esp + 8]
mov edx, dword [esp + 4]
mov eax, dword [esp + 0x10]
and byte [eax + 0xb44], 0xf7
push edx
push str.Couldnt_bind_to__s
push eax
call fcn.6b476950
add esp, 0xc
mov dword [esp + 4], 0x2d
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
jmp 0x6b44579d
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0xbc]
push eax
push 2
call fcn.6b466e00
xor ecx, ecx
add esp, 0xc
test eax, eax
jle 0x6b445591
mov word [esp + 0x38], 2
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x3a], ax
mov ecx, 0x10
jmp 0x6b445591
mov dword [esp + 0xc], 0
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0xbc]
push eax
push 0x17
call fcn.6b466e00
add esp, 0xc
mov ecx, 0x1c
test eax, eax
jle 0x6b445591
mov word [esp + 0x38], 0x17
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x3a], ax
mov eax, dword [esp + 0xc]
test eax, eax
je 0x6b44558c
push eax
call sub.msvcrt.dll_atoi
add esp, 4
mov dword [esp + 0x50], eax
mov ecx, 0x1c
lea edx, [esp + 0x38]
push ecx
push edx
push edi
mov edi, ecx
nop
nop
nop
nop
nop
nop
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x6b4455e5
cmp esi, 2
jl 0x6b445755
dec esi
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next
push dword [esp + 0x18]
call fcn.6b4767f0
add esp, 0xc
inc ebx
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x3a], ax
push edi
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x10]
jmp 0x6b4455a0
mov dword [esp + 0x34], pe_nt_image_headers32
mov dword [esp + 4], 0
lea edx, [esp + 0x278]
xor eax, eax
mov ecx, 0x20
mov edi, edx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x34]
push eax
push edx
mov edi, dword [esp + 0x10]
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
js 0x6b445641
movzx eax, bx
push eax
push str.Local_port:__hu
mov ebx, dword [esp + 0x18]
push ebx
call fcn.6b4767f0
add esp, 0xc
mov eax, dword [esp + 0x14]
or byte [eax + 0x24f], 1
mov al, 1
jmp 0x6b445687
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov ebx, dword [esp + 0x10]
mov dword [ebx + 0x89c], eax
lea eax, [esp + 0xb8]
push 0x100
push eax
push edi
call fcn.6b481730
add esp, 0xc
push eax
push edi
mov edi, dword [esp + 0x10]
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.6b476950
add esp, 0x10
mov dword [esp + 4], 0x2d
xor eax, eax
mov esi, dword [esp + 0x18]
test al, al
je 0x6b44579d
push 1
push edi
call fcn.6b471820
add esp, 8
call fcn.6b485a50
mov dword [esi + 0x25c], edx
mov dword [esi + 0x258], eax
cmp dword [esi + 0x254], 2
jl 0x6b4456e6
push 3
push dword [esi + 0x264]
push dword [esi + 0x260]
push ebx
call fcn.6b46d430
add esp, 0x10
push 4
push dword [esi + 0x26c]
push dword [esi + 0x268]
push ebx
call fcn.6b46d430
add esp, 0x10
cmp byte [esp + 0x2c], 0
je 0x6b4456f3
cmp dword [esi + 0x58], 4
jne 0x6b4456ff
mov eax, dword [ebp + 0xc]
mov dword [esi + eax*4 + 0x138], edi
jmp 0x6b44574b
test byte [esi + 0x24f], 4
jne 0x6b445726
push dword [esp + 0x1c4]
lea eax, [esp + 0x1cc]
push eax
push dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x6b44573d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
add eax, 0xffffd8cd
cmp eax, 2
jb 0x6b44573d
cmp edi, 0xb
jne 0x6b4457b9
mov eax, dword [esp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [esi + ecx*4 + 0x138], eax
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov ebx, dword [esp + 0x10]
mov dword [ebx + 0x89c], eax
lea eax, [esp + 0xb8]
push 0x100
push eax
push edi
call fcn.6b481730
add esp, 0xc
push eax
push edi
push str.bind_failed_with_errno__d:__s
push ebx
call fcn.6b476950
add esp, 0x10
mov dword [esp + 4], 0x2d
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 8]
push edi
push esi
push ebx
call fcn.6b444b10
add esp, 0xc
mov ecx, dword [esp + 4]
cmp ecx, 1
mov eax, 7
cmovne eax, ecx
jmp 0x6b44574d
lea eax, [esp + 0xb8]
push 0x100
push eax
push edi
call fcn.6b481730
add esp, 0xc
push eax
lea eax, [esp + 0x24e]
push eax
push str.Immediate_connect_fail_for__s:__s
push ebx
call fcn.6b4767f0
add esp, 0x10
mov dword [ebx + 0x89c], edi
push dword [esp + 8]
push esi
push ebx
call fcn.6b444b10
add esp, 0xc
mov eax, 7
jmp 0x6b44574d