Function at 0x5af740
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], 0xffffffff
lea edx, [ecx + 1]
mov eax, dword [edi + 0x18]
mov dword [ebp - 8], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5af761
sub ecx, edx
cmp ecx, 7
jb 0x5af7b4
lea esi, [ecx + ebx]
lea eax, [esi - 6]
push str..onion
push eax
call fcn.005b18a0
add esp, 8
test eax, eax
jne 0x5af79c
lea eax, [esi - 7]
push str..onion.
push eax
call fcn.005b18a0
add esp, 8
test eax, eax
je 0x5af7b4
push str.Not_resolving_.onion_address__RFC_7686_
push edi
call fcn.005aa770
add esp, 8
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x18]
mov dword [eax], 0
mov eax, dword [ebp - 8]
mov byte [eax + 0x1be], 0
cmp dword [edi + 0x84], 0
je 0x5af7dd
push 2
push 3
push edi
call fcn.005952f0
add esp, 0xc
mov esi, dword [ebp + 0x10]
push esi
push ebx
push edi
call fcn.005afdd0
add esp, 0xc
mov dword [ebp + 8], eax
test eax, eax
je 0x5af80e
push ebx
push str.Hostname__s_was_found_in_DNS_cache
push edi
call fcn.005aa810
mov eax, dword [ebp + 8]
add esp, 0xc
mov dword [ebp - 4], 0
inc dword [eax + 0x10]
cmp dword [edi + 0x84], 0
je 0x5af822
push 3
push edi
call fcn.00595330
add esp, 8
cmp dword [ebp + 8], 0
jne 0x5afbe5
cmp dword [edi + 0x634], 0
mov dword [ebp - 0xc], 0
je 0x5af872
push 1
push edi
call fcn.00599850
push dword [edi + 0x638]
mov eax, dword [edi + 0x634]
push 0
push dword [edi + 0x964]
call eax
push 0
push edi
mov esi, eax
call fcn.00599850
add esp, 0x1c
test esi, esi
jne 0x5af7aa
mov esi, dword [ebp + 0x10]
lea eax, [ebp - 0x10]
push eax
push ebx
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x5af88d
push esi
push ebx
lea eax, [ebp - 0x10]
push eax
push 2
jmp 0x5af8a6
lea eax, [ebp - 0x38]
push eax
push ebx
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x5af8c2
push esi
push ebx
lea eax, [ebp - 0x38]
push eax
push 0x17
call fcn.005bc450
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x5afb39
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
cmp byte [eax + 0x25f], 2
jne 0x5af904
mov eax, dword [edi + 0x7c]
cmp byte [eax + 0x104], 0
jne 0x5af8f7
push 0
call fcn.005af270
add esp, 4
test al, al
mov eax, dword [edi + 0x7c]
setne cl
inc cl
mov byte [eax + 0x104], cl
mov eax, dword [edi + 0x7c]
cmp byte [eax + 0x104], 2
jne 0x5af7aa
push str.localhost
push ebx
call fcn.005b18a0
add esp, 8
test eax, eax
jne 0x5af9ba
mov ecx, ebx
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5af920
sub ecx, edx
cmp ecx, 0xa
jb 0x5af947
lea eax, [ebx - 0xa]
push 0xa
add eax, ecx
push eax
push str..localhost
call fcn.005b1900
add esp, 0xc
test eax, eax
jne 0x5af9ba
cmp byte [ebp + 0x14], 0
je 0x5af964
cmp byte [edi + 0x688], 0
je 0x5af964
lea eax, [ebp - 0xc]
push eax
push esi
push ebx
push edi
call fcn.005cab50
jmp 0x5af984
push dword [ebp - 8]
push edi
call fcn.005cab30
add esp, 8
test al, al
je 0x5af7aa
lea eax, [ebp - 0xc]
push eax
push esi
push ebx
push edi
call fcn.005bc800
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x5afb39
cmp dword [ebp - 0xc], 0
je 0x5afbe5
mov eax, dword [edi + 0x18]
cmp byte [eax + 0x1be], 0
lea eax, [ebp + 8]
push eax
push edi
je 0x5afbb7
call fcn.005cac90
jmp 0x5afbbc
mov esi, ebx
lea ecx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x5af9c0
mov eax, 2
xorps xmm0, xmm0
mov word [ebp - 0x28], ax
sub esi, ecx
mov eax, dword [ebp + 0x10]
movzx eax, ax
push eax
movlpd qword [ebp - 0x20], xmm0
mov dword [ebp - 0x18], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x26], ax
lea eax, [ebp - 0x14]
push eax
push str.127.0.0.1
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jl 0x5af991
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
lea eax, [esi + 0x31]
push eax
push 1
call dword [0x8e2618]
mov edx, eax
add esp, 8
mov dword [ebp - 8], edx
test edx, edx
je 0x5af991
movups xmm0, xmmword [ebp - 0x28]
lea eax, [edx + 0x20]
mov dword [edx], 0
mov dword [edx + 4], 2
lea ecx, [eax + 0x10]
mov dword [edx + 8], 1
mov dword [edx + 0xc], 6
mov dword [edx + 0x10], 0x10
mov dword [edx + 0x18], eax
movups xmmword [eax], xmm0
mov dword [edx + 0x14], ecx
mov edx, ebx
nop dword [eax]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x5afa60
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5afa73
sub ecx, edx
lea eax, [ecx + 0x3d]
push eax
push 1
call dword [0x8e2618]
mov esi, eax
add esp, 8
test esi, esi
je 0x5afb36
push dword [ebp - 0x18]
mov eax, 0x17
mov word [ebp - 0x54], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x52], ax
lea eax, [ebp - 0x28]
push eax
push 0x786398
push 0x17
mov dword [ebp - 0x50], 0
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jl 0x5afb36
movups xmm1, xmmword [ebp - 0x28]
lea eax, [esi + 0x20]
mov dword [esi], 0
mov dword [esi + 4], 0x17
lea ecx, [eax + 0x1c]
movups xmmword [ebp - 0x4c], xmm1
mov dword [esi + 8], 1
mov edx, ebx
movups xmm0, xmmword [ebp - 0x54]
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
nop
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x5afb20
mov eax, dword [ebp - 8]
mov dword [esi + 0x1c], eax
jmp 0x5afb39
mov esi, dword [ebp - 8]
cmp dword [edi + 0x84], 0
je 0x5afb4f
push 2
push 3
push edi
call fcn.005952f0
add esp, 0xc
push dword [ebp + 0x10]
push 0
push ebx
push esi
push edi
call fcn.005aee80
add esp, 0x14
mov dword [ebp + 8], eax
cmp dword [edi + 0x84], 0
je 0x5afb79
push 3
push edi
call fcn.00595330
mov eax, dword [ebp + 8]
add esp, 8
test eax, eax
jne 0x5afb9a
push esi
call fcn.005bc280
mov eax, dword [ebp + 0x18]
add esp, 4
mov esi, dword [ebp - 4]
mov ecx, dword [ebp + 8]
pop edi
mov dword [eax], ecx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
push edi
xor esi, esi
call fcn.005affe0
mov eax, dword [ebp + 0x18]
add esp, 8
mov ecx, dword [ebp + 8]
pop edi
mov dword [eax], ecx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0059eca0
mov esi, eax
add esp, 8
mov eax, dword [ebp + 8]
test eax, eax
je 0x5afbd2
push eax
push edi
call fcn.005affe0
add esp, 8
test esi, esi
jne 0x5af7aa
xor ecx, ecx
cmp dword [ebp + 8], ecx
sete cl
mov dword [ebp - 4], ecx
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp - 4]
mov ecx, dword [ebp + 8]
pop edi
mov dword [eax], ecx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret