Function at 0x10178630
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x10373f78]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x30], 0xffffffff
mov eax, dword [edi + 0xc]
mov dword [ecx], 0
mov dword [ebp - 0x34], eax
mov byte [eax + 0x257], 0
cmp dword [edi + 0x78], 0
je 0x10178682
push 2
push 3
push edi
call fcn.10177280
add esp, 0xc
push esi
push ebx
push edi
call fcn.10178c10
add esp, 0xc
mov dword [ebp - 0x28], eax
test eax, eax
je 0x101786b0
push ebx
push str.Hostname__s_was_found_in_DNS_cache
push edi
call fcn.10170c50
mov eax, dword [ebp - 0x28]
add esp, 0xc
mov dword [ebp - 0x30], 0
inc dword [eax + 0x10]
cmp dword [edi + 0x78], 0
je 0x101786c1
push 3
push edi
call fcn.101772c0
add esp, 8
cmp dword [ebp - 0x28], 0
jne 0x10178a50
cmp dword [edi + 0x670], 0
mov dword [ebp - 0x38], 0
je 0x10178711
push 1
push edi
call fcn.101610e0
push dword [edi + 0x674]
mov eax, dword [edi + 0x670]
push 0
push dword [edi + 0x960]
call eax
push 0
push edi
mov esi, eax
call fcn.101610e0
add esp, 0x1c
test esi, esi
jne 0x10178a31
mov esi, dword [ebp - 0x2c]
lea eax, [ebp - 0x3c]
push eax
push ebx
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x1017873c
push esi
push ebx
lea eax, [ebp - 0x3c]
push eax
push 2
call fcn.10184f20
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x101789db
lea eax, [ebp - 0x24]
push eax
push ebx
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x10178769
push dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
push ebx
push eax
push 0x17
call fcn.10184f20
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x101789db
mov esi, dword [ebp - 0x34]
cmp byte [esi + 0x456], 2
jne 0x101787ab
mov eax, dword [edi + 0x70]
cmp byte [eax + 0xe0], 0
jne 0x1017879e
push 0
call fcn.10177fb0
add esp, 4
test al, al
mov eax, dword [edi + 0x70]
setne cl
inc cl
mov byte [eax + 0xe0], cl
mov eax, dword [edi + 0x70]
cmp byte [eax + 0xe0], 2
jne 0x10178a31
push str.localhost
push ebx
call fcn.10176b40
add esp, 8
test eax, eax
jne 0x10178862
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101787c6
sub ecx, edx
cmp ecx, 0xa
jb 0x101787ed
lea eax, [ebx - 0xa]
push 0xa
add eax, ecx
push eax
push str..localhost
call fcn.10176b90
add esp, 0xc
test eax, eax
jne 0x10178862
cmp byte [ebp + 0x14], 0
je 0x1017880c
cmp byte [edi + 0x6be], 0
je 0x1017880c
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x2c]
push ebx
push edi
call fcn.1018ece0
jmp 0x1017882c
push esi
push edi
call fcn.1018ecc0
add esp, 8
test al, al
je 0x10178a31
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x2c]
push ebx
push edi
call fcn.101852f0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x101789db
cmp dword [ebp - 0x38], 0
je 0x10178a50
mov eax, dword [edi + 0xc]
cmp byte [eax + 0x257], 0
lea eax, [ebp - 0x28]
push eax
push edi
je 0x10178a25
call fcn.1018ee00
jmp 0x10178a2a
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x10178867
mov eax, 2
xorps xmm0, xmm0
mov word [ebp - 0x14], ax
sub esi, ecx
mov eax, dword [ebp - 0x2c]
movzx eax, ax
push eax
movlpd qword [ebp - 0xc], xmm0
mov dword [ebp - 0x44], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x40]
push eax
push str.127.0.0.1
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jl 0x10178839
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x10], eax
lea eax, [esi + 0x31]
push 1
push eax
call dword [0x10373020]
mov esi, eax
add esp, 8
test esi, esi
je 0x10178839
movups xmm0, xmmword [ebp - 0x14]
lea eax, [esi + 0x20]
mov dword [esi], 0
mov dword [esi + 4], 2
lea ecx, [eax + 0x10]
mov dword [esi + 8], 1
mov edx, ebx
mov dword [esi + 0xc], 6
mov dword [esi + 0x10], 0x10
mov dword [esi + 0x18], eax
movups xmmword [eax], xmm0
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 0x10178901
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10178914
sub ecx, edx
push 1
lea eax, [ecx + 0x3d]
push eax
call dword [0x10373020]
add esp, 8
mov dword [ebp - 0x34], eax
test eax, eax
je 0x101789d8
push dword [ebp - 0x44]
mov eax, 0x17
mov word [ebp - 0x64], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x62], ax
lea eax, [ebp - 0x14]
push eax
push 0x102c562c
push 0x17
mov dword [ebp - 0x60], 0
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jge 0x1017896e
xor eax, eax
jmp 0x101789d8
movups xmm1, xmmword [ebp - 0x14]
mov edx, dword [ebp - 0x34]
lea eax, [edx + 0x20]
movups xmmword [ebp - 0x5c], xmm1
lea ecx, [eax + 0x1c]
movups xmm0, xmmword [ebp - 0x64]
mov dword [edx], 0
mov dword [edx + 4], 0x17
mov dword [edx + 8], 1
mov dword [edx + 0xc], 6
mov dword [edx + 0x10], 0x1c
mov dword [edx + 0x1c], 0
mov dword [edx + 0x18], eax
movups xmmword [eax], xmm0
unpckhpd xmm1, xmm1
movq qword [eax + 0x10], xmm1
mov dword [eax + 0x18], 0
mov dword [edx + 0x14], ecx
mov edx, ebx
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x101789c7
mov eax, dword [ebp - 0x34]
mov dword [esi + 0x1c], eax
cmp dword [edi + 0x78], 0
je 0x101789ee
push 2
push 3
push edi
call fcn.10177280
add esp, 0xc
push dword [ebp - 0x2c]
push ebx
push esi
push edi
call fcn.10177b70
add esp, 0x10
mov dword [ebp - 0x28], eax
cmp dword [edi + 0x78], 0
je 0x10178a10
push 3
push edi
call fcn.101772c0
add esp, 8
cmp dword [ebp - 0x28], 0
jne 0x10178a21
push esi
call fcn.10184d50
add esp, 4
jmp 0x10178a50
xor eax, eax
jmp 0x10178a53
call fcn.101667e0
add esp, 8
test eax, eax
je 0x10178a45
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102649e4
mov esp, ebp
pop ebp
ret
xor ecx, ecx
cmp dword [ebp - 0x28], ecx
sete cl
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x28]
pop edi
pop esi
mov dword [edx], ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.102649e4
mov esp, ebp
pop ebp
ret