Function at 0x661040
Capabilities:
Convert ip address from string

Disassembly:
sub esp, 0x60
mov eax, dword [0x7c2580]
xor eax, esp
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x74]
push ebx
mov ebx, dword [esp + 0x6c]
mov ecx, ebx
push ebp
push esi
mov esi, dword [esp + 0x78]
push edi
mov edi, dword [esp + 0x74]
lea edx, [ecx + 1]
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], 0xffffffff
mov ebp, dword [edi + 0x18]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x661080
sub ecx, edx
cmp ecx, 7
jb 0x6610e3
lea esi, [ebx + ecx]
lea eax, [esi - 6]
push str..onion
push eax
call fcn.0065d8f0
add esp, 8
test eax, eax
jne 0x6610bb
lea eax, [esi - 7]
push str..onion.
push eax
call fcn.0065d8f0
add esp, 8
test eax, eax
je 0x6610df
push str.Not_resolving_.onion_address__RFC_7686_
push edi
call fcn.00656dd0
add esp, 8
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x5c]
xor ecx, esp
call fcn.006d66cb
add esp, 0x60
ret
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
mov dword [eax], 0
mov byte [ebp + 0x259], 0
cmp dword [edi + 0x84], 0
je 0x66110a
push 2
push 3
push edi
call fcn.0065e7e0
add esp, 0xc
push esi
push ebx
push edi
call fcn.00661670
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
je 0x66113b
push ebx
push str.Hostname__s_was_found_in_DNS_cache
push edi
call fcn.00656ea0
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [esp + 0x14], 0
inc dword [eax + 0x10]
cmp dword [edi + 0x84], 0
je 0x66114f
push 3
push edi
call fcn.0065e820
add esp, 8
cmp dword [esp + 0x10], 0
jne 0x66150c
cmp dword [edi + 0x63c], 0
mov dword [esp + 0x1c], 0
je 0x6611a2
push 1
push edi
call fcn.00645920
push dword [edi + 0x640]
mov eax, dword [edi + 0x63c]
push 0
push dword [edi + 0x910]
call eax
push 0
push edi
mov esi, eax
call fcn.00645920
add esp, 0x1c
test esi, esi
jne 0x6610c9
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x24]
push eax
push ebx
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x6611bf
push esi
push ebx
lea eax, [esp + 0x2c]
push eax
push 2
jmp 0x6611da
lea eax, [esp + 0x4c]
push eax
push ebx
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x6611f1
push esi
push ebx
lea eax, [esp + 0x54]
push eax
push 0x17
call fcn.0066abd0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x6610c9
jmp 0x66147b
cmp byte [ebp + 0x4d3], 2
jne 0x661230
mov eax, dword [edi + 0x7c]
cmp byte [eax + 0x114], 0
jne 0x661220
push 0
call fcn.00660ae0
add esp, 4
test al, al
mov eax, dword [edi + 0x7c]
setne cl
inc cl
mov byte [eax + 0x114], cl
mov eax, dword [edi + 0x7c]
cmp byte [eax + 0x114], 2
jne 0x6610c9
push str.localhost
push ebx
call fcn.0065d8f0
add esp, 8
test eax, eax
jne 0x6612f0
mov ecx, ebx
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x661250
sub ecx, edx
cmp ecx, 0xa
jb 0x661277
lea eax, [ebx - 0xa]
push 0xa
add eax, ecx
push eax
push str..localhost
call fcn.0065d950
add esp, 0xc
test eax, eax
jne 0x6612f0
cmp byte [esp + 0x80], 0
je 0x661299
cmp byte [edi + 0x69f], 0
je 0x661299
lea eax, [esp + 0x1c]
push eax
push esi
push ebx
push edi
call fcn.00683f20
jmp 0x6612b8
push ebp
push edi
call fcn.0068cd90
add esp, 8
test al, al
je 0x6610c9
lea eax, [esp + 0x1c]
push eax
push esi
push ebx
push edi
call fcn.0066afb0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x66147b
cmp dword [esp + 0x1c], 0
je 0x66150c
mov eax, dword [edi + 0x18]
cmp byte [eax + 0x259], 0
lea eax, [esp + 0x10]
push eax
push edi
je 0x6614db
call fcn.00684060
jmp 0x6614e0
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x6612f5
mov eax, 2
xorps xmm0, xmm0
mov word [esp + 0x5c], ax
sub esi, ecx
mov eax, dword [esp + 0x18]
movzx eax, ax
push eax
movlpd qword [esp + 0x68], xmm0
mov dword [esp + 0x30], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x5e], ax
lea eax, [esp + 0x28]
push eax
push str.127.0.0.1
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jl 0x6612c5
mov eax, dword [esp + 0x28]
mov dword [esp + 0x60], eax
lea eax, [esi + 0x31]
push eax
push 1
call dword [0x7c2000]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x6612c5
movups xmm0, xmmword [esp + 0x5c]
lea ecx, [ebp + 0x20]
mov dword [ebp], 0
mov dword [ebp + 0x18], ecx
mov edx, ebx
mov dword [ebp + 4], 2
mov dword [ebp + 8], 1
mov dword [ebp + 0xc], 6
mov dword [ebp + 0x10], 0x10
movups xmmword [ecx], xmm0
add ecx, 0x10
mov dword [ebp + 0x14], ecx
nop dword [eax]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x6613a0
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6613b3
sub ecx, edx
lea eax, [ecx + 0x3d]
push eax
push 1
call dword [0x7c2000]
mov esi, eax
add esp, 8
test esi, esi
je 0x661479
push dword [esp + 0x2c]
mov eax, 0x17
mov word [esp + 0x34], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x32], ax
lea eax, [esp + 0x5c]
push eax
push 0x796164
push 0x17
mov dword [esp + 0x40], 0
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jl 0x661479
movups xmm1, xmmword [esp + 0x5c]
lea eax, [esi + 0x20]
mov dword [esi], 0
mov dword [esi + 4], 0x17
lea ecx, [eax + 0x1c]
movups xmmword [esp + 0x38], xmm1
mov dword [esi + 8], 1
mov edx, ebx
movups xmm0, xmmword [esp + 0x30]
mov dword [esi + 0xc], 6
mov dword [esi + 0x10], 0x1c
mov dword [esi + 0x1c], 0
mov dword [esi + 0x18], eax
movups xmmword [eax], xmm0
unpckhpd xmm1, xmm1
movq qword [eax + 0x10], xmm1
mov dword [eax + 0x18], 0
mov dword [esi + 0x14], ecx
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x661466
mov dword [esi + 0x1c], ebp
jmp 0x66147b
mov esi, ebp
cmp dword [edi + 0x84], 0
je 0x661491
push 2
push 3
push edi
call fcn.0065e7e0
add esp, 0xc
push dword [esp + 0x18]
push 0
push ebx
push esi
push edi
call fcn.00660650
add esp, 0x14
mov dword [esp + 0x10], eax
cmp dword [edi + 0x84], 0
je 0x6614be
push 3
push edi
call fcn.0065e820
mov eax, dword [esp + 0x18]
add esp, 8
test eax, eax
jne 0x6614cd
push esi
call fcn.0066aa00
add esp, 4
jmp 0x66150c
push eax
push edi
xor esi, esi
call fcn.00661870
add esp, 8
jmp 0x661510
call fcn.0064b160
mov esi, eax
add esp, 8
mov eax, dword [esp + 0x10]
test eax, eax
je 0x6614f7
push eax
push edi
call fcn.00661870
add esp, 8
test esi, esi
jne 0x6610c9
xor ecx, ecx
cmp dword [esp + 0x10], ecx
sete cl
mov dword [esp + 0x14], ecx
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
pop edi
mov dword [eax], ecx
mov eax, esi
mov ecx, dword [esp + 0x68]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.006d66cb
add esp, 0x60
ret